_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 |
|---|---|---|---|---|---|---|---|---|
2c6d4ecb9d3464140d6e36c6342dbd1765b22038aa3aff08a40af7bd9dc16889 | kupl/FixML | sub28.ml | type exp =
| V of var
| P of var * exp
| C of exp * exp
and var = string
let isinthelist l a =
let temp = List.filter ((fun x y -> if x <> y then false else true) a) l in
match temp with
| [] -> false
| hd::tl -> true
let isnotinthelist l a =
let temp = List.filter ((fun x y -> if x <> y then... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/wellformedness/wellformedness/submissions/sub28.ml | ocaml | type exp =
| V of var
| P of var * exp
| C of exp * exp
and var = string
let isinthelist l a =
let temp = List.filter ((fun x y -> if x <> y then false else true) a) l in
match temp with
| [] -> false
| hd::tl -> true
let isnotinthelist l a =
let temp = List.filter ((fun x y -> if x <> y then... | |
b9bd1e94b3181d5a201ba1c7f0e8eed41b4ab67e66a1d4513bee9d380e8e698f | SamirTalwar/advent-of-code | AOC_10_2.hs | {-# OPTIONS -Wall #-}
import qualified Data.List as List
import qualified Data.Maybe as Maybe
main :: IO ()
main = do
code <- lines <$> getContents
let scores = map score $ Maybe.mapMaybe complete code
let middle = length scores `div` 2
let answer = List.sort scores !! middle
print answer
score :: [Char] -... | null | https://raw.githubusercontent.com/SamirTalwar/advent-of-code/651c47d81e8e7959d500104ada6ad8f3106853c0/2021/AOC_10_2.hs | haskell | # OPTIONS -Wall # |
import qualified Data.List as List
import qualified Data.Maybe as Maybe
main :: IO ()
main = do
code <- lines <$> getContents
let scores = map score $ Maybe.mapMaybe complete code
let middle = length scores `div` 2
let answer = List.sort scores !! middle
print answer
score :: [Char] -> Int
score = foldl (\... |
25d3d5f04d6dcf72ed0f0494186b4090bc4b7eadba8c0b4d29025f09ce427695 | puppetlabs/puppetserver | certificate_authority.clj | (ns puppetlabs.puppetserver.certificate-authority
(:import [org.apache.commons.io IOUtils]
[java.util Date]
[java.io InputStream ByteArrayOutputStream ByteArrayInputStream File StringReader IOException]
[java.nio.file Files Paths LinkOption]
[java.nio.file.attribute FileAtt... | null | https://raw.githubusercontent.com/puppetlabs/puppetserver/b1b351a0bb4ad29adbff8070e32916d1409c2f89/src/clj/puppetlabs/puppetserver/certificate_authority.clj | clojure |
provisioned by PE or user in case of FOSS
Path to file containing serial numbers of infra node certificates
This would be re-generated anytime the infra-nodes list is updated.
Path to Infrastructure CRL file containing infra certificates
Infra CRL would be enabled by default.
them
Definitions
Note: When updat... | (ns puppetlabs.puppetserver.certificate-authority
(:import [org.apache.commons.io IOUtils]
[java.util Date]
[java.io InputStream ByteArrayOutputStream ByteArrayInputStream File StringReader IOException]
[java.nio.file Files Paths LinkOption]
[java.nio.file.attribute FileAtt... |
0b6779a98d5d64dabea9bc4e7b77de5a53207a14ddd9cdefe9b4251f0e02cb31 | lispnik/iup | cube.lisp | ;;; Generated from org-mode, do not edit
(eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload '("iup" "iup-gl" "cl-opengl" "cl-glu")))
(defpackage #:iup-examples.cube
(:use #:common-lisp)
(:export #:cube))
(in-package #:iup-examples.cube)
(defvar *canvas* nil)
(defvar *tt* 0.0)
(defvar *verti... | null | https://raw.githubusercontent.com/lispnik/iup/f8e5f090bae47bf8f91ac6fed41ec3bc01061186/examples/cube.lisp | lisp | Generated from org-mode, do not edit
FIXME (iup-cffi::%iup-set-function :idle_action 'idle)
(incf tt)
(iup-gl:make-current canvas)
(repaint canvas)
iup::+default+) |
(eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload '("iup" "iup-gl" "cl-opengl" "cl-glu")))
(defpackage #:iup-examples.cube
(:use #:common-lisp)
(:export #:cube))
(in-package #:iup-examples.cube)
(defvar *canvas* nil)
(defvar *tt* 0.0)
(defvar *vertices*
#((-1 -1 1) (-1 1 1)
(1 1 1) (... |
6ae661106bae00dd981d7a15233c686df1186a14ea3c73a2d1afd9a97f9e54f5 | hercules-ci/hercules-ci-agent | Error.hs | {-# LANGUAGE DeriveAnyClass #-}
module Hercules.API.Error where
import Hercules.API.Prelude
-- | General error type used in (some) HTTP error response bodies and in some
-- resources.
data Error = Error
{ -- | Symbolic names of the error condition; identifiers that clients
-- may use to identify specific error... | null | https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/b3f8aa8e4a8b22dbbe92cc5a89e6881090b933b3/hercules-ci-api/src/Hercules/API/Error.hs | haskell | # LANGUAGE DeriveAnyClass #
| General error type used in (some) HTTP error response bodies and in some
resources.
| Symbolic names of the error condition; identifiers that clients
may use to identify specific errors or classes of errors.
| Human-readable error message. |
module Hercules.API.Error where
import Hercules.API.Prelude
data Error = Error
errorTags :: [Text],
message :: Text
}
deriving (Generic, Show, Eq, NFData, ToJSON, FromJSON, ToSchema)
|
ba007a0777cb953ec97838ad7ac24717e9235355aff9364859addb139a64fb66 | greghendershott/pdb | define.rkt | #lang racket/base
(require racket/contract)
;; Examples for main.rkt test.
(define (plain x) x)
(provide plain)
(provide (rename-out [plain renamed]))
(define (contracted1 x) x)
(provide (contract-out [contracted1 (-> any/c any)]))
(define (contracted2 x) x)
(provide/contract [contracted2 (-> any/c any)])
(define ... | null | https://raw.githubusercontent.com/greghendershott/pdb/189835f787cd2cc1f97a1eff9657f5178ffb05fa/example/define.rkt | racket | Examples for main.rkt test.
This is here to try to trip naive matching, by having a definition
of `sub` that is not actually provided, unlike the one in the `sub`
module just below.
Likewise, another case of naive matching: | #lang racket/base
(require racket/contract)
(define (plain x) x)
(provide plain)
(provide (rename-out [plain renamed]))
(define (contracted1 x) x)
(provide (contract-out [contracted1 (-> any/c any)]))
(define (contracted2 x) x)
(provide/contract [contracted2 (-> any/c any)])
(define (c/r x) x)
(provide (contract-o... |
b4141426cc6d5f8103f40143b6f08c03be3c733646f5d0aa83d2967cce3ec5d3 | EasyCrypt/easycrypt | ecCoreGoal.ml | (* -------------------------------------------------------------------- *)
open EcLocation
open EcUtils
open EcIdent
open EcTypes
open EcFol
open EcEnv
module L = EcLocation
(* -------------------------------------------------------------------- *)
exception InvalidGoalShape
(* --------------------------------------... | null | https://raw.githubusercontent.com/EasyCrypt/easycrypt/ca3d10a8a57411c85b396309b3e27ceb03adbdf7/src/ecCoreGoal.ml | ocaml | --------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
-----------------------------------... | open EcLocation
open EcUtils
open EcIdent
open EcTypes
open EcFol
open EcEnv
module L = EcLocation
exception InvalidGoalShape
type clearerror = [
| `ClearInGoal of EcIdent.t list
| `ClearDep of EcIdent.t pair
]
exception ClearError of clearerror Lazy.t
module ID : sig
type id = private int
val gen : un... |
2ed430975f57d7b37b1cadbae053b46754813b83b8a599eaae316f71409ac183 | voxoz/emqttd | emqttd_auth_mod.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2013 - 2017 EMQ Enterprise , Inc. ( )
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% ... | null | https://raw.githubusercontent.com/voxoz/emqttd/2be612e0e7a00a866cd9af350a030966d73fbc09/src/emqttd_auth_mod.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2013 - 2017 EMQ Enterprise , Inc. ( )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqttd_auth_mod).
-author("Feng Lee <>").
-include("emqttd.hrl").
-export([passwd_hash/2]).
-type(hash_type... |
408e2df1baa3a1cb1553cc3f9c17a7a2a83c032b2e58651ba8bb43fc77675514 | jackdoe/bzzz | wildcard.clj | (ns bzzz.queries.wildcard
(:import (org.apache.lucene.search WildcardQuery)
(org.apache.lucene.index Term)))
(defn parse
[generic input analyzer]
(let [{:keys [field value boost]
:or {boost 1}} input
q (WildcardQuery. (Term. ^String field ^String value))]
(.setBoost q boost)
... | null | https://raw.githubusercontent.com/jackdoe/bzzz/ae98708056e39ada28f22aad9e43ea91695b346b/src/bzzz/queries/wildcard.clj | clojure | (ns bzzz.queries.wildcard
(:import (org.apache.lucene.search WildcardQuery)
(org.apache.lucene.index Term)))
(defn parse
[generic input analyzer]
(let [{:keys [field value boost]
:or {boost 1}} input
q (WildcardQuery. (Term. ^String field ^String value))]
(.setBoost q boost)
... | |
f3740088788a755a6769576aed6f52ab8908dce9ee1a8f6433c7966d76ba40b3 | arsalan0c/cdp-hs | Tracing.hs | {-# LANGUAGE OverloadedStrings, RecordWildCards, TupleSections #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeFamilies #
{- |
= Tracing
-}
module CDP.Domains.Tracing (module CDP.Domains.T... | null | https://raw.githubusercontent.com/arsalan0c/cdp-hs/f946d706485b0dd16360a753321c46d6f098649d/src/CDP/Domains/Tracing.hs | haskell | # LANGUAGE OverloadedStrings, RecordWildCards, TupleSections #
|
= Tracing
| Type 'Tracing.MemoryDumpConfig'.
Configuration for memory dump. Used only when "memory-infra" category is enabled.
| Type 'Tracing.TraceConfig'.
| Controls how the trace buffer stores data.
| Turns on system tracing.
| Turns on argu... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeFamilies #
module CDP.Domains.Tracing (module CDP.Domains.Tracing) where
import Control.Applicative ((<$>))
import Control.... |
4acdbe6672e972ae077fc552d0a2c212d5f28a5e4419f66d931dde1f0830f162 | ml4tp/tcoq | type_errors.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/checker/type_errors.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Type errors.
Fixpoints
CoFixpoi... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Cic
open Envi... |
afc92fcb1e5d2dc79b13a7375335d72d5e062da267d0b1fef48f2176c0be7e65 | techascent/tvm-clj | _make.clj | (ns tvm-clj.impl.fns.relay.op.image._make
(:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns]))
(tvm-ns-fns/export-tvm-functions "relay.op.image._make") | null | https://raw.githubusercontent.com/techascent/tvm-clj/1088845bd613b4ba14b00381ffe3cdbd3d8b639e/src/tvm_clj/impl/fns/relay/op/image/_make.clj | clojure | (ns tvm-clj.impl.fns.relay.op.image._make
(:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns]))
(tvm-ns-fns/export-tvm-functions "relay.op.image._make") | |
8e2080138f882bad026b63c0382ace7ea0c897529cd581560537c85581368227 | ku-fpg/sunroof-compiler | Concurrent.hs | # LANGUAGE ScopedTypeVariables #
-- | Provides common combinators for concurrency in Javascript.
--
-- The emulated threading Javascript threading model provided by
Sunroof is based on cooperative multithreading
-- (since Javascript is not multithreaded).
module Language.Sunroof.Concurrent
( loop
, forkJS
... | null | https://raw.githubusercontent.com/ku-fpg/sunroof-compiler/5d8edafea515c4c2b4e7631799f35d8df977e289/Language/Sunroof/Concurrent.hs | haskell | | Provides common combinators for concurrency in Javascript.
The emulated threading Javascript threading model provided by
(since Javascript is not multithreaded).
-------------------------------------------------------------
General Concurrent Combinators.
---------------------------------------------------... | # LANGUAGE ScopedTypeVariables #
Sunroof is based on cooperative multithreading
module Language.Sunroof.Concurrent
( loop
, forkJS
, threadDelay
, yield
) where
import Language.Sunroof.Types
import Language.Sunroof.Classes
import Language.Sunroof.JS.Number ( JSNumber )
import Language.Sunroof.JS.Browser... |
df7a95231342643c4b79293de94c6da30aa9580f7e7b773eff9defb001dab949 | kadena-io/chainweb-mining-client | Worker.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DerivingVia #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
-- |
-- Module: Worker
Copyright : Copyright © 2... | null | https://raw.githubusercontent.com/kadena-io/chainweb-mining-client/e051c1faab0ffb85d7c0d454763e77af2646384d/src/Worker.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module: Worker
Stability: experimental
The type of a mining worker
* Hash Target
* Mining Work
* Nonce
* Mining Worker
internal modules
-------------------------------------------------------------------------- --
Work
while solving the work.
string.
-----------------... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DerivingVia #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
Copyright : Copyright © 2020 Kadena LLC .
License : MIT
Maintainer : < >
mod... |
14c50b0cd3d3258c1a8f692ae5968f0a3345c1d6b6aaac2e369d7e044af27074 | np/ling | ling-fmt.hs | import qualified Ling.Fmt (main)
main :: IO ()
main = Ling.Fmt.main
| null | https://raw.githubusercontent.com/np/ling/ca942db83ac927420d1ae5e24b4da164394ddbbe/exec/ling-fmt.hs | haskell | import qualified Ling.Fmt (main)
main :: IO ()
main = Ling.Fmt.main
| |
66c38c3300fc334143ea68c5507c00348b875a4c9d3c0cd702f5b29d27519b26 | clojure-interop/aws-api | AWSRDSDataAsyncClientBuilder.clj | (ns com.amazonaws.services.rdsdata.AWSRDSDataAsyncClientBuilder
"Fluent builder for AWSRDSDataAsync. Use of the builder is preferred over using
constructors of the client class."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.services.rdsdata AWSRDSDataAsyncClientBuilder]))
(defn *sta... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.rdsdata/src/com/amazonaws/services/rdsdata/AWSRDSDataAsyncClientBuilder.clj | clojure | (ns com.amazonaws.services.rdsdata.AWSRDSDataAsyncClientBuilder
"Fluent builder for AWSRDSDataAsync. Use of the builder is preferred over using
constructors of the client class."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.services.rdsdata AWSRDSDataAsyncClientBuilder]))
(defn *sta... | |
4280ec7e1084d1f32207090c47c5d96539ec58099f2ff4043abb54d509d2652a | ocaml-flambda/flambda-backend | simple_value_approx.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/651e3119bfd6ed8d79d3139054093872b735fda1/middle_end/flambda/simple_value_approx.ml | ocaml | ************************************************************************
OCaml
... | , OCamlPro
and ,
Copyright 2014 - -2016 Jane Street Group LLC
the GNU Lesser General Public License version 2.1 , with the
[@@@ocaml.warning "+a-4-9-30-40-41-42-66"]
open! Int_replace_polymor... |
c30f9daac9636d511056c2b8f496dcf241f0e652ef9e49e3a9ada0c796016b5b | 2600hz/kazoo | kzd_port_requests.erl | %%%-----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz
%%% @doc Accessors for `port_requests' document.
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can o... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_documents/src/kzd_port_requests.erl | erlang | -----------------------------------------------------------------------------
@doc Accessors for `port_requests' document.
@end
-----------------------------------------------------------------------------
Private fields
------------------------------------------------------------------------------
@doc
@end
----... | ( C ) 2010 - 2020 , 2600Hz
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(kzd_port_requests).
-export([new/0]).
-export([bill/1, bill/2, set_bill/2]).
-export([bill_account_number... |
9ea689c9bc3d4bc832a571ebefc9a9f1185a4dc7bf6bf474d4f7807c9e3b48a0 | c-cube/frog-utils | frogdaemon.ml |
(* This file is free software, part of frog-utils. See file "license" for more details. *)
* { 1 Main daemon for IPC }
open Frog_server
let section = Lwt_log.Section.make "frogdaemon"
let main_config_file = "/etc/froglock.conf"
let setup_loggers file_name : unit Lwt.t =
let syslog = Lwt_log.syslog ~facility:`Us... | null | https://raw.githubusercontent.com/c-cube/frog-utils/3f68c606a7abe702f9e22a0606080191a2952b18/src/main/frogdaemon.ml | ocaml | This file is free software, part of frog-utils. See file "license" for more details.
daemonize and listen |
* { 1 Main daemon for IPC }
open Frog_server
let section = Lwt_log.Section.make "frogdaemon"
let main_config_file = "/etc/froglock.conf"
let setup_loggers file_name : unit Lwt.t =
let syslog = Lwt_log.syslog ~facility:`User () in
Lwt_log.default := syslog;
let%lwt () =
try%lwt
let%lwt log' = Lwt_l... |
344c3693187cc54222856990dabd082d145b1148f3f1612e4e7aae3b3fc0b5e2 | bbusching/libgit2 | strarray.rkt | #lang racket
(require ffi/unsafe
"define.rkt"
"utils.rkt")
(provide (all-defined-out))
; Types
(define _char-ptrptr (_cpointer/null _string))
(define-cstruct _git_strarray
([strings _char-ptrptr]
[count _size]))
(define _strarray _git_strarray-pointer)
(define _strarray/null _git_strarray-poin... | null | https://raw.githubusercontent.com/bbusching/libgit2/6d6a007543900eb7a6fbbeba55850288665bdde5/libgit2/include/strarray.rkt | racket | Types
Functions
misc | #lang racket
(require ffi/unsafe
"define.rkt"
"utils.rkt")
(provide (all-defined-out))
(define _char-ptrptr (_cpointer/null _string))
(define-cstruct _git_strarray
([strings _char-ptrptr]
[count _size]))
(define _strarray _git_strarray-pointer)
(define _strarray/null _git_strarray-pointer/null... |
ce6013d9f817e50c483f48c7955f972910a7e57a2df037af1d9089528474ff0f | RedPRL/algaett | Errors.ml | type t =
| NotInferable of {tm : Syntax.t}
| IllTyped of {tm : Syntax.t; tp : NbE.Domain.t}
| Conversion of NbE.Domain.t * NbE.Domain.t
| null | https://raw.githubusercontent.com/RedPRL/algaett/5685e49608aaf230f5691f3e339cd2bd3acb6ec9/src/elaborator/Errors.ml | ocaml | type t =
| NotInferable of {tm : Syntax.t}
| IllTyped of {tm : Syntax.t; tp : NbE.Domain.t}
| Conversion of NbE.Domain.t * NbE.Domain.t
| |
7b9dcd7b7dcbec8ca7807e86894664f14a514844ef51547f84f944c588084b1c | fortytools/holumbus | Core.hs | -- ----------------------------------------------------------------------------
|
Module : Holumbus . Network . Core
Copyright : Copyright ( C ) 2008
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.1
The Server - Modul... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/distribution/source/Holumbus/Network/Core.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
# OPTIONS -fglasgow-exts #
* Socket-Descriptor
* Server-Operations
* Client-Operations
deprecated
use this
* Handle-Operations
| Logger
--------------------... |
|
Module : Holumbus . Network . Core
Copyright : Copyright ( C ) 2008
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.1
The Server - Module for the Holumbus framework .
It contains the lowlevel functions , like ... |
9ef9f8237aa216cbe5475e9e44c6e006a211ded204b316bb20cbf7d6550a1e6e | bzliu94/cs61a_fa07 | type_inference.scm | 2018 - 02 - 08
; we support empty lists and gracefully non-address function applications
; s.t. the function is the result of evaluating an expression
2018 - 01 - 22
; finished translating from python
2018 - 01 - 19
; key is difference between explicit and implicit type;
; also, we have type consolidation a... | null | https://raw.githubusercontent.com/bzliu94/cs61a_fa07/12a62689f149ef035a36b326351928928f6e7b5d/01%20-%20homework/hw6/type_inference.scm | scheme | we support empty lists and gracefully non-address function applications
s.t. the function is the result of evaluating an expression
finished translating from python
key is difference between explicit and implicit type;
also, we have type consolidation as before
we are able to use hash tables via put and get
we ... | 2018 - 02 - 08
2018 - 01 - 22
2018 - 01 - 19
as they were introduced in sections 2.4 through 2.5.2 for
(define NIL_CODE 0)
(define COMPOSITE_FN_CODE 1)
(define UNKNOWN_CODE 0)
(define PROCEDURE_CODE 1)
(define NUMBER_CODE 2)
(define LIST_CODE 3)
(define SENTENCE_OR_WORD_CODE 4)
(define CONFLICTING_... |
bde1f9ced6c8dddb16dc737cd702ff4a3eb3f273bb91e29e55633ad59d54e56b | kitlang/kit | Modifier.hs | # LANGUAGE DeriveGeneric #
module Kit.Ast.Modifier where
import Data.Hashable
import GHC.Generics
data Modifier
= Public
| Private
| Inline
| Static
deriving (Eq, Generic)
instance Hashable Modifier
instance Show Modifier where
show Public = "public"
show Private = "private"
show Inline = "inline"
... | null | https://raw.githubusercontent.com/kitlang/kit/2769a7a8e51fe4466c50439d1a1ebdad0fb79710/src/Kit/Ast/Modifier.hs | haskell | # LANGUAGE DeriveGeneric #
module Kit.Ast.Modifier where
import Data.Hashable
import GHC.Generics
data Modifier
= Public
| Private
| Inline
| Static
deriving (Eq, Generic)
instance Hashable Modifier
instance Show Modifier where
show Public = "public"
show Private = "private"
show Inline = "inline"
... | |
3c3ce4230fb5c81a6a53cb668d7263874adee61adde6b7bb65f203b255f414db | elaforge/karya | Sync_test.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
| In addition to Sync , this tests the whole State - > Diff - > Sync - > BlockC
sequence .
Sync is hard to test functionally because its whole point is to run IO
acti... | null | https://raw.githubusercontent.com/elaforge/karya/8ea15e6a5fb57e2f15f8c19836751e315f9c09f2/Ui/Sync_test.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
test_error
set_block_title
set_track_scroll
Make sure removing and inserting the ruler track makes the others move over.
sync to initial state
multiple simultaneous updates
| Selection is correct even whe... | Copyright 2013
| In addition to Sync , this tests the whole State - > Diff - > Sync - > BlockC
sequence .
Sync is hard to test functionally because its whole point is to run IO
actions .
It 's also hard to test Diff functionally . I could test that the expected
Updates are emitt... |
252f56f2297ce630f3d706e2465e7f4f36d511c9e0e817334903041285e249a3 | oubiwann/star-traders | base_test.clj | (ns starlanes.game.base-test
(:require [clojure.test :refer :all]
[starlanes.game.base :as game]
[starlanes.util :as util]))
(deftest test-game-data-factory
(let [game-data (game/game-data-factory)]
(is (= (game-data :star-map) {}))
(is (= (game-data :total-moves) 0))
(is (= (g... | null | https://raw.githubusercontent.com/oubiwann/star-traders/8d7b85ce9ad6446f3b766cced08c120787a82352/clojure/test/starlanes/game/base_test.clj | clojure | (ns starlanes.game.base-test
(:require [clojure.test :refer :all]
[starlanes.game.base :as game]
[starlanes.util :as util]))
(deftest test-game-data-factory
(let [game-data (game/game-data-factory)]
(is (= (game-data :star-map) {}))
(is (= (game-data :total-moves) 0))
(is (= (g... | |
321adb5a7871a9e332ad561d2cdbd4dcf19bd8265690afcd798d33c023abd202 | boundedvariation/quantfin | Heston.hs | # LANGUAGE ExistentialQuantification #
# LANGUAGE MultiParamTypeClasses #
module Quant.Models.Heston (
Heston (..)
) where
import Quant.Time
import Quant.Types
import Quant.YieldCurve
import Data.Random
import Control.Monad.State
import Quant.MonteCarlo
| ' ' represents a Heston model ( i.e. stochastic volat... | null | https://raw.githubusercontent.com/boundedvariation/quantfin/d077e00d234cbc6a88396ad5644ba76f18cc8ae7/src/Quant/Models/Heston.hs | haskell | ^ Initial asset level.
^ Initial variance
^ Mean-reversion variance
^ Vol-vol
^ Correlation between processes
^ Mean reversion speed
# INLINE initialize #
# INLINE evolve' #
# INLINE discount # | # LANGUAGE ExistentialQuantification #
# LANGUAGE MultiParamTypeClasses #
module Quant.Models.Heston (
Heston (..)
) where
import Quant.Time
import Quant.Types
import Quant.YieldCurve
import Data.Random
import Control.Monad.State
import Quant.MonteCarlo
| ' ' represents a Heston model ( i.e. stochastic volat... |
92d0345058093859f1d7c4ac6a5cbc7feae927f4715c9b0f2ac68040a7387b4a | OCamlPro/typerex-lint | test_sempatch_comp_to_true.ml |
let test_comp_to_true condition texpr fexpr =
if condition = true then texpr
else fexpr
let test_comp_to_not_true condition texpr fexpr =
if condition != true then texpr
else fexpr
let test_comp_to_phys_true condition texpr fexpr =
if condition == true then texpr
else fexpr
| null | https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/plugins/ocp-lint-plugin-sempatch/tests/sempatch_comp_to_true/test_sempatch_comp_to_true.ml | ocaml |
let test_comp_to_true condition texpr fexpr =
if condition = true then texpr
else fexpr
let test_comp_to_not_true condition texpr fexpr =
if condition != true then texpr
else fexpr
let test_comp_to_phys_true condition texpr fexpr =
if condition == true then texpr
else fexpr
| |
c49066143dc1f1512e89ec3acd904a1ccaaadac86f10377a4a55f00628c6654e | DerekCuevas/interview-cake-clj | core.clj | (ns kth-to-last-linked-list.core
(:require [kth-to-last-linked-list.list :as list])
(:gen-class))
(defn kth-to-last-node
"O(n) time solution."
[head k]
(let [k-idx (- (dec (list/length head)) k)]
(when-not (neg? k-idx)
(->> (range k-idx)
(reduce :next head)
:value))))
| null | https://raw.githubusercontent.com/DerekCuevas/interview-cake-clj/f17d3239bb30bcc17ced473f055a9859f9d1fb8d/kth-to-last-linked-list/src/kth_to_last_linked_list/core.clj | clojure | (ns kth-to-last-linked-list.core
(:require [kth-to-last-linked-list.list :as list])
(:gen-class))
(defn kth-to-last-node
"O(n) time solution."
[head k]
(let [k-idx (- (dec (list/length head)) k)]
(when-not (neg? k-idx)
(->> (range k-idx)
(reduce :next head)
:value))))
| |
09f436eee42bf19f28372466dd20e08367aa864777626225291d4fc1095d5c1b | haskoin/murmur3 | Units.hs | module Data.Hash.Murmur.Units (tests) where
import Test.HUnit (assertBool, Assertion)
import Test.Framework (Test, testGroup)
import Test.Framework.Providers.HUnit (testCase)
import Data.Word (Word32)
import qualified Data.ByteString.Base16 as B16 (decodeBase16Lenient)
import qualified Data.ByteString.Char8 as C (pac... | null | https://raw.githubusercontent.com/haskoin/murmur3/d7faf0b03c430a5467eaa8ffcc00a117e67c3197/tests/Data/Hash/Murmur/Units.hs | haskell | module Data.Hash.Murmur.Units (tests) where
import Test.HUnit (assertBool, Assertion)
import Test.Framework (Test, testGroup)
import Test.Framework.Providers.HUnit (testCase)
import Data.Word (Word32)
import qualified Data.ByteString.Base16 as B16 (decodeBase16Lenient)
import qualified Data.ByteString.Char8 as C (pac... | |
57039b7043b558232da1c1610e03dcb34d22b452baa68c29b88c74c523c92f21 | utahstreetlabs/risingtide | interests_bolts.clj | (ns risingtide.test.storm.interests-bolts
(:require risingtide.test
[risingtide.storm.interests-bolts :refer :all]
[midje.sweet :refer :all]))
(fact "emit-scores! throws an exception if it isn't given a score for each user id "
(emit-scores! nil {"user-ids" [1 2 3]} {1 1 2 0} :test)
=> (t... | null | https://raw.githubusercontent.com/utahstreetlabs/risingtide/bc5b798396679739469b1bd8ee1b03db76178cde/test/risingtide/test/storm/interests_bolts.clj | clojure | (ns risingtide.test.storm.interests-bolts
(:require risingtide.test
[risingtide.storm.interests-bolts :refer :all]
[midje.sweet :refer :all]))
(fact "emit-scores! throws an exception if it isn't given a score for each user id "
(emit-scores! nil {"user-ids" [1 2 3]} {1 1 2 0} :test)
=> (t... | |
31a6a026ec30c0bb1fd1083633d3ae6af94c61401d86b750e0f4031281e5bf6d | realworldocaml/examples | finalizer.ml | open Core.Std
open Async.Std
let attach_finalizer n v =
match Heap_block.create v with
| None -> printf "%20s: FAIL\n%!" n
| Some hb ->
let final _ = printf "%20s: OK\n%!" n in
Gc.add_finalizer hb final
type t = { foo: bool }
let main () =
let alloced_float = Unix.gettimeofday () in
let alloced_boo... | null | https://raw.githubusercontent.com/realworldocaml/examples/32ea926861a0b728813a29b0e4cf20dd15eb486e/code/gc/finalizer.ml | ocaml | open Core.Std
open Async.Std
let attach_finalizer n v =
match Heap_block.create v with
| None -> printf "%20s: FAIL\n%!" n
| Some hb ->
let final _ = printf "%20s: OK\n%!" n in
Gc.add_finalizer hb final
type t = { foo: bool }
let main () =
let alloced_float = Unix.gettimeofday () in
let alloced_boo... | |
1181d29cb2bf0e191573aa352bb99ea393687e5d6f8d71ad467c65e3ff0256b6 | input-output-hk/cardano-wallet-legacy | Zoomable.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeFamilies #
module Cardano.Wallet.Kernel.DB.Util.Zoomable (
Zoomable(..)
-- * Generic zoom operators
, zoom
, zoomAllM
, zoomAll
, zoomAll_
, zoomMaybe
, zoomDef
-- * Support for defining instances
, UpdResult(... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet-legacy/143e6d0dac0b28b3274600c6c49ec87e42ec9f37/src/Cardano/Wallet/Kernel/DB/Util/Zoomable.hs | haskell | # LANGUAGE RankNTypes #
* Generic zoom operators
* Support for defining instances
----------------------------------------------------------------------------
----------------------------------------------------------------------------
---------------------------------------------------------------------------... | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
module Cardano.Wallet.Kernel.DB.Util.Zoomable (
Zoomable(..)
, zoom
, zoomAllM
, zoomAll
, zoomAll_
, zoomMaybe
, zoomDef
, UpdResult(..)
, QryResult(..)
) where
import Universum
import Control.Monad.Except (Except... |
50c2778b41adc3301ddce8fb4c98972fe11c49bf639919ce8d3382a1a77ca75d | korya/efuns | wX_Graphics.ml | (***********************************************************************)
(* *)
(* WXlib *)
(* *)
Fabrice Le Fessa... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/toolkit/wX_Graphics.ml | ocaml | *********************************************************************
WXlib
... | Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
The problem is : the XGraphics module is designed to be used by
sequential applications pullin... |
72bdfc1245e7ed247e00ffc74fe636fa1bfc03d5320d7c4df0e85980e713482c | mentat-collective/functional-numerics | quadrature_test.cljc | ;
Copyright © 2017 .
This work is based on the Scmutils system of MIT / GNU Scheme :
Copyright © 2002 Massachusetts Institute of Technology
;
; This is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; ei... | null | https://raw.githubusercontent.com/mentat-collective/functional-numerics/44856b0e3cd1f0dd9f8ebb2f67f4e85a68aa8380/test/numerical/quadrature_test.cljc | clojure |
This is free software; you can redistribute it and/or modify
either version 3 of the License , or ( at
your option) any later version.
This software is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR... | Copyright © 2017 .
This work is based on the Scmutils system of MIT / GNU Scheme :
Copyright © 2002 Massachusetts Institute of Technology
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(ns sicmutils.numerical.quadrature... |
8c48be9fe7d088421bc01442c29dbeced5750f2750d553554a39cbe1e842d1b4 | nikita-volkov/rebase | Safe.hs | module Rebase.Foreign.Marshal.Safe
(
module Foreign.Marshal.Safe
)
where
import Foreign.Marshal.Safe
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/Foreign/Marshal/Safe.hs | haskell | module Rebase.Foreign.Marshal.Safe
(
module Foreign.Marshal.Safe
)
where
import Foreign.Marshal.Safe
| |
23edb1730cd29c1d3c8e8f80f0c8d5194225411eeff95b79043d91093a493fd6 | basho/riak_cs | riak_cs_s3_rewrite_legacy.erl | %% ---------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2015 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . Y... | null | https://raw.githubusercontent.com/basho/riak_cs/c0c1012d1c9c691c74c8c5d9f69d388f5047bcd2/src/riak_cs_s3_rewrite_legacy.erl | erlang | ---------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permiss... | Copyright ( c ) 2007 - 2015 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
87face2353e8f2bd22e25e0c9ce08315ddb1703c7db37f5439578b47b7499d8e | gonimo/gonimo | IsDb.hs | # LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeFamilies #
SocketAPI / DB Translations ...
module Gonimo.Server.Db.IsDb where
import Database.Persist.Sql
import Control.Monad.State.Strict (StateT(..))
import Gonimo.SocketAPI... | null | https://raw.githubusercontent.com/gonimo/gonimo/f4072db9e56f0c853a9f07e048e254eaa671283b/back/src/Gonimo/Server/Db/IsDb.hs | haskell | # LANGUAGE TypeSynonymInstances #
| Types that have a representation in the db.
Key translations:
Table translations: | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeFamilies #
SocketAPI / DB Translations ...
module Gonimo.Server.Db.IsDb where
import Database.Persist.Sql
import Control.Monad.State.Strict (StateT(..))
import Gonimo.SocketAPI.Types as API
import Gonimo.Db.Entitie... |
42d39e6fd055ce473126b452d5c4e6adb520a9380c36df2e02f83f8bd11aae0e | planetfederal/signal | identity.clj | (ns signal.reducer.identity
(:require [signal.reducer.protocol :as proto]))
(def identifier "identity")
(defrecord IdentityReducer [cfg]
proto/IReducer
(exec [this v] (identity v)))
(defmethod proto/make-reducer identifier
[cfg]
(->IdentityReducer cfg))
| null | https://raw.githubusercontent.com/planetfederal/signal/e3eae56c753f0a56614ba8522278057ab2358c96/src/signal/reducer/identity.clj | clojure | (ns signal.reducer.identity
(:require [signal.reducer.protocol :as proto]))
(def identifier "identity")
(defrecord IdentityReducer [cfg]
proto/IReducer
(exec [this v] (identity v)))
(defmethod proto/make-reducer identifier
[cfg]
(->IdentityReducer cfg))
| |
35a89a68fbb310138681a211b7d21747a4faaadd6a426bb08d18c7106b04750f | audreyt/openafp | PTD1.hs |
module OpenAFP.Records.AFP.PTD1 where
import OpenAFP.Types
import OpenAFP.Internals
data PTD1 = PTD1 {
ptd1_Type :: !N3
,ptd1_ :: !N3
,ptd1 :: !NStr
} deriving (Show, Typeable)
| null | https://raw.githubusercontent.com/audreyt/openafp/178e0dd427479ac7b8b461e05c263e52dd614b73/src/OpenAFP/Records/AFP/PTD1.hs | haskell |
module OpenAFP.Records.AFP.PTD1 where
import OpenAFP.Types
import OpenAFP.Internals
data PTD1 = PTD1 {
ptd1_Type :: !N3
,ptd1_ :: !N3
,ptd1 :: !NStr
} deriving (Show, Typeable)
| |
94bbe4a946c0d37865addfcd67851ccfd5864241aebe0f4549e63e957efca4c2 | input-output-hk/casino | HelperListN.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeInType #-}
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE Exist... | null | https://raw.githubusercontent.com/input-output-hk/casino/3434448e657aa9bfdfc9216f8fb9d7984460b95b/prim/src/Crypto/Casino/Primitives/HelperListN.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE ConstraintKinds #
# LANGUAGE TypeInType #
# LANGUAGE MultiWayIf #
| Create a list from 0 to N-1 of N elements
| Consider the list as a queue, and pop the head and push an element to the end
pushPop (ListN.unListN -> l) a = ListN.toListN_ (tail l ++ [a])
[1,2,3,4,5,6] | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE TypeApplications #
# LANGUAGE ViewPatterns #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE AllowAmbiguousTypes #
module... |
9748de3b085ca19cf2fda95c45bcd485447029e1297e2e23418d35b5516a1fed | amperity/lein-monolith | plugin.clj | (ns lein-monolith.plugin
"This namespace runs inside of Leiningen on all projects and handles profile
creation for `with-all` and `inherit` functionality."
(:require
[lein-monolith.config :as config]
[lein-monolith.dependency :as dep]
[leiningen.core.main :as lein]
[leiningen.core.project :as proj... | null | https://raw.githubusercontent.com/amperity/lein-monolith/f7d476b3b746498d0d0539e090a1db33a6602280/src/lein_monolith/plugin.clj | clojure | Don't inherit anything
Inherit the base properties specified in the parent.
Provide additional properties to inherit, or replace if metadata is set.
Normal project or already activated monolith subproject, don't activate. | (ns lein-monolith.plugin
"This namespace runs inside of Leiningen on all projects and handles profile
creation for `with-all` and `inherit` functionality."
(:require
[lein-monolith.config :as config]
[lein-monolith.dependency :as dep]
[leiningen.core.main :as lein]
[leiningen.core.project :as proj... |
904e74d50a093f34a8f5520a4d76e04589c5f72adc9c13b63e81cd4756c7e8ae | ocaml-multicore/ocaml-tsan | scheduling.ml | # 2 "asmcomp/i386/scheduling.ml"
(**************************************************************************)
(* *)
(* OCaml *)
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/asmcomp/i386/scheduling.ml | ocaml | ************************************************************************
OCaml
... | # 2 "asmcomp/i386/scheduling.ml"
, projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
The " open ! " directive below is necessary because , although
th... |
2db923f1d2f1a9c70c81e5bdce1ffacef2cfd974f4bc3fec21fffe41e8d9c1b1 | timbertson/passe | password.ml | open Common
module Make (Re:Re_ext.Sig) = struct
module Store = Store.Make(Re)
open Store
module Log = (val Logging.log_module "password")
let rec foldi i f acc =
if i <= 0 then acc else foldi (pred i) f (f acc)
let rec fold_until pred f acc =
if (pred acc) then acc
else fold_until pred f (f acc)
let sg... | null | https://raw.githubusercontent.com/timbertson/passe/a0aa00695022657a222ea06a4796da36141aaa1a/src/common/password.ml | ocaml | XXX tests with non-ascii string encoding!
Log.info (fun m->m "input: %s (%d)" input !count);
Log.info (fun m->m "result: %s" result); | open Common
module Make (Re:Re_ext.Sig) = struct
module Store = Store.Make(Re)
open Store
module Log = (val Logging.log_module "password")
let rec foldi i f acc =
if i <= 0 then acc else foldi (pred i) f (f acc)
let rec fold_until pred f acc =
if (pred acc) then acc
else fold_until pred f (f acc)
let sg... |
90a5ee3949c80fb98ecc65f5e6caff94bd02134704230b1957832418baf74c28 | kupl/FixML | sub12.ml |
exception Problem
let rec sigma f a b =
if a<0||b<0||a>b then raise Problem
else
if a == b then f b
else f b + sigma f a (b-1);;
| null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/sigma/sigma1/submissions/sub12.ml | ocaml |
exception Problem
let rec sigma f a b =
if a<0||b<0||a>b then raise Problem
else
if a == b then f b
else f b + sigma f a (b-1);;
| |
08e70cdd0810104704a860e179f7920033ca4fa39fef5df4eefa5f401fc3f1cf | earl-ducaine/cl-garnet | virtual-aggregates.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : OPAL ; Base : 10 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
The Garnet User Interface Development Environment . ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; This code was written ... | null | https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/src/opal/virtual-aggregates.lisp | lisp | Syntax : Common - Lisp ; Package : OPAL ; Base : 10 -*-
; ;
This code was written as part of the Garnet project at ;;;
; ;
; ;
please contact to be put on the mailing list. ;;;
CHANGES:
aggregadgets causing run-time error when aggregadgets
fixed causing KR erro... |
03 - Sep-98 Gilham Fixed problem caused by changes moving between 2.2 and
3.0 . 1 ) Signature of update method changed for
were used as item - prototypes . 2 ) Window was n't
propagated to ` parts ' of aggregadgets once 1 ) was
: u... |
f952e6e85055f897dfaa3bb605c3e7b041a491385644ff194e60faf4e78e83e7 | eryx67/etracker | etracker_types.erl | -module(etracker_types).
-export_type([infohash/0,
peerid/0,
peerinfo/0,
ipaddr/0,
portnum/0,
trackerid/0,
timestamp/0,
filepath/0,
filename/0,
bcode/0,
event/0
]).
... | null | https://raw.githubusercontent.com/eryx67/etracker/f41f5d2172d2a0cf5aeebcc7442c7523a9338340/src/etracker_types.erl | erlang | -module(etracker_types).
-export_type([infohash/0,
peerid/0,
peerinfo/0,
ipaddr/0,
portnum/0,
trackerid/0,
timestamp/0,
filepath/0,
filename/0,
bcode/0,
event/0
]).
... | |
7911a8d0d946a631596c9d3446f2cddbb3c8e93c664da2f757d1e7d0f15debf3 | ArtixLabs/ArkOLD | Themes.hs | module Ark.Themes
( alacrittyThemeFile
, kittyThemeFile
, fzfSetTheme
, Themes(..)
) where
import Ark.Themes.Alacritty (alacrittyThemeFile)
import Ark.Themes.Fzf (fzfSetTheme)
import Ark.Themes.Kitty (kittyThemeFile)
import Ark.Themes.Options (Themes(..))
| null | https://raw.githubusercontent.com/ArtixLabs/ArkOLD/b7a88ba346167b53e2aabcabafcbac6bffe864de/src/Ark/Themes.hs | haskell | module Ark.Themes
( alacrittyThemeFile
, kittyThemeFile
, fzfSetTheme
, Themes(..)
) where
import Ark.Themes.Alacritty (alacrittyThemeFile)
import Ark.Themes.Fzf (fzfSetTheme)
import Ark.Themes.Kitty (kittyThemeFile)
import Ark.Themes.Options (Themes(..))
| |
8df238b6475d62bc098d454709866d31633852562b2014deb1d4c42b6193eead | sondresl/AdventOfCode | Day07.hs | module Day07 where
import Control.Monad.State (State(..), modify, gets, execState)
import Data.List.Extra (splitOn)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Either (rights, lefts, partitionEithers)
import Data.Bifunctor (first, second, bimap)
import Data.Foldable (toList)
import Data.Tree (Tr... | null | https://raw.githubusercontent.com/sondresl/AdventOfCode/f817550f38ad8988dd4dc79e71e9954ab6c67973/2022/Haskell/src/Day07.hs | haskell | Noise
Noise | module Day07 where
import Control.Monad.State (State(..), modify, gets, execState)
import Data.List.Extra (splitOn)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Either (rights, lefts, partitionEithers)
import Data.Bifunctor (first, second, bimap)
import Data.Foldable (toList)
import Data.Tree (Tr... |
7a6ccd01393b15e0e5f5c1f8441890a4c4e097618dc90c9694a19c0f58080caf | Z572/guile-wlroots | subcompositor.scm | (define-module (wlroots types subcompositor)
#:use-module (wayland display)
#:use-module (wayland resource)
#:use-module (wlroots render renderer)
#:use-module (wlroots render texture)
#:use-module (wlroots types)
#:use-module (wlroots types compositor)
#:use-module (wlroots types output)
#:use-module (... | null | https://raw.githubusercontent.com/Z572/guile-wlroots/f95ff8a8deb383700b699cd4ee78b6fd3759f65b/wlroots/types/subcompositor.scm | scheme | (define-module (wlroots types subcompositor)
#:use-module (wayland display)
#:use-module (wayland resource)
#:use-module (wlroots render renderer)
#:use-module (wlroots render texture)
#:use-module (wlroots types)
#:use-module (wlroots types compositor)
#:use-module (wlroots types output)
#:use-module (... | |
cb884d47cc1503d013d0822d50f0f49467d73b92ee7f92b81f1735ca2da87c0c | OlivierNicole/haskell-chess | Input.hs | module Input where
readMaybe :: (Read a) => String -> Maybe a
readMaybe s = case reads s of
[(x, "")] -> Just x
_ -> Nothing
| null | https://raw.githubusercontent.com/OlivierNicole/haskell-chess/3b76bbc39a6a43d6be9e22e4a68613eba2d2898d/Input.hs | haskell | module Input where
readMaybe :: (Read a) => String -> Maybe a
readMaybe s = case reads s of
[(x, "")] -> Just x
_ -> Nothing
| |
604fbda2483fb5ac1b9a7f7133f2f5d27eda3d8055758ccfa96a989a9a169f25 | Palmik/wai-sockjs | Handler.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
module Network.Sock.Handler
( sock
, sockWS
) where
------------------------------------------------------------------------------
import System.Random (randomRIO)
---------------------------------------------... | null | https://raw.githubusercontent.com/Palmik/wai-sockjs/d1037cb00450a362b7e593a76d6257d06ecb2405/src/Network/Sock/Handler.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------... | # LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
module Network.Sock.Handler
( sock
, sockWS
) where
import System.Random (randomRIO)
import Control.Monad.Trans (liftIO)
import qualified Data.Aeson as AE (encode, object)
import Data.Aeson ((.=))
i... |
58e3ea90a4e69b1fa1ffe4819e8cd04a836303d3cb5b8fb5f10318861a33349f | RJ/estatsd | estatsd_server.erl | %% Stats aggregation process that periodically dumps data to graphite
Will calculate 90th percentile etc .
%% Inspired by etsy statsd:
%% -anything-measure-everything/
%%
%% This could be extended to take a callback for reporting mechanisms.
%% Right now it's hardcoded to stick data into graphite.
%%
< >
%%
-mod... | null | https://raw.githubusercontent.com/RJ/estatsd/2643d305154af098650865bec28c9131964fea1f/src/estatsd_server.erl | erlang | Stats aggregation process that periodically dumps data to graphite
Inspired by etsy statsd:
-anything-measure-everything/
This could be extended to take a callback for reporting mechanisms.
Right now it's hardcoded to stick data into graphite.
-export([key2str/1,flush/0]). %% export for debugging
gb_tree of t... | Will calculate 90th percentile etc .
< >
-module(estatsd_server).
-behaviour(gen_server).
-export([start_link/4]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
TRef of interval timer
}).
start_link(FlushIntervalMs, GraphiteHost, Graph... |
ac9ac7287bc7efc07b310e1dbf5628f2b0028367713b1f9ef488911a0ab6dee9 | odj/Ouch | makeUnique.hs | import Ouch.Structure.Molecule
import System.IO
import System.Environment
import Ouch.Enumerate.Method
main = do
arg:_ <- getArgs
contents <- readFile arg
let molecules = map (\a -> read a :: Molecule) $ lines contents
uniqueMols = molecules >#> makeUnique
ppList uniqueMols
-- Prints a list as SMILES ... | null | https://raw.githubusercontent.com/odj/Ouch/ed20599214cf77b0cb81cc7cefb4cd9c35bc7cf7/Ouch/resources/app/makeUnique.hs | haskell | Prints a list as SMILES | import Ouch.Structure.Molecule
import System.IO
import System.Environment
import Ouch.Enumerate.Method
main = do
arg:_ <- getArgs
contents <- readFile arg
let molecules = map (\a -> read a :: Molecule) $ lines contents
uniqueMols = molecules >#> makeUnique
ppList uniqueMols
ppList [] = return ()
ppList ... |
88f2c5ab411c9c68fb8dbc7fbbc8f5934b6e34e7a360f2a171e46242e6b334d0 | aristidb/aws | UpdateItem.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE ScopedTypeVariables ... | null | https://raw.githubusercontent.com/aristidb/aws/093aaaf444468049d53a6a43ec0b835578c1ded0/Aws/DynamoDb/Commands/UpdateItem.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
---------------------------------------------------------------------------
|
License : BSD3
Stability : experimental
--------------------------------... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE RecordWildCards #
Module : . . Commands .
Copyright : Soostone Inc
Maintainer : < >
module Aws.DynamoDb.Comma... |
b05a6c7789c15b3c95f33af4c2d7eb88e713d3d3fb791c67a419e1bf9a3eda01 | nikodemus/SBCL | cell.lisp | ;;;; the VM definition of various primitive memory access VOPs for the
;;;; Alpha
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public doma... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/compiler/alpha/cell.lisp | lisp | the VM definition of various primitive memory access VOPs for the
Alpha
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
data object ref/set stuff
symbol hacking VOPs
The compiler likes to... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!VM")
(define-vop (slot)
(:args (object :scs (descriptor-reg)))
(:info name offset lowtag)
(:ignore n... |
ee0a0fcbcf5d502c8813e486893fe9191eef3b14d8352133f92d39d31df48ad2 | srid/rib | OpenGraph.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
| Meta tags for The Open Graph protocol : /
module Rib.Extra.OpenGraph
( OpenGraph (..),
OGType (..),
Article (..),
)
where
import Data.Time (UTCTime)
import Data.Time.ISO8601 (formatISO8601)
i... | null | https://raw.githubusercontent.com/srid/rib/d92d2c1981e2a259535b67e066eb31bdf7c26e0c/rib/src/Rib/Extra/OpenGraph.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
TODO: _article_profile :: [Profile]
Open graph meta element | # LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
| Meta tags for The Open Graph protocol : /
module Rib.Extra.OpenGraph
( OpenGraph (..),
OGType (..),
Article (..),
)
where
import Data.Time (UTCTime)
import Data.Time.ISO8601 (formatISO8601)
import Lucid
import Lucid.Base (makeAttribute)
import Relud... |
2fed2028fe92c0c884b4e3cb4a2679af5701b40a5c26a7f20bb4d20f78458f93 | draperlaboratory/VIBES | substituter.mli | (***************************************************************************)
(* *)
Copyright ( C ) 2022/2023 The Charles Stark Draper Laboratory , Inc.
(* *)
(* This... | null | https://raw.githubusercontent.com/draperlaboratory/VIBES/7f978d66d0b022d1a9262fdfc608b7a2b7c95dff/tools/vibes-higher-vars/lib/substituter.mli | ocaml | *************************************************************************
This file is provided under the license found in the LICENSE file in
the top-level director... | Copyright ( C ) 2022/2023 The Charles Stark Draper Laboratory , Inc.
This research was developed with funding from the Defense Advanced
Research Projects Agency ( DARPA ) .
open Core
open Bap.Std
open Bap_core_theory
module Naming : sig
val mark_reg_name_un... |
c9f7ed292adb3b3c28566195c1a6d868d636c47f160a225d1d6e11eb52ea3d39 | tfausak/rattletrap | Array.hs | module Rattletrap.Type.Property.Array where
import qualified Rattletrap.ByteGet as ByteGet
import qualified Rattletrap.BytePut as BytePut
import qualified Rattletrap.Schema as Schema
import qualified Rattletrap.Type.Dictionary as Dictionary
import qualified Rattletrap.Type.List as List
import qualified Rattletrap.Util... | null | https://raw.githubusercontent.com/tfausak/rattletrap/cc6d6aba923d840f23de7673cab9a043096d3099/src/lib/Rattletrap/Type/Property/Array.hs | haskell | module Rattletrap.Type.Property.Array where
import qualified Rattletrap.ByteGet as ByteGet
import qualified Rattletrap.BytePut as BytePut
import qualified Rattletrap.Schema as Schema
import qualified Rattletrap.Type.Dictionary as Dictionary
import qualified Rattletrap.Type.List as List
import qualified Rattletrap.Util... | |
e944a49abeaaf7b55275ec402d191e8225532d38663842a67582cc5a0dfe6b79 | aengelberg/paren.party | party.cljs | (ns paren.party
(:require
[cljsjs.soundjs]
[goog.userAgent :refer [MOBILE WINDOWS]]
[manifold-cljs.deferred :as d]
[manifold-cljs.executor :as ex]
[manifold-cljs.time :as mt]
[reagent.core :as reagent :refer [atom]]))
(enable-console-print!)
;; define your app data so that it doesn't get ove... | null | https://raw.githubusercontent.com/aengelberg/paren.party/0ecd81b76793bbd9a3a7b8a500ff35325b77d44c/src/paren/party.cljs | clojure | define your app data so that it doesn't get over-written on reload
optionally touch your app-state to force rerendering depending on
your application
(swap! app-state update-in [:__figwheel_counter] inc) | (ns paren.party
(:require
[cljsjs.soundjs]
[goog.userAgent :refer [MOBILE WINDOWS]]
[manifold-cljs.deferred :as d]
[manifold-cljs.executor :as ex]
[manifold-cljs.time :as mt]
[reagent.core :as reagent :refer [atom]]))
(enable-console-print!)
(defn millis
"Get the current time in milliseco... |
b165aa5c2614645034bec54ae3a09f5dbc12efc0915598c45dd8c28f01c62193 | 5HT/ant | JustHyph.mli |
open XNum;
open Unicode.Types;
open Substitute;
open GlyphMetric;
open FontMetric;
type hyphen_params =
{
hyphen_table : Hyphenation.hyphen_table;
hyphen_penalty : num;
ex_hyphen_penalty : num;
left_hyphen_min : int;
right_hyphen_min : int;
script_lang : uc_string
};
type simple_glyph_it... | null | https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Runtime/JustHyph.mli | ocaml |
open XNum;
open Unicode.Types;
open Substitute;
open GlyphMetric;
open FontMetric;
type hyphen_params =
{
hyphen_table : Hyphenation.hyphen_table;
hyphen_penalty : num;
ex_hyphen_penalty : num;
left_hyphen_min : int;
right_hyphen_min : int;
script_lang : uc_string
};
type simple_glyph_it... | |
7028bc57fbedcda531aa8bffad533c994683bc34e8cc8de1e96403ad200cac7a | trivial-features/trivial-features | tf-ecl.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; tf-ecl.lisp --- ECL implementation of trivial-features.
;;;
Copyright ( C ) 2007 - 2009 ,
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , t... | null | https://raw.githubusercontent.com/trivial-features/trivial-features/f6e8dd7268ae0137dbde4be469101a7f735f6416/src/tf-ecl.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
tf-ecl.lisp --- ECL implementation of trivial-features.
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,... | Copyright ( C ) 2007 - 2009 ,
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
(in-package :cl... |
768ee18b4eb9c06c5e09c64bc02128e5d6aa60848ce2971b964eb85acd514d5f | simingwang/emqx-plugin-kafkav5 | inet6_tcp_dist.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1997 - 2021 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/rel/emqx_plugin_kafka/lib/kernel-8.3/src/inet6_tcp_dist.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 1997 - 2021 . 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(inet6_tcp_dist).
Handles the connection setup phase with other Erlang nodes .
-export([listen/2, accept/1... |
98abb7aa7ca4356c0f32a1cc5be059f5976474abc3958539669b3cb591922b9f | plewto/Cadejo | op_amp_panel.clj | (ns cadejo.instruments.algo.editor.op-amp-panel
(:use [cadejo.instruments.algo.algo-constants])
(:require [cadejo.util.math :as math])
(:require [cadejo.ui.util.lnf :as lnf])
(:require [cadejo.ui.util.sgwr-factory :as sfactory])
(:require [sgwr.components.line :as line])
(:require [sgwr.components.tex... | null | https://raw.githubusercontent.com/plewto/Cadejo/2a98610ce1f5fe01dce5f28d986a38c86677fd67/src/cadejo/instruments/algo/editor/op_amp_panel.clj | clojure | slider tickmarks | (ns cadejo.instruments.algo.editor.op-amp-panel
(:use [cadejo.instruments.algo.algo-constants])
(:require [cadejo.util.math :as math])
(:require [cadejo.ui.util.lnf :as lnf])
(:require [cadejo.ui.util.sgwr-factory :as sfactory])
(:require [sgwr.components.line :as line])
(:require [sgwr.components.tex... |
8b666501d99821d53750dad895599442d6494cddfa125f1470ddbf9621267d91 | conorgpower/HaskellFunctions | FunctionsExercise.hs |
halve :: [a] -> ([a], [a])
halve a = if (length a `mod` 2) == 0 then
splitAt (((length a) + 1) `div` 2) a
else
error "ERROR"
thirdHT :: [a] -> a
thirdHT xs = head(tail(tail(xs)))
thirdIndex :: [a] -> a
thirdIndex a = if length a >= 3 then
a !... | null | https://raw.githubusercontent.com/conorgpower/HaskellFunctions/bdb2bcb2023305219e7fa8e4bf81ce3da927d980/FunctionsExercise.hs | haskell | Q.3
tail(_:xs) = xs
Q.4
Q.5 |
halve :: [a] -> ([a], [a])
halve a = if (length a `mod` 2) == 0 then
splitAt (((length a) + 1) `div` 2) a
else
error "ERROR"
thirdHT :: [a] -> a
thirdHT xs = head(tail(tail(xs)))
thirdIndex :: [a] -> a
thirdIndex a = if length a >= 3 then
a !... |
ffcf784b3bcb8caf1ff9d949e72e4a4d240c77b693bec353eeac073f7acf56dd | entropia/tip-toi-reveng | PlaySound.hs | module PlaySound (playSound) where
import System.Process
import System.Exit
import Control.Monad
import Control.Exception
import System.IO.Error
import System.IO
import System.Directory
import System.FilePath
import qualified Data.ByteString.Lazy as B
import System.Environment.Executable
players :: FilePath -> FileP... | null | https://raw.githubusercontent.com/entropia/tip-toi-reveng/1b4a6205a9cc125e7fd9b2e9be400ffb84ba0d36/src/PlaySound.hs | haskell | Try to handle both here. | module PlaySound (playSound) where
import System.Process
import System.Exit
import Control.Monad
import Control.Exception
import System.IO.Error
import System.IO
import System.Directory
import System.FilePath
import qualified Data.ByteString.Lazy as B
import System.Environment.Executable
players :: FilePath -> FileP... |
a3d78cf77087d75a8af515ce2820b773ef89c8fbe438de450f0165949422b4b6 | returntocorp/ocaml-tree-sitter-core | Codegen_boilerplate.ml | (*
Derive boilerplate to be used as a template when mapping a CST
to another type of tree.
*)
open Printf
open CST_grammar
open Indent.Types
let trans = Codegen_util.translate_ident
let make_header grammar = sprintf
{|(**
Boilerplate to be used as a template when mapping the %s CST
to another type of... | null | https://raw.githubusercontent.com/returntocorp/ocaml-tree-sitter-core/83737132df4c6842d53e629de0337be2310fb0cc/src/gen/lib/Codegen_boilerplate.ml | ocaml |
Derive boilerplate to be used as a template when mapping a CST
to another type of tree.
*
Boilerplate to be used as a template when mapping the %s CST
to another type of tree.
Disable warnings against unused variables
Disable warning against unused 'rec'
Note about comment placement: ocamlformat ... |
open Printf
open CST_grammar
open Indent.Types
let trans = Codegen_util.translate_ident
let make_header grammar = sprintf
module R = Tree_sitter_run.Raw_tree
[@@@warning "-26-27"]
[@@@warning "-39"]
type env = unit
let token (env : env) (tok : Tree_sitter_run.Token.t) =
R.Token tok
let blank (env : env) () =... |
f3f5cadf99ddefdefd48681e53b099807d7d65ce31064f7cd036216a886a0f66 | satos---jp/mincaml_self_hosting | recursive_variant.ml | type nat = Z | S of nat
let rec add m n =
match m with
| Z -> n
| S x -> S (add x n)
let rec sub m n =
match n with
| Z -> m
| S x ->
match m with
| Z -> Z
| S y -> sub y x
let rec mul m n =
match m with
| Z -> Z
| S x -> add n (mul x n)
let rec pow m n =
match m with
| Z -> S Z
| S x -> mu... | null | https://raw.githubusercontent.com/satos---jp/mincaml_self_hosting/5fdf8b5083437d7607a924142eea52d9b1de0439/test/recursive_variant.ml | ocaml | type nat = Z | S of nat
let rec add m n =
match m with
| Z -> n
| S x -> S (add x n)
let rec sub m n =
match n with
| Z -> m
| S x ->
match m with
| Z -> Z
| S y -> sub y x
let rec mul m n =
match m with
| Z -> Z
| S x -> add n (mul x n)
let rec pow m n =
match m with
| Z -> S Z
| S x -> mu... | |
4246b9ee9f214f62362b8c889b192422de25595fa4107e9c81c298c8141f3e35 | Eduap-com/WordMat | mring.lisp | A Maxima ring structure
Copyright ( C ) 2005 , 2007 , 2021 ,
Barton Willis
Department of Mathematics
University of Nebraska at Kearney
;; Kearney NE 68847
;;
;; This source code is licensed under the terms of the Lisp Lesser
GNU Public License ( LLGPL ) . The LLGPL consists of a preamble , published
... | null | https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/linearalgebra/mring.lisp | lisp | Kearney NE 68847
This source code is licensed under the terms of the Lisp Lesser
any later version. When the preamble conflicts with the LGPL,
the preamble takes precedence.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHA... | A Maxima ring structure
Copyright ( C ) 2005 , 2007 , 2021 ,
Barton Willis
Department of Mathematics
University of Nebraska at Kearney
GNU Public License ( LLGPL ) . The LLGPL consists of a preamble , published
by Franz Inc. ( ) , and the GNU
Library General Public License ( LGPL ) , version 2 , or... |
19766e3c7b158efc6a1d483c6fbe31cdf87a9a80bada92a4e76db55ec40bb9f8 | NorfairKing/intray | Main.hs | module Main where
import Intray.Web.Server
main :: IO ()
main = intrayWebServer
| null | https://raw.githubusercontent.com/NorfairKing/intray/f8ed32c79d8b3159a4c82cd8cc5c5aeeb92c2c90/intray-web-server/app/Main.hs | haskell | module Main where
import Intray.Web.Server
main :: IO ()
main = intrayWebServer
| |
0a0b13dc8b78dad046a1a2596254998734a738f883d5f2780fb3d5a96e506be9 | qkrgud55/ocamlmulti | parmatch.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/typing/parmatch.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : parmatch.ml 12961 2012 - 09 -... |
32db7fa3633de28f81a197d6de9ff2bf3886b9d0bf2eb2b19f82be9633a91d3a | slipstream/SlipStreamServer | service_config.clj | (ns com.sixsq.slipstream.db.serializers.service-config
(:refer-clojure :exclude [load])
(:require
[com.sixsq.slipstream.db.serializers.service-config-impl :as sci]))
;;
Interface to store and load entity as resource .
;;
(defn store
"Stores ServiceConfiguration per connector parameters.
Returns provided... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/db-serializers/src/com/sixsq/slipstream/db/serializers/service_config.clj | clojure | (ns com.sixsq.slipstream.db.serializers.service-config
(:refer-clojure :exclude [load])
(:require
[com.sixsq.slipstream.db.serializers.service-config-impl :as sci]))
Interface to store and load entity as resource .
(defn store
"Stores ServiceConfiguration per connector parameters.
Returns provided Servi... | |
4894c51711d8e87e30c4301be0392b70ee6f64d516d6ec9b6ecc36449887d639 | mokus0/shapefile | ByParts.hs | # LANGUAGE MultiParamTypeClasses , RecordWildCards , TypeFamilies #
module Database.Shapefile.Points.ByParts where
import Control.Monad (liftM)
import Data.Binary.IEEE754 (putFloat64le)
import Data.Binary.Put (Put, putWord32le)
import qualified ... | null | https://raw.githubusercontent.com/mokus0/shapefile/9a3821e1c6aef08b9304ed3c79cccbba09970d7d/src/Database/Shapefile/Points/ByParts.hs | haskell | ----------------------------------------------------------------------------
(See <-Vector-Unboxed-Base.html>)
----------------------------------------------------------------------------
# INLINE basicLength #
elemseq _ lmV z =
G.elemseq (undefined :: U.Vector Word32)
(from... | # LANGUAGE MultiParamTypeClasses , RecordWildCards , TypeFamilies #
module Database.Shapefile.Points.ByParts where
import Control.Monad (liftM)
import Data.Binary.IEEE754 (putFloat64le)
import Data.Binary.Put (Put, putWord32le)
import qualified ... |
097d67bcb28c9a7b6684e2b701fd5678239a875fc86afff9c11fd5e07cf3699e | lukaszkorecki/taskmaster | project.clj | (defproject taskmaster "0.0.3-SNAPSHOT-1"
:description "Background publisher/consumer on top of Postgres, next.jdbc and hikari-cp"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[nomnom/utility-belt.sql "1.0.0.beta1"]]
:profiles {:dev {:dependencies [[org.clojur... | null | https://raw.githubusercontent.com/lukaszkorecki/taskmaster/f8803e2cb4e093d4148316787285a8c53eae7e5f/project.clj | clojure | (defproject taskmaster "0.0.3-SNAPSHOT-1"
:description "Background publisher/consumer on top of Postgres, next.jdbc and hikari-cp"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[nomnom/utility-belt.sql "1.0.0.beta1"]]
:profiles {:dev {:dependencies [[org.clojur... | |
4dc1327cc97102408e9a25012c034c3a6bcaf7038e965f992c4b0a7753c418f2 | sjl/chancery | api.lisp | (ql:quickload "cl-d-api")
(defparameter *header*
"The following is a list of all user-facing parts of Chancery.
If there are backwards-incompatible changes to anything listed here, they will
be noted in the changelog and the author will feel bad.
Anything not listed here is subject to change at any time with no wa... | null | https://raw.githubusercontent.com/sjl/chancery/87cb53cd791d4d60a6c41bc0b02345739b82abb0/docs/api.lisp | lisp | (ql:quickload "cl-d-api")
(defparameter *header*
"The following is a list of all user-facing parts of Chancery.
If there are backwards-incompatible changes to anything listed here, they will
be noted in the changelog and the author will feel bad.
Anything not listed here is subject to change at any time with no wa... | |
607617fde68806bd2525fed61a76a3ecf6abf18079b5474f1c03b66ef5e12720 | clojure-interop/google-cloud-clients | ImageAnnotatorSettings$Builder.clj | (ns com.google.cloud.vision.v1p1beta1.ImageAnnotatorSettings$Builder
"Builder for ImageAnnotatorSettings."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.vision.v1p1beta1 ImageAnnotatorSettings$Builder]))
(defn get-stub-settings-builder
"returns: `com.google.cloud.vision.v1p1beta1.... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.vision/src/com/google/cloud/vision/v1p1beta1/ImageAnnotatorSettings%24Builder.clj | clojure | (ns com.google.cloud.vision.v1p1beta1.ImageAnnotatorSettings$Builder
"Builder for ImageAnnotatorSettings."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.vision.v1p1beta1 ImageAnnotatorSettings$Builder]))
(defn get-stub-settings-builder
"returns: `com.google.cloud.vision.v1p1beta1.... | |
196e08d34631c307df3747a0d74ea1734d284b4fce9a805aab8083200216f31c | rmloveland/scheme48-0.53 | scm-record.scm | Copyright ( c ) 1994 by . See file COPYING .
(define-complex-primitive (make-record symbol?)
(lambda (type)
(bug "no evaluator for MAKE-RECORD"))
(lambda (args node depth return?)
(let ((type-id (cadr (node-form (car args)))))
(make-pointer-type (get-record-type type-id))))
#f ; no closed f... | null | https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/ps-compiler/prescheme/primop/scm-record.scm | scheme | no closed form
no RECORD? available
no closed form
no RECORD? available
no closed form | Copyright ( c ) 1994 by . See file COPYING .
(define-complex-primitive (make-record symbol?)
(lambda (type)
(bug "no evaluator for MAKE-RECORD"))
(lambda (args node depth return?)
(let ((type-id (cadr (node-form (car args)))))
(make-pointer-type (get-record-type type-id))))
(lambda (args typ... |
9e2a5f311ad7c7f7febe86fca0d89b1081e54f646ebfd8e5004be471cd627273 | herd/herdtools7 | mrcu.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/6a5b3085a9d2357f98f4d560d7dd12add34edabe/tools/mrcu.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2016 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
31e3d6df502e4be7c96a39ca898c88b922b6f70c67dc36c51d466a920ac216ee | alex-hhh/ActivityLog2 | edit-session-weather.rkt | #lang racket/base
edit-session-weather.rkt -- edit weather data for a session
;;
;; This file is part of ActivityLog2, an fitness activity tracker
Copyright ( C ) 2015 , 2019 , 2020 , 2023 < >
;;
;; This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Publi... | null | https://raw.githubusercontent.com/alex-hhh/ActivityLog2/05e7422f43835c2d1b6a0d0d72e9e99adf94ae66/rkt/dialogs/edit-session-weather.rkt | racket |
This file is part of ActivityLog2, an fitness activity tracker
This program is free software: you can redistribute it and/or modify it
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR ... | #lang racket/base
edit-session-weather.rkt -- edit weather data for a session
Copyright ( C ) 2015 , 2019 , 2020 , 2023 < >
under the terms of the GNU General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option )
(require db/base
racke... |
256d8dd923bc83c4696938923ffabf5558814392096efed7d78976980a822158 | PLTools/GT | test018.mli | @type ('a, 'b, 'c) t = A of 'a | B of 'b | C of 'c with eq, compare
| null | https://raw.githubusercontent.com/PLTools/GT/62d1a424a3336f2317ba67e447a9ff09d179b583/regression/test018.mli | ocaml | @type ('a, 'b, 'c) t = A of 'a | B of 'b | C of 'c with eq, compare
| |
e470a59723976d325d379a9b25970f47ba72ddb90bdf3ee5102273af7ccea747 | cornell-netlab/yates | Yates_Mw.mli | open Yates_types.Types
module type MW_INPUT = sig
type structure
(* Gets the next structure (e.g. path) that we are going to augment the
* flow by, along with the weight of that structure. *)
val select_structure : topology -> demands -> Topology.VertexSet.t -> (structure * float)
(* Gets the usages of e... | null | https://raw.githubusercontent.com/cornell-netlab/yates/138242186975a8f5bcfe5518903108e6a6666f22/lib/routing/Yates_Mw.mli | ocaml | Gets the next structure (e.g. path) that we are going to augment the
* flow by, along with the weight of that structure.
Gets the usages of every edge in the topology. | open Yates_types.Types
module type MW_INPUT = sig
type structure
val select_structure : topology -> demands -> Topology.VertexSet.t -> (structure * float)
val usage_of_structure : topology -> demands -> structure -> (edge * float) list
Gets the weight of one edge in the topology .
val get_weight : topolo... |
aba23d8feea3b423165d6310d0faf1e13aae5e9c33d4f580256832631672cb4f | foreverbell/project-euler-solutions | 76.hs |
rec :: Int -> [Int]
rec 1 = repeat 1
rec n = result where
result = zipWith (+) last ((replicate n 0) ++ result)
last = (rec (n - 1)) ++ [0]
main = print $ pred $ (rec 100) !! 100
| null | https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/76.hs | haskell |
rec :: Int -> [Int]
rec 1 = repeat 1
rec n = result where
result = zipWith (+) last ((replicate n 0) ++ result)
last = (rec (n - 1)) ++ [0]
main = print $ pred $ (rec 100) !! 100
| |
b8c861bae058ba62f129d00ce2f180e88e7670a492e426e4f451f2e1b3aa9ced | intermine/bluegenes | config.clj | (ns bluegenes.config
(:require [clojure.spec.alpha :as s]
[clojure.string :as str]))
(s/def ::non-empty-string (s/and string? (complement str/blank?)))
(s/def ::optional-string (s/or :nil nil? :string string?))
(s/def ::integer-string (s/and string? #(re-matches #"^[0-9]+$" %)))
(s/def ::server-port (s/... | null | https://raw.githubusercontent.com/intermine/bluegenes/0e2f123b854d5150aa7d88d08725edd9f51351c4/src/clj/bluegenes/config.clj | clojure | path is empty and val would include all envvars, so we print differently. | (ns bluegenes.config
(:require [clojure.spec.alpha :as s]
[clojure.string :as str]))
(s/def ::non-empty-string (s/and string? (complement str/blank?)))
(s/def ::optional-string (s/or :nil nil? :string string?))
(s/def ::integer-string (s/and string? #(re-matches #"^[0-9]+$" %)))
(s/def ::server-port (s/... |
1404bd129d79f71fcfae7a17fd0aed574556b2ba2062bc7618dddfa45a0a89ca | goblint/analyzer | svcomp.ml | open GoblintCil
open Batteries
module Specification = SvcompSpec
module type Task =
sig
val file: Cil.file
val specification: Specification.t
module Cfg: MyCFG.CfgBidir
end
let task: (module Task) option ref = ref None
let is_error_function f =
let module Task = (val (Option.get !task)) in
match Task.sp... | null | https://raw.githubusercontent.com/goblint/analyzer/9f677d7b6790dd26e7b3e84a36769ae5089f2b72/src/witness/svcomp.ml | ocaml | correctness witness
violation witness | open GoblintCil
open Batteries
module Specification = SvcompSpec
module type Task =
sig
val file: Cil.file
val specification: Specification.t
module Cfg: MyCFG.CfgBidir
end
let task: (module Task) option ref = ref None
let is_error_function f =
let module Task = (val (Option.get !task)) in
match Task.sp... |
556b34430d215d3af6e3f37bb4a3fc22229c868690b93352c9063048a571f7c8 | alanz/ghc-exactprint | T9824.hs | # OPTIONS_GHC -fwarn - unused - matches #
# LANGUAGE TemplateHaskell #
module T9824 where
foo = [p| (x, y) |]
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc86/T9824.hs | haskell | # OPTIONS_GHC -fwarn - unused - matches #
# LANGUAGE TemplateHaskell #
module T9824 where
foo = [p| (x, y) |]
| |
b033db3aab3c7397365ae49fe273c749f94cb187a1ef72a7870e4d40bbf9e477 | ros/roslisp | roslisp.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Software License Agreement (BSD License)
;;
Copyright ( c ) 2008 , Willow Garage , Inc.
;; All rights reserved.
;;
;; Redistribution and use in source and binary forms, with
;; or without modification, are permitted provided that the
;; following cond... | null | https://raw.githubusercontent.com/ros/roslisp/559355a8d695e34e6dedae071a9af2c065411687/src/roslisp.lisp | lisp |
Software License Agreement (BSD License)
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... | Copyright ( c ) 2008 , Willow Garage , Inc.
* Neither the name of Willow Garage , Inc. nor the names
CONTRIBUTORS " AS IS " AND ANY EXPRESS OR
COPYRIGHT OWNER OR ANY DIRECT ,
INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN
(defpackage :roslisp
(:... |
e0d565e56ae6f621d9b4e4ed64e6f52ca06db36961f1d345ef18ed99b897b2e5 | serokell/log-warper | Roller.hs | -- | Custom implementation of 'LogHandler' with log rotation support.
module System.Wlog.LogHandler.Roller
( InvalidRotation (..)
, RollerHandler (..)
, logIndex
, rotationFileHandler
) where
import Universum
import Control.Concurrent (modifyMVar, modifyMVar_, withMVar)
import Da... | null | https://raw.githubusercontent.com/serokell/log-warper/a6dd74a1085e8c6d94a4aefc2a036efe30f6cde5/src/System/Wlog/LogHandler/Roller.hs | haskell | | Custom implementation of 'LogHandler' with log rotation support.
| Similar to 'GenericHandler'. But holds file 'Handle' inside
TODO: correct exceptions handling here is too smart for me
| Create rotation logging handler. |
module System.Wlog.LogHandler.Roller
( InvalidRotation (..)
, RollerHandler (..)
, logIndex
, rotationFileHandler
) where
import Universum
import Control.Concurrent (modifyMVar, modifyMVar_, withMVar)
import Data.Text.Lazy.Builder as B
import Fmt ((+||), (||+))
import System.Dir... |
c569f4052dacbd416c91b422f18ac00217a7ccbbe4241501c4bf6a174f7bb9f8 | ocsigen/macaque | sql_internals.ml | macaque : sql_internals.ml
MaCaQue : Macros for Caml Queries
Copyright ( C ) 2009 ,
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation ; either
version ... | null | https://raw.githubusercontent.com/ocsigen/macaque/a92e91c7ed443086551d909c3cfad22c71144f54/src/sql_internals.ml | ocaml | [when .. then ..]+ else ..
runtime object instance
identity unifications
failure
none of them is nullable | macaque : sql_internals.ml
MaCaQue : Macros for Caml Queries
Copyright ( C ) 2009 ,
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation ; either
version ... |
4bc6648887886d46552baec9e3309d2b9a24e0d5b3b2fece5423ef147f7aaf14 | cmk/rings | Semimodule.hs | # LANGUAGE CPP #
{-# LANGUAGE Safe #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE Flex... | null | https://raw.githubusercontent.com/cmk/rings/f1203d693d0069169582d478c663159de9416d87/src/Data/Semimodule.hs | haskell | # LANGUAGE Safe #
# LANGUAGE PolyKinds #
# LANGUAGE ConstraintKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE RankNTypes #
# LANGUAGE TypeOperators #
... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{ - # LANGUAGE RebindableSyntax # - }
# LANGUAGE TypeFamilies #
# LANGUAGE StandaloneDeriving #
module Data.Semimodule (
type LeftModule
, LeftSemimodule... |
34420c0ddd5d84b860579e4e48f231fb446b15846c65c752cdcde12666e1d04c | madvas/cljs-react-material-ui-example | website.clj | (ns cljs-react-material-ui-example.website
(:require [com.stuartsierra.component :as c]
[bidi.bidi :as b]
[clojure.java.io :as io]
[yada.yada :refer [yada]]
[yada.resources.classpath-resource :as yr]))
(defrecord Website []
c/Lifecycle
(start [component]
compon... | null | https://raw.githubusercontent.com/madvas/cljs-react-material-ui-example/55a1ecda8f0ff2348f9d424a2c758bf24fef531c/src/clj/cljs_react_material_ui_example/website.clj | clojure | (ns cljs-react-material-ui-example.website
(:require [com.stuartsierra.component :as c]
[bidi.bidi :as b]
[clojure.java.io :as io]
[yada.yada :refer [yada]]
[yada.resources.classpath-resource :as yr]))
(defrecord Website []
c/Lifecycle
(start [component]
compon... | |
6528794c6d43c17b93b0a6f5b81da2fe25f89d7954fb15aaa7f596950f38f896 | eltonlaw/donkeyblend | reader_test.clj | (ns donkeyblend.reader-test
(:require [clojure.test :refer [deftest testing is]]
[donkeyblend.reader :as reader]))
(deftest test-read-string
(testing "empty string"
(is (= nil (reader/read-string ""))))
(testing "string with single object"
(is (= '(ns my-namespace (:import bpy) (:require [uti... | null | https://raw.githubusercontent.com/eltonlaw/donkeyblend/563812a80c63d2ccfa4bb5f203bc63814795f922/test/donkeyblend/reader_test.clj | clojure | (ns donkeyblend.reader-test
(:require [clojure.test :refer [deftest testing is]]
[donkeyblend.reader :as reader]))
(deftest test-read-string
(testing "empty string"
(is (= nil (reader/read-string ""))))
(testing "string with single object"
(is (= '(ns my-namespace (:import bpy) (:require [uti... | |
5efdb8eeb48f909d7740ea7b35f7ffaa06be82bac9d8b90853fb65c168bedc17 | part-cw/lambdanative | sxpath.scm |
;;(include "../libs/gambit/common.sch")
;;(include "../libs/gambit/myenv.sch")
( include " .. /sxml - tools / sxml - tools.sch " )
$ I d : sxpath.scm , v 1.5 2005/09/07 09:27:34 lizorkin Exp $
Highghest level SXPath
;; Refactored from sxml-tools.scm and sxpathlib.scm
;============================================... | null | https://raw.githubusercontent.com/part-cw/lambdanative/74ec19dddf2f2ff787ee70ad677bc13b9dfafc29/modules/ssax/sxpath.scm | scheme | (include "../libs/gambit/common.sch")
(include "../libs/gambit/myenv.sch")
Refactored from sxml-tools.scm and sxpathlib.scm
==============================================================================
Abbreviated SXPath
sxpath:: AbbrPath -> Converter, or
to the following rewriting rules
(sxpath '()) -> (node-joi... |
( include " .. /sxml - tools / sxml - tools.sch " )
$ I d : sxpath.scm , v 1.5 2005/09/07 09:27:34 lizorkin Exp $
Highghest level SXPath
Evaluate an abbreviated SXPath
sxpath : : AbbrPath - > Node|Nodeset - > Nodeset
AbbrPath is a list . It is translated to the full SXPath according
( node - join ( sxp... |
18c9f170fada97ec70d5486fceb5fd42fe4abb9ba4c6548a871b8ee32b461112 | mirage/jitsu | libvirt_backend.ml |
* Copyright ( c ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/mirage/jitsu/6be8a950d831a6055b7611747497bd418f4ff1ba/src/libvirt_backend.ml | ocaml | convert vm state to string
uuid set, parse and check
uuid not set, try to lookup name |
* Copyright ( c ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
a5e28219c7381058ac7990e2f2306eff506a484d915449b48f4933eac7fa8d87 | falsetru/htdp | 36.4.1.scm | (define current-color 'red)
;; Definition:
(define (next)
(cond
[(symbol=? 'green current-color) (set! current-color 'yellow)]
[(symbol=? 'yellow current-color) (set! current-color 'red)]
[(symbol=? 'red current-color) (set! current-color 'green)]))
(define (init-traffic-light)
(set! current-color ... | null | https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/36/36.4.1.scm | scheme | Definition:
dimensions of traffic light
the positions of the bulbs
draw the light with the red bulb turned on | (define current-color 'red)
(define (next)
(cond
[(symbol=? 'green current-color) (set! current-color 'yellow)]
[(symbol=? 'yellow current-color) (set! current-color 'red)]
[(symbol=? 'red current-color) (set! current-color 'green)]))
(define (init-traffic-light)
(set! current-color 'red))
(define... |
ca41269dac8168a798bbc4f110090e96283389bdeeea4786acaf1465634f85f4 | onedata/op-worker | api_file_attrs_test_SUITE.erl | %%%-------------------------------------------------------------------
@author
( C ) 2020 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% This file contains tests concernin... | null | https://raw.githubusercontent.com/onedata/op-worker/14d788c29cb80ac83bef9885c13daed68c68e559/test_distributed/suites/api/file/api_file_attrs_test_SUITE.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
This file contains tests concerning file data basic API (REST + gs).
@end
-------------------------------------------------------------------
============================... | @author
( C ) 2020 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(api_file_attrs_test_SUITE).
-author("Bartosz Walkowicz").
-include("api_file_test_utils.hrl").
-include("modules/fslogic/data_distribution.hrl").
-include("modules/fslogic/fslogic_common.hr... |
dbd0802f2add9556a9547ab917d17e32849636075e2e363cf3a6bb3e6c01fa27 | jherrlin/guitar-theory-training | scales.cljc | (ns se.jherrlin.drills.scales
(:require
[se.jherrlin.music-theory.utils
:refer [fformat]
:as utils]
[clojure.string :as str]))
(defn intervals-in-scales [scales-map]
(let [
;; scales-map @v2.se.jherrlin.music-theory.definitions/scales-atom
]
(->> scales-map
vals
... | null | https://raw.githubusercontent.com/jherrlin/guitar-theory-training/b352f533647df486df7a8b967de2234729fac463/src/se/jherrlin/drills/scales.cljc | clojure | scales-map @v2.se.jherrlin.music-theory.definitions/scales-atom | (ns se.jherrlin.drills.scales
(:require
[se.jherrlin.music-theory.utils
:refer [fformat]
:as utils]
[clojure.string :as str]))
(defn intervals-in-scales [scales-map]
(let [
]
(->> scales-map
vals
(map (fn [{:scale/keys [intervals title]}]
(str
... |
cb1075eadb03208f3e21b28bc8997f335736dc9f3d1cfd85ef65f5a305c0212b | gafiatulin/codewars | Repeater.hs | Thinkful - String Drills : Repeater
--
module Kata where
repeater :: String -> Int -> String
repeater s n = concat . replicate n $ s
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/7%20kyu/Repeater.hs | haskell | Thinkful - String Drills : Repeater
module Kata where
repeater :: String -> Int -> String
repeater s n = concat . replicate n $ s
| |
afafe81e4d59854d8266c13b84f2ec2695b99c64131cd5ba1c40d16ce78224ec | robert-strandh/Climacs | text-syntax.lisp | ;;; -*- Mode: Lisp; Package: COMMON-LISP-USER -*-
( c ) copyright 2005 by
( )
( c ) copyright 2005 by
( )
( c ) copyright 2007 by
( )
;;; This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
... | null | https://raw.githubusercontent.com/robert-strandh/Climacs/68ccba6a2a9cc78c1a84f1698c31c78a215f3d90/Syntax/Text/text-syntax.lisp | lisp | -*- Mode: Lisp; Package: COMMON-LISP-USER -*-
This library is free software; you can redistribute it and/or
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lic... |
( c ) copyright 2005 by
( )
( c ) copyright 2005 by
( )
( c ) copyright 2007 by
( )
modify it under the terms of the GNU Library General Public
version 2 of the License , or ( at your option ) any later version .
Library General Public License for more detai... |
f4aadbabdea32922aa1f31c3911afe2e3e4771397484d491fc3c03cd642ee8a7 | Octachron/olivine | structured.ml | module Aliases= struct
module L = Info.Linguistic
module B = Lib
module Ty = B.Ty
module T = B.T
module H = Ast_helper
module Exp = H.Exp
module C = Common
module M = Info.Common.StringMap
end
open Aliases
open Item
open Utils
let unique, reset_uid = C.id_maker ()
let of_int = L.simple ["of"; "int"]
l... | null | https://raw.githubusercontent.com/Octachron/olivine/e93df595ad1e8bad5a8af689bac7d150753ab9fb/aster/structured.ml | ocaml | Note: we could try to simplify further field names,
but they happen to be quite short in practice | module Aliases= struct
module L = Info.Linguistic
module B = Lib
module Ty = B.Ty
module T = B.T
module H = Ast_helper
module Exp = H.Exp
module C = Common
module M = Info.Common.StringMap
end
open Aliases
open Item
open Utils
let unique, reset_uid = C.id_maker ()
let of_int = L.simple ["of"; "int"]
l... |
d6d7c13363d63fc751dff2a991d5b1748ef9a7c01afe6b7094646935d7f3a108 | graninas/Hydra | FTL.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FunctionalDependencies #
# LANGUAGE ScopedTypeVariables #
module Hydra.Core.State.FTL where
import Hydra.Prelude
import Control.Concurrent.STM as STM
import qualified Hydra . Core . Domain as D
class Monad m => StateL m where
type StateVar m :: * -> *
newVa... | null | https://raw.githubusercontent.com/graninas/Hydra/60d591b1300528f5ffd93efa205012eebdd0286c/lib/hydra-free/src/Hydra/Core/State/FTL.hs | haskell | -- | Modify variable with function.
| Class that defines how can we run internal nested transaction in the
current computation.
-- -- | Eval "delayed" logger: it will be written after successfull state operation.
evalStmLogger : : ( ) - > StateL ( )
-- evalStmLogger action = liftF $ EvalStmLogger action id
ins... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FunctionalDependencies #
# LANGUAGE ScopedTypeVariables #
module Hydra.Core.State.FTL where
import Hydra.Prelude
import Control.Concurrent.STM as STM
import qualified Hydra . Core . Domain as D
class Monad m => StateL m where
type StateVar m :: * -> *
newVa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.