_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 |
|---|---|---|---|---|---|---|---|---|
16abbb0ad67aba8378a5224d3bdf74bc478615cbde6795d9af355aeb0b3448cc | janestreet/learn-ocaml-workshop | config.ml | open! Base
open! Import
open Scaffold
type t =
{ num_cols : int
; num_rows : int
; grid_size_in_px : int
; render_interval_ms : float
; logic_interval_ms : float
}
let default =
{ num_rows = List.length Board.rows
; num_cols = Board.num_cols
; grid_size_i... | null | https://raw.githubusercontent.com/janestreet/learn-ocaml-workshop/1ba9576b48b48a892644eb20c201c2c4aa643c32/03-frogger/config.ml | ocaml | open! Base
open! Import
open Scaffold
type t =
{ num_cols : int
; num_rows : int
; grid_size_in_px : int
; render_interval_ms : float
; logic_interval_ms : float
}
let default =
{ num_rows = List.length Board.rows
; num_cols = Board.num_cols
; grid_size_i... | |
6d7e3d99d7a5fc5d92c21aa96f13f799b4ca863cc254f3d95d7f6c84e87fe3e0 | m4dc4p/haskelldb | MySQL.hs | -----------------------------------------------------------
-- |
Module : Database . HaskellDB.Sql . MySQL
Copyright : 2006
-- License : BSD-style
--
Maintainer :
-- Stability : experimental
-- Portability : non-portable
--
-- SQL generation for MySQL.
--
--------------------------... | null | https://raw.githubusercontent.com/m4dc4p/haskelldb/a1fbc8a2eca8c70ebe382bf4c022275836d9d510/src/Database/HaskellDB/Sql/MySQL.hs | haskell | ---------------------------------------------------------
|
License : BSD-style
Stability : experimental
Portability : non-portable
SQL generation for MySQL.
---------------------------------------------------------
Hack around the lack of "EXCEPT" in MySql
be undefined in the case I tried | Module : Database . HaskellDB.Sql . MySQL
Copyright : 2006
Maintainer :
module Database.HaskellDB.Sql.MySQL (generator) where
import Database.HaskellDB.Sql
import Database.HaskellDB.Sql.Default
import Database.HaskellDB.Sql.Generate
import Database.HaskellDB.PrimQuery
generator :: SqlGenerat... |
b715b66e18f7164fd0c1b765a90e760a250a4eff1c6d15379f8b9245bf36d5e7 | janestreet/file_path | examples_intf.ml | (** This file constructs examples for expect test coverage. In [Helpers], we supplement
these examples with quickcheck tests. Having manually-constructed examples gives us
some idea of what cases we have covered, and gives us a deterministic set of inputs
for which the expect tests can print outputs. *)
op... | null | https://raw.githubusercontent.com/janestreet/file_path/975cd0bd0460212b939016769aed2de28665b5a0/test/examples_intf.ml | ocaml | * This file constructs examples for expect test coverage. In [Helpers], we supplement
these examples with quickcheck tests. Having manually-constructed examples gives us
some idea of what cases we have covered, and gives us a deterministic set of inputs
for which the expect tests can print outputs.
* Input... |
open! Core
* Inputs to functions like [ Path.is_prefix ] .
module With_prefix = struct
type 'a t =
{ t : 'a
; prefix : 'a
}
[@@deriving compare, equal, quickcheck, sexp_of]
end
module With_suffix = struct
type 'a t =
{ t : 'a
; suffix : File_path.Relative.t
}
[@@deriving compare, equa... |
fe82a02f0ce226c0c504f84e8a8e041127db6ea1212d1f1814a2ba5db7c09d94 | bennn/mechanics | reader.rkt | #lang s-exp syntax/module-reader
mechanics/lang/main
| null | https://raw.githubusercontent.com/bennn/mechanics/f65242d4ad0872de7c321a1c9a8e04d9b17b9259/lang/reader.rkt | racket | #lang s-exp syntax/module-reader
mechanics/lang/main
| |
d5eb7025857ab7c2b1219b0b9894ca3a20c8e52e9c6eee821d8b7bc35feeeeda | ArseniyBorezkiy/arda_compiler_collection | am_voc.erl | %% @doc Dynamically described model's vocabulary module.
%% @end
@author < >
, 2016
-module (am_voc).
-behaviour (gen_acc_storage).
%
% api
%
-export ([
create_vocabulary/2,
select_vocabularies/1,
create_stem/4,
find_stem/3,
select_stems/4
]).
%
... | null | https://raw.githubusercontent.com/ArseniyBorezkiy/arda_compiler_collection/78f99c744ba14a3b2fc3863e429e3abe0becb302/src/storage/modules/am_voc.erl | erlang | @doc Dynamically described model's vocabulary module.
@end
api
headers
basic types
=============================================================================
API
=============================================================================
============================================================... | @author < >
, 2016
-module (am_voc).
-behaviour (gen_acc_storage).
-export ([
create_vocabulary/2,
select_vocabularies/1,
create_stem/4,
find_stem/3,
select_stems/4
]).
gen acc storage callbacks
-export ([
init/0,
terminate/... |
eb1dce04e68c179f3727cf48121a5dff0bbd0c612c80f1dc858734d4f709beef | b0-system/brzo | brzo_ocaml_be.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2019 The programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2019... | null | https://raw.githubusercontent.com/b0-system/brzo/e481a39d7881d7aaf800cf3c7a9b6cd836867a90/src-ocaml/brzo_ocaml_be.mli | ocaml | * OCaml domain best-effort helpers.
* The type for ambiguous external resolutions. The module name
and the list of files that could match.
* [resolve_intf_deps] is like {!resolve_impl_deps} but for compiling
and interface.
* [handle_amb_deps file ~unresolved ambs] continues if [ambs] is
empty and otherwi... | ---------------------------------------------------------------------------
Copyright ( c ) 2019 The programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2019... |
62347c92acd34ae7d67327a560475a6addad939d4b8f44297ba6697b4736d66d | ahrefs/devkit | static_config.ml | open Prelude
open Printf
open ExtLib
exception Error of string
let fail fmt = ksprintf (fun s -> raise (Error s)) fmt
module Label : sig
type t = private string
val make : string -> t
end = struct
type t = string
let make s =
let open Stre.ASCII in
if s <> "" && is_alpha s.[0] && (List.for_all (fun c -> c = '_' ... | null | https://raw.githubusercontent.com/ahrefs/devkit/bb3692a0d492f4a5c7990ea40a886fd60351c1d7/static_config.ml | ocaml | | Not_found -> prerr_endline (Printf.sprintf "Skipping unknown option : %S = %S" k v) | open Prelude
open Printf
open ExtLib
exception Error of string
let fail fmt = ksprintf (fun s -> raise (Error s)) fmt
module Label : sig
type t = private string
val make : string -> t
end = struct
type t = string
let make s =
let open Stre.ASCII in
if s <> "" && is_alpha s.[0] && (List.for_all (fun c -> c = '_' ... |
de8fde4877d7b42913b52c8f55fbe6a4a8c7398d632904185b78713f4a1618bd | kit-clj/kit | app.cljs | (ns ^:dev/once <<ns-name>>.app
(:require [<<ns-name>>.core :as core]))
(core/init!) | null | https://raw.githubusercontent.com/kit-clj/kit/320b920dcf25c33130f33b0e1cd55ff13f3157f6/libs/kit-generator/test/resources/modules/kit/cljs/assets/src/app.cljs | clojure | (ns ^:dev/once <<ns-name>>.app
(:require [<<ns-name>>.core :as core]))
(core/init!) | |
67979e88f7d9d53a1536f4846a230d2ece5221f5db2340bd83a0ca61d3b7bfd9 | eugeneia/athens | libxml2.lisp | ;;; test.lisp
;;;
;;; This file is part of the cl-libxml2 library, released under Lisp-LGPL.
;;; See file COPYING for details.
;;;
Author : < >
(defpackage :libxml2.test
(:use :cl :iter :libxml2.tree :lift :libxml2.xpath :metabang.bind)
(:export :libxml2-test
:run-libxml2-tests))
(in-package #:lib... | null | https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/cl-libxml2-20130615-git/test/libxml2.lisp | lisp | test.lisp
This file is part of the cl-libxml2 library, released under Lisp-LGPL.
See file COPYING for details.
tree-test
make-element
make-child-element
make-comment
make-process-instruction
make-text
make-document
parse (str string)
parse (stream string-stream)
parse (stream stream)
parse (octets s... | Author : < >
(defpackage :libxml2.test
(:use :cl :iter :libxml2.tree :lift :libxml2.xpath :metabang.bind)
(:export :libxml2-test
:run-libxml2-tests))
(in-package #:libxml2.test)
- test
(deftestsuite libxml2-test () ())
(deftestsuite tree-test (libxml2-test) ())
(addtest (tree-test)
make... |
fb00732f3ed55c7a31115a80ae224ae0e41a66c2094f0a23113408e0ae1acaab | ghilesZ/apronext | coeffext.ml | open Apron
module S = Scalarext
include Coeff
let zero = s_of_int 0
let one = s_of_int 1
let minus_one = s_of_int (-1)
let of_interval i = Interval i
let to_float = function
| Scalar x -> S.to_float x
| Interval _ -> invalid_arg "cant convert a coeff.interval to float"
let to_mpqf = function
| Scalar x -> S... | null | https://raw.githubusercontent.com/ghilesZ/apronext/7b8e6398155d002cf07130a25f29d7eb5edd0e28/src/coeffext.ml | ocaml | open Apron
module S = Scalarext
include Coeff
let zero = s_of_int 0
let one = s_of_int 1
let minus_one = s_of_int (-1)
let of_interval i = Interval i
let to_float = function
| Scalar x -> S.to_float x
| Interval _ -> invalid_arg "cant convert a coeff.interval to float"
let to_mpqf = function
| Scalar x -> S... | |
3f91b7077eb6ccf730a93978f689ae50643ae0d7f3920a91b0cc7e81dee2e557 | kupl/FixML | sub31.ml | type formula = TRUE
| FALSE
| NOT of formula
| ANDALSO of formula * formula
| ORELSE of formula * formula
| IMPLY of formula * formula
| LESS of expr * expr
and expr = NUM of int
| PLUS of expr * expr
| MINUS of expr * expr
... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/formula/formula/submissions/sub31.ml | ocaml | type formula = TRUE
| FALSE
| NOT of formula
| ANDALSO of formula * formula
| ORELSE of formula * formula
| IMPLY of formula * formula
| LESS of expr * expr
and expr = NUM of int
| PLUS of expr * expr
| MINUS of expr * expr
... | |
6dac5e7e98f5331d99416978d59d16ff45b1ceba2895fdeeb18ac5316063add2 | jjmrocha/kill-bill | kb_template_util.erl | %%
Copyright 2013
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distributed under the ... | null | https://raw.githubusercontent.com/jjmrocha/kill-bill/1ba409c39524f2b47ff1338214bc9b4de3f2659e/src/kb_template_util.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2013
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(kb_template_util).
-include("kill_bill.hrl").
-export([execute/2]).
execute(Path, Req) ->
Dtl = get_dtl(Path),
kb_response:handle({dtl, Dtl, []... |
a08504de9b7cf5727ba95eb7b03163a19b4fe217cbf9b32b379cc5242a0777e0 | antono/guix-debian | pretty-print.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the Lice... | null | https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/gnu/packages/pretty-print.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2014 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages pretty-print)
#:use-module (guix packages)
#:use-module (guix licenses)
#:use-m... |
d34be7266734f074af0be409ff0a3fea087cbd9e4592ed534e74bc146aa79bab | na4zagin3/satyrographos | commandLockdown.ml | open Core
module StringMap = Map.Make(String)
let outf = Format.std_formatter
let default_script_path () =
Filename.concat (FileUtil.pwd ()) "Satyristes"
let lockdown_file_path ~buildscript_path =
FilePath.concat
(FilePath.dirname buildscript_path)
"lockdown.yaml"
let lockdown_save_command =
let open... | null | https://raw.githubusercontent.com/na4zagin3/satyrographos/9dbccf05138510c977a67c859bbbb48755470c7f/bin/commandLockdown.ml | ocaml | open Core
module StringMap = Map.Make(String)
let outf = Format.std_formatter
let default_script_path () =
Filename.concat (FileUtil.pwd ()) "Satyristes"
let lockdown_file_path ~buildscript_path =
FilePath.concat
(FilePath.dirname buildscript_path)
"lockdown.yaml"
let lockdown_save_command =
let open... | |
7048ff78b96fd18abf0dc1b03be300a4ab79bfe03ad1d04a0348d1bc39547d09 | videlalvaro/claude | mongodb_test.clj | (ns claude.mongodb-test
(:use clojure.test
claude.core)
(:require [claude.mongodb :as cfm]))
(defn mock-vcap-env []
(constantly (slurp (clojure.java.io/resource "json/1.json"))))
(deftest host
(with-redefs [get-vcap-env (mock-vcap-env)]
(is (= "172.30.48.66"
(cfm/host)))
))
(deftes... | null | https://raw.githubusercontent.com/videlalvaro/claude/ae39a605740e16eb47053637420a80f63270681b/test/claude/mongodb_test.clj | clojure | (ns claude.mongodb-test
(:use clojure.test
claude.core)
(:require [claude.mongodb :as cfm]))
(defn mock-vcap-env []
(constantly (slurp (clojure.java.io/resource "json/1.json"))))
(deftest host
(with-redefs [get-vcap-env (mock-vcap-env)]
(is (= "172.30.48.66"
(cfm/host)))
))
(deftes... | |
25abc494428c2038ad4f3150d22892f5ec30407710174bad4441e32144632d2f | GregorySchwartz/too-many-cells | Classify.hs | TooManyCells . Classify . Classify
Collects functions pertaining to classifying cells from reference populations .
Gregory W. Schwartz
Collects functions pertaining to classifying cells from reference populations.
-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
module TooManyCells.Cla... | null | https://raw.githubusercontent.com/GregorySchwartz/too-many-cells/0de948c6e99a489f1d2e8c412a04e4bcf3b26806/src/TooManyCells/Classify/Classify.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE BangPatterns #
Remote
Local
| Classify matrices using cosine similarity. Results in a matrix with scores
(cosine similarity) for each column and observations per row.
| Force unification of features with reference features. | TooManyCells . Classify . Classify
Collects functions pertaining to classifying cells from reference populations .
Gregory W. Schwartz
Collects functions pertaining to classifying cells from reference populations.
-}
module TooManyCells.Classify.Classify
( classifyCells
, classifyMat
) where
... |
2d25acae9abf004fc723a118fdf443758b12a7d487de80d802d90c4d9bbf2646 | slipstream/SlipStreamServer | external_object_template_alpha_example.clj | (ns com.sixsq.slipstream.ssclj.resources.external-object-template-alpha-example
(:require
[clojure.spec.alpha :as s]
[com.sixsq.slipstream.ssclj.resources.common.utils :as u]
[com.sixsq.slipstream.ssclj.resources.external-object :as eo-resource]
[com.sixsq.slipstream.ssclj.resources.external-object-te... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi-resources/test/com/sixsq/slipstream/ssclj/resources/external_object_template_alpha_example.clj | clojure |
schemas
template resource
description
initialization: register this external object template
multimethods for validation
| (ns com.sixsq.slipstream.ssclj.resources.external-object-template-alpha-example
(:require
[clojure.spec.alpha :as s]
[com.sixsq.slipstream.ssclj.resources.common.utils :as u]
[com.sixsq.slipstream.ssclj.resources.external-object :as eo-resource]
[com.sixsq.slipstream.ssclj.resources.external-object-te... |
0e64b8a4ac253989217a6349ace7da361d7928ec038ec77b56cfc94f6fd76dc6 | paurkedal/ocaml-prime | prime_enumset.ml | Copyright ( C ) 2013 - -2022 Petter A. Urkedal < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any la... | null | https://raw.githubusercontent.com/paurkedal/ocaml-prime/14d27f45bed83a323a07de32cfd9d3327fe33643/lib/prime_enumset.ml | ocaml | Pre: e is strictly less than the elements of the set.
Pre: e is strictly greater than the elements of the set. | Copyright ( C ) 2013 - -2022 Petter A. Urkedal < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any la... |
c4ced4e32157dcec3b7636dae2c74742300f20cb48bb5bf0016daa9237071772 | CryptoKami/cryptokami-core | Worker.hs | # LANGUAGE CPP #
{-# LANGUAGE RankNTypes #-}
-- | Block processing related workers.
module Pos.Block.Worker
( blkWorkers
) where
import Universum
import Control.Lens (ix)
import qualified Data.List.NonEmpty as NE
import Data.Time.Units (Microsecond)
import ... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/block/src/Pos/Block/Worker.hs | haskell | # LANGUAGE RankNTypes #
| Block processing related workers.
--------------------------------------------------------------------------
All workers
--------------------------------------------------------------------------
| All workers specific to block processing.
Printe tip header
Print the difference between ti... | # LANGUAGE CPP #
module Pos.Block.Worker
( blkWorkers
) where
import Universum
import Control.Lens (ix)
import qualified Data.List.NonEmpty as NE
import Data.Time.Units (Microsecond)
import Formatting (Format, bprint, build, fixed, int, now, sformat, sho... |
cc06ed1a0457c4ed0b70acd8d6c079920572a491dcfaa01ed8eb05619a0b68f9 | mveritym/markov-bot | project.clj | (defproject markov-bot "0.1.0"
:description "Generate new tweets given twitter handles and/or search terms"
:license {:name "MIT License"}
:dependencies [[org.clojure/clojure "1.8.0"]
[twitter-api "0.7.9"]
[environ "1.1.0"]
[com.cemerick/url "0.1.1"]
... | null | https://raw.githubusercontent.com/mveritym/markov-bot/138ac43d2c5b016ae1b8beeeee2dc854cd748e53/markov-bot-lambda/project.clj | clojure | (defproject markov-bot "0.1.0"
:description "Generate new tweets given twitter handles and/or search terms"
:license {:name "MIT License"}
:dependencies [[org.clojure/clojure "1.8.0"]
[twitter-api "0.7.9"]
[environ "1.1.0"]
[com.cemerick/url "0.1.1"]
... | |
47d1ad3291042e906115ebb21aaf2d36396a3ae8581e0cc8b6a2522d3b411215 | robert-strandh/Gsharp | measure.lisp | (cl:in-package #:gsharp-measure)
(defmacro defrclass (name base slots)
`(progn
(stealth-mixin:define-stealth-mixin ,name () ,base
((modified-p :initform t :accessor modified-p)
,@slots))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Key signature.
(defmethod more-sharps... | null | https://raw.githubusercontent.com/robert-strandh/Gsharp/20b4a30ebf1e211bf421563278d425b3b06607e9/measure.lisp | lisp |
Key signature.
Staff.
maybe use this later
Note.
The relative x offset of the accidental of the note with respect
to the cluster. A value of nil indicates that accidental has
not been placed yet.
The relative x offset of the note with respect to the cluster.
The absolute y position of any dot, or NIL if... | (cl:in-package #:gsharp-measure)
(defmacro defrclass (name base slots)
`(progn
(stealth-mixin:define-stealth-mixin ,name () ,base
((modified-p :initform t :accessor modified-p)
,@slots))))
(defmethod more-sharps :after ((sig key-signature) &optional n)
(declare (ignore n))
(let ((staff (sta... |
c481595c4aa9c20a37a4972f3e472e0519b4dda9eb8791bee9a48dfd9fd1d8b4 | fujimura/hi | Git.hs | # LANGUAGE ScopedTypeVariables #
module Hi.Git
(
clone
, config
, lsFiles
, expandUrl
) where
import Control.Applicative
import System.Exit
import System.Process (readProcess, readProcessWithExitCode, callCommand)
import Control.Exception
expandU... | null | https://raw.githubusercontent.com/fujimura/hi/a55cf5ee87e3607f398a08aeb078f5ef63e6f4c5/src/Hi/Git.hs | haskell | | Clone given repository to current directory
| Return file list by `git ls-files`
| Return given config value | # LANGUAGE ScopedTypeVariables #
module Hi.Git
(
clone
, config
, lsFiles
, expandUrl
) where
import Control.Applicative
import System.Exit
import System.Process (readProcess, readProcessWithExitCode, callCommand)
import Control.Exception
expandU... |
96511ed5332add4af32d87c3e1ccc0038df8ec8687e033b79835cbd335659d05 | sealchain-project/sealchain | ReifyWalletError.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Cardano.Wallet.API.V1.ReifyWalletError (
translateWalletLayerErrors
) where
import qualified Data.Text as T
import Formatting (build, sformat)
import Universum
import ... | null | https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/wallet/src/Cardano/Wallet/API/V1/ReifyWalletError.hs | haskell | # LANGUAGE RankNTypes #
Nothing for non-layer exceptions. | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Cardano.Wallet.API.V1.ReifyWalletError (
translateWalletLayerErrors
) where
import qualified Data.Text as T
import Formatting (build, sformat)
import Universum
import Cardano.Wallet.API.V1.Types (V1 (..))... |
4a905a61f6c8ef0d10662486f1a79d97ce0bde9e2db5d8fa199cab530e9b7e8f | davelambert/porky | wilbur-ql.lisp | -*- package : ; Syntax : Common - lisp ; Base : 10 -*-
;;;
wilbur-ql.lisp
;;;
;;;
;;; --------------------------------------------------------------------------------------
;;;
;;; The contents of this file are subject to the NOKOS License Version 1.0a (the
;;; "License"); you may not use this file except in... | null | https://raw.githubusercontent.com/davelambert/porky/44a4ff0e791de23f723bfd93072fcef5f8523c8a/src/core/wilbur-ql.lisp | lisp | Syntax : Common - lisp ; Base : 10 -*-
--------------------------------------------------------------------------------------
The contents of this file are subject to the NOKOS License Version 1.0a (the
"License"); you may not use this file except in compliance with the License.
WARRANTY OF ANY KIND, e... |
wilbur-ql.lisp
Software distributed under the License is distributed on an " AS IS " basis , WITHOUT
The Original Software is
WILBUR2 : Nokia Semantic Web Toolkit for CLOS
Copyright ( c ) 2001 - 2005 Nokia and others . All Rights Reserved .
Portions Copyright ( c ) 1989 - 1992 . All Rights R... |
7b5c5d008a76a9cfac223271fc369970bdc38bc9e8d91642401088956011f6f9 | ocsigen/ocsigenserver | ocsigen_charset_mime.mli | Ocsigen
*
* ocsigen_charset_mime.mli Copyright ( C ) 2008
*
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundatio... | null | https://raw.githubusercontent.com/ocsigen/ocsigenserver/d468cf464dcc9f05f820c35f346ffdbe6b9c7931/src/http/ocsigen_charset_mime.mli | ocaml | * By convention, "no specified charset" is represented by the empty
string
* Association between extensions and charset, with a default value.
* All files are mapped to [no_charset]
* Functions related to the default charset in the association
* Updates the mapping between extensions from a file to its charset.... | Ocsigen
*
* ocsigen_charset_mime.mli Copyright ( C ) 2008
*
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundatio... |
981e035d2945d9660d00b69061c1c8eabf30f0e7808fea59e6cfda8d47b71544 | stevebleazard/ocaml-jsonxt | reader_string_file.ml | module type Reader_string_file = sig
type json
val json_of_string : string -> (json, string) result
val json_of_string_exn : string -> json
val json_of_file : string -> (json, string) result
val json_of_file_exn : string -> json
val json_of_channel : in_channel -> (json, string) result
val json_of_channe... | null | https://raw.githubusercontent.com/stevebleazard/ocaml-jsonxt/fe982b6087dd76ca003d8fbc19ae9a519f54b828/lib/reader_string_file.ml | ocaml | Stream.t returning functions
Stream.t Json_error_info raising functions | module type Reader_string_file = sig
type json
val json_of_string : string -> (json, string) result
val json_of_string_exn : string -> json
val json_of_file : string -> (json, string) result
val json_of_file_exn : string -> json
val json_of_channel : in_channel -> (json, string) result
val json_of_channe... |
c4d1701623956a91ed66b862073d80b2a6d0354f5eae012ec2a70061e30a6417 | pgj/mirage-kfreebsd | ethif.mli |
* Copyright ( c ) 2010 - 2011 Anil Madhavapeddy < >
*
* 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 PROVID... | null | https://raw.githubusercontent.com/pgj/mirage-kfreebsd/0ff5b2cd7ab0975e3f2ee1bd89f8e5dbf028b102/packages/mirage-net/lib/ethif.mli | ocaml |
* Copyright ( c ) 2010 - 2011 Anil Madhavapeddy < >
*
* 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 PROVID... | |
0387121662356a815a30363ce59b5197dfe1e6b63ab65c7dbf28104266eb3181 | racket/typed-racket | apply.rkt | #lang racket/base
(require syntax/parse racket/syntax
(for-template racket/unsafe/ops racket/base (prefix-in k- '#%kernel))
"../utils/utils.rkt"
"utils.rkt"
"logging.rkt")
(provide apply-opt-expr)
(define-literal-syntax-class +)
(define-literal-syntax-class *)
(define-literal-synta... | null | https://raw.githubusercontent.com/racket/typed-racket/6ea20bec8d41e1a188d7f831c35423293a89c98e/typed-racket-lib/typed-racket/optimizer/apply.rkt | racket | #lang racket/base
(require syntax/parse racket/syntax
(for-template racket/unsafe/ops racket/base (prefix-in k- '#%kernel))
"../utils/utils.rkt"
"utils.rkt"
"logging.rkt")
(provide apply-opt-expr)
(define-literal-syntax-class +)
(define-literal-syntax-class *)
(define-literal-synta... | |
c4a4c7b204df4da3c24bbf95e220c3fd3a0c370d76934b5fafc4c9b303c46dbc | tommay/pokemon-go | List.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import qualified Options.Applicative as O
import Options.Applicative ((<|>), (<**>))
import Data.Semigroup ((<>))
import qualified Calc
import qualified Cup
import Cup (Cup)
import qualified Epic
import qualified GameMaster
import ... | null | https://raw.githubusercontent.com/tommay/pokemon-go/2368df178a9c49935f4fb11b35cb0ab0d9cb1dc5/app/List.hs | haskell | # LANGUAGE OverloadedStrings # |
module Main where
import qualified Options.Applicative as O
import Options.Applicative ((<|>), (<**>))
import Data.Semigroup ((<>))
import qualified Calc
import qualified Cup
import Cup (Cup)
import qualified Epic
import qualified GameMaster
import GameMaster (GameMaster)
impo... |
49237c17afac07cde8f8a50e7c01a43bf071e3e3230d5bf00f99e84168bebe39 | ssardina/ergo | sort.scm | A two - armed robot must sort a stack of bricks by size . Initially , all the
bricks are located on stackA ; in the final state they must all be on
;;; stackB in ascending order. The robot can pick up a brick from either
;;; stack using either arm and put a brick down onto either stack with either
;;; arm. When... | null | https://raw.githubusercontent.com/ssardina/ergo/4225ebb95779d1748f377cf2e4d0a593d6a2a103/Examples/PlanningExamples/sort.scm | scheme | in the final state they must all be on
stackB in ascending order. The robot can pick up a brick from either
stack using either arm and put a brick down onto either stack with either
arm. When the robot is holding a brick in each hand, it can sense which
the action theory
auxilliary functions
the goal to be a... | A two - armed robot must sort a stack of bricks by size . Initially , all the
one is the bigger of the two .
(define (pick-result st) (if (null? st) 'fail 'ok))
(define (pick-obtain st) (if (null? st) 'nothing (car st)))
(define (pick-remaining st) (if (null? st) st (cdr st)))
(define (rand-list n)
(if (= n ... |
5707c5bdcd01ebc03dac763e37ab45814a015e4c93aa2be0d6c18fbb7ffe765e | SahilKang/cl-avro | decimal.lisp | Copyright 2021 Google LLC
;;;
;;; This file is part of cl-avro.
;;;
;;; cl-avro is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;;; (at your option) any later version.
;... | null | https://raw.githubusercontent.com/SahilKang/cl-avro/70fcaa32514cfb59b75812b2eab45ed24cce9d27/test/resolution/logical/decimal.lisp | lisp |
This file is part of cl-avro.
cl-avro is free software: you can redistribute it and/or modify
(at your option) any later version.
cl-avro 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 t... | Copyright 2021 Google LLC
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(in-package #:cl-user)
(defpackage #:cl-avro/test/resolution/decimal
(:use #:cl ... |
68a1e0c8083c0cef9eb446461627dccf358cde28d7a2c3604f95a5d0e881ab80 | nmunro/mtg-api | ruling.lisp | (defpackage mtg-api/ruling
(:use :cl)
(:export #:make-ruling
#:date
#:text))
(in-package :mtg-api/ruling)
(defclass ruling ()
((date :initarg :date :initform "" :reader date)
(text :initarg :text :initform "" :reader text))
(:documentation "Represents a ruling in MTG"))
(defmethod pri... | null | https://raw.githubusercontent.com/nmunro/mtg-api/f796794cde8a483278f22d7ac7e6c46302685ec1/src/cards/ruling.lisp | lisp | (defpackage mtg-api/ruling
(:use :cl)
(:export #:make-ruling
#:date
#:text))
(in-package :mtg-api/ruling)
(defclass ruling ()
((date :initarg :date :initform "" :reader date)
(text :initarg :text :initform "" :reader text))
(:documentation "Represents a ruling in MTG"))
(defmethod pri... | |
c68751a2bcf986b7172afe28cab84a7d189e39646eb05839b2f8f1ea4573f2f2 | ChickenProp/haskenthetical | TypeCheck.hs | module TypeCheck
( runTypeCheck
, typeCheckDefs
, typeCheckMacs
-- Currently only exported for testing
, Constraint(..)
, Substitutable(..)
, generalize
, solver1
) where
import Prelude.Extra
import Control.Monad (replicateM, zipWithM)
import Control.Monad.Except (liftEither)
import Control.Monad.T... | null | https://raw.githubusercontent.com/ChickenProp/haskenthetical/fed8274a18e9eff450bc7a5187f0204a228d99cb/src/TypeCheck.hs | haskell | Currently only exported for testing
`s` such that `apply s t1 = apply s t2`.
of t2. That is, we can create a substitution `s` such that
`apply s t2 = t1`.
g <- genSym
Match tString g -- this is fine, will substitute g -> String
-- going forward.
Match g tString -- this will thro... | module TypeCheck
( runTypeCheck
, typeCheckDefs
, typeCheckMacs
, Constraint(..)
, Substitutable(..)
, generalize
, solver1
) where
import Prelude.Extra
import Control.Monad (replicateM, zipWithM)
import Control.Monad.Except (liftEither)
import Control.Monad.Trans (lift)
import Control.Monad.RWS.Stri... |
cd1a6fedcb4ebb57d94aa20d9ddc9bc819ecaadcfd4ccb6eb7af8bf732fff985 | fetburner/Coq2SML | vm.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/kernel/vm.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
************************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Term
open Con... |
cf3dabddf9d6fcbb3489da3d29ffe2d11e5eb786b9767d295fc2ff6745e16d83 | clojure-interop/google-cloud-clients | GrpcProductSearchCallableFactory.clj | (ns com.google.cloud.vision.v1p4beta1.stub.GrpcProductSearchCallableFactory
"gRPC callable factory implementation for Cloud Vision API.
This class is for advanced usage."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.vision.v1p4beta1.stub GrpcProductSearchCallableFactory]))
(defn... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.vision/src/com/google/cloud/vision/v1p4beta1/stub/GrpcProductSearchCallableFactory.clj | clojure | (ns com.google.cloud.vision.v1p4beta1.stub.GrpcProductSearchCallableFactory
"gRPC callable factory implementation for Cloud Vision API.
This class is for advanced usage."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.vision.v1p4beta1.stub GrpcProductSearchCallableFactory]))
(defn... | |
6db1a00bfe7861ce7b8d58e457e1b1f53e2437592d1dce43c0b5fe92f3c5be86 | hyperledger-labs/fabric-chaincode-ocaml | client.ml | open GRPC
let () = Unix.sleepf 0.1
let target = if Array.length Sys.argv > 1 then Sys.argv.(1) else "unix:socket"
let client = Client.create ~target ()
let () =
print_endline "Unary";
let rsp =
GRPC_protoc_plugin.Client.unary_rpc ~timeout:4L client
Echo.Grpc.Examples.Echo.Echo.unaryEcho' "Client"
in
... | null | https://raw.githubusercontent.com/hyperledger-labs/fabric-chaincode-ocaml/6181ba3e8fb219a9a1b2ce2fe2ac1dc1a477c1bd/grpc-protoc-plugin/tests/echo/client.ml | ocaml | open GRPC
let () = Unix.sleepf 0.1
let target = if Array.length Sys.argv > 1 then Sys.argv.(1) else "unix:socket"
let client = Client.create ~target ()
let () =
print_endline "Unary";
let rsp =
GRPC_protoc_plugin.Client.unary_rpc ~timeout:4L client
Echo.Grpc.Examples.Echo.Echo.unaryEcho' "Client"
in
... | |
c465dc63b12bb7b467d0244a235289440648d6692e92b306b1699f3d8ad1bcd0 | onaio/hatti | viewby.cljs | (ns hatti.map.viewby
(:require-macros [cljs.core.async.macros :refer [go go-loop]])
(:require [clojure.string :refer [split]]
[chimera.js-interop :refer [safe-regex]]
[chimera.seq :refer [in?]]
[om.core :as om :include-macros true]
[hatti.charting :refer [evenly-space... | null | https://raw.githubusercontent.com/onaio/hatti/7dc23c1c60b9fc46e1ff5b023eb6c794ebd04773/src/hatti/map/viewby.cljs | clojure | MAP
For all other types, answer is a scalar, not a list
nil cannot be selected or deselected: no-change
else -> the logic begins
first click -> *just* select this answer
special rule: nothing is clicked -> make everything clicked
else: some things are clicked -> leave alone | (ns hatti.map.viewby
(:require-macros [cljs.core.async.macros :refer [go go-loop]])
(:require [clojure.string :refer [split]]
[chimera.js-interop :refer [safe-regex]]
[chimera.seq :refer [in?]]
[om.core :as om :include-macros true]
[hatti.charting :refer [evenly-space... |
4e5e8b7697a4c5a82f952b34da729b87b6f5410a2b0d19884a579ed663162362 | gonimo/gonimo | User.hs | # LANGUAGE TypeFamilies #
-- | Functions for working with User entity
-- This module is intended to be imported qualified as User
module Gonimo.Server.Db.User where
import Control.Monad.State.Class
import Data.Maybe
import Data.Text (Text)
import Contr... | null | https://raw.githubusercontent.com/gonimo/gonimo/f4072db9e56f0c853a9f07e048e254eaa671283b/back/src/Gonimo/Server/Db/User.hs | haskell | | Functions for working with User entity
This module is intended to be imported qualified as User
| Create a new user in the database. | # LANGUAGE TypeFamilies #
module Gonimo.Server.Db.User where
import Control.Monad.State.Class
import Data.Maybe
import Data.Text (Text)
import Control.Monad.IO.Class (MonadIO)
import Control.Monad.Trans.Reader (ReaderT (..))
imp... |
471f2a72399a70556db0b5ac90b9d12ac4dee432e19680e41f085bb833877987 | magnars/optimus | concatenate_bundles_test.clj | (ns optimus.optimizations.concatenate-bundles-test
(:use [midje.sweet]
[optimus.optimizations.concatenate-bundles]))
(fact
"When files are bundled together, we still keep the original ones.
That way you can still cherry-pick files. However, the :bundle property
is removed - they are no longer to be incl... | null | https://raw.githubusercontent.com/magnars/optimus/ac5df602726d255312dfd48cf7ae2e00d99069bd/test/optimus/optimizations/concatenate_bundles_test.clj | clojure | (ns optimus.optimizations.concatenate-bundles-test
(:use [midje.sweet]
[optimus.optimizations.concatenate-bundles]))
(fact
"When files are bundled together, we still keep the original ones.
That way you can still cherry-pick files. However, the :bundle property
is removed - they are no longer to be incl... | |
e32cc53dcd029e789475956518e10c4198bf552886079113f371d35891af1330 | incoherentsoftware/defect-process | Selection.hs | module Menu.PauseMenu.Selection
( readSelection
, updateSelectionFromSlotComboBoxes
) where
import Control.Monad.State (StateT, put)
import Data.Maybe (isJust)
import Game.Mode
import Menu.PauseMenu.HelpEntry
import Menu.PauseMenu.Selection.Types
import Menu.PauseMenu.SlotComboBoxes
import Menu.P... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/15f2569e7d0e481c2e28c0ca3a5e72d2c049b667/src/Menu/PauseMenu/Selection.hs | haskell | module Menu.PauseMenu.Selection
( readSelection
, updateSelectionFromSlotComboBoxes
) where
import Control.Monad.State (StateT, put)
import Data.Maybe (isJust)
import Game.Mode
import Menu.PauseMenu.HelpEntry
import Menu.PauseMenu.Selection.Types
import Menu.PauseMenu.SlotComboBoxes
import Menu.P... | |
3c3cab7e71564513676f2125cecb8a8b754ea16b0886f2eee03cc21ff8573860 | ptaoussanis/sente | project.clj | (defproject com.taoensso.examples/sente "1.18.0-SNAPSHOT"
:description "Sente, reference web-app example project"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"
:distribution :repo
:comments "Same as Clojure"}
:min-lein-version "2.3.3"
:global-vars {*war... | null | https://raw.githubusercontent.com/ptaoussanis/sente/798e50ee800cf3827c74fcd099d2b67ab13a28ee/example-project/project.clj | clojure | <--- Sente
TODO Choose (uncomment) a supported web server -----------------------
Default
:exclusions [ring/ring-core]]
Needs v0.4.2 +
[aleph "0.4.1"]
[info.sunng/ring-jetty9-adapter "0.14.2"]
-----------------------------------------------------------------------
Includes `ring... | (defproject com.taoensso.examples/sente "1.18.0-SNAPSHOT"
:description "Sente, reference web-app example project"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"
:distribution :repo
:comments "Same as Clojure"}
:min-lein-version "2.3.3"
:global-vars {*war... |
b4db00b8aba9ca1c7895a61070c868c31eae1b8753fc2728bd56ea9132bb2c5f | janegca/htdp2e | Exercise-138-ColsAndRows.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname Exercise-138-ColsAndRows) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2h... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/02-ArbitrarilyLargeData/Exercise-138-ColsAndRows.rkt | racket | about the language level of this file in a form that our tools can easily process.
The function col consumes a natural number n and an image i.
It produces a column—a vertical arrangement—of n copies of i.
The function row consumes a natural number n and an image i.
It produces a row—a horizontal arrangement—o... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname Exercise-138-ColsAndRows) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repea... |
645db59640c1905384999e2c21062acd4ac90426c71743892c7acb7c905b7156 | DalekBaldwin/on-lisp | chapter-14.lisp | (in-package :on-lisp.14)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Chapter 14 - Anaphoric Macros
p. 191
(defmacro aif (test-form then-form &optional else-form)
`(let ((it ,test-form))
(if it ,then-form ,else-form)))
(defmacro awhen (test-form &body body)
`(aif ,test-form
(progn ,@body)))
(defmacro awh... | null | https://raw.githubusercontent.com/DalekBaldwin/on-lisp/b13e8b6e956bef45c4fd7194a062c27555268048/src/chapter-14.lisp | lisp |
version in book
Corrected problem in :
return result of test if no non-test forms in clause
not in original code
wrong
not in original code
version in book
Corrected problem in :
return result of test if no non-test forms in clause
not in original code
should this be eql instead? | (in-package :on-lisp.14)
Chapter 14 - Anaphoric Macros
p. 191
(defmacro aif (test-form then-form &optional else-form)
`(let ((it ,test-form))
(if it ,then-form ,else-form)))
(defmacro awhen (test-form &body body)
`(aif ,test-form
(progn ,@body)))
(defmacro awhile (expr &body body)
`(do ((it ,... |
5ad49df24a956ff4fb7f2690d1f88055178154a25083a4c96229421edf6bb35d | cdepillabout/servant-checked-exceptions | Internal.hs | module Servant.Checked.Exceptions.Internal
( module Servant.Checked.Exceptions.Internal.Envelope
, module Servant.Checked.Exceptions.Internal.EnvelopeT
, module Servant.Checked.Exceptions.Internal.Verbs
, module Servant.Checked.Exceptions.Internal.Servant
, module Servant.Checked.Exceptions.Internal.Util
) ... | null | https://raw.githubusercontent.com/cdepillabout/servant-checked-exceptions/8ec4e831e45e51f3404790496f036a42c7349afa/servant-checked-exceptions-core/src/Servant/Checked/Exceptions/Internal.hs | haskell | module Servant.Checked.Exceptions.Internal
( module Servant.Checked.Exceptions.Internal.Envelope
, module Servant.Checked.Exceptions.Internal.EnvelopeT
, module Servant.Checked.Exceptions.Internal.Verbs
, module Servant.Checked.Exceptions.Internal.Servant
, module Servant.Checked.Exceptions.Internal.Util
) ... | |
91713e553b33452355d20890a872b29a26527c568aeb37ec601d258f917a4cc1 | cldm/cldm | ssh-repository.lisp | (in-package :cldm)
(defclass ssh-cld-repository (cld-repository)
((address :initarg :address
:initform (error "Provide the ssh address")
:accessor repository-address
:documentation "The cld repository ssh address"))
(:documentation "A cld repository accessible via ssh"))
(defme... | null | https://raw.githubusercontent.com/cldm/cldm/899f1a92d52245ef0fc84d073ac35c4b0d2e9609/src/repository/ssh-repository.lisp | lisp | has not previously failed
The uri has previously failed, do nothing
the uri failed, add the uri to failed ones
else, no download session | (in-package :cldm)
(defclass ssh-cld-repository (cld-repository)
((address :initarg :address
:initform (error "Provide the ssh address")
:accessor repository-address
:documentation "The cld repository ssh address"))
(:documentation "A cld repository accessible via ssh"))
(defme... |
9bacb903436806932dd3ca454f70954f0c7ae4a0d213e8872e75455c6de53bbf | ghc/testsuite | tc047.hs | module ShouldSucceed where
type OL a = [a]
-- produces the interface:
data OL a = MkOL [ a ] deriving ( )
ranOAL : : ( OL ( a , a ) ) - > [ a ]
-- this interface was produced by BOTH hbc and nhc
-- the following bogus type sig. was accepted by BOTH hbc and nhc
f x = ranOAL where -- ranOAL :: OL (a,v) -> [a]
--r... | null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_compile/tc047.hs | haskell | produces the interface:
this interface was produced by BOTH hbc and nhc
the following bogus type sig. was accepted by BOTH hbc and nhc
ranOAL :: OL (a,v) -> [a]
ranOAL :: OL (a,v) -> [v], the right sig. | module ShouldSucceed where
type OL a = [a]
data OL a = MkOL [ a ] deriving ( )
ranOAL : : ( OL ( a , a ) ) - > [ a ]
ranOAL ( xs) = mp sd xs
mp f [] = []
mp f (x:xs) = (f x) : mp f xs
sd (f,s) = s
|
e2e9e0193170a382b529b7c2b0d3d3dbbd4e5835f8e05c886896ec77adfb7ee7 | inconvergent/cl-veq | array-utils.lisp |
(in-package :veq)
GENERIC INIT ARRAY OF VEC
(defmacro $make (&key (dim 1) (n 1) v (type t))
"create vector array with size (n dim), and initial value v."
`(make-array (the pn (* ,dim ,n))
:initial-element ,v :element-type ,type :adjustable nil))
(defmacro define-constr (type)
(labels ((nm (n) (veqsymb ... | null | https://raw.githubusercontent.com/inconvergent/cl-veq/698087a14b3f48ffb2c075046d667e4df15b6039/src/array-utils.lisp | lisp | ACCESS |
(in-package :veq)
GENERIC INIT ARRAY OF VEC
(defmacro $make (&key (dim 1) (n 1) v (type t))
"create vector array with size (n dim), and initial value v."
`(make-array (the pn (* ,dim ,n))
:initial-element ,v :element-type ,type :adjustable nil))
(defmacro define-constr (type)
(labels ((nm (n) (veqsymb ... |
2c5635e6cfa35ba7248ecdb97bfb580af22595df03d80e86c137ce0d0311b57f | pixlsus/registry.gimp.org_static | planet-render1-2.scm | ; planet-render1-2.scm
( C ) 2005 - 2007 Aurore D. " " ,
;
; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
; (at your option) any later version.
;
; Thi... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/planet-render1-2.scm | scheme | planet-render1-2.scm
This program is free software; you can redistribute it and/or modify
either version 2 of the License , or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FI... | ( C ) 2005 - 2007 Aurore D. " " ,
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
Foundation , Inc. , 51 Franklin St , Fifth Floor , Boston , MA 02110 - 1301 USA
You 'll find this script in the " Xtns > Misc > Planet ... |
df1f018c8e9c831794cc66836d84eadd23df8788419dd0daedf63c8ae0d3e35e | exercism/erlang | example.erl | -module(example).
-export([is_armstrong_number/1]).
is_armstrong_number(N) ->
{Digits, Count}=to_digits(N),
N==calc_number(Digits, Count).
calc_number(Digits, Count) ->
calc_number(Digits, Count, 0).
calc_number([], _, Acc) ->
Acc;
calc_number([Digit|More], Count, Acc) ->
calc_number(More, Count, Acc+trunc(ma... | null | https://raw.githubusercontent.com/exercism/erlang/57ac2707dae643682950715e74eb271f732e2100/exercises/practice/armstrong-numbers/.meta/example.erl | erlang | -module(example).
-export([is_armstrong_number/1]).
is_armstrong_number(N) ->
{Digits, Count}=to_digits(N),
N==calc_number(Digits, Count).
calc_number(Digits, Count) ->
calc_number(Digits, Count, 0).
calc_number([], _, Acc) ->
Acc;
calc_number([Digit|More], Count, Acc) ->
calc_number(More, Count, Acc+trunc(ma... | |
e7b6e591f4ec56c467c9cd7054e16fe70a300f1f127f03bf46da5314f6b35a92 | zwizwa/rai | test-ai-network.rkt | #lang racket/base
(require rsound ;; Install via package manager
rai/meta
rai/ai-network)
;; A raw rsound signal? as a reference point.
(define reference
(let ((state 0))
(network/s 0 1
(lambda ()
(lambda ()
(set! state (+ state .01))
... | null | https://raw.githubusercontent.com/zwizwa/rai/422786a8703f08ff8b2185ff5c3ea7f58c4640fc/nodep/test-ai-network.rkt | racket | Install via package manager
A raw rsound signal? as a reference point.
Some signal generators using the stream DSL.
saw-d1
(define vibrato-tone
(network ()
(test) | #lang racket/base
rai/meta
rai/ai-network)
(define reference
(let ((state 0))
(network/s 0 1
(lambda ()
(lambda ()
(set! state (+ state .01))
(sin state))))))
(begin
(module test-generators rai/stream
(provide (all-de... |
108b7d9d31ddb37221393bb0dedf6b58c7be15c327d3cef76da56767adec7edd | OCamlPro/OCamlPro-OCaml-Branch | odoc_man.ml | (***********************************************************************)
(* OCamldoc *)
(* *)
, projet Cristal , INRIA Rocquencourt
(* ... | null | https://raw.githubusercontent.com/OCamlPro/OCamlPro-OCaml-Branch/3a522985649389f89dac73e655d562c54f0456a5/inline-more/ocamldoc/odoc_man.ml | ocaml | *********************************************************************
OCamldoc
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 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 .
$ Id$
open Odoc_info
open Parameter
ope... |
50e836af657063f02bf9ddd1c6ac532e6a5ccdbe011a89fd951845cd4502c816 | gregnwosu/haskellbook | chapter6.hs | module Chapter6 where
import Data.List
data Trivial = Trivial
instance Eq Trivial where
Trivial == Trivial = True
data DayOfWeek = Mon | Tue | Wed | Thu | Fri | Sat | Sun
data Date =
Date DayOfWeek Int
instance Eq DayOfWeek where
(==) Mon Mon = True
(==) Tue Tue = True
(==) _ _ = False
data Boo = Boo
... | null | https://raw.githubusercontent.com/gregnwosu/haskellbook/b21fb6772e58f07cff334d9c551d0477ec856897/chapter6/chapter6.hs | haskell | module Chapter6 where
import Data.List
data Trivial = Trivial
instance Eq Trivial where
Trivial == Trivial = True
data DayOfWeek = Mon | Tue | Wed | Thu | Fri | Sat | Sun
data Date =
Date DayOfWeek Int
instance Eq DayOfWeek where
(==) Mon Mon = True
(==) Tue Tue = True
(==) _ _ = False
data Boo = Boo
... | |
5dbff037829f9583bb20ebb60f3c02e440eca76f47b98cf7419c1e608b5ce7d0 | cstar/ejabberd-old | mod_last_odbc.erl | %%%----------------------------------------------------------------------
%%% File : mod_last_odbc.erl
Author : < >
%%% Purpose : jabber:iq:last support (JEP-0012)
Created : 24 Oct 2003 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne
%%%
%%% This program is free software; you can re... | null | https://raw.githubusercontent.com/cstar/ejabberd-old/559f8b6b0a935710fe93e9afacb4270d6d6ea00f/src/mod_last_odbc.erl | erlang | ----------------------------------------------------------------------
File : mod_last_odbc.erl
Purpose : jabber:iq:last support (JEP-0012)
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be us... | Author : < >
Created : 24 Oct 2003 by < >
ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License
Founda... |
eba03db88298d2f6c72d47f547e138b82e115158348a94bf38faf2f8354b09f7 | racket/racket7 | config.rkt | #lang racket/base
(provide (struct-out parse-config)
make-parse-config
config-case-sensitive
config-multi-line
config-group-number
config-group-number+1)
(struct parse-config (who
px?
case-sensitive?
multi-l... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/regexp/parse/config.rkt | racket | case-sensitive?
multi-line?
group-number-box
references?-box | #lang racket/base
(provide (struct-out parse-config)
make-parse-config
config-case-sensitive
config-multi-line
config-group-number
config-group-number+1)
(struct parse-config (who
px?
case-sensitive?
multi-l... |
f05af026b9739ea6eb2a9c7c7d4feb5b70455c413bcdaa5f52e5ecee5711239a | numberten/genetic_library | Minimal.hs | import Genetics
config = defaultConfig { geneSize = 4,
chromosomeSize = 5,
populationSize = 100,
targetFitness = 100,
crossoverRate = 0.9,
mutationRate = 0.001,
fitn... | null | https://raw.githubusercontent.com/numberten/genetic_library/b16f57115ee26adced963884e4d21d1faab37dc0/tests/Minimal.hs | haskell | import Genetics
config = defaultConfig { geneSize = 4,
chromosomeSize = 5,
populationSize = 100,
targetFitness = 100,
crossoverRate = 0.9,
mutationRate = 0.001,
fitn... | |
2998b2401ce7446078bd5fc881163a26000b6eeb1a98b38384b653ebd8d13a5e | keigoi/linocaml | linArray1.ml | open Base
module type LIN_ARRAY = sig
type 'a larr = 'a array lin
module LinMonad : S.LIN_MONAD
open LinMonad
val alloc :
'a list -> ('pre, 'pre, 'a larr) monad
val dealloc :
('a larr, unit, 'pre, 'post) lens -> ('pre, 'post, unit data) monad
val to_list :
('a larr, unit, 'pre, 'post) lens -> ... | null | https://raw.githubusercontent.com/keigoi/linocaml/6cbc4fc698c04a69a53239c86ab9475580dc3ce0/lib/linArray1.ml | ocaml | open Base
module type LIN_ARRAY = sig
type 'a larr = 'a array lin
module LinMonad : S.LIN_MONAD
open LinMonad
val alloc :
'a list -> ('pre, 'pre, 'a larr) monad
val dealloc :
('a larr, unit, 'pre, 'post) lens -> ('pre, 'post, unit data) monad
val to_list :
('a larr, unit, 'pre, 'post) lens -> ... | |
a1e5053bf8038bb2c01f2904c3f38743757c353eb5d9c11966cb41a651fa5627 | vyzo/gerbil | _lmdb.scm | ;;; -*- Scheme -*-
( C ) vyzo at hackzen.org
;;; LMDB FFI
;; compile: -ld-options "-llmdb"
(declare
(block)
(standard-bindings)
(extended-bindings)
(not safe))
(namespace ("std/db/_lmdb#"))
(##namespace ("" define-macro define let let* if or and
quote quasiquote unquote unquote-splicing
... | null | https://raw.githubusercontent.com/vyzo/gerbil/17fbcb95a8302c0de3f88380be1a3eb6fe891b95/src/std/db/_lmdb.scm | scheme | -*- Scheme -*-
LMDB FFI
compile: -ld-options "-llmdb"
constants
Environment flags
mdb_dbi_open Database Flags
mdb_put Write Flags
mdb_copy Copy Flags
(define-const MDB_PREV_MULTIPLE)
errors Return Codes
LMDB types
ffi types for output parameters
API
ffi hekpers
LMDB API
mdb_env_copyfd
mdb_env_... | ( C ) vyzo at hackzen.org
(declare
(block)
(standard-bindings)
(extended-bindings)
(not safe))
(namespace ("std/db/_lmdb#"))
(##namespace ("" define-macro define let let* if or and
quote quasiquote unquote unquote-splicing
c-lambda c-define-type c-declare c-initialize
... |
a605a0042ae32c0571c75d82af67aca203ef5aada753852c0f881b636fa4b324 | Eventuria/demonstration-gsd | Dependencies.hs | # LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
module Eventuria.GSD.Monitoring.API.Server.Dependencies where
import Eventuria.Commons.Logger.Core
import Eventuria.Commons.Network.Core
import qualified Eventuria.Libraries.PersistedStreamEngine.Instances.EventStore.Client.Dependencies as EventStoreClient
impor... | null | https://raw.githubusercontent.com/Eventuria/demonstration-gsd/5c7692b310086bc172d3fd4e1eaf09ae51ea468f/src/Eventuria/GSD/Monitoring/API/Server/Dependencies.hs | haskell | # LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
module Eventuria.GSD.Monitoring.API.Server.Dependencies where
import Eventuria.Commons.Logger.Core
import Eventuria.Commons.Network.Core
import qualified Eventuria.Libraries.PersistedStreamEngine.Instances.EventStore.Client.Dependencies as EventStoreClient
impor... | |
48c70e069a50b1e585376aa77c113932c415d60dad057a1b6ab182b8c3e96b63 | mstksg/emd | Pipe.hs | {-# LANGUAGE DeriveFunctor #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE TemplateHaskell #-}
module Numeric.EMD.Internal.Pipe (
Pipe
, (.|)
, runPipe
,... | null | https://raw.githubusercontent.com/mstksg/emd/bc02724d861a8932b72a97745542a62dd19071d0/src/Numeric/EMD/Internal/Pipe.hs | haskell | # LANGUAGE DeriveFunctor #
# LANGUAGE TemplateHaskell #
upstream pipe finishes)
* @m@: Underlying monad
Some specializations:
pump out items.
If a pipe is producer and @a@ is 'Void', it means that it will
produce infinitely.
else downstream.
* Normally you can ask ... | # LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Numeric.EMD.Internal.Pipe (
Pipe
, (.|)
, runPipe
, awaitEither, await, awaitSurely
, repeatM, unfoldP, unfoldPForever, iterateP, sourceL... |
c41798e74c70909da524c5a474c2b2621c289edfb48b90c56a47432a1f8b9811 | mentat-collective/emmy | rotation.cljc | #_"SPDX-License-Identifier: GPL-3.0"
(ns emmy.mechanics.rotation
(:refer-clojure :exclude [+ - * /])
(:require [emmy.generic :as g :refer [cos sin + - * /]]
[emmy.matrix :as matrix]
[emmy.structure :as s :refer [up]]
[emmy.util.stream :as us]
[emmy.value :as v]))
(d... | null | https://raw.githubusercontent.com/mentat-collective/emmy/535b237a8e3fd7067b9c0ade8b2a4b3419f9f132/src/emmy/mechanics/rotation.cljc | clojure | XXX: R[xyz] should not return an up; they should return a struct
of the same shape they were given. But do rotations of covectors
work that way? Maybe we should assert up-ness here rather than
promise to be more general than we are.
Aliases to match scmutils. | #_"SPDX-License-Identifier: GPL-3.0"
(ns emmy.mechanics.rotation
(:refer-clojure :exclude [+ - * /])
(:require [emmy.generic :as g :refer [cos sin + - * /]]
[emmy.matrix :as matrix]
[emmy.structure :as s :refer [up]]
[emmy.util.stream :as us]
[emmy.value :as v]))
(d... |
306c56022de7d9563d8c92b8e87e0809f228dcff6dfc095dfef4700cd3d10002 | mclumd/Meta-AQUA | rep_fire.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Package : REPRESENTATIONS ; Base : 10 -*-
(in-package :reps)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;
;;;; Meta-AQUA Background Knowledge Represented as Frames
;;;;
Copyright ( C ) 2013 ( )
;;;;
;;;;
;;;; ... | null | https://raw.githubusercontent.com/mclumd/Meta-AQUA/e4d4f83330fd07d1354aec245a49bde9e246c618/Representations/rep_fire.lisp | lisp | Syntax : Common - lisp ; Package : REPRESENTATIONS ; Base : 10 -*-
Meta-AQUA Background Knowledge Represented as Frames
File: rep_fire.lisp
*******************************************************
This program is free software; you can redistribute it and/or modify ... |
(in-package :reps)
Copyright ( C ) 2013 ( )
under the terms of the GNU General Public License as published by the Free
You should have received a copy of the GNU General Public License along
Mass Ave , Cambridge , , USA . In emacs type C - h C - w to view license .
arsonist XP .... |
b9e3579ca384e97f0e81504cc812719a0fa3ca93b3b17ace543110d562589a4f | AndrasKovacs/ELTE-func-lang | Lesson01_pre.hs |
- Gyak felvételek : Teams->tárgy team->gyakX->files
- canvas EA oldal : tematika + összes info
- követelmény :
- gyak : minimum : 13 pont
- órai eleji kisfeladat : 0 - 2 pont ( 10 perc )
- nagy házi : félév során 3 darab , 4 - 4 pontért
- első hf félév közepén van kiírva
... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/3e5ff0bc586b8374f94aac1370dc4b98cf1bbff4/2021-22-2/gyak_2/Lesson01_pre.hs | haskell | # options_ghc -Wincomplete-patterns #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
vagy Prelude-ből standard függvényt.
" case "
xor' :: Bool -> Bool -> Bool
xor' x y = case x of
True -> _
False ... |
- Gyak felvételek : Teams->tárgy team->gyakX->files
- canvas EA oldal : tematika + összes info
- követelmény :
- gyak : minimum : 13 pont
- órai eleji kisfeladat : 0 - 2 pont ( 10 perc )
- nagy házi : félév során 3 darab , 4 - 4 pontért
- első hf félév közepén van kiírva
... |
4391617855f5a74bf80744548d42f169241828266f39ad857cedd71b1ff5e5b8 | melange-re/melange | test_pervasive.ml |
module Pervasives = struct include List include Pervasives end
let f = Pervasives.(@)
let a0 = abs_float
let a1 = acos
let a2 = tan
let a3 = tanh
let a4 = asin
let a5 = atan2
let a6 = atan
let a7 = ceil
let a8 = cos
let a9 = cosh
let a10 = exp
let a11 = sin
let a12 = sinh
let a13 = sqrt
let a14 = floor
let a... | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/test_pervasive.ml | ocaml | local variables:
compile-command: "ocamlc -dlambda -c test_pervasive.ml"
end: |
module Pervasives = struct include List include Pervasives end
let f = Pervasives.(@)
let a0 = abs_float
let a1 = acos
let a2 = tan
let a3 = tanh
let a4 = asin
let a5 = atan2
let a6 = atan
let a7 = ceil
let a8 = cos
let a9 = cosh
let a10 = exp
let a11 = sin
let a12 = sinh
let a13 = sqrt
let a14 = floor
let a... |
934d6acd282d51c6647e735537638a652661762cc8cdd9cd83360e9ffd9f1144 | jaked/orpc | orpc_js_server.ml |
* This file is part of orpc , OCaml signature to ONC RPC generator
* Copyright ( C ) 2008 - 9 Skydeck , Inc
* Copyright ( C ) 2010
*
* 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 So... | null | https://raw.githubusercontent.com/jaked/orpc/ecb5df8ec928070cd89cf035167fcedf3623ee3c/src/orpc-js-server/orpc_js_server.ml | ocaml |
* This file is part of orpc , OCaml signature to ONC RPC generator
* Copyright ( C ) 2008 - 9 Skydeck , Inc
* Copyright ( C ) 2010
*
* 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 So... | |
2641a29625376e75f0ff6fdbd72a50c390293e9f191deb1a7e00aa57631e4a80 | kblake/erlang-chat-demo | state_handler.erl | Nitrogen Web Framework for Erlang
Copyright ( c ) 2008 - 2010
See MIT - LICENSE for licensing information .
-module (state_handler).
-export ([
behaviour_info/1,
get_state/1, get_state/2, set_state/2, clear/1, clear_all/0
]).
get_state(Key , State ) - > Value .
% Retrieve a value from the storage ... | null | https://raw.githubusercontent.com/kblake/erlang-chat-demo/6fd2fce12f2e059e25a24c9a84169b088710edaf/apps/nitrogen/src/handlers/state/state_handler.erl | erlang | Retrieve a value from the storage area.
Retrieve a value from the storage area.
Put a value into the storage area.
Remove a value from the storage area.
Clear all values from the storage area. | Nitrogen Web Framework for Erlang
Copyright ( c ) 2008 - 2010
See MIT - LICENSE for licensing information .
-module (state_handler).
-export ([
behaviour_info/1,
get_state/1, get_state/2, set_state/2, clear/1, clear_all/0
]).
get_state(Key , State ) - > Value .
get_state(Key) ->
_Value = get_... |
29d1918746e271b87eb0aa648b81420c9bf825a6b2017753660b9521c537b39d | input-output-hk/project-icarus-importer | Util.hs | -- | Utility functions
module Pos.Wallet.Web.State.Util
( cleanupAcidStatePeriodically
) where
import Universum
import Data.Acid (createArchive, createCheckpoint)
import Data.Time.Units (TimeUnit)
import Formatting (sformat, shown, (%))
import Mockable (Delay... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet/src/Pos/Wallet/Web/State/Util.hs | haskell | | Utility functions
| This worker does acid cleanup action every (passed)
* Create checkpoint and archive.
* Delete all files in /Archive except for newest one.
checkpoint/archive
cleanup old archive data
Returns how many files were deleted |
module Pos.Wallet.Web.State.Util
( cleanupAcidStatePeriodically
) where
import Universum
import Data.Acid (createArchive, createCheckpoint)
import Data.Time.Units (TimeUnit)
import Formatting (sformat, shown, (%))
import Mockable (Delay, Mockable, delay)
impo... |
03efc47f9ed20c05e6e159576479a0a7914b4c790b88ba5352ecf0216db755f7 | ocaml/dune | action_exec.ml | open Import
open Fiber.O
module DAP = Dune_action_plugin.Private.Protocol
* A version of [ Dune_action_plugin . Private . Protocol . Dependency ] where all
relative paths are replaced by [ Path.t ] . ( except the protocol does n't
support Globs yet )
relative paths are replaced by [Path.t]. (except the... | null | https://raw.githubusercontent.com/ocaml/dune/4e83d1b80bd9a37de7e0d39d6f22873850314557/src/dune_engine/action_exec.ml | ocaml | This code assumes that there can be at most one 'dynamic-run' within single
action. [DAP.Dependency.t] stores relative paths so name clash would be
possible if multiple 'dynamic-run' would be executed in different
subdirectories that contains targets having the same name.
When passing these to an exte... | open Import
open Fiber.O
module DAP = Dune_action_plugin.Private.Protocol
* A version of [ Dune_action_plugin . Private . Protocol . Dependency ] where all
relative paths are replaced by [ Path.t ] . ( except the protocol does n't
support Globs yet )
relative paths are replaced by [Path.t]. (except the... |
135bb7746338a222b0bb873bf3d3191d85cfa643c5fc8ac95361a964aa2c2d7a | earl-ducaine/cl-garnet | demo-grow.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : DEMO - GROW ; Base : 10 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
The Garnet User Interface Development Environment . ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; This code was w... | null | https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/src/demos/demo-grow.lisp | lisp | Syntax : Common - Lisp ; Package : DEMO - GROW ; Base : 10 -*-
; ;
This code was written as part of the Garnet project at ;;;
; ;
; ;
please contact to be put on the mailing list. ;;;
$Id$
This file contains demo code for showing things that change size in a window.
This is intended as a test a... |
Designed and implemented by
(in-package :DEMO-GROW)
(unless (get :garnet-modules :graphics-selection)
(common-lisp-user::garnet-load (concatenate 'string "gadgets:"
"graphics-loader")))
Eliminate compiler warnings
(declaim (special WIN TOP-AGG SEL-OBJS-AGG MYSELECTI... |
4a73fa80026470cd98ae10ebf98991e3c7c8ce93614fd1bad5c7c50f649aa5dd | ghc/packages-process | T1780.hs | module Main where
import Control.Concurrent
import System.IO
import System.Process
launch :: String -> IO String
launch i = do (hin,hout,herr,ph) <- runInteractiveProcess "cat" [] Nothing Nothing
-- forkIO $ collect ph -- This doesn't seem to be relevant to the problem.
forkIO $ do hPutSt... | null | https://raw.githubusercontent.com/ghc/packages-process/cb1d1a6ead68f0e1b209277e79ec608980e9ac84/tests/T1780.hs | haskell | forkIO $ collect ph -- This doesn't seem to be relevant to the problem.
timeout | module Main where
import Control.Concurrent
import System.IO
import System.Process
launch :: String -> IO String
launch i = do (hin,hout,herr,ph) <- runInteractiveProcess "cat" [] Nothing Nothing
forkIO $ do hPutStr hin i
hClose hin
hGetContents hout
main :: IO (... |
03c4f65a5f0ebff35df7d6299a9283d5eef9aa8fe06f67656d85050a3e6b1eba | seanhess/yeti | Tag.hs | module Yeti.View.Tag where
import Yeti.Prelude
import Yeti.View.Types
( TagMod,
View,
Content(..),
addContent,
viewContents,
AttValue,
Attribute,
Class,
Name,
Script(..),
Tag(Tag, classes, attributes),
viewClasses,
addClasses,
classList ... | null | https://raw.githubusercontent.com/seanhess/yeti/b274dce41b0bf2f9115ea836d585aaff1cd2f5ac/src/Yeti/View/Tag.hs | haskell | | Add a class attribute. If it exists, combine with spaces
this can be MULTIPLE classes, yay
| Set an attribute, replacing existing value
type TagF = TagMod -> View Content () -> View Content ()
(#) :: TagF -> View Content () -> View Content ()
f # ct = f id ct
| A generic node with style, attributes, and conten... | module Yeti.View.Tag where
import Yeti.Prelude
import Yeti.View.Types
( TagMod,
View,
Content(..),
addContent,
viewContents,
AttValue,
Attribute,
Class,
Name,
Script(..),
Tag(Tag, classes, attributes),
viewClasses,
addClasses,
classList ... |
f48df9f9d96cb7fafb6e1e04af6fb82f02e48229a1da7048c554018ff6471194 | ua-parser/uap-clj | project.clj | (defproject uap-clj "1.6.2"
:description "Clojure language implementation of ua-parser"
:url "-clj"
:license {:name "The MIT License (MIT)"
:url "-license.php"}
:scm {:name "git"
:url "-clj"}
:dependencies [[org.clojure/clojure "1.11.1"]
[levand/immuconf "0.1... | null | https://raw.githubusercontent.com/ua-parser/uap-clj/6f351b8126e9ce81050cd9b7833ff3d7b4fe7ba4/project.clj | clojure | (defproject uap-clj "1.6.2"
:description "Clojure language implementation of ua-parser"
:url "-clj"
:license {:name "The MIT License (MIT)"
:url "-license.php"}
:scm {:name "git"
:url "-clj"}
:dependencies [[org.clojure/clojure "1.11.1"]
[levand/immuconf "0.1... | |
b8416d76c2305a28224945ecec1a4386a16553dfd738d212593b9887ddbe7ee8 | alesaccoia/festival_flinger | cmu_us_gka_clunits.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
Carnegie Mellon University ; ; ;
and and ; ; ;
Copyright ( c ) 1998 - 2005 ... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/voices/us/cmu_us_gka_cg/festvox/cmu_us_gka_clunits.scm | scheme |
;;;
; ;
; ;
; ;
; ;
;;;
Permission is hereby granted, free of charge, to use and distribute ;;;
this software and its documentation without restriction, including ;;;
withou... |
Ensure this version of festival has been compiled with clunits module
(require_module 'clunits)
(if (assoc 'cmu_us_gka_clunits voice-locations)
(defvar cmu_us_gka::dir
(cdr (assoc 'cmu_us_gka_clunits voice-locations)))
(defvar cmu_us_gka::dir (string-append (pwd) "/")))
(if (not (probe_file (path-ap... |
9d7c0431dda26975980d6c893f6d6adc82d055f5c8f393ae1903c44fe557ba8f | TrustInSoft/tis-kernel | value_util.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/value/utils/value_util.ml | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
21dba8b5053fe6b9c5c784bdb8e417a2827482b3b9cbeba4676f00cd91d13b4e | gregsexton/SICP-Clojure | ch4.clj | (ns sicp.ch4)
;;; syntax
(defn self-evaluating? [exp]
(or (number? exp) (string? exp)))
(def variable? symbol?)
(defn tagged-list? [exp tag]
(when (seq exp)
(= (first exp) tag)))
(def quoted? #(tagged-list? % 'quote))
(def text-of-quotation second)
(def assignment? #(tagged-list? % 'set!))
(def assignment... | null | https://raw.githubusercontent.com/gregsexton/SICP-Clojure/1f675feda18594ce8c12e028e3746298544dbd68/src/sicp/ch4.clj | clojure | syntax
(define <var> <value>)
(define (<var> <param_1> ... <param_n>) <body>)
no else clause
this is the underlying apply not the one defined here
eval/apply
original -- replaced with multimethods below
(cond (self-evaluating? exp) exp
(variable? exp) (lookup-variable-value exp env)
(quoted? e... | (ns sicp.ch4)
(defn self-evaluating? [exp]
(or (number? exp) (string? exp)))
(def variable? symbol?)
(defn tagged-list? [exp tag]
(when (seq exp)
(= (first exp) tag)))
(def quoted? #(tagged-list? % 'quote))
(def text-of-quotation second)
(def assignment? #(tagged-list? % 'set!))
(def assignment-variable s... |
77debab17ab4b9c0674eeb0621b11b1492311ad37848d29ed8b449b5215fb97a | OCADml/OSCADml | scad.mli | * Build scad models with well - typed dimensional system ( 3d / 2d ) aware
functions mapping down onto the similarly named operations made available
by the OpenSCAD language .
OpenSCAD objects and the operations upon them are represented by the
recursive type { ! type : t } , which can then fin... | null | https://raw.githubusercontent.com/OCADml/OSCADml/7dae78eaeb34b9d5e70d07e3550408ca6d1a15be/lib/scad.mli | ocaml | * The scad type is kept abstract, as the available constructor functions
provide much less cumbersome means of building up models.
* [sphere ?fa ?fs ?fn radius]
Creates a sphere with given [radius] at the origin of the coordinate system.
* [cone ?center ?fa ?fs ?fn ~height r1 r2 ]
Creates a cone (using ... | * Build scad models with well - typed dimensional system ( 3d / 2d ) aware
functions mapping down onto the similarly named operations made available
by the OpenSCAD language .
OpenSCAD objects and the operations upon them are represented by the
recursive type { ! type : t } , which can then fin... |
914e7363edd5acbc7e6cdd984025caf1da19520378d4be56bd00d9a690aee8e3 | haskell-foundation/foundation | Sequential.hs | -- |
-- Module : Foundation.Collection.Sequential
-- License : BSD-style
Maintainer : < >
-- Stability : experimental
-- Portability : portable
--
-- Different collections (list, vector, string, ..) unified under 1 API.
-- an API to rules them all, and in the darkness bind them.
--
# LANGUAGE Flexible... | null | https://raw.githubusercontent.com/haskell-foundation/foundation/39985b94b4de4d02e8decb5e378b53ad3f72c0cc/foundation/Foundation/Collection/Sequential.hs | haskell | |
Module : Foundation.Collection.Sequential
License : BSD-style
Stability : experimental
Portability : portable
Different collections (list, vector, string, ..) unified under 1 API.
an API to rules them all, and in the darkness bind them.
| A set of methods for ordered colection
| Take the last @n... | Maintainer : < >
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE ConstrainedClassMethods #
# LANGUAGE DefaultSignatures #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeOperators #
module Foundation.Collection.Sequential
( Sequential(..)
)... |
869b4ae2fb21e43d04ac9f685527c2520f1d02c6fd6fe1b19328558498bae774 | sheyll/b9-vm-image-builder | B9Exec.hs | -- | This modules contains support for external command execution.
--
-- @since 0.5.65
module B9.B9Exec
( cmd,
cmdStdout,
cmdInteractive,
hostCmdEither,
hostCmdStdoutEither,
hostCmd,
hostCmdStdIn,
Timeout (..),
ptyCmdInteractive,
HostCommandStdin (..),
HostCommandStdout (..),
... | null | https://raw.githubusercontent.com/sheyll/b9-vm-image-builder/4d2af80d3be4decfce6c137ee284c961e3f4a396/src/lib/B9/B9Exec.hs | haskell | | This modules contains support for external command execution.
@since 0.5.65
| Execute the given shell command.
If 'isInteractive' is true, the standard-in will be passed to the external command,
and all output of the program will be directed to standard-out.
The command and the output is either logged to the... | module B9.B9Exec
( cmd,
cmdStdout,
cmdInteractive,
hostCmdEither,
hostCmdStdoutEither,
hostCmd,
hostCmdStdIn,
Timeout (..),
ptyCmdInteractive,
HostCommandStdin (..),
HostCommandStdout (..),
)
where
import B9.B9Config
import B9.B9Error
import B9.B9Logging
import B9.BuildInfo ... |
206bbc4c47f959095cc5d7f560bc78b18edf633eab2730f4d737654a20a842e6 | rems-project/lem | util.ml | (**************************************************************************)
(* Lem *)
(* *)
, University of Cambridge
, INRIA Paris -... | null | https://raw.githubusercontent.com/rems-project/lem/5243fa8f6752dd247fce9deff97008b814f4bd7c/src/util.ml | ocaml | ************************************************************************
Lem
... | , University of Cambridge
, INRIA Paris - Rocquencourt
, University of Cambridge
, University of Cambridge
, University of Cambridge ( while working on Lem )
... |
19fa62cabd8f66493ac76108d35278d173978348d66c2c1aa0f38f5320161681 | clj-kondo/clj-kondo | recur_test.clj | (ns clj-kondo.recur-test
(:require
[clj-kondo.test-utils :refer [lint! assert-submaps]]
[clojure.test :as t :refer [deftest is testing]]))
(def linter-config
{:linters
{:unexpected-recur {:level :error}}})
(deftest unexpected-recur
(testing "recur doesn't correspond to function or loop"
(assert-sub... | null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/72ba0d8a60295347615df08822715dda36987936/test/clj_kondo/recur_test.clj | clojure | (ns clj-kondo.recur-test
(:require
[clj-kondo.test-utils :refer [lint! assert-submaps]]
[clojure.test :as t :refer [deftest is testing]]))
(def linter-config
{:linters
{:unexpected-recur {:level :error}}})
(deftest unexpected-recur
(testing "recur doesn't correspond to function or loop"
(assert-sub... | |
81f6e294a64b52becfa8faea9a7b3c7160b53453021a4064f0cbf30059c04d80 | ppaml-op3/insomnia | ValueConstructor.hs | # LANGUAGE MultiParamTypeClasses , DeriveDataTypeable , DeriveGeneric , TemplateHaskell #
module Insomnia.ValueConstructor (ValConPath(..),
ValConName,
ValueConstructor(..),
InferredValConPath(..),
... | null | https://raw.githubusercontent.com/ppaml-op3/insomnia/5fc6eb1d554e8853d2fc929a957c7edce9e8867d/src/Insomnia/ValueConstructor.hs | haskell | | A ValConName stands for a value constructor. Unlike a normal
value-level variable, it may only be substituted for by a path to a
value constructor, rather than an arbitrary expression.
associated with the given path.
| Value constructors may be either local to the current model, or
specified along a global pat... | # LANGUAGE MultiParamTypeClasses , DeriveDataTypeable , DeriveGeneric , TemplateHaskell #
module Insomnia.ValueConstructor (ValConPath(..),
ValConName,
ValueConstructor(..),
InferredValConPath(..),
... |
8c83e00d328de62d08039d1fc619edbd3bde325e856517ce5c35b6e01d4ce75d | audreyt/openafp | EFG.hs |
module OpenAFP.Records.AFP.EFG where
import OpenAFP.Types
import OpenAFP.Internals
data EFG = EFG {
efg_Type :: !N3
,efg_ :: !N3
,efg :: !NStr
} deriving (Show, Typeable)
| null | https://raw.githubusercontent.com/audreyt/openafp/178e0dd427479ac7b8b461e05c263e52dd614b73/src/OpenAFP/Records/AFP/EFG.hs | haskell |
module OpenAFP.Records.AFP.EFG where
import OpenAFP.Types
import OpenAFP.Internals
data EFG = EFG {
efg_Type :: !N3
,efg_ :: !N3
,efg :: !NStr
} deriving (Show, Typeable)
| |
e756beecbbcb6c5c609b73bb3f7164dc4407862ededa4cbfdca71a5f1ac867bb | endobson/racket-llvm | types.rkt | #lang racket
(provide (all-defined-out))
(require "define.rkt"
"ctypes.rkt"
"enums.rkt"
ffi/unsafe)
;/*===-- Types -------------------------------------------------------------===*/
;/* LLVM types conform to the following hierarchy:
; *
; * types:
; * integer type
; * real type... | null | https://raw.githubusercontent.com/endobson/racket-llvm/3eb557b0fe4bddfdfce8e8f4659d218535daa061/private/ffi/types.rkt | racket | /*===-- Types -------------------------------------------------------------===*/
/* LLVM types conform to the following hierarchy:
*
* types:
* integer type
* real type
* function type
* sequence types:
* array type
* pointer type
* vector type
* void type
* label... | #lang racket
(provide (all-defined-out))
(require "define.rkt"
"ctypes.rkt"
"enums.rkt"
ffi/unsafe)
(define-llvm-unsafe LLVMGetTypeKind (_fun LLVMTypeRef -> LLVMTypeKind))
(define-llvm-safe LLVMGetTypeKind (_fun safe:LLVMTypeRef -> LLVMTypeKind))
(define-llvm-unsafe LLVMGetTypeContext (... |
fc29162e242ef6014c20c771ab4cfc313884d123aa2a6fe8b02249925ba6b988 | jahfer/ot | core.cljs | (ns ot.core
(:require [om.core :as om :include-macros true]
[om.dom :as dom :include-macros true]
[ot.routes :as routes]
[ot.components.app :as app]
[cljs.core.async :refer [chan <!]]
[secretary.core :as secretary]
[ot.lib.queue :as q]
... | null | https://raw.githubusercontent.com/jahfer/ot/117b2b5524de5878f05e50751b6ec758c02c0ef0/src/cljs/ot/core.cljs | clojure | temp
:document-tree [] | (ns ot.core
(:require [om.core :as om :include-macros true]
[om.dom :as dom :include-macros true]
[ot.routes :as routes]
[ot.components.app :as app]
[cljs.core.async :refer [chan <!]]
[secretary.core :as secretary]
[ot.lib.queue :as q]
(:use-ma... |
dcc892b679be91a49b5404cd8d8487e0a00e23aea37a319b3c483bf95aa4b184 | sarabander/p2pu-sicp | 2.50.scm | (require (planet "sicp.ss" ("soegaard" "sicp.plt" 2 1)))
Modified to use the transform - painter from hend.scm ( in sicp.plt )
(define (beside painter1 painter2)
(let ((split-point (make-vect 0.5 0.0)))
(let ((paint-left
(transform-painter (make-vect 0.0 0.0)
split-poin... | null | https://raw.githubusercontent.com/sarabander/p2pu-sicp/fbc49b67dac717da1487629fb2d7a7d86dfdbe32/2.2/2.50.scm | scheme | (require (planet "sicp.ss" ("soegaard" "sicp.plt" 2 1)))
Modified to use the transform - painter from hend.scm ( in sicp.plt )
(define (beside painter1 painter2)
(let ((split-point (make-vect 0.5 0.0)))
(let ((paint-left
(transform-painter (make-vect 0.0 0.0)
split-poin... | |
2bb55fcfcfcaa43967869554877f0eec7f27f0da2c05a5d942f23029efb7da7b | returntocorp/semgrep | Parse_cpp_tree_sitter.ml |
*
* Copyright ( c ) 2021 - 2022 R2C
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file LICE... | null | https://raw.githubusercontent.com/returntocorp/semgrep/db9b44c8a606ffa84f92b45b79d96ed821c420ee/languages/cpp/tree-sitter/Parse_cpp_tree_sitter.ml | ocaml | ***************************************************************************
Prelude
***************************************************************************
to avoid cascading error effects when code is partially parsed by
* tree-sitter
***************************************************************************... |
*
* Copyright ( c ) 2021 - 2022 R2C
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file LICE... |
dd864992f4144dd1d8b4156ce1a9dc65ede47e6c97043ac9bd026b55a30b94fd | arclanguage/Clamp | hof.lisp | ;;;; Higher order funtions.
(in-package :clamp)
(use-syntax :clamp)
(def mapv (f seq &rest seqs)
"Map a procedure over the given sequences and return a vector
containing the results."
(apply #'cl:map 'vector f seq seqs))
(def testify (x &optional (test #'iso))
"If passed a procedure, returns it. Otherwise r... | null | https://raw.githubusercontent.com/arclanguage/Clamp/9f165b057a109564cd0e836cf611d1e81e43cb12/src/hof.lisp | lisp | Higher order funtions.
The macros 'accum' and 'on' are not defined yet. |
(in-package :clamp)
(use-syntax :clamp)
(def mapv (f seq &rest seqs)
"Map a procedure over the given sequences and return a vector
containing the results."
(apply #'cl:map 'vector f seq seqs))
(def testify (x &optional (test #'iso))
"If passed a procedure, returns it. Otherwise returns a function
which t... |
e312c83c2ab0095aa46874131d8ee5c3e114fc97426dd04813be15b7355e61b8 | yurug/ocaml4.04.0-copatterns | torture.ml | Torture test - I / O interspersed with lots of GC
let finished = ref false
let gc_thread () =
while not !finished do
print_string " gc " ; print_newline ( ) ;
Gc.minor();
Thread.yield()
done
let writer_thread (oc, size) =
while not !finished do
print_string " writer " ; print_int size ; pri... | null | https://raw.githubusercontent.com/yurug/ocaml4.04.0-copatterns/b3ec6a3cc203bd2cde3b618546d29e10f1102323/testsuite/tests/lib-threads/torture.ml | ocaml | Torture test - I / O interspersed with lots of GC
let finished = ref false
let gc_thread () =
while not !finished do
print_string " gc " ; print_newline ( ) ;
Gc.minor();
Thread.yield()
done
let writer_thread (oc, size) =
while not !finished do
print_string " writer " ; print_int size ; pri... | |
9842f56b068e1d4e136468c2cd0b58248cedf9b89c4146eb64c9872b1fd8cae7 | lmj/lparallel | defpair.lisp | Copyright ( c ) 2011 - 2012 , . All rights reserved .
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this li... | null | https://raw.githubusercontent.com/lmj/lparallel/9c11f40018155a472c540b63684049acc9b36e15/src/util/defpair.lisp | lisp |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary... | Copyright ( c ) 2011 - 2012 , . All rights reserved .
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY... |
c5d0409b1eb2cf16ebbe333d46a9c9ed3ad3d244188fcecce9681cbb5701b6dd | singleheart/programming-in-haskell | ex4b.hs | (||) :: Bool -> Bool -> Bool
False || False = False
_ || _ = True
| null | https://raw.githubusercontent.com/singleheart/programming-in-haskell/80c7efc0425babea3cd982e47e121f19bec0aba9/ch04/ex4b.hs | haskell | (||) :: Bool -> Bool -> Bool
False || False = False
_ || _ = True
| |
69acf8bcca023394b8cb74860b85dcb1544b795affbad6ef84f85f4659160d36 | ulisesmac/Horarios-FC-UNAM | views.cljs | (ns horarios-fc.screens.pick-plan.views
(:require
[clojure.string :as string]
[horarios-fc.components.major-icons :as mi]
[horarios-fc.components.requesting-data :refer [requesting-data]]
[horarios-fc.screens.pick-major.subs :as pick-major.subs]
[horarios-fc.screens.pick-plan.events :as events]
[hor... | null | https://raw.githubusercontent.com/ulisesmac/Horarios-FC-UNAM/50b6ac08a96923b4a1fd2fd263e8de7800084bbe/src/horarios_fc/screens/pick_plan/views.cljs | clojure | (ns horarios-fc.screens.pick-plan.views
(:require
[clojure.string :as string]
[horarios-fc.components.major-icons :as mi]
[horarios-fc.components.requesting-data :refer [requesting-data]]
[horarios-fc.screens.pick-major.subs :as pick-major.subs]
[horarios-fc.screens.pick-plan.events :as events]
[hor... | |
c52e4f087033eedfda8250fb40cb5bb6354199671b1ebad106a8baf1642fda43 | erlangonrails/devdb | riak_core_ring.erl | %% -------------------------------------------------------------------
%%
%% riak_core: Core Riak Application
%%
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/riak-0.11.0/apps/riak_core/src/riak_core_ring.erl | erlang | -------------------------------------------------------------------
riak_core: Core Riak Application
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
sp... | Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
8b8e283f27fc6eb9769d51fe608219ed3848dab7bb0872860d1fe40e5e374b94 | manuel-serrano/hop | letfusion.scm | ;*=====================================================================*/
* serrano / prgm / project / hop / hop / js2scheme / letfusion.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/481cb10478286796addd2ec9ee29c95db27aa390/js2scheme/letfusion.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* Let fusion merges J2SBlock with variable decarations and */
*===========================... | * serrano / prgm / project / hop / hop / js2scheme / letfusion.scm * /
* Author : * /
* Creation : Sun Mar 27 13:16:54 2016 * /
* Last change : We d Apr 15 11:47:25 2020 ( serrano ) * /
* Cop... |
da158bb7601d186789443399863ae13ed67415c9ff6f24453fcf08b46e0d0b60 | EFanZh/EOPL-Exercises | exercise-5.42-test.rkt | #lang racket/base
(require rackunit)
(require "../solutions/exercise-5.42.rkt")
(check-equal? (run "2") (num-val 2))
(check-equal? (run "-(3, 3)") (num-val 0))
(check-equal? (run "-(3, 4)") (num-val -1))
(check-equal? (run "-(4, 3)") (num-val 1))
(check-equal? (run "zero?(0)") (bool-val #t))
(check-equal? (run "zero?... | null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/tests/exercise-5.42-test.rkt | racket | #lang racket/base
(require rackunit)
(require "../solutions/exercise-5.42.rkt")
(check-equal? (run "2") (num-val 2))
(check-equal? (run "-(3, 3)") (num-val 0))
(check-equal? (run "-(3, 4)") (num-val -1))
(check-equal? (run "-(4, 3)") (num-val 1))
(check-equal? (run "zero?(0)") (bool-val #t))
(check-equal? (run "zero?... | |
4b60948210991bddd973b6e9e4de3eedffc0fb0cd6edde09d1b5e40bc26edfe3 | racket/swindle | base.rkt | Written by is Life ! ( )
;;> The `base' module defines some basic low-level syntactic extensions to
;;> Racket. It can be used by itself to get these extensions.
#lang mzscheme
(provide (all-from-except mzscheme
#%module-begin #%top #%app define let let* letrec lambda
keyword? keyword->... | null | https://raw.githubusercontent.com/racket/swindle/122e38efb9842394ef6462053991efb4bd0edf3b/base.rkt | racket | > The `base' module defines some basic low-level syntactic extensions to
> Racket. It can be used by itself to get these extensions.
> itself for syntax definitions.
(syntax-rules ()
(require-for-syntax swindle/base) . body)])
> This special syntax is redefined to make keywords (symbols whose name... | Written by is Life ! ( )
#lang mzscheme
(provide (all-from-except mzscheme
#%module-begin #%top #%app define let let* letrec lambda
keyword? keyword->string string->keyword))
> > ( # % module - begin ... )
> ` base ' is a language module -- it redefines ` # % module - begin ' to load... |
dfcfc64e8edbaf7cedd24f60ff5aa90c01328e902bb1ced31e02fb14a828c73b | vmchale/libmeme | Script.hs | module Text.Convert.Script ( toScript ) where
import qualified Data.Map as M
import Text.Convert.Common
uppercase :: [Char]
uppercase = ['𝒜','ℬ','𝒞','𝒟','ℰ','ℱ','𝒢','ℋ','ℐ','𝒥','𝒦','ℒ','ℳ','𝒩','𝒪','𝒫','𝒬','ℛ','𝒮','𝒯','𝒰','𝒱','𝒲','𝒳','𝒴','𝒵']
scriptLowercase :: [Char]
scriptLowe... | null | https://raw.githubusercontent.com/vmchale/libmeme/a1880f9c1886260e8d7ebf2e0e7844c63b0ee02b/src/Text/Convert/Script.hs | haskell | | \\( O(n) \\) | module Text.Convert.Script ( toScript ) where
import qualified Data.Map as M
import Text.Convert.Common
uppercase :: [Char]
uppercase = ['𝒜','ℬ','𝒞','𝒟','ℰ','ℱ','𝒢','ℋ','ℐ','𝒥','𝒦','ℒ','ℳ','𝒩','𝒪','𝒫','𝒬','ℛ','𝒮','𝒯','𝒰','𝒱','𝒲','𝒳','𝒴','𝒵']
scriptLowercase :: [Char]
scriptLowe... |
dc68d9a4a3d1f400a3d7b7242bd9162e8b24da7bf0ca5e9e45d3d067f2aea3bc | manuel-serrano/bigloo | filtre.scm | ;*---------------------------------------------------------------------*/
* serrano / prgm / project / bigloo / recette / filtre.scm * /
;* */
* Author : * /
* Creation : ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/recette/filtre.scm | scheme | *---------------------------------------------------------------------*/
* */
* */
*---------------------------------------------------------------------*/
*---------------------------... | * serrano / prgm / project / bigloo / recette / filtre.scm * /
* Author : * /
* Creation : We d Aug 12 16:13:39 1992 * /
* Last change : Thu Nov 3 14:18:53 2011 ( serrano ) * /
* tes... |
ea40724f311b2b942406258d53e0cd70eafe90c3fde697c1efc8eb2f69d64d6a | FrankC01/clasew | excel.clj | (ns
^{:author "Frank V. Castellucci"
:doc "Clojure AppleScriptEngine Wrapper - Excel DSL"}
clasew.excel
(:require [clasew.core :as as]
[clojure.java.io :as io]))
;; Setup our own engine
(defonce ^:private prv-eng as/new-eng) ; Use engine for this namespace
;;
;; Low level DSL functions --... | null | https://raw.githubusercontent.com/FrankC01/clasew/1e5a444bccd4f34c68a1e5d1ec2121a36fd8c959/src/clasew/excel.clj | clojure | Setup our own engine
Use engine for this namespace
Low level DSL functions ----------------------------------------------------
| (ns
^{:author "Frank V. Castellucci"
:doc "Clojure AppleScriptEngine Wrapper - Excel DSL"}
clasew.excel
(:require [clasew.core :as as]
[clojure.java.io :as io]))
(def ^:private scrptfile (io/resource "clasew-excel.applescript"))
(defn clasew-excel-call!
"Takes 1 or more maps produced fr... |
0e05a28ecaf683f428f98834f02f038dd07f226582802af2f3c16a0d2ca9b550 | FrankC01/clasew | ident_utils.clj | (ns
^{:author "Frank V. Castellucci"
:doc "Clojure AppleScriptEngine Wrapper - Identity Utilities"}
clasew.ident-utils
(:require [clasew.ast-emit :as ast]))
;;
;; General purpose identity functions
;;
(defn add-record-definitions
"Generate a AS record from imap arguments"
[args]
(apply (partial ast/... | null | https://raw.githubusercontent.com/FrankC01/clasew/1e5a444bccd4f34c68a1e5d1ec2121a36fd8c959/src/clasew/ident_utils.clj | clojure |
General purpose identity functions
(ast/predicate-from-filter contacts-mapset-core filters)
HOF Support for deletion. Works with both outlook and contacts
| (ns
^{:author "Frank V. Castellucci"
:doc "Clojure AppleScriptEngine Wrapper - Identity Utilities"}
clasew.ident-utils
(:require [clasew.ast-emit :as ast]))
(defn add-record-definitions
"Generate a AS record from imap arguments"
[args]
(apply (partial ast/record-definition nil)
(reduce
... |
6102f88fee96059c676655627064d76cf7ca464fefa1102208742962e0299bbd | bhaskara/programmable-reinforcement-learning | test-all.lisp | (load "data-struct/set/test-set.lisp")
(load "data-struct/pot-set/test-pot-set.lisp")
(load "data-struct/tree/test-tree.lisp")
(load "data-struct/prop-logic/test-prop-logic.lisp")
(load "test/test-mdp.lisp")
(load "test/test-rl.lisp")
(load "test/test-alisp.lisp")
#+concurrent-alisp (load "test/test-calisp.lisp"... | null | https://raw.githubusercontent.com/bhaskara/programmable-reinforcement-learning/8afc98116a8f78163b3f86076498d84b3f596217/lisp/test/test-all.lisp | lisp | (load "data-struct/set/test-set.lisp")
(load "data-struct/pot-set/test-pot-set.lisp")
(load "data-struct/tree/test-tree.lisp")
(load "data-struct/prop-logic/test-prop-logic.lisp")
(load "test/test-mdp.lisp")
(load "test/test-rl.lisp")
(load "test/test-alisp.lisp")
#+concurrent-alisp (load "test/test-calisp.lisp"... | |
a822c6ccdf3f9383129e61d5f0e68f818d7187ef541657788a0b697e382ef944 | Hans-Halverson/myte | parser_env.ml | module Env = struct
type t = {
mutable lexer: Lexer.t;
mutable lex_result: Lexer.result;
Previous lex result , initially the same as the first lex result until Lexer.next is called
a second time .
a second time. *)
mutable prev_lex_result: Lexer.result;
mutable errors: (Loc.t * Parse... | null | https://raw.githubusercontent.com/Hans-Halverson/myte/e401440c9b0b2e8de40007ab349d87248b8e1601/src/parser/parser_env.ml | ocaml | A stack of bools where each bool represents whether bitwise or is not allowed
in the enclosing matches
Whether the lexer should currently be lexing an interpolated string
Track whether whether parser is in top level of match statement | module Env = struct
type t = {
mutable lexer: Lexer.t;
mutable lex_result: Lexer.result;
Previous lex result , initially the same as the first lex result until Lexer.next is called
a second time .
a second time. *)
mutable prev_lex_result: Lexer.result;
mutable errors: (Loc.t * Parse... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.