_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 |
|---|---|---|---|---|---|---|---|---|
b47f6d920b830916807bba560e3dc66a876ddbab52fed8c2ac43c93b47ea57d2 | lisp/de.setf.xml | schema.lisp | 20100513T131919Z00
;;; from #<doc-node +oil #x2A825416>
(common-lisp:in-package "+oil#")
(de.setf.resource.schema:defclass |Class|
(|-schema#|:|Class|)
nil)
(de.setf.resource.schema:defclass |Datatype|
(|-schema#|:... | null | https://raw.githubusercontent.com/lisp/de.setf.xml/827681c969342096c3b95735d84b447befa69fa6/namespaces/www-daml-org/2001/03/daml-oil/schema.lisp | lisp | from #<doc-node +oil #x2A825416> | 20100513T131919Z00
(common-lisp:in-package "+oil#")
(de.setf.resource.schema:defclass |Class|
(|-schema#|:|Class|)
nil)
(de.setf.resource.schema:defclass |Datatype|
(|-schema#|:|Class|)
... |
1555535929e180bb9cadc0f510ce913004916a97a3d2f76cd1984500664a4980 | janestreet/rpc_parallel | qtest.ml | open Core
open Poly
open Async
open Qtest_deprecated.Std
module Add_map_function = Rpc_parallel.Map_reduce.Make_map_function_with_init (struct
module Param = Int
module Input = Int
module Output = Int
type state_type = int
let init = return
let map state x = return (x + state)
end)
module ... | null | https://raw.githubusercontent.com/janestreet/rpc_parallel/28bffcaa8a9fb73c321a616e724cf88efd38870f/test/qtest.ml | ocaml | open Core
open Poly
open Async
open Qtest_deprecated.Std
module Add_map_function = Rpc_parallel.Map_reduce.Make_map_function_with_init (struct
module Param = Int
module Input = Int
module Output = Int
type state_type = int
let init = return
let map state x = return (x + state)
end)
module ... | |
ff14fe39dadb7b1aab5a40b0bc1e0ca7fc2992abf43ca5c3cd52d9ec459469b9 | puffnfresh/haskell-jwt | JWTTestsCompat.hs | # LANGUAGE BangPatterns , OverloadedStrings , ScopedTypeVariables , TemplateHaskell #
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
# OPTIONS_GHC -fno - warn - missing - signatures #
# OPTIONS_GHC -fno - warn - orphans #
{-
- Turn of deprecation warnings as these tests deliberately use
- deprecated types/... | null | https://raw.githubusercontent.com/puffnfresh/haskell-jwt/260f9c358dc11ef3930653dd0ae3f3373fbd1c0c/tests/src/Web/JWTTestsCompat.hs | haskell | # LANGUAGE TypeSynonymInstances, FlexibleInstances #
- Turn of deprecation warnings as these tests deliberately use
- deprecated types/functions to ensure that the library is backward compatible
| # LANGUAGE BangPatterns , OverloadedStrings , ScopedTypeVariables , TemplateHaskell #
# OPTIONS_GHC -fno - warn - missing - signatures #
# OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_GHC -fno - warn - warnings - deprecations #
module Web.JWTTestsCompat
(
main
, defaultTestGroup
) where
import Tes... |
55138e73a7351d31b97b1d733f4015dfea97afabaf0c85c8961e15e64729ad36 | koka-lang/koka | Printer.hs | ------------------------------------------------------------------------------
Copyright 2012 - 2021 , Microsoft Research , .
--
-- This is free software; you can redistribute it and/or modify it under the
terms of the Apache License , Version 2.0 . A copy of the License can be
-- found in the LICENSE file at the... | null | https://raw.githubusercontent.com/koka-lang/koka/50cd25fdfb0f917c2908ac12df14dd628547e0ad/src/Lib/Printer.hs | haskell | ----------------------------------------------------------------------------
This is free software; you can redistribute it and/or modify it under the
found in the LICENSE file at the root of this distribution.
---------------------------------------------------------------------------
Module for portable contr... | Copyright 2012 - 2021 , Microsoft Research , .
terms of the Apache License , Version 2.0 . A copy of the License can be
module Lib.Printer(
Color(..)
, Printer( write, writeText, writeLn, writeTextLn, flush,
withColor, withBackColor, withReverse, withUnderline
, setColor , setBa... |
470ac180791ec38b0d53f4a89369740829074d271a96573c7e00f2c9d75d3e68 | jeffshrager/biobike | accessors.lisp | -*- Package : aframes ; mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
(in-package :aframes)
;;; +=========================================================================+
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
;;; | ... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Sframes/accessors.lisp | lisp | mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
+=========================================================================+
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software and as... |
(in-package :aframes)
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
| " Software " ) , to deal in the Software without restriction , including |
| distribute , sublicense , and/or sell copies of the Software , and to |
| permit persons to whom the Software is furnished to do so , subject t... |
03864a2a4e9cc08d9dc2bfcc590fcc22073d962a1a4f17ffe536164243452a56 | bartima3us/gen_bittorrent | gen_bittorrent_impl.erl | %%%-------------------------------------------------------------------
@author
( C ) 2018 ,
%%% @doc
%%%
%%% @end
Created : 21 . Jul 2019 19.29
%%%-------------------------------------------------------------------
-module(gen_bittorrent_impl).
-author("bartimaeus").
-behaviour(gen_bittorrent).
%% API
-expor... | null | https://raw.githubusercontent.com/bartima3us/gen_bittorrent/e06c99a042c9312f37b75162171606cd8f24c576/examples/gen_bittorrent_impl.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
| @author
( C ) 2018 ,
Created : 21 . Jul 2019 19.29
-module(gen_bittorrent_impl).
-author("bartimaeus").
-behaviour(gen_bittorrent).
-export([
start_link/0
]).
-export([
init/1,
peer_handshaked/2,
peer_unchoked/2,
peer_choked/2,
block_requested/4,
block_downloaded/5,
piece_com... |
6f3c0c46cdb247151c882e4131f6e3c0fef20bf2d05d05e8d30ffc8f3d209fc3 | clash-lang/clash-compiler | T2334.hs | module T2334 where
import qualified Prelude as P
import Clash.Explicit.Prelude
import Clash.Driver
import Clash.Driver.Manifest
import GHC.Stack
import System.Environment
import System.FilePath
import qualified Control.Exception as Exception
topEntity ::
Clock System ->
Reset System ->
Signal System Int ->
... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/b4b326e4a1b1ba739bf430540fe2f8bc7238e144/tests/shouldwork/Issues/T2334.hs | haskell | # NOINLINE topEntity # | module T2334 where
import qualified Prelude as P
import Clash.Explicit.Prelude
import Clash.Driver
import Clash.Driver.Manifest
import GHC.Stack
import System.Environment
import System.FilePath
import qualified Control.Exception as Exception
topEntity ::
Clock System ->
Reset System ->
Signal System Int ->
... |
d543f0d6c25d290cd4c00e12da622ebc53e6ecac1b78d53e3a9bbc7862c6bc0f | processone/xmpp | xep0328.erl | Created automatically by XML generator ( fxml_gen.erl )
%% Source: xmpp_codec.spec
-module(xep0328).
-compile(export_all).
do_decode(<<"jid">>, <<"urn:xmpp:jidprep:0">>, El,
Opts) ->
decode_jidprep(<<"urn:xmpp:jidprep:0">>, Opts, El);
do_decode(Name, <<>>, _, _) ->
erlang:error({xmpp_codec, {miss... | null | https://raw.githubusercontent.com/processone/xmpp/88c43c3cf5843a8a0f76eac390980a3a39c972dd/src/xep0328.erl | erlang | Source: xmpp_codec.spec | Created automatically by XML generator ( fxml_gen.erl )
-module(xep0328).
-compile(export_all).
do_decode(<<"jid">>, <<"urn:xmpp:jidprep:0">>, El,
Opts) ->
decode_jidprep(<<"urn:xmpp:jidprep:0">>, Opts, El);
do_decode(Name, <<>>, _, _) ->
erlang:error({xmpp_codec, {missing_tag_xmlns, Name}});
do_... |
cac09f51e49afae4ff4cfed3e378b203319f89a4b8a026039b4821c0c5778c25 | functionally/mantis | Bech32.hs |
module Mantra.Command.Bech32 (
command
, mainDecode
, mainEncode
) where
import Control.Monad.IO.Class (MonadIO)
import Mantra.Command.Types (Mantra(Bech32Decode, Bech32Encode))
import Mantra.Types (MantraM, foistMantraEither, foistMantraMaybe, printMantra)
import qualified Codec.Binary.Bech32 as B... | null | https://raw.githubusercontent.com/functionally/mantis/1cd121202452dcc1bce56ed4b4f41f0e880c9d04/app/Mantra/Command/Bech32.hs | haskell |
module Mantra.Command.Bech32 (
command
, mainDecode
, mainEncode
) where
import Control.Monad.IO.Class (MonadIO)
import Mantra.Command.Types (Mantra(Bech32Decode, Bech32Encode))
import Mantra.Types (MantraM, foistMantraEither, foistMantraMaybe, printMantra)
import qualified Codec.Binary.Bech32 as B... | |
0483c32914d95caa6f13b73831a5c7c14ab21ddd737d0104020c02eda7147f59 | wlitwin/graphv | ogl_intf.ml | module type Buffer = Sigs.BufferS
module type S = sig
module Buffer : Buffer
module Dyn : sig
type t = private {
mutable arr : Buffer.Float.t;
mutable size : int;
}
type underlying = Buffer.Float.t
val create : int -> t
val clear : t -> unit
... | null | https://raw.githubusercontent.com/wlitwin/graphv/d0a09575c5ff5ee3727c222dd6130d22e4cf62d9/gles3/core/ogl_intf.ml | ocaml | module type Buffer = Sigs.BufferS
module type S = sig
module Buffer : Buffer
module Dyn : sig
type t = private {
mutable arr : Buffer.Float.t;
mutable size : int;
}
type underlying = Buffer.Float.t
val create : int -> t
val clear : t -> unit
... | |
4f4cf905b3a0b8c83de3075446723d4861a1777fff778f69295ae7f084263028 | kudu-dynamics/blaze | SolverSpec.hs | # OPTIONS_GHC -fno - warn - incomplete - uni - patterns #
HLINT ignore " Evaluate "
HLINT ignore " Use head "
HLINT ignore " Reduce duplication "
HLINT ignore " Eta reduce "
module Blaze.Pil.SolverSpec where
import Blaze.Prelude hiding (const, numerator, denominator)
import Blaze.Pil.Solver hiding (pilVar)
i... | null | https://raw.githubusercontent.com/kudu-dynamics/blaze/2220a07d372a817e79525ec2707984b189fe98c9/test/general/Blaze/Pil/SolverSpec.hs | haskell | | Get a concrete variable from solver output.
x >= y && x < y + 0.0000.....
. Pil.VAR . Pil.VarOp $ pilVar "a"
. Pil.VAR . Pil.VarOp $ pilVar "a"
TODO: is this correct? | # OPTIONS_GHC -fno - warn - incomplete - uni - patterns #
HLINT ignore " Evaluate "
HLINT ignore " Use head "
HLINT ignore " Reduce duplication "
HLINT ignore " Eta reduce "
module Blaze.Pil.SolverSpec where
import Blaze.Prelude hiding (const, numerator, denominator)
import Blaze.Pil.Solver hiding (pilVar)
i... |
c3a96c753d642bd3477235ed65f6022a942a5747ca1dd4084ec71d9219ab8d45 | RRethy/nvim-treesitter-textsubjects | textsubjects-container-outer.scm | (([
(method)
(singleton_method)
(module)
(class)
(singleton_class)
] @_start @_end)
(#make-range! "range" @_start @_end))
; sorbet type *annotation*
(((call method: (identifier) @_start) . [(singleton_method) (method)] @_end)
(#match? @_start "sig")
(#make-range! "range" @_start @_end))
| null | https://raw.githubusercontent.com/RRethy/nvim-treesitter-textsubjects/b18ab0e2fa677bc2f58062233ba5f7914a01e53f/queries/ruby/textsubjects-container-outer.scm | scheme | sorbet type *annotation* | (([
(method)
(singleton_method)
(module)
(class)
(singleton_class)
] @_start @_end)
(#make-range! "range" @_start @_end))
(((call method: (identifier) @_start) . [(singleton_method) (method)] @_end)
(#match? @_start "sig")
(#make-range! "range" @_start @_end))
|
e88cea7a90c697ec38d2393b9a432114261e5caee1530cad49eaa28a66cf1fe5 | zotonic/zotonic | controller_log_client.erl | @author < >
2019 < >
%% @doc Log client side events
Copyright 2019
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable ... | null | https://raw.githubusercontent.com/zotonic/zotonic/1bb4aa8a0688d007dd8ec8ba271546f658312da8/apps/zotonic_mod_logging/src/controllers/controller_log_client.erl | erlang | @doc Log client side events
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the spe... | @author < >
2019 < >
Copyright 2019
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(controller_log_client).
-author("Marc Worrell <>").
-export([
service_available/1,
allowed_methods/1,
... |
1779212483c9f3089241cb887e3249e6b9f5b66ce44b3a822bd19d1c09f75fec | charlieg/Sparser | pause.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
copyright ( c ) 1994 - 1996 -- all rights reserved
;;;
;;; File: "pause"
Module : " interface;workbench : "
Version : 0.1 January 1995
initiated 6/10/94 v2.3 . Added button 7/27 . Tweeked synch . code
to allow treetop t... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/interface/workbench/pause.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
File: "pause"
start edge.
---------------
workbench hook
---------------
action on *wb/pause-button*
called from Put-parse-into-pause
-------------------------------------
-------------------------------------
called from End-SGML-section
... | copyright ( c ) 1994 - 1996 -- all rights reserved
Module : " interface;workbench : "
Version : 0.1 January 1995
initiated 6/10/94 v2.3 . Added button 7/27 . Tweeked synch . code
to allow treetop trace without the Workbench up .
0.1 ( 1/9/95 ) adapted Synchronize / should - we - pause ? t... |
600fab7af76cf4c8540ac28dbafe95f8f41bba0838d51ee5831979b9b377458e | McCLIM/McCLIM | with-output-to-drawing-stream.lisp | (in-package #:climi)
(defmacro with-output-to-drawing-stream ((stream backend destination &rest args) &body body)
(with-gensyms (cont)
`(flet ((,cont (,stream) ,@body))
(declare (dynamic-extent (function ,cont)))
(invoke-with-output-to-drawing-stream (function ,cont) ,backend ,destination ,@args)))... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/d49fef5c2bb1307a006cdadfc4061e0a6b0fff79/Core/windowing/with-output-to-drawing-stream.lisp | lisp | (in-package #:climi)
(defmacro with-output-to-drawing-stream ((stream backend destination &rest args) &body body)
(with-gensyms (cont)
`(flet ((,cont (,stream) ,@body))
(declare (dynamic-extent (function ,cont)))
(invoke-with-output-to-drawing-stream (function ,cont) ,backend ,destination ,@args)))... | |
45b67d9db34239fd72025cba319d43cff824092ebc6fed553aa3e3881278dfd7 | ardoq/analytics-clj | analytics_clj.clj | (ns ardoq.analytics-clj
(:import
[com.github.segmentio AnalyticsClient Config Defaults]
[com.github.segmentio.models Traits Context Props Options]))
(def context
(doto (Context.)
(.put "library" "analytics-clj")))
(defn- map-keys
"Maps a function over the keys of an associative collection."
[f col... | null | https://raw.githubusercontent.com/ardoq/analytics-clj/4bf86696d81729d543cba8ad1b0208b367421988/src/ardoq/analytics_clj.clj | clojure | (ns ardoq.analytics-clj
(:import
[com.github.segmentio AnalyticsClient Config Defaults]
[com.github.segmentio.models Traits Context Props Options]))
(def context
(doto (Context.)
(.put "library" "analytics-clj")))
(defn- map-keys
"Maps a function over the keys of an associative collection."
[f col... | |
1e680998812b94f2450b7ad007b8fac221ef4fdd4a3cdeba8992e8ecb4931e7d | Liutos/Project-Euler | pro6.lisp | (defun difference (n)
(- (expt (/ (* n (1+ n)) 2) 2)
(loop for i from 1 upto n summing (expt i 2)))) | null | https://raw.githubusercontent.com/Liutos/Project-Euler/dd59940099ae37f971df1d74c4b7c78131fd5470/lisp/pro6.lisp | lisp | (defun difference (n)
(- (expt (/ (* n (1+ n)) 2) 2)
(loop for i from 1 upto n summing (expt i 2)))) | |
16724d9a9a8a4d43a3e5753fd05494f3906a775e3beadc34a9291b18e9f39a05 | brendanhay/gogol | CreateContact.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/77394c4e0f5bd729e6fe27119701c45f9d5e1e9a/lib/services/gogol-people/gen/Gogol/People/CreateContact.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
* Resource
** Constructing a Request
| A resource alias for @people.people.createContact@ method which the
'PeoplePeopleCreateContact' request conforms to.
/See:/ 'newPeoplePeopleCreateContact' smart constructor.
| V1 error... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
7e98d082691c3f507544727fa74adc56aa9543ef44805cd894366007bc1b8983 | xh4/web-toolkit | closer-mop-packages.lisp | (in-package :cl-user)
(defpackage #:closer-mop
(:use #:common-lisp #+lispworks #:lispworks)
(:nicknames #:c2mop)
#+(or allegro clozure lispworks mcl)
(:shadow #:standard-class)
#+(or allegro clisp clozure ecl clasp lispworks sbcl)
(:shadow #:defgeneric #:defmethod #:standard-generic-function)
#+clozur... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/closer-mop-20191227-git/closer-mop-packages.lisp | lisp | (in-package :cl-user)
(defpackage #:closer-mop
(:use #:common-lisp #+lispworks #:lispworks)
(:nicknames #:c2mop)
#+(or allegro clozure lispworks mcl)
(:shadow #:standard-class)
#+(or allegro clisp clozure ecl clasp lispworks sbcl)
(:shadow #:defgeneric #:defmethod #:standard-generic-function)
#+clozur... | |
06d87e4d8ed6b0c302ccda89ca53f3486b3b1ac37465a71623e499f660d4fe3b | clojerl/clojerl | clojerl.ExceptionInfo.erl | -module('clojerl.ExceptionInfo').
-include("clojerl.hrl").
-behavior('clojerl.IEquiv').
-behavior('clojerl.IError').
-behavior('clojerl.IExceptionInfo').
-behavior('clojerl.IHash').
-behavior('clojerl.IStringable').
-export([?CONSTRUCTOR/2, ?CONSTRUCTOR/3]).
-export([equiv/2]).
-export([ message/1
, message... | null | https://raw.githubusercontent.com/clojerl/clojerl/506000465581d6349659898dd5025fa259d5cf28/src/erl/lang/errors/clojerl.ExceptionInfo.erl | erlang | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
clojerl.IEquiv
clojerl.IError
clojerl.IExceptionInfo
clojerl.IStringable | -module('clojerl.ExceptionInfo').
-include("clojerl.hrl").
-behavior('clojerl.IEquiv').
-behavior('clojerl.IError').
-behavior('clojerl.IExceptionInfo').
-behavior('clojerl.IHash').
-behavior('clojerl.IStringable').
-export([?CONSTRUCTOR/2, ?CONSTRUCTOR/3]).
-export([equiv/2]).
-export([ message/1
, message... |
39b8e63eb4cba470e2ef8a11aa4e0ccfc74e9bb8379ce23689da8d7cda1bafce | oakes/Nightcoders | template.prod.clj | (require
'[clojure.java.io :as io]
'[cljs.build.api :as api])
(defn delete-children-recursively! [f]
(when (.isDirectory f)
(doseq [f2 (.listFiles f)]
(delete-children-recursively! f2)))
(when (.exists f) (io/delete-file f)))
(defn build-cljs [file-name opts]
(let [out-file (str "resources/nightco... | null | https://raw.githubusercontent.com/oakes/Nightcoders/c1b48129b08fdf1a0093878cc9b3249f44a5f732/resources/template.prod.clj | clojure | (require
'[clojure.java.io :as io]
'[cljs.build.api :as api])
(defn delete-children-recursively! [f]
(when (.isDirectory f)
(doseq [f2 (.listFiles f)]
(delete-children-recursively! f2)))
(when (.exists f) (io/delete-file f)))
(defn build-cljs [file-name opts]
(let [out-file (str "resources/nightco... | |
d9e3711034a1c78841edb524798a987b81584d2c62ed3f782a18432769cf9aff | joinr/spork | primitive.clj | This is , more or less , a port of shape primitives from
excellent book The Haskell School of Expression . I 'd like to port it
;eventually...for now it's not doing anything.
(ns spork.geometry.primitive)
;ellipse :: Point -> Point -> Graphic
: : Point - > Point - > Point - > Graphic
;line :: Point ... | null | https://raw.githubusercontent.com/joinr/spork/bb80eddadf90bf92745bf5315217e25a99fbf9d6/obe/geometry/primitive.clj | clojure | eventually...for now it's not doing anything.
ellipse :: Point -> Point -> Graphic
line :: Point -> Point -> Graphic
polygon :: [Point] -> Graphic
polyline :: [Point] -> Graphic
fillTri x y size w =
drawInWindow w
(polygon [(x,y),
(x+size,y),
... | This is , more or less , a port of shape primitives from
excellent book The Haskell School of Expression . I 'd like to port it
(ns spork.geometry.primitive)
: : Point - > Point - > Point - > Graphic
( withColor Blue
type Vertex = ( Float , Float )
inchToPixel x = round ( 100*x )
pixelToInch n ... |
14d815b96cc338649434b3fa51878fc87cbd9d8c13c2148ea4600563cabfd50f | danilkolikov/dfl | Type.hs | |
Module : Frontend . Inference . Type
Description : Definition of a type
Copyright : ( c ) , 2019
License : MIT
Module with the definition of a type
Module : Frontend.Inference.Type
Description : Definition of a type
Copyright : (c) Danil Kolikov, 2019
License : MI... | null | https://raw.githubusercontent.com/danilkolikov/dfl/698a8f32e23b381afe803fc0e353293a3bf644ba/src/Frontend/Inference/Type.hs | haskell | | Type of an expression
^ Type variable
^ Type constructor
^ Function type
^ Application of a type constructor
| Drops information about positions | |
Module : Frontend . Inference . Type
Description : Definition of a type
Copyright : ( c ) , 2019
License : MIT
Module with the definition of a type
Module : Frontend.Inference.Type
Description : Definition of a type
Copyright : (c) Danil Kolikov, 2019
License : MI... |
183188942702ce54ce6500630ae7bd5532252f4a3b5d4001b5416870fdb061df | wireless-net/erlang-nommu | tls_record.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2007 - 2014 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Publi... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/ssl/src/tls_record.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitatio... | Copyright Ericsson AB 2007 - 2014 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
Purpose : Handle TLS / SSL record protoc... |
51fa1482531eef5b5af464b02a8fa0a1d80a228482df912be84649a1f66d4283 | rorra/rorracasts_erlang | diccionario.erl | -module(diccionario).
-compile(export_all).
test() ->
Constructor
_D1 = dict:new(),
%% Constructor desde una lista
D2 = dict:from_list([{key3, [valor3]}, {key2, [valor2]}, {key1, valor}]),
%% Diccionario a lista
io:format("El diccionario a lista es ~w\n", [dict:to_list(D2)]),
item
D3 = di... | null | https://raw.githubusercontent.com/rorra/rorracasts_erlang/c50d20abe3f1a65001576734caedae90f36e3ecd/006-dict-y-orddict/diccionario.erl | erlang | Constructor desde una lista
Diccionario a lista
Modificar un valor
Eliminar una llave | -module(diccionario).
-compile(export_all).
test() ->
Constructor
_D1 = dict:new(),
D2 = dict:from_list([{key3, [valor3]}, {key2, [valor2]}, {key1, valor}]),
io:format("El diccionario a lista es ~w\n", [dict:to_list(D2)]),
item
D3 = dict:store(key4, 5, D2),
valor a un item existente
D4 = ... |
0318702937ffb41b0123f768ee743e8a947e66fa8b0534fbe92d6da84813805f | ivanjovanovic/sicp | e-5.4.scm | Exercise 5.4 . Specify register machines that implement each of the
; following procedures. For each machine, write a controller instruction
; sequence and draw a diagram showing the data paths.
; a. Recursive exponentiation:
(define (expt b n)
(if (= n 0)
1
(* b (expt b (- n 1)))))
; b. Iterative ... | null | https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/5.1/e-5.4.scm | scheme | following procedures. For each machine, write a controller instruction
sequence and draw a diagram showing the data paths.
a. Recursive exponentiation:
b. Iterative exponentiation:
------------------------------------------------------------
I will just define the machines.
implement exponential.
save current s... | Exercise 5.4 . Specify register machines that implement each of the
(define (expt b n)
(if (= n 0)
1
(* b (expt b (- n 1)))))
(define (expt b n)
(define (expt-iter counter product)
(if (= counter 0)
product
(expt-iter (- counter 1) (* b product))))
(expt-iter n 1))
a ) ... |
74af562050a70e61b2760ccd878fc57ca0675589f9f1798bbb4b9daaface64a2 | eareese/htdp-exercises | 094-ufo-game-design.rkt | #lang htdp/bsl
(require 2htdp/image)
(require 2htdp/universe)
;; Exercise 94. Draw some sketches of what the [UFO and tank] game scenery looks
;; like at various stages. Use the sketches to determine the constant and the
;; variable pieces of the game. For the former, develop physical constants that
;; describe the di... | null | https://raw.githubusercontent.com/eareese/htdp-exercises/a85ff3111d459dda0e94d9b463d01a09accbf9bf/part01-fixed-size-data/094-ufo-game-design.rkt | racket | Exercise 94. Draw some sketches of what the [UFO and tank] game scenery looks
like at various stages. Use the sketches to determine the constant and the
variable pieces of the game. For the former, develop physical constants that
describe the dimensions of the world (canvas), its objects, and the graphical
constan... | #lang htdp/bsl
(require 2htdp/image)
(require 2htdp/universe)
(define CANVAS
(scene+curve
(scene+curve
(rectangle 200 200 "outline" "black")
0 195 10 1/2
100 195 10 1/3
"purple")
100 195 10 1/2
200 195 10 1/3
"purple"))
(define TANK (rectangle 30 15 "solid" "blue"))
(define TANK-Y (- (i... |
e57f0bb1e309130ad4628aada860ff7d09941d3f459fb76bc1df2a43838b235f | yrashk/erlang | erl_compile.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1997 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/stdlib/src/erl_compile.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 1997 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(erl_compile).
-include("erl_compil... |
86e49f32cd871383e609dac0af823aaada924e0d3d00413459d3bd3fa33e8aff | manuel-serrano/bigloo | emit_cop.scm | ;*=====================================================================*/
* ... /prgm / project / bigloo / / comptime / Cgen / emit_cop.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation : T... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/16e397e187fa85d8949a0285bfb43d4ab4ed8839/comptime/Cgen/emit_cop.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* The emission of cop code. */
*===========================... | * ... /prgm / project / bigloo / / comptime / Cgen / emit_cop.scm * /
* Author : * /
* Creation : Tue Jul 2 14:39:37 1996 * /
* Last change : Tue May 10 08:03:27 2022 ( serrano ) * /
* Copyrigh... |
2e64938de00440d4e7fa26eae4b078acc697685ba79f4f732dd25028d8b894cb | shonfeder/alg_structs | semigroup.mli | * An interface for a type with a binary , associative operator over it .
" A semigroup is an algebraic structure consisting of a set together with an
associative binary operation " ( { { : }
wikipedia ) } .
" The term ' semigroup ' is standard , but semi - monoid would be more
systemati... | null | https://raw.githubusercontent.com/shonfeder/alg_structs/09a57285ffae77dce2d2dd0581a0d453d31fb332/lib/semigroup.mli | ocaml | * {1 Seed}
* The [Seed] needed to generate an implementation of {{!module-type:S}
Semigroup} for the type {{!type:Seed.t} t}.
* The principle (and sole) type.
We can think of this set-theoretically as the carrier set of the algebraic
structure or category-theoretically as the single object in the cat... | * An interface for a type with a binary , associative operator over it .
" A semigroup is an algebraic structure consisting of a set together with an
associative binary operation " ( { { : }
wikipedia ) } .
" The term ' semigroup ' is standard , but semi - monoid would be more
systemati... |
81d9ebab912009e9140c07314d423acee7c02f0c7d587bad2db7ae34ff1f35a7 | imitator-model-checker/imitator | AlgoBCShuffle.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Université Paris 13 , LIPN , CNRS , France
* Université de Lorraine , CNRS , , LORIA , Nancy , France
*
* Module description : Classical Beh... | null | https://raw.githubusercontent.com/imitator-model-checker/imitator/105408ae2bd8c3e3291f286e4d127defd492a58b/src/AlgoBCShuffle.ml | ocaml | **********************************************************
**********************************************************
Modules
**********************************************************
**********************************************************
**********************************************************
***************... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Université Paris 13 , LIPN , CNRS , France
* Université de Lorraine , CNRS , , LORIA , Nancy , France
*
* Module description : Classical Beh... |
37c448bd57dfe443b3dff4dfc4b56b07304015085dbf456b206b066b615e6f3e | erlang/egd | egd_font.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2016 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/erlang/egd/1cea959544de7dd40a3284ba571a58939de57616/src/egd_font.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 2008 - 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(egd_font).
-export([load/1, load_binary/1, size/1, glyph/2]).
-include("egd.hrl").
:
LSs : : [ [ { X... |
4b86d49d1a313bee19a625b901b1ebadad6803614399db1a1f2345456d36ff5c | gelisam/klister | IORef.hs | {-# LANGUAGE RankNTypes #-}
-- |
-- Variants of 'view', 'over', and 'set' for pieces of state which are
represented using a Reader over an IORef instead of a State .
module Control.Lens.IORef where
import Control.Lens
import Control.Monad.IO.Class
import Control.Monad.Reader
import Data.IORef
viewIORef :: (MonadIO... | null | https://raw.githubusercontent.com/gelisam/klister/71c71e6ab768e7e6b43e9402bc127423cd6e562b/src/Control/Lens/IORef.hs | haskell | # LANGUAGE RankNTypes #
|
Variants of 'view', 'over', and 'set' for pieces of state which are
^ Getter r (IORef s)
^ Getter s a
^ Getter r (IORef s)
^ Setter s a
^ Getter r (IORef s)
^ Setter s a | represented using a Reader over an IORef instead of a State .
module Control.Lens.IORef where
import Control.Lens
import Control.Monad.IO.Class
import Control.Monad.Reader
import Data.IORef
viewIORef :: (MonadIO m, MonadReader r m)
-> m a
viewIORef refGetter leafGetter = do
ref <- view refGetter
s <-... |
e703150997cb8bff38cb8bab4977b965ab9b63f6e94c9fd085b0d0cd1abfbfd3 | theodormoroianu/SecondYearCourses | lab11_sol.hs | # LANGUAGE FlexibleInstances #
import Data.Monoid
import Data.Semigroup (Max (..), Min (..))
import Data.Foldable (foldMap, foldr)
import Data.Char (isUpper)
import Test.QuickCheck
elem :: (Foldable t, Eq a) => a -> t a -> Bool
elem x = getAny . foldMap (Any . (== x))
null :: (Foldable t) => t a -> Bool
null = getAll... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/l/lab11/lab11_sol.hs | haskell | # LANGUAGE FlexibleInstances #
import Data.Monoid
import Data.Semigroup (Max (..), Min (..))
import Data.Foldable (foldMap, foldr)
import Data.Char (isUpper)
import Test.QuickCheck
elem :: (Foldable t, Eq a) => a -> t a -> Bool
elem x = getAny . foldMap (Any . (== x))
null :: (Foldable t) => t a -> Bool
null = getAll... | |
d4e86aff689605f00b69b750cdf1c983f24297a36f1aaa5aeaab61cd030b923d | michaelklishin/welle | counters_test.clj | (ns clojurewerkz.welle.test.counters-test
(:require [clojurewerkz.welle.core :as wc]
[clojurewerkz.welle.conversion :as conversion]
[clojurewerkz.welle.buckets :as wb]
[clojurewerkz.welle.counters :as cnt]
[clojure.test :refer :all]
[clojurewe... | null | https://raw.githubusercontent.com/michaelklishin/welle/3f3cd24af7c0d95489298e4096b362b6943f85ef/test/clojurewerkz/welle/test/counters_test.clj | clojure | (ns clojurewerkz.welle.test.counters-test
(:require [clojurewerkz.welle.core :as wc]
[clojurewerkz.welle.conversion :as conversion]
[clojurewerkz.welle.buckets :as wb]
[clojurewerkz.welle.counters :as cnt]
[clojure.test :refer :all]
[clojurewe... | |
5bcb8ec0ed7d5759d639b8b1e008f3461c43a7a557ac990c94f1ca9fcff0c38c | threatgrid/ctim | verdicts.cljc | (ns ctim.examples.verdicts
(:require [ctim.schemas.common :as c]))
(def verdict-maximal
{:type "verdict"
:observable {:type "ip",
:value "10.0.0.1"}
:disposition 1
:disposition_name "Clean"
:judgement_id "-494d13ae-e914-43f0-883b-085062a8d9a1"
:valid_time {:start_time #inst "2016-02-... | null | https://raw.githubusercontent.com/threatgrid/ctim/2ecae70682e69495cc3a12fd58a474d4ea57ae9c/src/ctim/examples/verdicts.cljc | clojure | (ns ctim.examples.verdicts
(:require [ctim.schemas.common :as c]))
(def verdict-maximal
{:type "verdict"
:observable {:type "ip",
:value "10.0.0.1"}
:disposition 1
:disposition_name "Clean"
:judgement_id "-494d13ae-e914-43f0-883b-085062a8d9a1"
:valid_time {:start_time #inst "2016-02-... | |
caa15bf64b3de72c2aafad4c43b303069471ce280aae1dd71696a2e3dad09c0f | karchie/stl2010-twitter | tweets.clj | (ns #^{:doc "Strange Loop 2010 twitter hackery"
:author "Kevin A. Archie <>"}
stl2010.tweets
(:gen-class)
(:use [clojure.contrib.string :only (join)])
(:require [clojure.contrib.http.agent :as http-agent]
[clojure.contrib.json :as json]))
(def +max-tweets+ 1200)
(defn get-referenced-users
[tweet... | null | https://raw.githubusercontent.com/karchie/stl2010-twitter/a5790cd1f9ca3d3962b21fe82b4b56a079a9042c/src/stl2010/tweets.clj | clojure | returns outfile" | (ns #^{:doc "Strange Loop 2010 twitter hackery"
:author "Kevin A. Archie <>"}
stl2010.tweets
(:gen-class)
(:use [clojure.contrib.string :only (join)])
(:require [clojure.contrib.http.agent :as http-agent]
[clojure.contrib.json :as json]))
(def +max-tweets+ 1200)
(defn get-referenced-users
[tweet... |
bb850c28c3243f8bba2d1bd9bf1708cf1df5305854a8296d13e279eafef64921 | jordanthayer/ocaml-search | main.ml |
Online Planner . Will be first implemented by wrapping the
progression planner with online capability : ( 1 ) receiving message ; ( 2 )
ask the simulator for the future committements ; ( 3 ) new branching
rules that avoid mutex with future committements .
try with a single search algorithm -- refer... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/online/main.ml | ocaml |
Online Planner . Will be first implemented by wrapping the
progression planner with online capability : ( 1 ) receiving message ; ( 2 )
ask the simulator for the future committements ; ( 3 ) new branching
rules that avoid mutex with future committements .
try with a single search algorithm -- refer... | |
a902db057a420d43f3be1f658ca823c7f4f2906f25cc5344889a2839806c3b98 | marcelosousa/llvmvf | Module.hs | -------------------------------------------------------------------------------
-- Module : Analysis.Type.Standard.Module
Copyright : ( c ) 2013
-- A Type System for Memory Analysis of LLVM IR Modules
-- Type Inference
-------------------------------------------------------------------------------
module Ana... | null | https://raw.githubusercontent.com/marcelosousa/llvmvf/c314e43aa8bc8bb7fd9c83cebfbdcabee4ecfe1b/src/Analysis/Type/Standard/Module.hs | haskell | -----------------------------------------------------------------------------
Module : Analysis.Type.Standard.Module
A Type System for Memory Analysis of LLVM IR Modules
Type Inference
----------------------------------------------------------------------------- | Copyright : ( c ) 2013
module Analysis.Type.Standard.Module (typeCheckModule, STyRes) where
import Analysis.Type.Standard.Function (typeCheckFunction,typeFunction)
import Analysis.Type.Util
import Analysis.Type.Standard.Global (typeCheckGlobal)
import Language.LLVMIR
import Language.LLVMIR.Printer
import UU.P... |
fa3b8a95e055ea1009872daf6293f181b4b187fcd892c46915d995b6c3fee31f | alesaccoia/festival_flinger | cmu_us_rms_other.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
Carnegie Mellon University ; ; ;
and and ; ; ;
Copyright ( c ) 1998 - 2000 ... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/voices/us/cmu_us_rms_cg/festvox/cmu_us_rms_other.scm | scheme |
;;;
; ;
; ;
; ;
; ;
;;;
Permission is hereby granted, free of charge, to use and distribute ;;;
this software and its documentation without restriction, including ;;;
withou... |
(define (cmu_us_rms::select_other)
"(cmu_us_rms::select_other)
Set up the anything esle for the voice."
)
(define (cmu_us_rms::reset_other)
"(cmu_us_rms::reset_other)
Reset other information."
t
)
(provide 'cmu_us_rms_other)
|
fdd1886942299a9252f54e04cade98c92a531abe32079efba33cdf83f6259435 | haskellfoundation/error-message-index | Foo.hs | module Foo where
data Foo = Foo
class IsAFoo x where
convertToFoo :: x -> Foo
instance IsAFoo Foo where
convertToFoo = id
| null | https://raw.githubusercontent.com/haskellfoundation/error-message-index/26c5c12c279eb4a997b1ff17eea46f1e86b046ab/message-index/messages/GHC-90177/example1/after/Foo.hs | haskell | module Foo where
data Foo = Foo
class IsAFoo x where
convertToFoo :: x -> Foo
instance IsAFoo Foo where
convertToFoo = id
| |
35856e663e0e11e4e228f43ec340991207db294eb0c88a828864a03353a74728 | helium/blockchain-core | blockchain_cli_ledger.erl | %%%-------------------------------------------------------------------
%% @doc
%% == Blockchain CLI Ledger ==
%% @end
%%%-------------------------------------------------------------------
-module(blockchain_cli_ledger).
-behavior(clique_handler).
-export([register_cli/0]).
-include("blockchain.hrl").
-include("bloc... | null | https://raw.githubusercontent.com/helium/blockchain-core/0caf2295d0576c0ef803258e834bf6ec3b3e74bc/src/cli/blockchain_cli_ledger.erl | erlang | -------------------------------------------------------------------
@doc
== Blockchain CLI Ledger ==
@end
-------------------------------------------------------------------
--------------------------------------------------------------------
ledger
------------------------------------------------------------------... | -module(blockchain_cli_ledger).
-behavior(clique_handler).
-export([register_cli/0]).
-include("blockchain.hrl").
-include("blockchain_vars.hrl").
register_cli() ->
register_all_usage(),
register_all_cmds().
register_all_usage() ->
lists:foreach(fun(Args) ->
apply(clique, regi... |
3a9bdbd2323144682326a470e0a0e9cc5f452dc579b119ebeed3d3cae0bfec3f | cram2/cram | alpha-memory-node.lisp | ;;;
Copyright ( c ) 2009 , < >
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this li... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_core/cram_prolog/src/rete/alpha-memory-node.lisp | lisp |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Re... | Copyright ( c ) 2009 , < >
* Neither the name of Willow Garage , Inc. nor the names of its
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR ... |
517f4d7f895b88fedd1cea4d0d157e8f52c0d94b77666a2ef3161063a778f2cf | haskell/ghcup-hs | IOStreams.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
module GHCup.Download.IOStreams where
import GHCup.Download.Utils
import GHCup.Errors
import GHCup.Types.JSON ( )
import ... | null | https://raw.githubusercontent.com/haskell/ghcup-hs/109187eb6fcd8adc28cc892c5137fc9bae1d2639/lib/GHCup/Download/IOStreams.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
--------------------------
[ Low-level (non-curl) ]--
--------------------------
^ https?
^ host (e.g. "www.example.com")
^ path (e.g. "/my/file") including query
^ destination file to create and write to
^ additional headers
^ expected content... | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
module GHCup.Download.IOStreams where
import GHCup.Download.Utils
import GHCup.Errors
import GHCup.Types.JSON ( )
import GHCup.Prelude
import Control.Applicative
import ... |
b0e89fe08f363cb6aaa948df260e827b56a7e3e2010597d4d3971b87ef4083a0 | uwplse/synapse | log.rkt | #lang racket
(provide logging? log-id log-start-time log-search log-cegis)
(define logging? (make-parameter #f))
(define log-id (make-parameter #f))
(define log-start-time (make-parameter (current-inexact-milliseconds)))
(define (format-time t)
(~r (/ t 1000) #:precision 3))
(define (time-string search-start-tim... | null | https://raw.githubusercontent.com/uwplse/synapse/10f605f8f1fff6dade90607f516550b961a10169/opsyn/engine/log.rkt | racket | #lang racket
(provide logging? log-id log-start-time log-search log-cegis)
(define logging? (make-parameter #f))
(define log-id (make-parameter #f))
(define log-start-time (make-parameter (current-inexact-milliseconds)))
(define (format-time t)
(~r (/ t 1000) #:precision 3))
(define (time-string search-start-tim... | |
5fb1313432332f86ad600a182da6cacd350b80b31ab378f959aa59204181ffaa | raviksharma/bartosz-basics-of-haskell | Main.hs | module Main where
import qualified Data.Map as M
import Lexer (tokenize)
import Parser (parse)
import Evaluator
main = do
loop (M.fromList [("pi", pi), ("e", exp 1.0)])
loop symTab = do
str <- getLine
if null str
then
return ()
else
let toks = tokenize str
tree = parse toks
... | null | https://raw.githubusercontent.com/raviksharma/bartosz-basics-of-haskell/86d40d831f61415ef0022bff7fe7060ae6a23701/10-error-handling/evaluate4/Main.hs | haskell | use old symTab | module Main where
import qualified Data.Map as M
import Lexer (tokenize)
import Parser (parse)
import Evaluator
main = do
loop (M.fromList [("pi", pi), ("e", exp 1.0)])
loop symTab = do
str <- getLine
if null str
then
return ()
else
let toks = tokenize str
tree = parse toks
... |
5d1e72fd6bdf9f8ef1604224b0155d753b3a89cdbfeb5f8feb8bdc541c1fe0af | ghc/nofib | ModArithm.hs | Time - stamp : < Sat Jun 05 2010 01:37:17 Stardate : Stardate : [ -28]3175.12 hwloidl >
--
Modular Arithmetic over Z_p
-----------------------------------------------------------------------------
@node Modular Arithmetic , ADT Matrix , Top , Top
-- @chapter Modular Arithmetic
module ModArithm (modHom, modSum, ... | null | https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/parallel/linsolv/ModArithm.hs | haskell |
---------------------------------------------------------------------------
@chapter Modular Arithmetic
, Hom(hom)
# SPECIALISE
modInv :: Int -> Int -> Int
#
error $ "modInv: Input values " ++ (show (m,x)) ++ " are not relative prime!" ++ ("** Wrong GCD res: gcd= " ++ (show g) ++ "; but x*a+y*b= " ++ (show... | Time - stamp : < Sat Jun 05 2010 01:37:17 Stardate : Stardate : [ -28]3175.12 hwloidl >
Modular Arithmetic over Z_p
@node Modular Arithmetic , ADT Matrix , Top , Top
module ModArithm (modHom, modSum, modDif, modProd, modQuot, modInv
# SPECIALISE
modHom : : Int - > Int - > Int
#
modHom :: Int -... |
ef76980f9c67c0652458cbdd76539085435457ae9c23bcdb7dba60389347d358 | informatimago/lisp | scratch.lisp | (install-prompt-functions)
(progn
(let ((resource (gethash "lisp" *cached-resources*)))
(let ((url (cached-resource-url resource))
(start (cached-resource-previous-length resource)))
(multiple-value-bind (contents status headers uri stream do-close reason)
(drakma:http-request url
... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/small-cl-pgms/irclog-prompter/scratch.lisp | lisp | (install-prompt-functions)
(progn
(let ((resource (gethash "lisp" *cached-resources*)))
(let ((url (cached-resource-url resource))
(start (cached-resource-previous-length resource)))
(multiple-value-bind (contents status headers uri stream do-close reason)
(drakma:http-request url
... | |
a5e936c78729fca383bfeda31ca5c3a7ff1af73b15a0c14843c83e127812fcd9 | beetleman/shadow-cljs-hooks | symbols.clj | (ns shadow-cljs-hooks.symbols)
(defn eval-symbol [sym]
(require (symbol (namespace sym)) :reload)
(eval sym))
| null | https://raw.githubusercontent.com/beetleman/shadow-cljs-hooks/1b0543124da8bc2dca04213bd3183ace14d2a1e1/src/shadow_cljs_hooks/symbols.clj | clojure | (ns shadow-cljs-hooks.symbols)
(defn eval-symbol [sym]
(require (symbol (namespace sym)) :reload)
(eval sym))
| |
dbada4230fe9beb3a05df860856a88e6fad62a82c665f0724a209c0fecfc0bae | input-output-hk/plutus | Spec.hs | -- editorconfig-checker-disable-file
# LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - omit - interface - pragmas #
# OPTIONS_GHC -fplugin PlutusTx . Plugin -fplugin - opt PlutusTx . Plugin : coverage - all #
# OPTIONS_GHC -fplugin - opt PlutusTx . Plugin : max - simplifier - iterations ... | null | https://raw.githubusercontent.com/input-output-hk/plutus/863613c90abecb8271e9d80d868f2adb77b4d844/plutus-tx-plugin/test/Plugin/Coverage/Spec.hs | haskell | editorconfig-checker-disable-file
TODO: This should really use a prism instead of going to and from lists I guess | # LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - omit - interface - pragmas #
# OPTIONS_GHC -fplugin PlutusTx . Plugin -fplugin - opt PlutusTx . Plugin : coverage - all #
# OPTIONS_GHC -fplugin - opt PlutusTx . Plugin : max - simplifier - iterations - pir=0 #
# OPTIONS_GHC -fplugin - op... |
07fd2ad5f29abb39892cf88db8dfb6ab43cabc2e29c2ff9d87fbdfe9d2644d68 | fragnix/fragnix | GHC.Integer.Logarithms.Compat.hs | {-# LANGUAGE Haskell2010 #-}
# LINE 1 " src / GHC / Integer / Logarithms / Compat.hs " #
-- |
-- Module: GHC.Integer.Logarithms.Compat
Copyright : ( c ) 2011
Licence : MIT
Maintainer : < >
-- Stability: Provisional
Portability : Non - ... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/application/GHC.Integer.Logarithms.Compat.hs | haskell | # LANGUAGE Haskell2010 #
|
Module: GHC.Integer.Logarithms.Compat
Stability: Provisional
Low level stuff for integer logarithms.
* Functions
Stuff is already there | # LINE 1 " src / GHC / Integer / Logarithms / Compat.hs " #
Copyright : ( c ) 2011
Licence : MIT
Maintainer : < >
Portability : Non - portable ( GHC extensions )
# LANGUAGE CPP , MagicHash , UnboxedTuples #
module GHC.Integer.Logarithms.Compa... |
db1b3869d26903d70ae1ada3cff64b3255a3fda85b504c7f7c2a54893b0b4858 | kaznum/programming_in_ocaml_exercise | board.mli | (* マス目の状態 *)
type state = Pressed | NotPressed
(* 問題となる行・列のあるべき黒マス状態 *)
type spec = int list
(* 盤面 *)
type board = {
width : int;
height : int;
h_spec : spec list;
v_spec : spec list;
body : state ref list list; (* マス目の状態 *)
}
(* マス目が解となっているかどうかチェック *)
val is_solved :
h_spec:spec list -> v_spec:spec list... | null | https://raw.githubusercontent.com/kaznum/programming_in_ocaml_exercise/6f6a5d62a7a87a1c93561db88f08ae4e445b7d4e/ch16/board.mli | ocaml | マス目の状態
問題となる行・列のあるべき黒マス状態
盤面
マス目の状態
マス目が解となっているかどうかチェック | type state = Pressed | NotPressed
type spec = int list
type board = {
width : int;
height : int;
h_spec : spec list;
v_spec : spec list;
}
val is_solved :
h_spec:spec list -> v_spec:spec list -> state ref list list -> bool
問題から初期画面を作成する
val board_of_spec : h_spec:spec list -> v_spec:spec list -> board
|
7ad88de2e1f9548bc524664827a65735127b2ac80bb338a919d9d895a399c22b | ijvcms/chuanqi_dev | map_20016.erl | -module(map_20016).
-export([
range/0,
data/0
]).
range() -> {48, 36}.
data() ->
{
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/map_data/map_20016.erl | erlang | -module(map_20016).
-export([
range/0,
data/0
]).
range() -> {48, 36}.
data() ->
{
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1... | |
1f4801637f95da0f3ddf2f9649a446a8a32925554936455dfa6331ce23eb02dc | cedlemo/OCaml-GI-ctypes-bindings-generator | Recent_manager_error.ml | open Ctypes
open Foreign
type t = Not_found | Invalid_uri | Invalid_encoding | Not_registered | Read | Write | Unknown
let of_value v =
if v = Unsigned.UInt32.of_int 0 then Not_found
else if v = Unsigned.UInt32.of_int 1 then Invalid_uri
else if v = Unsigned.UInt32.of_int 2 then Invalid_encoding
else if v = Un... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Recent_manager_error.ml | ocaml | open Ctypes
open Foreign
type t = Not_found | Invalid_uri | Invalid_encoding | Not_registered | Read | Write | Unknown
let of_value v =
if v = Unsigned.UInt32.of_int 0 then Not_found
else if v = Unsigned.UInt32.of_int 1 then Invalid_uri
else if v = Unsigned.UInt32.of_int 2 then Invalid_encoding
else if v = Un... | |
b2e3a4ea15a3f6387924a5786bec98ad6133b66ada4667ca25aa9ddbb7cc6293 | mro/geohash | assert2.ml | let equals_int = Assert.assert_equals_int
let equals_float = Assert.assert_equals_float
let equals_string = Assert.assert_equals_string
| null | https://raw.githubusercontent.com/mro/geohash/6a8ab5102b6bc1b7fd8f090f54329273ed9a68c4/test/assert2.ml | ocaml | let equals_int = Assert.assert_equals_int
let equals_float = Assert.assert_equals_float
let equals_string = Assert.assert_equals_string
| |
36ce8244c1bac6b9deb51b969e2ac1fac8eeb9dcd53e59ae3208fe5e0823423e | thattommyhall/offline-4clojure | p171.clj | ;; Intervals - Medium
Write a function that takes a sequence of integers and returns a sequence of " intervals " . Each interval is a a vector of two integers , start and end , such that all integers between start and end ( inclusive ) are contained in the input sequence .
;; tags -
;; restricted -
(ns offline-4c... | null | https://raw.githubusercontent.com/thattommyhall/offline-4clojure/73e32fc6687816aea3c514767cef3916176589ab/src/offline_4clojure/p171.clj | clojure | Intervals - Medium
tags -
restricted -
your solution here | Write a function that takes a sequence of integers and returns a sequence of " intervals " . Each interval is a a vector of two integers , start and end , such that all integers between start and end ( inclusive ) are contained in the input sequence .
(ns offline-4clojure.p171
(:use clojure.test))
(def __
)
(de... |
7cba81c79d3d01b9a2c76e49c35630dc2e818db16dbf140654344e307ed270a8 | portkey-cloud/aws-clj-sdk | _2017-07-01.clj | (ns portkey.aws.translate.-2017-07-01 (:require [portkey.aws]))
(def
endpoints
'{"us-east-2"
{:credential-scope {:service "translate", :region "us-east-2"},
:ssl-common-name "translate.us-east-2.amazonaws.com",
:endpoint "-east-2.amazonaws.com",
:signature-version :v4},
"us-west-2"
{:credential-... | null | https://raw.githubusercontent.com/portkey-cloud/aws-clj-sdk/10623a5c86bd56c8b312f56b76ae5ff52c26a945/src/portkey/aws/translate/_2017-07-01.clj | clojure | (ns portkey.aws.translate.-2017-07-01 (:require [portkey.aws]))
(def
endpoints
'{"us-east-2"
{:credential-scope {:service "translate", :region "us-east-2"},
:ssl-common-name "translate.us-east-2.amazonaws.com",
:endpoint "-east-2.amazonaws.com",
:signature-version :v4},
"us-west-2"
{:credential-... | |
c88c54ce49fcbd69acc8ab9332c10b80699ff050dc139c245e9054439230f301 | jakemcc/sicp-study | 1.19.clj | Exercise 1.19
(ns exercise1.19 (:use clojure.test))
Was attempting to use clojure.test , was having issues though , leaving in to hopefully
; have discussion on it
Compute p ' and q '
Tpq = { a < - bq + aq + ap
; { b <- bp + aq
If Tpq is applied twice that is the same as ' .
Therefor to figure out p... | null | https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section1.2/1.19.clj | clojure | have discussion on it
{ b <- bp + aq
Tpq^2 = { a <- bpq + aqq + bqq + aqq + apq + bqp + aqp + app =
b(pq + qq + qp) + a(pq + qq + qp) + a(pp + qq)
{ b <- bpp + aqp + bqq + aqq + apq = b(pp + qq) + a(qp + qq + pq)
Looking at the equations you can see that p' = pp + qq, q' = 2*pq + qq
P... | Exercise 1.19
(ns exercise1.19 (:use clojure.test))
Was attempting to use clojure.test , was having issues though , leaving in to hopefully
Compute p ' and q '
Tpq = { a < - bq + aq + ap
If Tpq is applied twice that is the same as ' .
Therefor to figure out p ' and q ' apply Tpq twice
(defn fib-iter [a ... |
006968873791ae8e40c5c5e56ef06b500c8d65097f74d5d17a53bb61c8b557d0 | lucywang000/shadow-test-utils | filters_test.cljc | (ns shadow-test-utils.filters-test
(:require [shadow-test-utils.filters :refer [tweak-test-ns tweak-test-case]]
[clojure.test :refer [deftest is are use-fixtures testing are]]))
(defn v1 [])
(defn v2 [])
(defn ^:focus vf1 [])
(defn ^:focus vf2 [])
(defn ^:skip vs1 [])
(defn ^:skip vs2 [])
(deftest test-... | null | https://raw.githubusercontent.com/lucywang000/shadow-test-utils/edd19c882b441e599c084feff1195bf8a40b7775/test/shadow_test_utils/filters_test.cljc | clojure | (ns shadow-test-utils.filters-test
(:require [shadow-test-utils.filters :refer [tweak-test-ns tweak-test-case]]
[clojure.test :refer [deftest is are use-fixtures testing are]]))
(defn v1 [])
(defn v2 [])
(defn ^:focus vf1 [])
(defn ^:focus vf2 [])
(defn ^:skip vs1 [])
(defn ^:skip vs2 [])
(deftest test-... | |
720f48f9c4cba4eb09f1bda32a75569e376abddf3e3452cf7d5d11349c3b8a42 | qfpl/applied-fp-course | Topic.hs | module Level06.Types.Topic
( Topic
, mkTopic
, getTopic
, encodeTopic
) where
import Waargonaut.Encode (Encoder)
import qualified Waargonaut.Encode as E
import Level06.Types.Error (Error (EmptyTopic), nonEmptyText)
import Data.Functor.Contravariant ((>... | null | https://raw.githubusercontent.com/qfpl/applied-fp-course/d5a94a9dcee677bc95a5184c2ed13329c9f07559/src/Level06/Types/Topic.hs | haskell | module Level06.Types.Topic
( Topic
, mkTopic
, getTopic
, encodeTopic
) where
import Waargonaut.Encode (Encoder)
import qualified Waargonaut.Encode as E
import Level06.Types.Error (Error (EmptyTopic), nonEmptyText)
import Data.Functor.Contravariant ((>... | |
19064789b08021d68a53f019324e4217a27c9e40954b9569b4d909c3e5b00f73 | lisp/de.setf.utility | date.lisp | ;;; -*- Package: de.setf.utility.implementation; -*-
This file is part of the ' de.setf.utility ' Common Lisp library .
;;; It implements universal time conversion functions.
Copyright 2010 [ ) All Rights Reserved
;;; 'de.setf.utility' is free software: you can redistribute it and/or modify
it under the ... | null | https://raw.githubusercontent.com/lisp/de.setf.utility/782cd79d99ebf40deeed60c492be9873bbe42a15/date.lisp | lisp | -*- Package: de.setf.utility.implementation; -*-
It implements universal time conversion functions.
'de.setf.utility' is free software: you can redistribute it and/or modify
'de.setf.utility' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERC... |
This file is part of the ' de.setf.utility ' Common Lisp library .
Copyright 2010 [ ) All Rights Reserved
it under the terms of version 3 of the GNU Lesser General Public License as published by
the Free Software Foundation .
A copy of the GNU Lesser General Public License should be included with ' d... |
fee4c758d9cfe11e3a75a2645b3a15ab08bd5d40e469eee825904e173ada562f | kelamg/HtDP2e-workthrough | ex499.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex499) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Accumulators/ex499.rkt | racket | about the language level of this file in a form that our tools can easily process.
[List-of Numbers] -> Number
produces the product of all numbers in l
[List-of Number] Number -> Number
accumulator a is the product of all
the numbers that l0 lacks from l
Q - The performance of product is O(n) where n is the leng... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex499) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(check-expect (product '()) 1)
(check-expect (product ... |
92b92d3236f232e3fdf519c15bca0d853d1ef3023637ff3a35bfb4414b8748d3 | clash-lang/clash-compiler | Internal.hs | |
Copyright : ( C ) 2019 , Google Inc. ,
2021 - 2022 , QBayLogic B.V. ,
2021 - 2022 , Myrtle.ai
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
Copyright : (C) 2019 , Google Inc.,
2021-2... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/ba4765139ea0728546bf934005d2d9b77e48d8c7/clash-prelude/src/Clash/Class/AutoReg/Internal.hs | haskell | $setup
>>> import Data.Maybe
2. Given a data type where a constructor indicates (parts) of the data will
Both parts will be stored in separate registers. The register holding the
"potentially uninteresting" part will only be enabled if the constructor
bits indicate they're interesting.
when viewed a... | |
Copyright : ( C ) 2019 , Google Inc. ,
2021 - 2022 , QBayLogic B.V. ,
2021 - 2022 , Myrtle.ai
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
Copyright : (C) 2019 , Google Inc.,
2021-2... |
7424a19476490a0db4927c1559778812a60f94e3e62afc53a17c741cba543d6f | tonyrog/can | can_sup.erl | %%%---- BEGIN COPYRIGHT -------------------------------------------------------
%%%
Copyright ( C ) 2007 - 2013 , Rogvall Invest AB , < >
%%%
%%% This software is licensed as described in the file COPYRIGHT, which
%%% you should have received as part of this distribution. The terms
%%% are also available at .
%%%
%%... | null | https://raw.githubusercontent.com/tonyrog/can/9f76fd57198e5531978791e0528e1798a9c08693/src/can_sup.erl | erlang | ---- BEGIN COPYRIGHT -------------------------------------------------------
This software is licensed as described in the file COPYRIGHT, which
you should have received as part of this distribution. The terms
are also available at .
You may opt to use, copy, modify, merge, publish, distribute and/or sell
furni... | Copyright ( C ) 2007 - 2013 , Rogvall Invest AB , < >
copies of the Software , and permit persons to whom the Software is
This software is distributed on an " AS IS " basis , WITHOUT WARRANTY OF ANY
@author < >
( C ) 2013 ,
Created : 28 Aug 2006 by
-module(can_sup).
-behaviour(supervisor).
-ex... |
ae1a00a6da474d7f0ddb00680119de0a05f45dd286b3be9a7f245b9bb724e336 | elastic/eui-cljs | header_breadcrumbs.cljs | (ns eui.header-breadcrumbs
(:require ["@elastic/eui/lib/components/header/header_breadcrumbs/header_breadcrumbs.js" :as eui]))
(def EuiHeaderBreadcrumbs eui/EuiHeaderBreadcrumbs)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/header_breadcrumbs.cljs | clojure | (ns eui.header-breadcrumbs
(:require ["@elastic/eui/lib/components/header/header_breadcrumbs/header_breadcrumbs.js" :as eui]))
(def EuiHeaderBreadcrumbs eui/EuiHeaderBreadcrumbs)
| |
61ffde1c05a034db456a15bdadfba8f392da6ddc15eb9b8f113fc7c51bd265c3 | xh4/web-toolkit | aes.lisp | ;;;; -*- mode: lisp; indent-tabs-mode: nil -*-
aes.lisp -- implementation of the Rijndael block cipher
;;;
Currently limited to 128 - bit block sizes , although the full range of
;;; key sizes is supported.
(in-package :crypto)
(in-ironclad-readtable)
FIXME : is it work it to combine these into one large array... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/ironclad-v0.47/src/ciphers/aes.lisp | lisp | -*- mode: lisp; indent-tabs-mode: nil -*-
key sizes is supported.
preferring to reload it at every reference, so a single large
array scheme might not be the best for them (yet)
going to notice?
invert the order of the round keys
the "optimized implementation" also had a fully unrolled version of
this loop han... | aes.lisp -- implementation of the Rijndael block cipher
Currently limited to 128 - bit block sizes , although the full range of
(in-package :crypto)
(in-ironclad-readtable)
FIXME : is it work it to combine these into one large array and
subscript into that rather than having separate arrays ? CMUCL
and S... |
582d0f64003178df46c847f669b16ced2634d5f158e7209ec751a49061b4f088 | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | Capability.hs | {-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
-- | Contains the types generated from the schema Capability
module StripeAPI.Types.Capability where
import qualified Contro... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/Capability.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains the types generated from the schema Capability
# SOURCE #
# SOURCE #
# SOURCE #
This is an object representing a capability for a Stripe account.
Related guide: [Account capabilities](https:\/\/stripe.com\/docs\/connect\/account-capabilities).
| ac... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module StripeAPI.Types.Capability where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
import qualified Data.A... |
b9e99e9fdd67a147a941de3979f483e53c6d114c12e2b64987a278a0af8fca36 | scrintal/heroicons-reagent | ellipsis_vertical.cljs | (ns com.scrintal.heroicons.solid.ellipsis-vertical)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M10.5 6a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm0 6a1.5 1.5 0 113 0 1.5 1.5 0 ... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/ellipsis_vertical.cljs | clojure | (ns com.scrintal.heroicons.solid.ellipsis-vertical)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M10.5 6a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm0 6a1.5 1.5 0 113 0 1.5 1.5 0 ... | |
cc46a68680494848e4f77b18918cb318669701e09f504df1cb76941af486a35b | mogenslund/liquid | markdownfolds_test.clj | (ns liq.extras.markdownfolds-test
(:require [clojure.test :refer :all]
[liq.buffer :as buffer]
[liq.extras.markdownfolds :refer :all]))
(deftest get-headline-level-test
""
(is (= (get-headline-level (buffer/buffer "# abc") 1) 1))
(is (= (get-headline-level (buffer/buffer "## abc") 1) 2)... | null | https://raw.githubusercontent.com/mogenslund/liquid/eafc54df9c67f2e625220b78b65de1143099ef00/test/liq/extras/markdownfolds_test.clj | clojure | (ns liq.extras.markdownfolds-test
(:require [clojure.test :refer :all]
[liq.buffer :as buffer]
[liq.extras.markdownfolds :refer :all]))
(deftest get-headline-level-test
""
(is (= (get-headline-level (buffer/buffer "# abc") 1) 1))
(is (= (get-headline-level (buffer/buffer "## abc") 1) 2)... | |
05077cb599a00c0580e7576e024ea9121062a8b99903f4ac4219b0db30def60b | ocramz/sparse-linear-algebra | Accelerate.hs | # language GADTs , TypeFamilies #
-----------------------------------------------------------------------------
-- |
Module : Numeric . LinearAlgebra . Sparse . Accelerate
Copyright : ( c ) 2017
-- License : BSD3 (see the file LICENSE)
--
Maintainer : zocca marco gmail
-- Stability : ex... | null | https://raw.githubusercontent.com/ocramz/sparse-linear-algebra/77f14ebc5c545cb665cdd840149a021f3df07183/accelerate/src/Numeric/LinearAlgebra/Sparse/Accelerate.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD3 (see the file LICENSE)
Stability : experimental
Portability : portable
`accelerate` instances for sparse linear algebra
---------------------------------------------------------------------------
(fromVectors,... | # language GADTs , TypeFamilies #
Module : Numeric . LinearAlgebra . Sparse . Accelerate
Copyright : ( c ) 2017
Maintainer : zocca marco gmail
module Numeric.LinearAlgebra.Sparse.Accelerate where
import Foreign.Storable (Storable(..))
import Control.Monad.Primitive
import Data.Ord (comparing)
... |
8273aeeb94dbbd197f9c65dc2e7a1df900918c499a88925d9a13d702cfc2ab20 | marianoguerra-atik/riak_core_ring_on_partisans_plumtree | pring_peer_service.erl | -module(pring_peer_service).
-export([join/1,
leave/1,
on_down/2,
members/0,
manager/0,
stop/0,
stop/1]).
-export([join_p/1, leave_p/1, members_p/1, connections_p/1]).
join(Node) ->
partisan_peer_service:join(Node).
leave(Node) ->
partisan_peer_service:l... | null | https://raw.githubusercontent.com/marianoguerra-atik/riak_core_ring_on_partisans_plumtree/19167b7f111221dc9c4ae127ac9fd3120b17dda1/apps/pring/src/pring_peer_service.erl | erlang | -module(pring_peer_service).
-export([join/1,
leave/1,
on_down/2,
members/0,
manager/0,
stop/0,
stop/1]).
-export([join_p/1, leave_p/1, members_p/1, connections_p/1]).
join(Node) ->
partisan_peer_service:join(Node).
leave(Node) ->
partisan_peer_service:l... | |
989c2d95f8941449622391e54b32934ac82e477cb250667cffe631853a4525c1 | larcenists/larceny | 128.body1.scm | Copyright ( C ) ( 2015 ) . All Rights Reserved .
;;;
;;; 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,
;;;... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/lib/SRFI/srfi/128.body1.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 ) ( 2015 ) . All Rights Reserved .
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 ,
... |
87ad62de888561f6870ee6a162ab82c1c98a0d4fbb7bc527fd293b6acb656954 | cedlemo/OCaml-GI-ctypes-bindings-generator | Recent_chooser_error.ml | open Ctypes
open Foreign
type t = Not_found | Invalid_uri
let of_value v =
if v = Unsigned.UInt32.of_int 0 then Not_found
else if v = Unsigned.UInt32.of_int 1 then Invalid_uri
else raise (Invalid_argument "Unexpected Recent_chooser_error value")
let to_value = function
| Not_found -> Unsigned.UInt32.of_int 0... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Recent_chooser_error.ml | ocaml | open Ctypes
open Foreign
type t = Not_found | Invalid_uri
let of_value v =
if v = Unsigned.UInt32.of_int 0 then Not_found
else if v = Unsigned.UInt32.of_int 1 then Invalid_uri
else raise (Invalid_argument "Unexpected Recent_chooser_error value")
let to_value = function
| Not_found -> Unsigned.UInt32.of_int 0... | |
0867aeb0f0db650da3d4893441c849c42b055bd877fcce2083fba79995725e17 | scverif/scverif | asmlifter.mli | Copyright 2019 - Inria , NXP
SPDX - License - Identifier : BSD-3 - Clause - Clear WITH modifications
val lift_section :
Asmast.section -> Ilast.macro_decl Location.located
| null | https://raw.githubusercontent.com/scverif/scverif/307a17b61a2286fb7009d434825f9245caebfddc/src/asmlifter.mli | ocaml | Copyright 2019 - Inria , NXP
SPDX - License - Identifier : BSD-3 - Clause - Clear WITH modifications
val lift_section :
Asmast.section -> Ilast.macro_decl Location.located
| |
d259ba0e34e84b0a915d9b2ff68faa8b40dedaf8d97b7301f8aae2a24da8fc48 | kblake/erlang-chat-demo | element_h3.erl | Nitrogen Web Framework for Erlang
Copyright ( c ) 2008 - 2010
See MIT - LICENSE for licensing information .
-module (element_h3).
-include_lib ("wf.hrl").
-compile(export_all).
reflect() -> record_info(fields, h3).
render_element(Record) ->
Text = wf:html_encode(Record#h3.text, Record#h3.html_encode),
... | null | https://raw.githubusercontent.com/kblake/erlang-chat-demo/6fd2fce12f2e059e25a24c9a84169b088710edaf/apps/nitrogen/src/elements/heading/element_h3.erl | erlang | Nitrogen Web Framework for Erlang
Copyright ( c ) 2008 - 2010
See MIT - LICENSE for licensing information .
-module (element_h3).
-include_lib ("wf.hrl").
-compile(export_all).
reflect() -> record_info(fields, h3).
render_element(Record) ->
Text = wf:html_encode(Record#h3.text, Record#h3.html_encode),
... | |
1a789a18194924647cb0349cd0ef279304dc0c4694205d39bd1b32dd5a4de933 | spinda/liquidhaskell-cabal-demo | Setup.hs | import Distribution.Simple
import LiquidHaskell.Cabal
data Choice = Simple | Post
choice :: Choice
choice = Post -- Simple
main :: IO ()
main = case choice of
Simple -> liquidHaskellMain
Post -> liquidHaskellMainHooks
| null | https://raw.githubusercontent.com/spinda/liquidhaskell-cabal-demo/715b051f8352ddb3a81611b4b3db52ef5eb9ad50/Setup.hs | haskell | Simple | import Distribution.Simple
import LiquidHaskell.Cabal
data Choice = Simple | Post
choice :: Choice
main :: IO ()
main = case choice of
Simple -> liquidHaskellMain
Post -> liquidHaskellMainHooks
|
10dc35ff6c3c308b65622149458f5b85828231619e419c0127f42215a8137429 | TrustInSoft/tis-kernel | intmap.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/qed/src/intmap.mli | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
a38af9f3ffa422e3e2fdad47bf0e6286560f964a47e4524fe58100ce3748a97f | kiselgra/c-mera | c.misc.04.hex.lisp | (include <stdio.h>)
(function main () -> int
(printf "%d\\n" 0x01)
(printf "%d\\n" 012)
(return 0))
# # 1
# # 12
| null | https://raw.githubusercontent.com/kiselgra/c-mera/d06ed96d50a40a3fefe188202c8c535d6784f392/tests/c.misc.04.hex.lisp | lisp | (include <stdio.h>)
(function main () -> int
(printf "%d\\n" 0x01)
(printf "%d\\n" 012)
(return 0))
# # 1
# # 12
| |
cf9ac2b5b496885d3b8c5d198ce6fccb48ac9c6d200e3b02b541a624ecbd1bc5 | ghcjs/ghcjs-dom | MimeType.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.MimeType
(js_getType, getType, js_getSuffixes, getSuffixes,
js_getDescription, ... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/MimeType.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.MimeType
(js_getType, getType, js_getSuffixes, getSuffixes,
js_getDescription, getDescription, js_getEnabledPlugin,
getEnabledPlugin, MimeType(..), gTypeMimeType)
... |
59c31204613e9ecf78fcf8af28d8d485b6bf1cd0ff4f77e23664abd35a8ca7cd | yapsterapp/er-cassandra | tables.clj | (ns er-cassandra.dump.tables
(:require
[cats.core :as monad :refer [return]]
[clojure.java.io :as io]
[er-cassandra.record :as cass.r]
[er-cassandra.session :as cass.session]
[er-cassandra.schema :as cass.schema]
[prpr.promise :as pr :refer [ddo]]
[prpr.stream :as stream]
[qbits.hayt :as h]
... | null | https://raw.githubusercontent.com/yapsterapp/er-cassandra/1d059f47bdf8654c7a4dd6f0759f1a114fdeba81/src/er_cassandra/dump/tables.clj | clojure | remove nil values from the record streams
to avoid creating tombstones
(warn "update-counter-record"
:table table
:counter-key-cols counter-key-cols
:counter-col counter-col
:record record})
:prepare? has a bug for [:+] stmts
:prepare? true
:any not supported for prepared counter t... | (ns er-cassandra.dump.tables
(:require
[cats.core :as monad :refer [return]]
[clojure.java.io :as io]
[er-cassandra.record :as cass.r]
[er-cassandra.session :as cass.session]
[er-cassandra.schema :as cass.schema]
[prpr.promise :as pr :refer [ddo]]
[prpr.stream :as stream]
[qbits.hayt :as h]
... |
057cf1acbb0e09327c0ce5997d513339bd484394d7fced61ff398a3ac1ae6e63 | kowey/GenI | FeatureStructure.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - orphans #
module NLP.GenI.Test.FeatureStructure where
import Control.Arrow ( (***) )
import Control.Monad ( liftM, liftM2 )
import GHC.Exts ( IsString(..) )
import Data.Maybe (isJust)
import qualified Data.Map as Map
import q... | null | https://raw.githubusercontent.com/kowey/GenI/570a6ef70e61a7cb01fe0fc29732cd9c1c8f2d7a/geni-test/NLP/GenI/Test/FeatureStructure.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------
----------------------------------------------------------------------
via derive
via derive | # LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fno - warn - orphans #
module NLP.GenI.Test.FeatureStructure where
import Control.Arrow ( (***) )
import Control.Monad ( liftM, liftM2 )
import GHC.Exts ( IsString(..) )
import Data.Maybe (isJust)
import qualified Data.Map as Map
import qualified Data.Text as T
import Test... |
35bec3daf4c58a1e23e834da087bdb38143c111de1b1162fe9202f1a56a75bd5 | polyfy/polylith | m107_missing_componens_in_project_test.clj | (ns polylith.clj.core.validator.m107-missing-componens-in-project-test
(:require [clojure.test :refer :all]
[polylith.clj.core.util.interface.color :as color]
[polylith.clj.core.validator.m107-missing-componens-in-project :as m107])
(:refer-clojure :exclude [bases]))
(def settings {:profile... | null | https://raw.githubusercontent.com/polyfy/polylith/febea3d8a9b30a60397594dda3cb0f25154b8d8d/components/validator/test/polylith/clj/core/validator/m107_missing_componens_in_project_test.clj | clojure | (ns polylith.clj.core.validator.m107-missing-componens-in-project-test
(:require [clojure.test :refer :all]
[polylith.clj.core.util.interface.color :as color]
[polylith.clj.core.validator.m107-missing-componens-in-project :as m107])
(:refer-clojure :exclude [bases]))
(def settings {:profile... | |
6316c7d890afe47aa331dbd846d7f08f7ab7e293160620b6b0e7b022be4ee781 | karlll/bioerl | assembly.erl | %
2013 - 12 - 03 karlll < >
%
%
Genome assembly
%
-module(assembly).
-compile([export_all]).
%% -------------------------------------------------------------------------- %%
%% String composition %%
%% ----------------------------------------------------... | null | https://raw.githubusercontent.com/karlll/bioerl/6ade2d63bb37f1312e33c3bbad9b7252323ad369/src/assembly.erl | erlang |
-------------------------------------------------------------------------- %%
String composition %%
-------------------------------------------------------------------------- %%
-------------------------------------------------------------------------- %%
... | 2013 - 12 - 03 karlll < >
Genome assembly
-module(assembly).
-compile([export_all]).
print_str_compo(String,K) ->
StrCompo = str_compo(String,K),
lists:foreach(fun(El) -> io:format("~s~n",[El]) end, StrCompo).
get_str_compo(String,K) ->
StrCompo = str_compo(String,K),
lists:map(fun(El) -> io_lib:format(... |
4da25bd7ad80ac3df396fe56f1b6842321a11a7f75adc7424c9c0ad34a44abe2 | facebook/pyre-check | lwtSubprocess.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/98b8362ffa5c715c708676c1a37a52647ce79fe0/source/lwtSubprocess.ml | ocaml | TODO(T132410158) Add a module-level doc comment. |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
cf6ebf5402f44dbf1bb9afbf2e4bcbba2ddf57c0c1aae4fa6619d0347ba6ab08 | BranchTaken/Hemlock | zint.ml | module T = struct
type t = int64 Stdlib.Array.t
let min_word_length = 0L
2**64 bits .
let init n ~f =
Stdlib.Array.init (Stdlib.Int64.to_int n) (fun i -> f (Stdlib.Int64.of_int i))
let word_length t =
Stdlib.Int64.of_int (Stdlib.Array.length t)
let get i t =
Stdlib.Array.get t (Stdlib.Int64.to_i... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/53da5c0d9cf0c94d58b4391735d917518eec67fa/bootstrap/src/basis/zint.ml | ocaml | module T = struct
type t = int64 Stdlib.Array.t
let min_word_length = 0L
2**64 bits .
let init n ~f =
Stdlib.Array.init (Stdlib.Int64.to_int n) (fun i -> f (Stdlib.Int64.of_int i))
let word_length t =
Stdlib.Int64.of_int (Stdlib.Array.length t)
let get i t =
Stdlib.Array.get t (Stdlib.Int64.to_i... | |
9d401a39b75371bcec4bbd552160ed8e4040135286189d7fed14804d29e47ed7 | composewell/unicode-data | Numeric.hs | -- |
Module : Unicode . . Numeric
Copyright : ( c ) 2020 Composewell Technologies and Contributors
-- License : Apache-2.0
-- Maintainer :
-- Stability : experimental
--
-- Numeric character property related functions.
--
-- @since 0.3.0
module Unicode.Char.Numeric
( -- * Predicates
isNu... | null | https://raw.githubusercontent.com/composewell/unicode-data/bf8bb533650119b3ce196aa95b009c6f4ebc1f04/unicode-data/lib/Unicode/Char/Numeric.hs | haskell | |
License : Apache-2.0
Maintainer :
Stability : experimental
Numeric character property related functions.
@since 0.3.0
* Predicates
* Numeric values
* Re-export from @base@
| Selects Unicode numeric characters, including digits from various
__Note:__ a character may have a numeric value (see 'n... | Module : Unicode . . Numeric
Copyright : ( c ) 2020 Composewell Technologies and Contributors
module Unicode.Char.Numeric
isNumeric
, isNumber
, numericValue
, integerValue
, isDigit
, isOctDigit
, isHexDigit
, digitToInt
, intToDigit
) where
import Data.Char (... |
0960eaeeeee9c59860f0df353dcb560e0f5e94093f7ee5a855a7473cfbce5b21 | input-output-hk/marlowe-cardano | Store.hs | {-# LANGUAGE Arrows #-}
# LANGUAGE DuplicateRecordFields #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
{-# LANGUAGE StrictData #-}
module Language.Marlowe.Runtime.Indexer.Store
where
import Control.Concurrent.Component
import Control.Concurrent.STM (STM, atomically, modifyTVar, newTVar, readTVar, writeTVar)
... | null | https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/e0b4fa12179e4d26f15f04e2a453de934b644ae2/marlowe-runtime/indexer/Language/Marlowe/Runtime/Indexer/Store.hs | haskell | # LANGUAGE Arrows #
# LANGUAGE GADTs #
# LANGUAGE StrictData #
pulls batches to save in another.
Spawn the aggregator thread
Spawn the persister thread to read the changes accumulated by the aggregator.
| The aggregator component pulls chain events and accumulates a batch of
changes to persist.
A variable which w... | # LANGUAGE DuplicateRecordFields #
# LANGUAGE KindSignatures #
module Language.Marlowe.Runtime.Indexer.Store
where
import Control.Concurrent.Component
import Control.Concurrent.STM (STM, atomically, modifyTVar, newTVar, readTVar, writeTVar)
import Control.Monad (forever, guard, unless)
import Data.Aeson (ToJSON)
im... |
9ea022333c31f7cc5cf01e1fdf41386081d66359623cd267b8cd12af62f4a81a | ghcjs/ghcjs-dom | Request.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.Request
(js_newRequest, newRequest, js_clone, clone, clone_, js_getMethod,
getM... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/Request.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/Request.type Mozilla Request.type documentation>
| <-US/docs/Web/API/Request.referrer Mozilla Request.referrer documentation>
| <-US/docs/Web/API/Request.mode Mozilla Request.mode documentation>
| <-U... | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.Request
(js_newRequest, newRequest, js_clone, clone, clone_, js_getMethod,
getMethod, js_getUrl, getUrl, js_getHeaders, getHeaders,
js_getType, getType, js_getDestination... |
3012465948bac54825ceea52d4cf52befd66c5e364168a0c21d90b0b5e458cdb | DavidAlphaFox/RabbitMQ | mochiweb_acceptor.erl | @author < >
@copyright 2010 Mochi Media , Inc.
@doc MochiWeb acceptor .
-module(mochiweb_acceptor).
-author('').
-include("internal.hrl").
-export([start_link/3, init/3]).
start_link(Server, Listen, Loop) ->
proc_lib:spawn_link(?MODULE, init, [Server, Listen, Loop]).
init(Server, Listen, Loop) ->
... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/mochiweb-wrapper/mochiweb-git/src/mochiweb_acceptor.erl | erlang |
Tests
| @author < >
@copyright 2010 Mochi Media , Inc.
@doc MochiWeb acceptor .
-module(mochiweb_acceptor).
-author('').
-include("internal.hrl").
-export([start_link/3, init/3]).
start_link(Server, Listen, Loop) ->
proc_lib:spawn_link(?MODULE, init, [Server, Listen, Loop]).
init(Server, Listen, Loop) ->
... |
44c4be859ba20aa518959fcc346ddfe633626132c635d3e0e3062b689aff634a | orbitz/phantom_types | will_compile.ml | let () =
let s1 = Estring.make_utf8 "hello" in
let s2 = Estring.make_utf8 "world" in
let s3 = Estring.concat (Estring.make_utf8 " ") [s1; s2] in
Printf.printf "%s\n" (Estring.str s3)
| null | https://raw.githubusercontent.com/orbitz/phantom_types/12f199745f78024e67b01cc39c5aa1a23cfc18e5/estring/will_compile.ml | ocaml | let () =
let s1 = Estring.make_utf8 "hello" in
let s2 = Estring.make_utf8 "world" in
let s3 = Estring.concat (Estring.make_utf8 " ") [s1; s2] in
Printf.printf "%s\n" (Estring.str s3)
| |
3f0bb3adc2236a9aaae39d4fe857179a0998eb3cb49e33dd9dbca05cb9de4321 | gsdlab/clafer | TypeSystem.hs | # LANGUAGE TemplateHaskell #
Copyright ( C ) 2015 < >
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 ... | null | https://raw.githubusercontent.com/gsdlab/clafer/a30a645ae1e4fc793851e53446d220924038873a/test/Suite/TypeSystem.hs | haskell | c0_A
c0_as
c0_B
c0_b | # LANGUAGE TemplateHaskell #
Copyright ( C ) 2015 < >
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 ... |
87be0ff7d40a636d63db91f53675376eab3db0cafddd44828080572daf5161da | naproche/naproche | Time.hs | {- generated by Isabelle -}
Title : Isabelle / Time.hs
Author : Makarius
LICENSE : BSD 3 - clause ( Isabelle )
Time based on milliseconds .
See " $ ISABELLE_HOME / src / Pure / General / time.scala "
Author: Makarius
LICENSE: BSD 3-clause (Isabelle)
Time based on m... | null | https://raw.githubusercontent.com/naproche/naproche/f88efe1cf38828069e0d6ba225318562702f3d41/Isabelle/src/Isabelle/Time.hs | haskell | generated by Isabelle
# LANGUAGE OverloadedStrings # |
Title : Isabelle / Time.hs
Author : Makarius
LICENSE : BSD 3 - clause ( Isabelle )
Time based on milliseconds .
See " $ ISABELLE_HOME / src / Pure / General / time.scala "
Author: Makarius
LICENSE: BSD 3-clause (Isabelle)
Time based on milliseconds.
See "$ISABELLE... |
14c8b37e53e243dbe3fc1a70d988cc68a141b4d957be5318cf0be29e5b0a3554 | caradoc-org/caradoc | textview.mli | (*****************************************************************************)
(* Caradoc: a PDF parser and validator *)
Copyright ( C ) 2017
(* *)
(* This program is... | null | https://raw.githubusercontent.com/caradoc-org/caradoc/100f53bc55ef682049e10fabf24869bc019dc6ce/src/ui/textview.mli | ocaml | ***************************************************************************
Caradoc: a PDF parser and validator
This program is free software; you can redistribute it and/or modify
... | Copyright ( C ) 2017
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation .
You should have received a copy of the GNU General Public License along
with this program ; if n... |
0dd1816feab87ff1f079cd250c10ecf105d53cd9b738640846d2688213d3af8d | CloudI/CloudI | cloudi_request.erl | -*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*-
ex : set utf-8 sts=4 ts=4 sw=4 et nomod :
%%%
%%%------------------------------------------------------------------------
%%% @doc
%%% ==CloudI Request==
%%% Request format transform.
%%% @end
%%%
MIT License
%%%
Co... | null | https://raw.githubusercontent.com/CloudI/CloudI/e2e0b78f82ee6ba9f4f47713f19833bec8d071f6/src/lib/cloudi_core/src/cloudi_request.erl | erlang |
------------------------------------------------------------------------
@doc
==CloudI Request==
Request format transform.
@end
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
the rights to use, copy, modify, m... | -*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*-
ex : set utf-8 sts=4 ts=4 sw=4 et nomod :
MIT License
Copyright ( c ) 2013 - 2023 Michael Truog < mjtruog at protonmail dot com >
to deal in the Software without restriction , including without limitation
and/or... |
d9646cd67492bab9e452225127a17674855b87d1b5d482dc335af9493cc8dd53 | jackfirth/rebellion | web-link.rkt | #lang racket/base
(require racket/contract/base)
(provide
(contract-out
[web-link
(-> url-coercible? link-relation-coercible? url-coercible? web-link?)]
[web-link? (-> any/c boolean?)]
[web-link-source (-> web-link? url?)]
[web-link-relation (-> web-link? (or/c url? symbol?))]
[web-link-target (-> web-l... | null | https://raw.githubusercontent.com/jackfirth/rebellion/64f8f82ac3343fe632388bfcbb9e537759ac1ac2/web-link.rkt | racket | @------------------------------------------------------------------------------ | #lang racket/base
(require racket/contract/base)
(provide
(contract-out
[web-link
(-> url-coercible? link-relation-coercible? url-coercible? web-link?)]
[web-link? (-> any/c boolean?)]
[web-link-source (-> web-link? url?)]
[web-link-relation (-> web-link? (or/c url? symbol?))]
[web-link-target (-> web-l... |
125af31ff1394b3b8ef7d23bf9387bf55c8a79aa03821caa8d39b712bf9b758e | ocaml-flambda/ocaml-jst | translattribute.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* ... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/a9268d29b47cd5c3c051e761f454330573f7ee0e/lambda/translattribute.ml | ocaml | ************************************************************************
OCaml
Pierre... | Copyright 2015 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Typedtree
open Lambda
open Location
let is_inline_attribute =
[ ["inline"; "ocaml.inline"],true ]
let is_inlined_attribute =
[ ["inlined"; "ocaml.inlined"], t... |
8249c1043ef1af428a95b98fcbbd463f7ef1926f8570bec5b6690beeb5982726 | nboldi/c-parser-in-haskell | RangeTree.hs | # LANGUAGE NamedFieldPuns #
-- | A 2-Dimensional R-Tree for intervals
module MiniC.RangeTree where
import Text.Parsec.Pos
import Text.Parsec.PosOps
import MiniC.SourceNotation
import MiniC.Representation
import SourceCode.SourceTree
import Control.Lens
import Data.List
import Data.Maybe
import Debug.Tr... | null | https://raw.githubusercontent.com/nboldi/c-parser-in-haskell/1a92132e7d1b984cf93ec89d6836cc804257b57d/MiniC/RangeTree.hs | haskell | | A 2-Dimensional R-Tree for intervals
| Trees of ranges in a hierarchical structure, with ranges and indices.
| Generates a range tree from a source rose. Indexes the tree according to the
hiearchy of nodes in the original tree.
Inserts a new node into a range tree
| Finds indices of nodes in the tree that ... | # LANGUAGE NamedFieldPuns #
module MiniC.RangeTree where
import Text.Parsec.Pos
import Text.Parsec.PosOps
import MiniC.SourceNotation
import MiniC.Representation
import SourceCode.SourceTree
import Control.Lens
import Data.List
import Data.Maybe
import Debug.Trace
data RangeTree = RangeTree { rtRange... |
07aed5281da718e718b8315a6a340e514a273bec5621e3585ff0b9be0a496f39 | synrc/nitro | element_password.erl | -module(element_password).
-author('Vladimir Galunshchikov').
-include_lib("nitro/include/nitro.hrl").
-include_lib("nitro/include/event.hrl").
-compile(export_all).
render_element(Record) when Record#password.show_if==false -> [<<>>];
render_element(Record) ->
Id = case Record#password.postback of
[] -> R... | null | https://raw.githubusercontent.com/synrc/nitro/753b543626add2c014584546ec50870808a2eb90/src/elements/input/element_password.erl | erlang | global
spec | -module(element_password).
-author('Vladimir Galunshchikov').
-include_lib("nitro/include/nitro.hrl").
-include_lib("nitro/include/event.hrl").
-compile(export_all).
render_element(Record) when Record#password.show_if==false -> [<<>>];
render_element(Record) ->
Id = case Record#password.postback of
[] -> R... |
97a38d93520be10f6962299d06f23f69f219fbc3a606bb059d1c1484b707f827 | vseloved/cl-agraph | triple.lisp | CL - AGRAPH triple definition and parsing / serialization
( c ) Vsevolod Dyomkin . see LICENSE file for permissions
(in-package :agraph)
(named-readtables:in-readtable rutils-readtable)
;;; URIs & blank nodes
(defvar *prefixes*
(let ((prefixes (make-hash-table :test 'equal)))
(loop :for (prefix uri) :in '... | null | https://raw.githubusercontent.com/vseloved/cl-agraph/e605b34fa57a9ede6fb6cc13ef82fc3438898567/src/triple.lisp | lisp | URIs & blank nodes
triples
utils
nquads
subject ::= uriref | nodeID
predicate ::= uriref | nodeID
graph ::= uriref | nodeID
consume white space if there is any at the start of a line
check if this line is a comment or a triple
consume comment line | CL - AGRAPH triple definition and parsing / serialization
( c ) Vsevolod Dyomkin . see LICENSE file for permissions
(in-package :agraph)
(named-readtables:in-readtable rutils-readtable)
(defvar *prefixes*
(let ((prefixes (make-hash-table :test 'equal)))
(loop :for (prefix uri) :in '(("rdf" "-rdf-syntax-ns... |
7f104b20dfc7b0929bbcc1a3fc5e9bf43b7451f281aef4ed13fba53221bc09b7 | williamleferrand/aws | sDB_factory.ml | SDB API
(* *)
module Make = functor (HC : Aws_sigs.HTTP_CLIENT) ->
struct
module C = CalendarLib.Calendar
module P = CalendarLib.Printer.CalendarPrinter
module X = My_xml
open Lwt
open Creds
module Util = Aws_util
exception Error of string
let sprint = Printf.sprintf
let print = Printf.print... | null | https://raw.githubusercontent.com/williamleferrand/aws/d591ef0a2b89082caac6ddd6850b2d8b7824e577/src/sDB_factory.ml | ocaml |
XML readers
preseve the order of domains in response
list all domains
create domain
delete domain
put attributes
batch put attributes
get attributes
delete attributes
select: TODO if [encode=true], encode references to values in the
select [expression]. This might not be easy, as the [expres... | SDB API
module Make = functor (HC : Aws_sigs.HTTP_CLIENT) ->
struct
module C = CalendarLib.Calendar
module P = CalendarLib.Printer.CalendarPrinter
module X = My_xml
open Lwt
open Creds
module Util = Aws_util
exception Error of string
let sprint = Printf.sprintf
let print = Printf.printf
le... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.