_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 |
|---|---|---|---|---|---|---|---|---|
0068443d62dce6218bdf1caea81ac5642be8f2b2520398bdcae318088993a0af | mfikes/fifth-postulate | ns405.cljs | (ns fifth-postulate.ns405)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns405.cljs | clojure | (ns fifth-postulate.ns405)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | |
6a23bf75faa43204c85a02d6fb6b5d8f946d73e1fc5d92a124004c8f0f36e373 | dbuenzli/tgls | myocamlbuild.ml | open Ocamlbuild_plugin
open Command
(* Platform detection *)
let os =
String.trim @@
try Sys.getenv "TGLS_HOST_OS"
with Not_found -> run_and_read "uname -s"
let darwin = os = "Darwin"
let linux = os = "Linux"
let freebsd = os = "FreeBSD"
let rpi =
linux &&
try ignore (run_and_read "cat /proc/cpuinfo | gre... | null | https://raw.githubusercontent.com/dbuenzli/tgls/58bf47d393da00f24fa8e58521ddb9e3afb08d1d/myocamlbuild.ml | ocaml | Platform detection
Tags for OpenGL X.Y
Tags for OpenGL ES X.Y | open Ocamlbuild_plugin
open Command
let os =
String.trim @@
try Sys.getenv "TGLS_HOST_OS"
with Not_found -> run_and_read "uname -s"
let darwin = os = "Darwin"
let linux = os = "Linux"
let freebsd = os = "FreeBSD"
let rpi =
linux &&
try ignore (run_and_read "cat /proc/cpuinfo | grep -q 'BCM270.'"); true
... |
dba623c065663fa62f713f1839f99529f56b4a17ef36ebcc6bde53be0e91ba95 | kazu-yamamoto/http2 | RingOfQueues.hs | # LANGUAGE ForeignFunctionInterface #
# LANGUAGE RecordWildCards #
{-# LANGUAGE BangPatterns #-}
# LANGUAGE FlexibleContexts #
Haskell implementation of H2O 's priority queue .
--
module RingOfQueues (
Entry
, newEntry
, renewEntry
, item
, Node
, PriorityQueue(..)
, new
, enqueue
, dequeue
,... | null | https://raw.githubusercontent.com/kazu-yamamoto/http2/3c29763be147a3d482eff28f427ad80f1d4df706/bench-priority/RingOfQueues.hs | haskell | # LANGUAGE BangPatterns #
--------------------------------------------------------------
| Abstract data type of entries for priority queues.
^ Extracting an item from an entry.
# UNPACK #
# UNPACK #
| Changing the item of an entry.
--------------------------------------------------------------
-------------------... | # LANGUAGE ForeignFunctionInterface #
# LANGUAGE RecordWildCards #
# LANGUAGE FlexibleContexts #
Haskell implementation of H2O 's priority queue .
module RingOfQueues (
Entry
, newEntry
, renewEntry
, item
, Node
, PriorityQueue(..)
, new
, enqueue
, dequeue
, delete
) where
import Control.... |
6dcac022867d1adb12e9cacb01705caf21b9a4eb8996e6b25b7f30509cc7e821 | Octachron/codept | broken.ml | module B
open open B
| null | https://raw.githubusercontent.com/Octachron/codept/2d2a95fde3f67cdd0f5a1b68d8b8b47aefef9290/tests/complex/broken_network/broken.ml | ocaml | module B
open open B
| |
ae799ba8fbccd89787c96a0f85c2484a8315ebdc7e2c1ff9a0a5172b94dca90a | kowainik/policeman | Hackage.hs | | Functions to download packages from Hackage .
-}
module Policeman.Download.Hackage
( PackageName (..)
, downloadFromHackage
, getLatestHackageCabalFileContent
) where
import Control.Exception (catch)
import Control.Monad.Trans.Except (withExceptT)
import Shellmet (($?), ($|))
import System.Dire... | null | https://raw.githubusercontent.com/kowainik/policeman/26a92678c76b145ad9ae30054bf978a0d6ec2a58/src/Policeman/Download/Hackage.hs | haskell | | By the given pacakge name it downloads the latest `.cabal` file and
returns its content.
</<name>/<name>.cabal>
| This function takes 'PackageName' and previous package
'Version', downloads @.tar.gz@ archive from Hackage and unpacks it in
the current directory.
download archive from Hackage
unpack | | Functions to download packages from Hackage .
-}
module Policeman.Download.Hackage
( PackageName (..)
, downloadFromHackage
, getLatestHackageCabalFileContent
) where
import Control.Exception (catch)
import Control.Monad.Trans.Except (withExceptT)
import Shellmet (($?), ($|))
import System.Dire... |
fd2ce15248f2c23d3ac4be83c60b1db554f2ab5e12c07b479afa13696825aedf | inaka/erlang_guidelines | types.erl | -module(types).
-include("bad_types.hrl").
-type id() :: pos_integer().
-record(type, {id :: id(), name :: binary()}).
-opaque type() :: #type{}.
-export_type([id/0, type/0]).
%% If you later want to use these types on your specs you DO NOT have to include
%% any file and you just write -spec my_function(types:id()... | null | https://raw.githubusercontent.com/inaka/erlang_guidelines/882f7f12b74b65066fdeff9bbe2197a3d6f8a713/src/types.erl | erlang | If you later want to use these types on your specs you DO NOT have to include
any file and you just write -spec my_function(types:id()) -> types:type(). | -module(types).
-include("bad_types.hrl").
-type id() :: pos_integer().
-record(type, {id :: id(), name :: binary()}).
-opaque type() :: #type{}.
-export_type([id/0, type/0]).
|
9df53a3b184d7678946cd8272f9fd9d2afd6459e526c09c3028503329cdb7198 | KavrakiLab/tmkit | smtrun.lisp | (in-package :tmsmt)
(defvar *smt-trace-command* nil)
(defstruct smt
(runtime 0d0 :type double-float)
process)
(defparameter *smt-readtable*
(let ((r (copy-readtable nil)))
(setf (readtable-case r) :preserve)
r))
(defparameter *smt-package* (find-package :tmsmt))
(defun smt-input (smt)
(sb-ext:proce... | null | https://raw.githubusercontent.com/KavrakiLab/tmkit/4fb6fc0fa02c5b242dfcbe0013d3c1178e9d9224/lisp/smtrun.lisp | lisp | Write
Maybe trace commands
Read | (in-package :tmsmt)
(defvar *smt-trace-command* nil)
(defstruct smt
(runtime 0d0 :type double-float)
process)
(defparameter *smt-readtable*
(let ((r (copy-readtable nil)))
(setf (readtable-case r) :preserve)
r))
(defparameter *smt-package* (find-package :tmsmt))
(defun smt-input (smt)
(sb-ext:proce... |
da86a72568983d5ea30506b1d62b2b9a9106fc2b60dec65433740686315a4629 | aerosol/gen_cycle | gen_cycle_sup.erl | -module(gen_cycle_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([start_child/1]).
-export([stop_child/1]).
-export([init/1]).
-define(CHILD(I, Type), {I, {I, start_link, []}, transient, 5000, Type, [I]}).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
start_child(Args) ... | null | https://raw.githubusercontent.com/aerosol/gen_cycle/34782726521b17a6ea7b397c7eae5a009e8798f7/src/gen_cycle_sup.erl | erlang | -module(gen_cycle_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([start_child/1]).
-export([stop_child/1]).
-export([init/1]).
-define(CHILD(I, Type), {I, {I, start_link, []}, transient, 5000, Type, [I]}).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
start_child(Args) ... | |
3e8f78ba0be94c766b9b5523bad000d4b16737ceb20dfdf618b4dd93b6ffa04e | UBTECH-Walker/WalkerSimulationFor2020WAIC | GetMapJson.lisp | ; Auto-generated. Do not edit!
(cl:in-package cruiser_msgs-srv)
;//! \htmlinclude GetMapJson-request.msg.html
(cl:defclass <GetMapJson-request> (roslisp-msg-protocol:ros-message)
()
)
(cl:defclass GetMapJson-request (<GetMapJson-request>)
())
(cl:defmethod cl:initialize-instance :after ((m <GetMapJson-reques... | null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_16.04_v1.2_20200616/walker_install/share/common-lisp/ros/cruiser_msgs/srv/GetMapJson.lisp | lisp | Auto-generated. Do not edit!
//! \htmlinclude GetMapJson-request.msg.html
//! \htmlinclude GetMapJson-response.msg.html |
(cl:in-package cruiser_msgs-srv)
(cl:defclass <GetMapJson-request> (roslisp-msg-protocol:ros-message)
()
)
(cl:defclass GetMapJson-request (<GetMapJson-request>)
())
(cl:defmethod cl:initialize-instance :after ((m <GetMapJson-request>) cl:&rest args)
(cl:declare (cl:ignorable args))
(cl:unless (cl:typep ... |
9f2183a6ca7bb0a2fd522df9f708b78533c376fad073c33c872123525834b8ae | lambe-lang/compiler | type.mli | module Checker : sig
val check :
'a Lambe_ast.Type.gamma
-> 'a Lambe_ast.Type.t
-> 'a Lambe_ast.Kind.t
-> bool
val reduce :
'a Lambe_ast.Type.gamma -> 'a Lambe_ast.Type.t -> 'a Lambe_ast.Type.t option
val subsume :
'a Lambe_ast.Type.gamma
-> 'a Lambe_ast.Type.t
-> 'a Lambe_... | null | https://raw.githubusercontent.com/lambe-lang/compiler/79d7937c06ca30e231855ec4ce99012ca0395cd5/lib/checker/type.mli | ocaml | module Checker : sig
val check :
'a Lambe_ast.Type.gamma
-> 'a Lambe_ast.Type.t
-> 'a Lambe_ast.Kind.t
-> bool
val reduce :
'a Lambe_ast.Type.gamma -> 'a Lambe_ast.Type.t -> 'a Lambe_ast.Type.t option
val subsume :
'a Lambe_ast.Type.gamma
-> 'a Lambe_ast.Type.t
-> 'a Lambe_... | |
a416508561deb5ef9500a89d3af3b63db2b6cb8640f8fa05063df8ae22526950 | snmsts/cserial-port | main.lisp | (cl:in-package :cserial-port)
(defvar *default-name*
(%default-name *serial-class*))
(defvar *default-timeout-ms* nil)
(defvar *default-baud-rate* 9600)
(defvar *default-encoding* :latin-1)
(defvar *default-data-bits* 8)
(defvar *default-stop-bits* 1)
(defvar *default-parity* :none)
;;interfaces borrowed from lis... | null | https://raw.githubusercontent.com/snmsts/cserial-port/ba8ba8a7ba69d31970d29ec8dfe4cce937a71e4a/src/main.lisp | lisp | interfaces borrowed from lisp works
below are not yet supported
more | (cl:in-package :cserial-port)
(defvar *default-name*
(%default-name *serial-class*))
(defvar *default-timeout-ms* nil)
(defvar *default-baud-rate* 9600)
(defvar *default-encoding* :latin-1)
(defvar *default-data-bits* 8)
(defvar *default-stop-bits* 1)
(defvar *default-parity* :none)
(defun open-serial
(&optio... |
f2e50831d773fc8608f07707d06f23fb9fb74e3ca8728a3b6cc60be47674a012 | coalton-lang/coalton | settings.lisp | ;;;; settings.lisp
;;;;
;;;; This file contains variables that can be used to control how
Coalton works .
(defpackage #:coalton-impl/settings
(:use #:cl)
(:export
#:coalton-release-p ; FUNCTION
#:*coalton-print-unicode* ; VARIABLE
#:*coalton-dump-ast* ; VARIAB... | null | https://raw.githubusercontent.com/coalton-lang/coalton/e3c284d90d98b051a871521b6ef0af5193c89597/src/settings.lisp | lisp | settings.lisp
This file contains variables that can be used to control how
FUNCTION
VARIABLE
VARIABLE
VARIABLE
VARIABLE
VARIABLE
VARIABLE
VARIABLE
Configure the backend to print out the ast of toplevel forms
Configure the backend to remove env updates from the generated code
Configure the backend to remov... | Coalton works .
(defpackage #:coalton-impl/settings
(:use #:cl)
(:export
))
(in-package #:coalton-impl/settings)
(declaim (type boolean *coalton-print-unicode*))
(defvar *coalton-print-unicode* t
"Whether to print coalton info using unicode symbols")
(defun coalton-release-p ()
"Determines how redefina... |
73c6adaca05077683f5c8bdf0eb9a86f70d22971cdd187b5de008945808cc938 | wenkokke/MonoProc | FreeNames.hs | module PROC.MF.FreeNames where
import PROC.Base
import Data.Monoid ((<>))
import Data.Set (Set)
import qualified Data.Set as S
-- * Free Variable Names
class FreeNames a where
freeNames :: a -> Set Name
isFreeIn :: Name -> a -> Bool
isFreeIn x a = S.member x (freeNames a)
instance FreeNames Prog where
fre... | null | https://raw.githubusercontent.com/wenkokke/MonoProc/c3d00bd55ee8a6f2c12ebf5abb226c731e856350/src/PROC/MF/FreeNames.hs | haskell | * Free Variable Names | module PROC.MF.FreeNames where
import PROC.Base
import Data.Monoid ((<>))
import Data.Set (Set)
import qualified Data.Set as S
class FreeNames a where
freeNames :: a -> Set Name
isFreeIn :: Name -> a -> Bool
isFreeIn x a = S.member x (freeNames a)
instance FreeNames Prog where
freeNames (Prog _ s) = freeN... |
f267c803f8cb9f75b5309e108fb2869addf8f793a4874081e3fd1b52e7c8710e | tsloughter/mmmbot | mmmbot_images.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2012 ,
%%% @doc
%%%
%%% @end
Created : 29 Apr 2012 by < >
%%%-------------------------------------------------------------------
-module(mmmbot_images).
-behaviour(gen_event).
%% API
-export([start/0]).
%% gen_event... | null | https://raw.githubusercontent.com/tsloughter/mmmbot/12986c8b0984824aa0565fb8fa0e60082b660c97/apps/mmmbot_images/src/mmmbot_images.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
gen_event callbacks
===================================================================
gen_event callbacks
========================================================... | @author < >
( C ) 2012 ,
Created : 29 Apr 2012 by < >
-module(mmmbot_images).
-behaviour(gen_event).
-export([start/0]).
-export([init/1, handle_event/2, handle_call/2,
handle_info/2, terminate/2, code_change/3]).
-define(SERVER, ?MODULE).
-record(state, {bucket, mp}).
start() ->
mmmb... |
7cef0bf894d770b151f47ef6509dffe773dfd301878814d87174ec441166a6dd | semilin/layoup | hail.lisp |
(MAKE-LAYOUT :NAME "hail" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX NIL
:KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/hail.lisp | lisp |
(MAKE-LAYOUT :NAME "hail" :MATRIX (APPLY #'KEY-MATRIX 'NIL) :SHIFT-MATRIX NIL
:KEYBOARD NIL) | |
ab469a7fbadddb1f92223c550f5c5765c2af291251810e46bb2c0829d001b56b | cram2/cram | gripper.lisp | ;;;
Copyright ( c ) 2016 , < >
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this list... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_pr2/cram_pr2_low_level/src/gripper.lisp | lisp |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redi... | Copyright ( c ) 2016 , < >
* Neither the name of the Institute for Artificial Intelligence/
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR ... |
2f24c9ddf2079d221f2d96c34591660a672903d3f2f969826b8c034d6d3dbcef | seckcoder/iu_c311 | type-check.rkt | ; type checking for ki
| null | https://raw.githubusercontent.com/seckcoder/iu_c311/a1215983b6ab08df32058ef1e089cb294419e567/racket/compiler/ki/type-check.rkt | racket | type checking for ki | |
f5fd1a3cc59d8257abcd5eedce24132d9979d72cebb4a09d7525feb1a9aa250e | janestreet/ecaml | display_property.mli | (** [(Info-goto-node "(elisp)Display Property")] *)
open! Core
open! Import
module Margin : sig
type t =
| Left
| Right
[@@deriving sexp_of]
end
type t = Display_in_margin of Margin.t [@@deriving sexp_of]
val to_values : t -> Value.t list
val of_values_exn : Value.t * Value.t -> t
| null | https://raw.githubusercontent.com/janestreet/ecaml/f4efda2ee2dd59ef18722c8c2232fb8972a6770c/src/display_property.mli | ocaml | * [(Info-goto-node "(elisp)Display Property")] |
open! Core
open! Import
module Margin : sig
type t =
| Left
| Right
[@@deriving sexp_of]
end
type t = Display_in_margin of Margin.t [@@deriving sexp_of]
val to_values : t -> Value.t list
val of_values_exn : Value.t * Value.t -> t
|
86d4b5d7353c9a5247c63005eec323cfa30f054790a3c9fdf8f6a9d004c108e1 | tezos/tezos-mirror | fr_carray.ml | (*****************************************************************************)
(* *)
MIT License
Copyright ( c ) 2022 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/a42b3090645b62bdc1e4e82c69bebefbc0de9763/src/lib_bls12_381_polynomial/fr_carray.ml | ocaml | ***************************************************************************
Permission is hereby granted, free of charge, to any person obtaining a
copy of this so... | MIT License
Copyright ( c ) 2022 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS... |
1ba238f3eea51f6e87a8dc38293ebc0323c574532016d2bc92492cea5468835e | CarlWright/NGerlguten | template1.erl | -module (template1).
-include("../../include/eg.hrl").
-export ([on_instanciation/1, box/3, tag_map/4, handler/5]).
on_instanciation(Env ) ->
FilePart = atom_to_list(?MODULE),
FileName = "../test/template testing/" ++ FilePart ++ ".tem",
Env2 = Env#env{template = ?MODULE},
V = eg_xml_lite:parse_file(FileName... | null | https://raw.githubusercontent.com/CarlWright/NGerlguten/3c87f2e3a44ae9069f9379933b99c0feb8262d66/lib/ng_examples/testing/template%20testing/template1.erl | erlang | tear off Box Definitions for a template
repeat for each box definition in the template
repeat for each value of a box record
parse out the values for the Box record and return a box record
parse out each attribute & value for the box
set the attributes of the box record
get the box name out of the box list
load... | -module (template1).
-include("../../include/eg.hrl").
-export ([on_instanciation/1, box/3, tag_map/4, handler/5]).
on_instanciation(Env ) ->
FilePart = atom_to_list(?MODULE),
FileName = "../test/template testing/" ++ FilePart ++ ".tem",
Env2 = Env#env{template = ?MODULE},
V = eg_xml_lite:parse_file(FileName... |
dd7c56b91409f0a22bfbf157d2bfbe85db803ea63ea0bea09570362c33a8a265 | ghollisjr/cl-ana | histogram.lisp | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
;;;;
This file is part of cl - ana .
;;;;
;;;; cl-ana 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 Li... | null | https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/serialization/histogram.lisp | lisp |
cl-ana is free software: you can redistribute it and/or modify it
(at your option) any later version.
cl-ana is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License... | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
This file is part of cl - ana .
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
... |
e4e5131319101cce18cdfb8b452595246519784002492fd5cca27d9a14b7f6cb | Lupino/haskell-periodic | FuncStat.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Periodic.Server.FuncStat
( FuncStat (..)
, funcStat
, FuncStatList
) where
import qualified Data.ByteString.Char8 as B (intercalate, pack)
import Data.Byteable
import Data.IOMap (IOMap)
import Da... | null | https://raw.githubusercontent.com/Lupino/haskell-periodic/cb8be30a37400c1fa3f2bebafb2b6ebc165bd634/periodic-server/src/Periodic/Server/FuncStat.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE RecordWildCards #
module Periodic.Server.FuncStat
( FuncStat (..)
, funcStat
, FuncStatList
) where
import qualified Data.ByteString.Char8 as B (intercalate, pack)
import Data.Byteable
import Data.IOMap (IOMap)
import Data.Int (Int64)
import ... |
adeefa13e08ce4ad06127288ddb584a0c30efaca559b0a18c7dd625d686c8139 | eshamster/watson | import.lisp | (defpackage :watson/t/definer/import
(:use #:cl
#:rove
#:watson/definer/import)
(:import-from #:watson/env/environment
#:with-cloned-wenvironment
#:wsymbol-import
#:wenv-import-body-generators
#:intern.wat)
(:import-from #:watson/env/... | null | https://raw.githubusercontent.com/eshamster/watson/0525f4a657298cec74121162c3cd3dec953c7a25/t/definer/import.lisp | lisp | (defpackage :watson/t/definer/import
(:use #:cl
#:rove
#:watson/definer/import)
(:import-from #:watson/env/environment
#:with-cloned-wenvironment
#:wsymbol-import
#:wenv-import-body-generators
#:intern.wat)
(:import-from #:watson/env/... | |
1860295c79ccf5027ce7ae29d07c12e1be37b8674978b22bce71136c84aa2484 | replikativ/filesync-replikativ | core.clj | (ns filesync-replikativ.core
(:gen-class)
(:require [clojure.core.async :as async :refer [chan timeout]]
[filesync-replikativ.filesystem :refer :all]
[superv.async :refer [<? <?? go-loop-try S]]
[clj-ipfs-api.core :as ipfs]
[konserve
[core :as k]
... | null | https://raw.githubusercontent.com/replikativ/filesync-replikativ/68ef904d2eb0918dfb4a05bcad17497a02cf7541/src/filesync_replikativ/core.clj | clojure | how to deal with special files? folder/symlinks etc.?
do not re-sync on startup
:applied-log [sync-path :in-loop]
we randomize, so we do not get in lock-step with some application
this should ensure liveness | (ns filesync-replikativ.core
(:gen-class)
(:require [clojure.core.async :as async :refer [chan timeout]]
[filesync-replikativ.filesystem :refer :all]
[superv.async :refer [<? <?? go-loop-try S]]
[clj-ipfs-api.core :as ipfs]
[konserve
[core :as k]
... |
65086c2e3e6364aa9b8dc082e1adb51e55dffcc9c95b25cf9a6d22fc9d64be13 | roddyyaga/finch | load.ml | open Jingoo
open Core
let split_front_matter s =
let s = String.strip s ^ "\n" in
let front_matter_start_opt = String.substr_index ~pattern:"---\n" s in
match front_matter_start_opt with
| None -> (None, s)
| Some fm_start -> (
let frontmatter_end_opt = String.substr_index ~pattern:"\n---\n" s in
... | null | https://raw.githubusercontent.com/roddyyaga/finch/685b661b987c7b57fe07e1e67b0ce4f688d87d67/lib/load.ml | ocaml | open Jingoo
open Core
let split_front_matter s =
let s = String.strip s ^ "\n" in
let front_matter_start_opt = String.substr_index ~pattern:"---\n" s in
match front_matter_start_opt with
| None -> (None, s)
| Some fm_start -> (
let frontmatter_end_opt = String.substr_index ~pattern:"\n---\n" s in
... | |
5d5517c8400647ec803c3b75e873230afc66063cfd37a0141f931378edf0f02b | bryal/carth | GetConfig.hs | # LANGUAGE TupleSections , TemplateHaskell , RankNTypes #
| Read all the different kinds of configurtion options for Carth . Command line options , config
-- files, environment variables, etc.
module GetConfig (getConfig, Conf(..)) where
import System.Console.GetOpt
import System.Environment
import System.Exit
im... | null | https://raw.githubusercontent.com/bryal/carth/8b11c27abe5d6db5501eebb826422aa2c73aacdb/app/GetConfig.hs | haskell | files, environment variables, etc. | # LANGUAGE TupleSections , TemplateHaskell , RankNTypes #
| Read all the different kinds of configurtion options for Carth . Command line options , config
module GetConfig (getConfig, Conf(..)) where
import System.Console.GetOpt
import System.Environment
import System.Exit
import System.FilePath
import Data.List
im... |
ac609fbb172bc65b2bc87ea7bcf43e026924ab846e35f591fccbcdbedd7f8e77 | bluelisp/hemlock | indent.lisp | ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
;;;
;;; ******************************************... | null | https://raw.githubusercontent.com/bluelisp/hemlock/47e16ba731a0cf4ffd7fb2110e17c764ae757170/src/indent.lisp | lisp | -*- Mode: Lisp; indent-tabs-mode: nil -*-
**********************************************************************
**********************************************************************
| This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
Hemlock indentation commands
Written by and
(in-package :hemlock)
(defhvar "Spaces per Tab"
"The number of spaces a tab is equivalent to. NOTE: This is not incorporat... |
d320ae318fb8e4e9f75418b366aa040928d992b7fcd927edfd5b976c5a52d0bd | mirage/irmin | type.ml |
* Copyright ( c ) 2013 - 2022 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... | null | https://raw.githubusercontent.com/mirage/irmin/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/src/irmin/type.ml | ocaml |
* Copyright ( c ) 2013 - 2022 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... | |
a06604f4f974da0da36204620ff2f50b51df1c81cccb74c688d9feb2e48a50eb | danielsz/sente-system | server.clj | (ns example.server
"Official Sente reference example: server"
{:author "Peter Taoussanis (@ptaoussanis)"}
(:require
[ring.middleware.defaults]
[com.stuartsierra.component :as component]
[compojure.core :as comp :refer [routes GET POST]]
[compojure.route :as route]
[hiccup.core :as hiccup]
... | null | https://raw.githubusercontent.com/danielsz/sente-system/e5dbe8549b6e6082591284699bca5779b3712f90/src/clj/example/server.clj | clojure | (timbre/set-level! :trace) ; Uncomment for more logging
Uncomment for extra debug info
Ring handlers
Include our cljs target
Some server>user async push examples
Sente event handlers
Dispatch on event-id
Handle event-msgs on a single thread
(future (-event-msg-handler component ev-msg)) ; Handle event-msgs ... | (ns example.server
"Official Sente reference example: server"
{:author "Peter Taoussanis (@ptaoussanis)"}
(:require
[ring.middleware.defaults]
[com.stuartsierra.component :as component]
[compojure.core :as comp :refer [routes GET POST]]
[compojure.route :as route]
[hiccup.core :as hiccup]
... |
239fd85034f1d97fede903e44eada600342615a4f4cc321fdc5d878400f34718 | probprog/bopp | core.clj | (ns bopp.core
"User interface for BOPP"
(require [deodorant.core :as bo]
[bopp.program-transformations :as pt]
[bopp.helper-functions :refer [argmax]]
[bopp.error-handling :refer [changing-types?]]
[anglican.inference :refer [log-marginal infer]]
[anglican.stat... | null | https://raw.githubusercontent.com/probprog/bopp/cfb93c22cd7f97ec303eb47b6748b6124b9b5914/src/bopp/core.clj | clojure | Could be +-Infinity
must provide opt-program-transformation,
Suggested: anglican.inference/log-marginal)
Suggested: identity, - for minimization)
Speed option
BO options
Optimization options
Inference options
Other options
Default optimization options
Default other options
FIXME: Don't replace -Infinity wi... | (ns bopp.core
"User interface for BOPP"
(require [deodorant.core :as bo]
[bopp.program-transformations :as pt]
[bopp.helper-functions :refer [argmax]]
[bopp.error-handling :refer [changing-types?]]
[anglican.inference :refer [log-marginal infer]]
[anglican.stat... |
8219945c15bdf89242d90ee1f6b6249ef7fc0bbfa6ddab969880a0c0bf532a8f | mejgun/haskell-tdlib | ChatMember.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Data.ChatMember where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.ChatMemberStatus as ChatMemberStatus
import qualified TD.Data.MessageSender as MessageSender
import qualified Utils as U
-- |
data ChatMember = -- |... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/e81b9b3096f4b5bb3e10ca9f895ee469efa47a37/src/TD/Data/ChatMember.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
| Describes a user or a chat as a member of another chat
| Status of the member in the chat
| Point in time (Unix timestamp) when the user joined/was promoted/was banned in the chat
| Identifier of a user that invited/promoted/banned this member in the chat; 0 if unknown
| Iden... |
module TD.Data.ChatMember where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.ChatMemberStatus as ChatMemberStatus
import qualified TD.Data.MessageSender as MessageSender
import qualified Utils as U
ChatMember
status :: Maybe ChatMemberStatus.ChatMemberStatus,... |
36303040221b2d1d7717ff027f631dd2b82d1fd0b85ba16f0f27794e3057529e | ghc/testsuite | tcfail169.hs |
Trac # 958
module ShoulFail where
NB : deriving Show omitted
data Seq a = Cons a (Seq (Succ a)) | Nil deriving Show
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail169.hs | haskell |
Trac # 958
module ShoulFail where
NB : deriving Show omitted
data Seq a = Cons a (Seq (Succ a)) | Nil deriving Show
| |
59c32cecc4a707491f1c13a0abfd86ee22b8595f53efe0b22f84106d190dec77 | cwi-swat/monadic-frp | PaperExample.hs | -- | The example from the paper
# LANGUAGE TupleSections , ViewPatterns , NoMonomorphismRestriction #
module PaperExample where
import Control.Monad.State.Lazy
import Control.MonadicFRP
import Data.Set hiding (map,filter)
import Prelude hiding (null,map,filter,filter,until,repeat,cycle,scanl,span,break,tail )
import q... | null | https://raw.githubusercontent.com/cwi-swat/monadic-frp/c0c40fdfe4a2c77df66173338b109831b35b7672/PaperExample.hs | haskell | | The example from the paper
stuff implicit in paper:
implicit in paper
slight difference with paper: if the user does not move the mouse the pattern match will fail (this would define an empty rectangle) here we fix this.
implicit in paper | # LANGUAGE TupleSections , ViewPatterns , NoMonomorphismRestriction #
module PaperExample where
import Control.Monad.State.Lazy
import Control.MonadicFRP
import Data.Set hiding (map,filter)
import Prelude hiding (null,map,filter,filter,until,repeat,cycle,scanl,span,break,tail )
import qualified Prelude as P
import Dat... |
8fa229f7eb1779faf896fb44925e9d6277ace1bf8a7b5831367537010304c54c | skanev/playground | 28-tests.scm | (require rackunit rackunit/text-ui)
(load-relative "../../support/eopl.scm")
(load-relative "../28.scm")
(load-relative "helpers/proc.scm")
(define eopl-3.28-tests
(test-suite
"Tests for EOPL exercise 3.28"
(check-equal? (run "let a = 3
in let p = proc (x) -(x, a)
... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/03/tests/28-tests.scm | scheme | (require rackunit rackunit/text-ui)
(load-relative "../../support/eopl.scm")
(load-relative "../28.scm")
(load-relative "helpers/proc.scm")
(define eopl-3.28-tests
(test-suite
"Tests for EOPL exercise 3.28"
(check-equal? (run "let a = 3
in let p = proc (x) -(x, a)
... | |
e3172a4f5dcfd75449ad0c8a25eef0d6385dddc7ccaa14eb116da41fb4ec3708 | heyoka/faxe | esp_first.erl | Date : 09.12.16 - 18:02
Ⓒ 2016 heyoka
-module(esp_first).
-author("Alexander Minichmair").
-behavior(esp_stats).
%% API
-export([execute/2, options/0]).
options() ->
esp_stats:get_options() ++ [{module, atom, ?MODULE}].
execute({_Tss, Values}, _Opts) ->
{first, lists:last(Values)}. | null | https://raw.githubusercontent.com/heyoka/faxe/e539afe8b62790a6037914751deef7d815be11a2/apps/faxe/src/components/stats/esp_first.erl | erlang | API | Date : 09.12.16 - 18:02
Ⓒ 2016 heyoka
-module(esp_first).
-author("Alexander Minichmair").
-behavior(esp_stats).
-export([execute/2, options/0]).
options() ->
esp_stats:get_options() ++ [{module, atom, ?MODULE}].
execute({_Tss, Values}, _Opts) ->
{first, lists:last(Values)}. |
b8ccfdbd38398e8c0a8230f7ad269a34b1ad684bdef61147c1e9b50c44016a5f | UU-ComputerScience/js-asteroids | Asteroids.hs | # LANGUAGE CPP #
{-# OPTIONS -pgmP cpp #-}
module Asteroids where
import Graphics.UI.WX
import Graphics.UI.WXCore hiding (window,bitmap)
import Control.Monad
#ifdef __UHC__
import Language.UHC.JS.Marshal
import Language.UHC.JS.Types
import Language.UHC.JS.Prelude
foreign import js "Math.random()"
random... | null | https://raw.githubusercontent.com/UU-ComputerScience/js-asteroids/b7015d8ad4aa57ff30f2631e0945462f6e1ef47a/wxasteroids/src/Asteroids.hs | haskell | # OPTIONS -pgmP cpp #
advance :: (Textual w, Paint w1) => w -> Var [[a]] -> w1 -> IO ()
when (or collisions) (play explode)
consoleLog (str (show (pointX pos) ++ "," ++ show (pointY pos)))
| # LANGUAGE CPP #
module Asteroids where
import Graphics.UI.WX
import Graphics.UI.WXCore hiding (window,bitmap)
import Control.Monad
#ifdef __UHC__
import Language.UHC.JS.Marshal
import Language.UHC.JS.Types
import Language.UHC.JS.Prelude
foreign import js "Math.random()"
random :: IO Double
#else
rando... |
1b0aed04988180673a7ffcb6c85c2d63533c424d5f43841625ed61f1d5ab240d | backtracking/mlpost | types.mli | (**************************************************************************)
(* *)
Copyright ( C ) Johannes Kanig ,
, and
(* *)
(* This software is f... | null | https://raw.githubusercontent.com/backtracking/mlpost/e82db2d3766f24392956478496fa26c8837c1fef/src/types.mli | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | Copyright ( C ) Johannes Kanig ,
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
type color = Concrete_types.color
type name = string
type corner =
[ `Northwest
| `Northeast
| ... |
6fef88f1aca461e6e4ae0ae80240fe89c53ee8496981a32d8e1d202960345bff | callum-oakley/advent-of-code | 05.clj | (ns aoc.2018.05
(:require
[clojure.test :refer [deftest is]]))
(defn parse [s]
(map int s))
(defn react [polymer]
(reduce (fn [acc x]
(let [y (first acc)]
uppercase and lowercase differ by 32
(if (and y (= 32 (abs (- x y))))
(rest acc)
(cons x acc))... | null | https://raw.githubusercontent.com/callum-oakley/advent-of-code/da5233fc0fd3d3773d35ee747fd837c59c2b1c04/src/aoc/2018/05.clj | clojure | (ns aoc.2018.05
(:require
[clojure.test :refer [deftest is]]))
(defn parse [s]
(map int s))
(defn react [polymer]
(reduce (fn [acc x]
(let [y (first acc)]
uppercase and lowercase differ by 32
(if (and y (= 32 (abs (- x y))))
(rest acc)
(cons x acc))... | |
2241f47a8b24d17ac5dc5d2700529f2d1238982e9cad5d497ee434c563c07700 | TrustInSoft/tis-kernel | bag.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/libraries/utils/bag.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 ... |
370bac87c63e29bc9a23d652c0daabbb9c9af896b2308606e30db43cdd72884c | khmelevskii/emotion-cljs | styled.cljs | (ns helix-emotion.components.button.styled
(:require
[emotion.core :refer [defcss-when defstyled]]))
(defcss-when --color-primary [color]
(= color "primary")
{:color "#fff"
:background-color "#006cda"
:&:hover {:background-color "#3690df"}})
(defcss-when --color-secondary [color]
(= color... | null | https://raw.githubusercontent.com/khmelevskii/emotion-cljs/4baaccfa19c0808e11f3a8e838f62ac6382b8860/examples/helix-emotion/src/main/helix_emotion/components/button/styled.cljs | clojure | (ns helix-emotion.components.button.styled
(:require
[emotion.core :refer [defcss-when defstyled]]))
(defcss-when --color-primary [color]
(= color "primary")
{:color "#fff"
:background-color "#006cda"
:&:hover {:background-color "#3690df"}})
(defcss-when --color-secondary [color]
(= color... | |
22bf1019ad6f07196b451867a108b85c85b7c5af4b1a288e6d6579d18c0ac741 | dhess/sicp-solutions | ex2.35.scm | (define (accumulate op initial sequence)
(if (null? sequence)
initial
(op (car sequence)
(accumulate op initial (cdr sequence)))))
(define (count-leaves t)
(accumulate (lambda (leaves total) (+ leaves total))
0
(map (lambda (sub-tree)
(if (pair... | null | https://raw.githubusercontent.com/dhess/sicp-solutions/2cf78db98917e9cb1252efda76fddc8e45fe4140/chap2/ex2.35.scm | scheme | (define (accumulate op initial sequence)
(if (null? sequence)
initial
(op (car sequence)
(accumulate op initial (cdr sequence)))))
(define (count-leaves t)
(accumulate (lambda (leaves total) (+ leaves total))
0
(map (lambda (sub-tree)
(if (pair... | |
b9ef93e4547cad3b9b6e2effdf074ad1ec590efe5effd86f9ba08d62bac57947 | coco-team/lustrec | compiler_common.ml | (********************************************************************)
(* *)
The LustreC compiler toolset / The LustreC Development Team
Copyright 2012 - -- ONERA - CNRS - INPT
(* ... | null | https://raw.githubusercontent.com/coco-team/lustrec/b21f9820df97e661633cd4418fdab68a6c6ca67d/src/compiler_common.ml | ocaml | ******************************************************************
LustreC is free software, distributed WITHOUT ANY WARRANTY
under the terms of the GNU Lesser General Public L... | The LustreC compiler toolset / The LustreC Development Team
Copyright 2012 - -- ONERA - CNRS - INPT
version 2.1 .
open Utils
open Format
open Lustre_types
open Corelang
let check_main () =
if !Options.main_node = "" then... |
2cfb18f6b18efea40da5f0f497e0869092320c27bd4d1ed9d7972def3b0ad2aa | tlehman/sicp-exercises | ex-2.18.scm | Exercise 2.18 : Define a procedure reverse that takes a list as argument
; and returns a list of the same elements in reverse order:
;
; (reverse (list 1 4 9 16 25))
( 25 16 9 4 1 )
(define (reverse my-list)
( last ' ( 1 2 3 ) ) # = > 3
(define (last lst)
(if (null? lst) lst
(if (null? (cdr lst)) (car ... | null | https://raw.githubusercontent.com/tlehman/sicp-exercises/57151ec07d09a98318e91c83b6eacaa49361d156/ex-2.18.scm | scheme | and returns a list of the same elements in reverse order:
(reverse (list 1 4 9 16 25))
throw away the last element | Exercise 2.18 : Define a procedure reverse that takes a list as argument
( 25 16 9 4 1 )
(define (reverse my-list)
( last ' ( 1 2 3 ) ) # = > 3
(define (last lst)
(if (null? lst) lst
(if (null? (cdr lst)) (car lst)
(last (cdr lst)))))
( beginning ' ( 1 2 3 ) ) # = > ( 1 2 )
(define (beginning ... |
ac118616b09f23a7959acc70c1c6c9b3765fa98ad3992c16bdfa075d48be20dc | funcool/promesa | protocols.cljc | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
Copyright ( c ) < >
(ns promesa.protocols
"A generic promise abstraction and related protocols.")
(defprotocol IPromise
(-fmap [it... | null | https://raw.githubusercontent.com/funcool/promesa/19491a4ea476f80ae741c6d8072c1a4612b1b654/src/promesa/protocols.cljc | clojure |
the return value is ignored.") | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) < >
(ns promesa.protocols
"A generic promise abstraction and related protocols.")
(defprotocol IPromise
(-fmap [it f]... |
c2fcbdff92d9c6fe746a5f69b7d551784c3755db5be54cfe5f3b153fa3627735 | thheller/shadow-cljs | node_test.clj | (ns shadow.build.targets.node-test
(:refer-clojure :exclude (compile flush resolve))
(:require
[shadow.build :as build]
[shadow.build.modules :as modules]
[shadow.build.classpath :as cp]
[shadow.build.targets.node-script :as node-script]
[shadow.cljs.util :as util]
[shadow.cljs.devtools.serv... | null | https://raw.githubusercontent.com/thheller/shadow-cljs/ba0a02aec050c6bc8db1932916009400f99d3cce/src/main/shadow/build/targets/node_test.clj | clojure | (update-in [::build/config :devtools] assoc :enabled false)
just the defines, preloads are added in resolve
since :configure is only called once in :dev
we delay setting the :entries until compile-prepare which is called every cycle
need to come up with a cleaner API for this
must be included before any deftest b... | (ns shadow.build.targets.node-test
(:refer-clojure :exclude (compile flush resolve))
(:require
[shadow.build :as build]
[shadow.build.modules :as modules]
[shadow.build.classpath :as cp]
[shadow.build.targets.node-script :as node-script]
[shadow.cljs.util :as util]
[shadow.cljs.devtools.serv... |
e04fec83bde416674625653a3cc229f2d335bfa014bfcaff23e4f97ab2f7897d | balayette/blockchan | listext.ml | module List =
struct
include List
let repr_of_hashes l =
let rec aux l acc = match l with
| e::[] -> acc ^ e
| e::l -> aux l (acc ^ e ^ ", ")
| [] -> acc
in aux l ""
let remove_options l =
let rec aux l acc = match l with... | null | https://raw.githubusercontent.com/balayette/blockchan/3b7e292ec9e9574eefcdebd0a6036698a80febdb/src/listext.ml | ocaml | module List =
struct
include List
let repr_of_hashes l =
let rec aux l acc = match l with
| e::[] -> acc ^ e
| e::l -> aux l (acc ^ e ^ ", ")
| [] -> acc
in aux l ""
let remove_options l =
let rec aux l acc = match l with... | |
2a5ccea03142437a4fc81d90b52d5d259732811143cb1ffc0f4d2adb6634d716 | expipiplus1/vulkan | Peek.hs | # LANGUAGE AllowAmbiguousTypes #
module Render.Peek
( peekStmt
, peekStmtDirect
, getLenRef
, storablePeek
, vectorPeekWithLenRef
, unwrapIdiomaticType
) where
import qualified Data.Text as T
import Data.Vector (Vector)
import Data.Vector.Extra
( pattern Empty
, pattern (:<|)
)
import qualified Da... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/73cacc1696011047dcf0c66e9d3fb483762c15cf/generate-new/src/Render/Peek.hs | haskell | TODO: probably shouldn't ignore these here
If this is already the correct type don't try wrapping it
| Make a type idiomatic, CFloat to Float for example
| Render a peek and don't do any unwrapping to idiomatic haskell types
TODO: Should this take into account the type?
--------------------------------------------... | # LANGUAGE AllowAmbiguousTypes #
module Render.Peek
( peekStmt
, peekStmtDirect
, getLenRef
, storablePeek
, vectorPeekWithLenRef
, unwrapIdiomaticType
) where
import qualified Data.Text as T
import Data.Vector (Vector)
import Data.Vector.Extra
( pattern Empty
, pattern (:<|)
)
import qualified Da... |
df727d41dbfaf8f6747b892b3ba83f9de6d7b1552541a182e12084d768c8c652 | input-output-hk/project-icarus-importer | Abstract.hs | # OPTIONS_GHC -fno - warn - orphans #
-- | Abstract definition of a wallet
module Wallet.Abstract (
-- * Abstract definition of a wallet
Wallet(..)
, Ours
, Pending
, WalletConstr
, mkDefaultWallet
, walletBoot
, applyBlocks
-- * Auxiliary operations
, balance
, txIns
, txOuts
, updateU... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet-new/test/unit/Wallet/Abstract.hs | haskell | | Abstract definition of a wallet
* Abstract definition of a wallet
* Auxiliary operations
------------------------------------------------------------------------------
Wallet type class
------------------------------------------------------------------------------
| Check if an address is ours
| Pending transa... | # OPTIONS_GHC -fno - warn - orphans #
module Wallet.Abstract (
Wallet(..)
, Ours
, Pending
, WalletConstr
, mkDefaultWallet
, walletBoot
, applyBlocks
, balance
, txIns
, txOuts
, updateUtxo
, updatePending
, utxoRestrictToOurs
) where
import Universum
import qualified Data.Fo... |
a4de8a699c239854411ff5acc7218994a44fd20d2852f8806b4eea65ca3337e9 | mirage/ocaml-xenstore-server | sockets.ml |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... | null | https://raw.githubusercontent.com/mirage/ocaml-xenstore-server/2a8ae397d2f9291107b5d9e9cfc6085fde8c0982/unix/sockets.ml | ocaml | The unix domain socket may not exist, or we may get a connection
refused error if the server is in the middle of restarting.
seconds
seconds
attempts
the maximum amount of space used for buffering
seq of next byte to write
Individual connections
input: Input.t;
output: Output.t;
Take only the bi... |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... |
ea8e28cd066938c763d8c728888d7b9ba3c38d94bc2146b531309f524a108b15 | Clojure2D/clojure2d-examples | oscillating_objects_3_7.clj | (ns NOC.ch03.oscillating-objects-3-7
(:require [clojure2d.core :refer :all]
[fastmath.core :as m]
[fastmath.vector :as v]
[fastmath.random :as r])
(:import [fastmath.vector Vec2]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(def ^:const ^int w 640)
... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/NOC/ch03/oscillating_objects_3_7.clj | clojure | (ns NOC.ch03.oscillating-objects-3-7
(:require [clojure2d.core :refer :all]
[fastmath.core :as m]
[fastmath.vector :as v]
[fastmath.random :as r])
(:import [fastmath.vector Vec2]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(def ^:const ^int w 640)
... | |
f8015acb24eaf2ee94a887a3e460c4731ecdd1345ada2a8514af63e865711007 | Armael/cdcl | verif.ml | open Prelude
let verif (nb_vars, nb_clauses, clauses) values =
let tbl = Hashtbl.create nb_vars in
Initialize a hashtable with the values of the variables
Array.iteri (fun i b -> Hashtbl.add tbl (i+1) b) values;
let verif_clause clause =
List.fold_left (fun acc v ->
(if v > 0 then (Hashtbl.find tbl... | null | https://raw.githubusercontent.com/Armael/cdcl/44c9c0e48549a0433fe7f3819b15b5ca2f369ea6/src/verif.ml | ocaml | open Prelude
let verif (nb_vars, nb_clauses, clauses) values =
let tbl = Hashtbl.create nb_vars in
Initialize a hashtable with the values of the variables
Array.iteri (fun i b -> Hashtbl.add tbl (i+1) b) values;
let verif_clause clause =
List.fold_left (fun acc v ->
(if v > 0 then (Hashtbl.find tbl... | |
f55afba581fc506c81e71bbb14221a34252322d86f9b05f83d43464478ba66f6 | Helium4Haskell/helium | RightSection.hs | module RightSection where
test :: [Int]
test = filter (False `eqBool`) [1..10]
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/simple/typeerrors/Examples/RightSection.hs | haskell | module RightSection where
test :: [Int]
test = filter (False `eqBool`) [1..10]
| |
25bbf3ccd7e0b5daaa1d6033a12cc29edb226778a258774c98fb2bd5c40cc991 | na4zagin3/satyrographos | command_build__doc_make.ml | module StdList = List
open Satyrographos_testlib
open TestLib
open Shexp_process
let satyristes =
{|
(lang "0.0.3")
(doc
(name "example-doc")
(build
((make "build-doc")))
(dependencies (grcnum fonts-theano)))
|}
let makefile =
{|
PHONY: build-doc
build-doc:
@echo "Target: build-doc"
@echo "=============... | null | https://raw.githubusercontent.com/na4zagin3/satyrographos/d2943bac9659d20746720ab36ebe11ae59203d32/test/testcases/command_build__doc_make.ml | ocaml | module StdList = List
open Satyrographos_testlib
open TestLib
open Shexp_process
let satyristes =
{|
(lang "0.0.3")
(doc
(name "example-doc")
(build
((make "build-doc")))
(dependencies (grcnum fonts-theano)))
|}
let makefile =
{|
PHONY: build-doc
build-doc:
@echo "Target: build-doc"
@echo "=============... | |
ca9812510189a16b77db020f32a2f92f24a53a2f731444959f4703a07cb2fd99 | expipiplus1/vulkan | Requirement.hs | # LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE MagicHash #
{-# LANGUAGE NamedFieldPuns #-}
{-# LAN... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src-manual/Vulkan/Requirement.hs | haskell | # LANGUAGE DeriveTraversable #
# LANGUAGE GADTs #
# LANGUAGE NamedFieldPuns #
# LANGUAGE PatternSynonyms #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE Strict #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableIn... | # LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE MagicHash #
# LANGUAGE PolyKinds #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
# LANGUAGE Undec... |
cd1cc0e0944effad0d4aa0feda28a8bf6243d58353ff5313b1c02ea519f1b538 | macourtney/Dark-Exchange | 003_create_users.clj | (ns darkexchange.database.migrations.003-create-users
(:use darkexchange.database.util))
(defn
#^{:doc "Creates the users table in the database."}
up []
(create-table :users
(id)
(string :name)
(string :encrypted_password)
(string :salt)
(string :encrypted_password_algorithm)
(integer :en... | null | https://raw.githubusercontent.com/macourtney/Dark-Exchange/1654d05cda0c81585da7b8e64f9ea3e2944b27f1/src/darkexchange/database/migrations/003_create_users.clj | clojure | (ns darkexchange.database.migrations.003-create-users
(:use darkexchange.database.util))
(defn
#^{:doc "Creates the users table in the database."}
up []
(create-table :users
(id)
(string :name)
(string :encrypted_password)
(string :salt)
(string :encrypted_password_algorithm)
(integer :en... | |
00dc70ff008da6c48220805be9405db52658130f596717a3b0ec4751503bbcc7 | tov/memoize | test2.hs | # language TemplateHaskell #
import Data.Function.Memoize
import Data.Function ( fix )
data List a = Nil | Cons a (List a)
$(deriveMemoizable ''List)
main = print $
let lcs = memoFix2 -- exponential time if you put fix here
$ \ f -> \ a b -> case (a,b) of
(Cons x a', Cons y b') ->
... | null | https://raw.githubusercontent.com/tov/memoize/21ec2da556c9c870560d40e67236f52da1e4a41c/test/test2.hs | haskell | exponential time if you put fix here | # language TemplateHaskell #
import Data.Function.Memoize
import Data.Function ( fix )
data List a = Nil | Cons a (List a)
$(deriveMemoizable ''List)
main = print $
$ \ f -> \ a b -> case (a,b) of
(Cons x a', Cons y b') ->
maximum [ if x == y then 1 + f a' b' else 0, f a b', f ... |
481a9b5808a1dadd2523dd13a1abc8da41d6e8485c925fbdf1e5a60e1e2718bc | kraison/vivace-graph-v3 | mmap.lisp | (in-package :graph-db)
#+lispworks(deftype word () '(unsigned-byte 64))
(cffi:defctype size :unsigned-int)
(deftype uint32 () '(integer 0 4294967295))
(deftype uint40 () '(integer 0 1099511627775))
(deftype uint64 () '(integer 0 18446744073709551615))
(defstruct (mapped-file
(:conc-name m-)
(:predicate ma... | null | https://raw.githubusercontent.com/kraison/vivace-graph-v3/cf2caaf26baccec9afd4d6a79375cd9ff5fe0613/mmap.lisp | lisp | (remap-lock (make-rw-lock))
Make sure the file size is set right!
(cffi:foreign-funcall "madvise"
:int fd
size size
:int MADV_RANDOM))) ;; NEED MADV_RANDOM FROM ?
(log:debug "Calling msync on ~S" mapped-file)
(log:debug "Calling munmap on ~S" mapped-file)
(incf offset)) | (in-package :graph-db)
#+lispworks(deftype word () '(unsigned-byte 64))
(cffi:defctype size :unsigned-int)
(deftype uint32 () '(integer 0 4294967295))
(deftype uint40 () '(integer 0 1099511627775))
(deftype uint64 () '(integer 0 18446744073709551615))
(defstruct (mapped-file
(:conc-name m-)
(:predicate ma... |
cc997c349993f81fbf41f8eba6fb4ab1ac2ae5608ffd02967d42fbaa4a7ad521 | expipiplus1/vulkan | ComponentSwizzle.hs | {-# language CPP #-}
No documentation found for Chapter " ComponentSwizzle "
module Vulkan.Core10.Enums.ComponentSwizzle (ComponentSwizzle( COMPONENT_SWIZZLE_IDENTITY
, COMPONENT_SWIZZLE_ZERO
,... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/ebc0dde0bcd9cf251f18538de6524eb4f2ab3e9d/src/Vulkan/Core10/Enums/ComponentSwizzle.hs | haskell | # language CPP #
| VkComponentSwizzle - Specify how a component is swizzled
= Description
Setting the identity swizzle on a component is equivalent to setting the
identity mapping on that component. That is:
+-----------------------------------+-----------------------------------+
| Component ... | No documentation found for Chapter " ComponentSwizzle "
module Vulkan.Core10.Enums.ComponentSwizzle (ComponentSwizzle( COMPONENT_SWIZZLE_IDENTITY
, COMPONENT_SWIZZLE_ZERO
, COMPONENT_SWIZZLE_ON... |
c56ae31b06bf1660b8271f2c103bd163dd5945f3527677a9c14bc8b60c7624e6 | kappamodeler/kappa | acyclicity.ml | open Data_structures
let is_acyclic pb =
try (
match pb.Pb_sig.first_encoding
with None -> raise Exit
| Some cpb ->
let add_relation x y (set,map,mapop) =
if x=y then raise Exit
else
let set' = String2Set.add x (String2Set.add y set) in
let map' =
let old =
try Pb_sig.S... | null | https://raw.githubusercontent.com/kappamodeler/kappa/de63d1857898b1fc3b7f112f1027768b851ce14d/complx_rep/backend/contact_map/acyclicity.ml | ocaml | open Data_structures
let is_acyclic pb =
try (
match pb.Pb_sig.first_encoding
with None -> raise Exit
| Some cpb ->
let add_relation x y (set,map,mapop) =
if x=y then raise Exit
else
let set' = String2Set.add x (String2Set.add y set) in
let map' =
let old =
try Pb_sig.S... | |
c97663d185e8caad256854c4971b2648da975a83412c060fb789452219a33d6d | sgbj/MaximaSharp | ztpsv.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 2edcbd958861 2012/05/30 03:34:52 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 3fe93de3be82 2012/05/06 02:17:14 toy ... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/lapack/blas/ztpsv.lisp | lisp | Compiled by f2cl version:
Using Lisp CMU Common Lisp 20d (20D Unicode)
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 2edcbd958861 2012/05/30 03:34:52 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 3fe93de3be82 2012/05/06 02:17:14 toy $ "
" f2cl6.l , v 1d5cbacbb... |
3a28081b7b63e67158a18de6886462c17c6aa156785c309e4390ffcf28c28852 | scrintal/heroicons-reagent | chat_bubble_left_ellipsis.cljs | (ns com.scrintal.heroicons.outline.chat-bubble-left-ellipsis)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejo... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/outline/chat_bubble_left_ellipsis.cljs | clojure | (ns com.scrintal.heroicons.outline.chat-bubble-left-ellipsis)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejo... | |
d98e811214436383f34f25006a76f3c518757799f2044a11488de3c3e782ff52 | eryx67/etracker | etracker_db_mgr.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2012 ,
%%% @doc
%%%
%%% @end
Created : 14 Nov 2012 by < >
%%%-------------------------------------------------------------------
-module(etracker_db_mgr).
%% API
-export([start_link/0, stop/0]).
-define(SERVER, ... | null | https://raw.githubusercontent.com/eryx67/etracker/f41f5d2172d2a0cf5aeebcc7442c7523a9338340/src/etracker_db_mgr.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API | @author < >
( C ) 2012 ,
Created : 14 Nov 2012 by < >
-module(etracker_db_mgr).
-export([start_link/0, stop/0]).
-define(SERVER, ?MODULE).
start_link() ->
DefaultOpts = {etracker_ets_mgr, [{dir, "etracker_data"},
{dump_interval, 3600},
{ db_type , ets }
... |
0fb6ba48ea2c44f1f4f752e4618f686ba5aa14939bc7e5071664a05b4eec7822 | VinylRecords/Vinyl | Lens.hs | # LANGUAGE TypeApplications #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE UndecidableInstances #
# LANGUAGE FunctionalDependencies #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #... | null | https://raw.githubusercontent.com/VinylRecords/Vinyl/0ed0fa278e96c6036a4eef1ae86bf5f66dabdc62/Data/Vinyl/Lens.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
# LANGUAGE CPP #
# LANGUAGE TypeInType #
| Lenses into record fields.
| The presence of a field in a record is witnessed by a... | # LANGUAGE TypeApplications #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE UndecidableInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE TypeFamilies #
#if __GLASGOW_HASKELL__ < 806
#endif
module... |
775a3440261a2cf1f1b3702ced1707a5f11e605c2712d263540374d7860f029b | K2InformaticsGmbH/egambo | egambo_tictac_win_5_5_4_p.erl | -module(egambo_tictac_win_5_5_4_p).
-export([win/2]).
% generated in egambo_tictac_wip
win(<<P:8, P:8, P:8, P:8, _/binary>>, P) -> true;
win(<<P:8, P:8, P:8, _:8, P:8, _/binary>>, P) -> true;
win(<<P:8, P:8, _:8, P:8, P:8, _/binary>>, P) -> true;
win(<<P:8, _:8, P:8, P:8, P:8, _/binary>>, P) -> true;
win(<<P:8, _:32... | null | https://raw.githubusercontent.com/K2InformaticsGmbH/egambo/e8bdf971f188a2139db52712ab5b9d87b2f11520/src/egambo_tictac_win_5_5_4_p.erl | erlang | generated in egambo_tictac_wip | -module(egambo_tictac_win_5_5_4_p).
-export([win/2]).
win(<<P:8, P:8, P:8, P:8, _/binary>>, P) -> true;
win(<<P:8, P:8, P:8, _:8, P:8, _/binary>>, P) -> true;
win(<<P:8, P:8, _:8, P:8, P:8, _/binary>>, P) -> true;
win(<<P:8, _:8, P:8, P:8, P:8, _/binary>>, P) -> true;
win(<<P:8, _:32, P:8, _:32, P:8, _:32, P:8, _/bi... |
70ba4fbfb5a6d183c3357f12db96c679a5bea919b88de8b9ee771b031e4b0d8b | penpot/penpot | color_selection.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.main.ui.workspace.sidebar.options.menus.color-selection
(:require
[app.common.data :as d]
[app... | null | https://raw.githubusercontent.com/penpot/penpot/7303d311d5f23d515fa3fcdc6cd13cf7f429d1fe/frontend/src/app/main/ui/workspace/sidebar/options/menus/color_selection.cljs | clojure |
Copyright (c) KALEIDOS INC
When dragging on the color picker sometimes all the shapes hasn't updated the color to the prev value so we need this extra calculation | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.main.ui.workspace.sidebar.options.menus.color-selection
(:require
[app.common.data :as d]
[app.common.data.macros :as dm]
[a... |
d8cf3948a6575ed32f0de8a19a69f4b93d77a9a9acf1c044f469afd05cbd847d | malcolmreynolds/GSLL | matrix-product-nonsquare.lisp | Regression test MATRIX - PRODUCT - NONSQUARE for GSLL , automatically generated
(in-package :gsl)
(LISP-UNIT:DEFINE-TEST MATRIX-PRODUCT-NONSQUARE
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST #2A((-1488.7347 959.9901) (774.94495 1312.0566)))
(MULTIPL... | null | https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/tests/matrix-product-nonsquare.lisp | lisp | Regression test MATRIX - PRODUCT - NONSQUARE for GSLL , automatically generated
(in-package :gsl)
(LISP-UNIT:DEFINE-TEST MATRIX-PRODUCT-NONSQUARE
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST #2A((-1488.7347 959.9901) (774.94495 1312.0566)))
(MULTIPL... | |
b700538e163ebc3ddf44dae4d4d84256d922e4a31b82b8cb7170e431ce7e32a7 | ktakashi/sagittarius-scheme | test-ed25519.scm | (define ed25519-signer (make-eddsa-signer ed25519-scheme))
(define ed25519-verifier (make-eddsa-verifier ed25519-scheme))
(define test-ed25519 (make-test-eddsa Ed25519 ed25519-signer ed25519-verifier))
(test-ed25519
#x9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60
#xd75a980182b10ab7d54bfed3c964073... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/d068f29df5fefaf23700c62f7be1a68c08864060/ext/crypto/tests/test-ed25519.scm | scheme | (define ed25519-signer (make-eddsa-signer ed25519-scheme))
(define ed25519-verifier (make-eddsa-verifier ed25519-scheme))
(define test-ed25519 (make-test-eddsa Ed25519 ed25519-signer ed25519-verifier))
(test-ed25519
#x9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60
#xd75a980182b10ab7d54bfed3c964073... | |
7ea0d1d387765c7ac06ee524d80b14a77715d339dfb2c151b581aebb20ecf840 | NetComposer/nksip | path_test_ua2.erl | %% -------------------------------------------------------------------
%%
%% path_test: Path (RFC3327) Tests
%%
Copyright ( c ) 2013 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the Licen... | null | https://raw.githubusercontent.com/NetComposer/nksip/7fbcc66806635dc8ecc5d11c30322e4d1df36f0a/test/callbacks/path_test_ua2.erl | erlang | -------------------------------------------------------------------
path_test: Path (RFC3327) Tests
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
spe... | Copyright ( c ) 2013 . 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
-module(path_test_ua2).
-in... |
6071166dd5dd4ed8ff303c6dabc96013d87a9b05601672af60b3967f8ee155c0 | nebularis/systest | systest_hooks.erl | -*- tab - width : 4;erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% ex: ts=4 sw=4 et
%% ----------------------------------------------------------------------------
%%
Copyright ( c ) 2005 - 2012 Nebularis .
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this ... | null | https://raw.githubusercontent.com/nebularis/systest/fbef181fd0203137f9f6ca6a471c75ca180ec375/src/systest_hooks.erl | erlang | ex: ts=4 sw=4 et
----------------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), deal
to use, copy, modify, merge, publish, distribute, sublicense, and/o... | -*- tab - width : 4;erlang - indent - level : 4;indent - tabs - mode : nil -*-
Copyright ( c ) 2005 - 2012 Nebularis .
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the ... |
81693b160ffad4a72217aafb4137c7b083b88d521619687477102876a56fc9f5 | alexandergunnarson/quantum | core.cljc | (ns
^{:doc "Some useful macros, like de-repetitivizing protocol extensions.
Also some plumbing macros for `for` loops and the like."
:attribution "alexandergunnarson"}
quantum.core.type.core
(:refer-clojure :exclude
[class])
(:require
[quantum.untyped.core.type.core :as u]
[quantum.unt... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/core/type/core.cljc | clojure | (ns
^{:doc "Some useful macros, like de-repetitivizing protocol extensions.
Also some plumbing macros for `for` loops and the like."
:attribution "alexandergunnarson"}
quantum.core.type.core
(:refer-clojure :exclude
[class])
(:require
[quantum.untyped.core.type.core :as u]
[quantum.unt... | |
ccbba041704bbeee2e1f51d7f10d91ace370d078117cb988819a9bf33902dda4 | exoscale/collmann | project.clj | (defproject io.exo/collmann "0.1.0"
:description "riemann events for collectd"
:url ""
:license {:name "MIT"
:url ""}
:aot :all
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/tools.logging "0.2.6"]
[org.collectd/plugin-api "5.4.0"]
... | null | https://raw.githubusercontent.com/exoscale/collmann/e786a6e65b4a446c0f4380152b10f6ec52d20304/project.clj | clojure | (defproject io.exo/collmann "0.1.0"
:description "riemann events for collectd"
:url ""
:license {:name "MIT"
:url ""}
:aot :all
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/tools.logging "0.2.6"]
[org.collectd/plugin-api "5.4.0"]
... | |
9372d9d1d08d66713975f9e030edff4f49b051ca46ad94b1f9ffa135ca849b63 | CRogers/obc | stack.ml |
* Oxford Oberon-2 compiler
* stack.ml
* Copyright ( C ) 1995 , 1998
* Oxford Oberon-2 compiler
* stack.ml
* Copyright (C) J. M. Spivey 1995, 1998
*)
open Icode
open Symtab
open Print
open Dict
let rcsid = "$Id: stack.ml 1678 2011-03-15 20:27:21Z mike $"
We keep a stack of Booleans , eac... | null | https://raw.githubusercontent.com/CRogers/obc/49064db244e0c9d2ec2a83420c8d0ee917b54196/compiler/stack.ml | ocaml | This assumes that a label immediately following an unconditional
branch is the target of some other forward branch. |
* Oxford Oberon-2 compiler
* stack.ml
* Copyright ( C ) 1995 , 1998
* Oxford Oberon-2 compiler
* stack.ml
* Copyright (C) J. M. Spivey 1995, 1998
*)
open Icode
open Symtab
open Print
open Dict
let rcsid = "$Id: stack.ml 1678 2011-03-15 20:27:21Z mike $"
We keep a stack of Booleans , eac... |
77279ed1c3fb1a029880c574010d69eebb9daab941bb9603e650e21c941492a2 | ygrek/mldonkey | donkeyStats.ml | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey 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
... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/networks/donkey/donkeyStats.ml | ocaml | Some opcode for edonkey downloads
opcode = stats
ANONYMISED Informations on the downloads: | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey 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
... |
52a16e23d593585ef2a672cca2ff68b663d4e5abad56ecbf29c23b5e43986091 | TrustInSoft/tis-interpreter | partitioning.ml | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/value/engine/partitioning.ml | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Softwa... |
6af009168c3a3817b67582e91cb571bb03aa36d1f5cc86811873ce631d4fe8a8 | uscensusbureau/citysdk | tests.cljs | (ns test.wmsAPI.tests
(:require
[cljs.core.async :refer [chan close! >! <!]
:refer-macros [go]]
[cljs.test :refer-macros [deftest is run-tests]]
[test.fixtures.core :refer [GG test-async] :as ts]
[census.wmsAPI.core :refer [$g$->wms-cfg
lookup-id->match?
... | null | https://raw.githubusercontent.com/uscensusbureau/citysdk/ae5c1c2d826dec76dfca903d6784750811ec24bc/v2/src/test/wmsAPI/tests.cljs | clojure | don't ask
↓ seq'd inverted geoKeyMap ↓
| (ns test.wmsAPI.tests
(:require
[cljs.core.async :refer [chan close! >! <!]
:refer-macros [go]]
[cljs.test :refer-macros [deftest is run-tests]]
[test.fixtures.core :refer [GG test-async] :as ts]
[census.wmsAPI.core :refer [$g$->wms-cfg
lookup-id->match?
... |
c2bbff10db33b8930c40413b75d99ef5512b5e6567d1fa8397cfa4139e3fc8a5 | rudymatela/speculate | bool.hs | import Test.QuickSpec
main =
quickSpec
[ ["p", "q", "r"] `vars` (undefined :: Bool)
, "False" `fun0` False
, "True" `fun0` True
, "not" `fun1` not
, "&&" `fun2` (&&)
, "||" `fun2` (||)
]
| null | https://raw.githubusercontent.com/rudymatela/speculate/8ec39747d03033db4349d554467d4b78bb72935d/bench/qs1/bool.hs | haskell | import Test.QuickSpec
main =
quickSpec
[ ["p", "q", "r"] `vars` (undefined :: Bool)
, "False" `fun0` False
, "True" `fun0` True
, "not" `fun1` not
, "&&" `fun2` (&&)
, "||" `fun2` (||)
]
| |
14045f246be60ca8787f043f8e80bea0589fd1b5b0b1115c593f05b55d754c73 | agda/agda | Strict.hs | -- | A strict version of the 'Maybe' type.
--
-- Import qualified, as in
-- @
import qualified . Utils . Maybe . Strict as Strict
-- @
module Agda.Utils.Maybe.Strict
( module Data.Strict.Maybe
, module Data.Strict.Classes
, module Agda.Utils.Maybe.Strict
) where
import Prelude hiding (Maybe(..), ... | null | https://raw.githubusercontent.com/agda/agda/5d251d98739480692350221442e48d9f246c83e6/src/full/Agda/Utils/Maybe/Strict.hs | haskell | | A strict version of the 'Maybe' type.
Import qualified, as in
@
@
| Note that strict Maybe is an 'Applicative' only modulo strictness.
The laws only hold in the strict semantics.
Eg. @pure f <*> pure _|_ = _|_@, but according to the laws for
* Collection operations.
| Filtering a singleton list.
... | import qualified . Utils . Maybe . Strict as Strict
module Agda.Utils.Maybe.Strict
( module Data.Strict.Maybe
, module Data.Strict.Classes
, module Agda.Utils.Maybe.Strict
) where
import Prelude hiding (Maybe(..), maybe)
import Data.Strict.Classes
import Data.Strict.Maybe
import Agda.Utils.Null
... |
561aa321513ab8950655456eec55db89dfa31701a5e854ccccbb18c271e00ba0 | mirage/orm | simple.ml | pp camlp4orf
open Printf
type x = {
foo: int;
bar: string
} with
orm
open OUnit
open Test_utils
let name = "simple.db"
let x = { foo = (Random.int 100); bar="hello world" }
let x2 = { foo = (Random.int 100); bar="bye world" }
let test_init () =
ignore(open_db x_init name);
ignore(open_db ~rm:false x_ini... | null | https://raw.githubusercontent.com/mirage/orm/24c2e0e3157853b2328d09feacdbe637e34d354c/lib_test/simple.ml | ocaml | pp camlp4orf
open Printf
type x = {
foo: int;
bar: string
} with
orm
open OUnit
open Test_utils
let name = "simple.db"
let x = { foo = (Random.int 100); bar="hello world" }
let x2 = { foo = (Random.int 100); bar="bye world" }
let test_init () =
ignore(open_db x_init name);
ignore(open_db ~rm:false x_ini... | |
0b8184dd801bbca20b7711db9e58dffe0b0afcb478e319c074c5b1cfdad93346 | ericclack/overtone-loops | rap1.clj | (ns overtone-loops.music.rap1
(:use [overtone.live]
[overtone-loops.loops]
[overtone-loops.samples]))
;; Stop any currently playing music and clear any patterns
(set-up)
;; 1 & 2 & 3 & 4 &
(def ticks (loop-player 1/2 cymbal-closed [7 5 6 5 7 5 _ 3 ]))
(def... | null | https://raw.githubusercontent.com/ericclack/overtone-loops/54b0c230c1e6bd3d378583af982db4e9ae4bda69/src/overtone_loops/music/rap1.clj | clojure | Stop any currently playing music and clear any patterns
1 & 2 & 3 & 4 &
TO DO...
--------------------------------------------- | (ns overtone-loops.music.rap1
(:use [overtone.live]
[overtone-loops.loops]
[overtone-loops.samples]))
(set-up)
(def ticks (loop-player 1/2 cymbal-closed [7 5 6 5 7 5 _ 3 ]))
(def hats (loop-player 1/2 cymbal-pedal [_ _ _ _ _ _ 6 _ ]))
(def kicks (loop-player 1/2 bass-hard [6 6 _ _ 6 _ _... |
080bc0680120c46890399dd3e94af583126ce625ee070700f5e22a8335e1dc4c | disco-lang/disco | Parsing2.hs | Version 1 , 18 Oct 2016
This is just like , but re - exports the general versions of
operators like ( < * > ) and so on from the Prelude , instead of
Parser - specific versions .
# OPTIONS_GHC -fno - warn - missing - signatures #
module Parsing2
* Lexing
TokenParser, makeTokenParser, emptyDef, GenLan... | null | https://raw.githubusercontent.com/disco-lang/disco/68b96b233b04f26229fe6277678eeb8710422523/explore/sub/Parsing2.hs | haskell | * Parsing
----------------------------------------------------------
----------------------------------------------------------
For more, see -3.1.11/docs/Text-Parsec-Token.html
----------------------------------------------------------
Parsing
---------------------------------------------------------- | Version 1 , 18 Oct 2016
This is just like , but re - exports the general versions of
operators like ( < * > ) and so on from the Prelude , instead of
Parser - specific versions .
# OPTIONS_GHC -fno - warn - missing - signatures #
module Parsing2
* Lexing
TokenParser, makeTokenParser, emptyDef, GenLan... |
b819ddd1aabc1a298fcad5d4d8a12bd40ef2157b7455f2e2a92d7b7553c17261 | zippy/anansi | compose.cljs | (ns ss.compose
(:require [clojure.string :as string]
[ss.dom-helpers :as d]
[ss.debug :as debug]
[ss.utils :as u]
[ss.ui :as ui]
[ss.ss-utils :as ssu]
[ss.streamscapes :as sss]
[ss.ceptr :as ceptr]
[ss.state :as s]
... | null | https://raw.githubusercontent.com/zippy/anansi/881aa279e5e7836f3002fc2ef7623f2ee1860c9a/public/ss/src/compose.cljs | clojure | (ns ss.compose
(:require [clojure.string :as string]
[ss.dom-helpers :as d]
[ss.debug :as debug]
[ss.utils :as u]
[ss.ui :as ui]
[ss.ss-utils :as ssu]
[ss.streamscapes :as sss]
[ss.ceptr :as ceptr]
[ss.state :as s]
... | |
7f06de130b2b763f4a9c1d9e6dd5ef90b6de1c401e4b4b477bc9051a9d1ef92c | plumatic/grab-bag | cache_test.clj | (ns plumbing.cache-test
(:use plumbing.core clojure.test plumbing.cache plumbing.test)
(:require
[plumbing.parallel :as parallel]))
(set! *warn-on-reflection* true)
(deftest strong-interner-test
(let [i (strong-interner :key)
v1 {:key 1 :val 10}
v2 {:key 2 :val 20}]
(is (identical? v1 (i ... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/plumbing/test/plumbing/cache_test.clj | clojure | (ns plumbing.cache-test
(:use plumbing.core clojure.test plumbing.cache plumbing.test)
(:require
[plumbing.parallel :as parallel]))
(set! *warn-on-reflection* true)
(deftest strong-interner-test
(let [i (strong-interner :key)
v1 {:key 1 :val 10}
v2 {:key 2 :val 20}]
(is (identical? v1 (i ... | |
dc81adf419936f0e5663a69c4a230f2e273ace017d4127bb4ed6b9dbf750290d | pariyatti/kosa | views.clj | (ns kosa.mobile.today.pali-word.views
(:require [clojure.string :as str]
[hiccup2.core :as h]
[hiccup.form :as f]
[kosa.config :as config]
[kosa.layouts.mobile :as p]
[kosa.views :as v]))
(defn show-index-preview [card]
[:div {:class "card-index-content f... | null | https://raw.githubusercontent.com/pariyatti/kosa/68099ccb830b99a9d0ead81ccfd878ba72020e78/src/kosa/mobile/today/pali_word/views.clj | clojure | TODO: include these fields also
[:div {:class "field"} "<%= form.label :audio_file, "Audio clip to upload:" %>\n <%= form.file_field :audio_file %>"]
TODO: signal errors to user
[:div {:id "error_explanation"}
[:li "<%= message %>"]"<% end %>"]]
; TODO : requires javascript ... | (ns kosa.mobile.today.pali-word.views
(:require [clojure.string :as str]
[hiccup2.core :as h]
[hiccup.form :as f]
[kosa.config :as config]
[kosa.layouts.mobile :as p]
[kosa.views :as v]))
(defn show-index-preview [card]
[:div {:class "card-index-content f... |
95a155976722f20c6d2ca25c19acfd66d9db3481dd520864f83b7ddff7eece72 | Clojure2D/clojure2d-examples | ex38_old_school_xor.clj | (ns ex38-old-school-xor
(:require [clojure2d.core :refer :all]
[fastmath.core :as m]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(def cnvs (canvas 600 600 :mid))
(defn draw-rings
"Draw rings"
[canvas posx posy]
(dotimes [x 17]
(let [si... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/ex38_old_school_xor.clj | clojure | (ns ex38-old-school-xor
(:require [clojure2d.core :refer :all]
[fastmath.core :as m]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(def cnvs (canvas 600 600 :mid))
(defn draw-rings
"Draw rings"
[canvas posx posy]
(dotimes [x 17]
(let [si... | |
b2b8685d866079c45a51e23c469265b7649055b4256605d20d5a10b27aef8e05 | mfikes/fifth-postulate | ns259.cljs | (ns fifth-postulate.ns259)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns259.cljs | clojure | (ns fifth-postulate.ns259)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | |
7c29cc0bb3b168bc40df8d75e9b3b13bf48dd568c35ec273233e96bab85214a9 | byorgey/diagrams-play | Sized.hs | # LANGUAGE NoMonomorphismRestriction #
import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine
d = circle 1 ||| circle 2 ||| circle 3
main = defaultMain (d # sized (Dims 3 3)) | null | https://raw.githubusercontent.com/byorgey/diagrams-play/5362c715db394be6848ff5de1bbe71178e5f173f/Sized.hs | haskell | # LANGUAGE NoMonomorphismRestriction #
import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine
d = circle 1 ||| circle 2 ||| circle 3
main = defaultMain (d # sized (Dims 3 3)) | |
dca431b46eed2227390d797f8dba3971849dc75406735f61e11ce657f3588050 | zellige/hastile | LayerSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module Hastile.Lib.LayerSpec where
import qualified Control.Monad.IO.Class as IOClass
import qualified Data.ByteString.Char8 as ByteString
import qualified Data.LruCache.IO as LRUIO
import qualified Hasql.Pool as Pool
import Test.... | null | https://raw.githubusercontent.com/zellige/hastile/4dabe66bd997e91128ab4136b6f40da51c204a2b/test/Hastile/Lib/LayerSpec.hs | haskell | # LANGUAGE OverloadedStrings # |
module Hastile.Lib.LayerSpec where
import qualified Control.Monad.IO.Class as IOClass
import qualified Data.ByteString.Char8 as ByteString
import qualified Data.LruCache.IO as LRUIO
import qualified Hasql.Pool as Pool
import Test.Hspec (Spec, befo... |
47ffd7d0b3f9994b1aae70834010b9bd6aea1d38ce33096505a890073a773cbb | chunsj/TH | binomial.lisp | (in-package :th)
(defgeneric score/binomial (data p n))
(defgeneric sample/binomial (p nt &optional n))
(defun of-binomial-p (data p n) (and (of-ie data 0 n) (of-it p 0 1) (> n 0)))
(defun lbc (n k)
(let ((n1 ($add n 1))
(k1 ($add k 1))
(nk1 ($add ($sub n k) 1)))
($sub ($lgammaf n1)
(... | null | https://raw.githubusercontent.com/chunsj/TH/890f05ab81148d9fe558be3979c30c303b448480/pd/binomial.lisp | lisp | (in-package :th)
(defgeneric score/binomial (data p n))
(defgeneric sample/binomial (p nt &optional n))
(defun of-binomial-p (data p n) (and (of-ie data 0 n) (of-it p 0 1) (> n 0)))
(defun lbc (n k)
(let ((n1 ($add n 1))
(k1 ($add k 1))
(nk1 ($add ($sub n k) 1)))
($sub ($lgammaf n1)
(... | |
3211eca12005c4ee12400b872ce1057c4bc5c070867645241d77aa1514532aa3 | lambe-lang/nethra | sources.mli | module FromList : functor (Locator : Specs.LOCATOR) ->
Specs.SOURCE with type e = Locator.e and type Construct.c = Locator.e list
module FromChars :
Specs.SOURCE with type e = char and type Construct.c = char list
| null | https://raw.githubusercontent.com/lambe-lang/nethra/d803be8005021b3ee12d45768e90bb95645b226c/lib/nethra/syntax/source/sources.mli | ocaml | module FromList : functor (Locator : Specs.LOCATOR) ->
Specs.SOURCE with type e = Locator.e and type Construct.c = Locator.e list
module FromChars :
Specs.SOURCE with type e = char and type Construct.c = char list
| |
5a12d7f7bcfd9546f8091b9816d4f9eca5607fc8cc3931d97b57ccaf3adee543 | antoniogarrote/clj-s4 | wiring.clj | (ns wordcount.wiring
(:use [clj-s4.wiring]))
(wire-app "WordCountAnalysis"
(wire-pe {:id "sentenceSplitter"
:class "cljs4.SentenceSplitter"
:keys ["Text *"]
:properties
[{:name "model" :value "/Users/antoniogarrote/Development/Projects/s4/clj-s4/sampleapps/wordcount... | null | https://raw.githubusercontent.com/antoniogarrote/clj-s4/5d41b327682a532e4ed4672a139676adbc775714/sampleapps/wordcount/src/wordcount/wiring.clj | clojure | (ns wordcount.wiring
(:use [clj-s4.wiring]))
(wire-app "WordCountAnalysis"
(wire-pe {:id "sentenceSplitter"
:class "cljs4.SentenceSplitter"
:keys ["Text *"]
:properties
[{:name "model" :value "/Users/antoniogarrote/Development/Projects/s4/clj-s4/sampleapps/wordcount... | |
6cece047182171faf2e7f88be9800bbd7e5e55de3d5c161ea6192c89da8f9380 | tezos/tezos-mirror | test_filter_state.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2022 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/b7f14148a61a8afec9bdb3c16de8f197ee6b8cff/src/proto_016_PtMumbai/lib_plugin/test/test_filter_state.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2022 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
925066e90b79f5dd6e197cb8a42be53f6124e4e82df9fd4dd151bf9e094f6d44 | maybevoid/casimir | Decide.hs |
module Casimir.Ops.Decide
where
import Casimir.Base
import Casimir.Free
data DecideEff s
data DecideOps s eff = DecideOps {
decideOp :: eff s
}
data DecideCoOp s a = DecideOp (s -> a)
deriving (Functor)
instance EffOps (DecideEff s) where
type Operation (DecideEff s) = DecideOps s
instance EffCoOp (DecideE... | null | https://raw.githubusercontent.com/maybevoid/casimir/ebbfa403739d6f258e6ac6793549006a0e8bff42/casimir/src/lib/Casimir/Ops/Decide.hs | haskell |
module Casimir.Ops.Decide
where
import Casimir.Base
import Casimir.Free
data DecideEff s
data DecideOps s eff = DecideOps {
decideOp :: eff s
}
data DecideCoOp s a = DecideOp (s -> a)
deriving (Functor)
instance EffOps (DecideEff s) where
type Operation (DecideEff s) = DecideOps s
instance EffCoOp (DecideE... | |
f5acda0ec7582849ddee46a9da465991f242382da290673506763ad6ae7f94ce | crategus/cl-cffi-gtk | gtk.gesture-multi-press.lisp | ;;; ----------------------------------------------------------------------------
;;; gtk.gesture-multi-press.lisp
;;;
;;; The documentation of this file is taken from the GTK 3 Reference Manual
Version 3.24 and modified to document the Lisp binding to the GTK library .
;;; See <>. The API documentation of the Lisp bi... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/7f5a09f78d8004a71efa82794265f2587fff98ab/gtk/gtk.gesture-multi-press.lisp | lisp | ----------------------------------------------------------------------------
gtk.gesture-multi-press.lisp
The documentation of this file is taken from the GTK 3 Reference Manual
See <>. The API documentation of the Lisp binding is
This program is free software: you can redistribute it and/or modify
it under th... | Version 3.24 and modified to document the Lisp binding to the GTK library .
available from < -cffi-gtk/ > .
Copyright ( C ) 2019 - 2021
as published by the Free Software Foundation , either version 3 of the
the GNU Lesser General Public License that clarifies the terms for use
GNU Lesser General Public Li... |
5f25077c793925c96d1efe2c2fe2938c5651112db72b9b982eacbcf128502128 | avsm/platform | opamDarcs.ml | (**************************************************************************)
(* *)
Copyright 2012 - 2015 OCamlPro
Copyright 2012 INRIA
(* ... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/opam-client.2.0.5%2Bdune/src/repository/opamDarcs.ml | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2012 - 2015 OCamlPro
Copyright 2012 INRIA
GNU Lesser General Public License version 2.1 , with the special
open OpamFilename.Op
open OpamProcess.Job.Op
module VCS = struct
let name = `darcs
let ... |
f4500ec54f1140a0d6af5b147c0e26d73d5e99d52ef951a3808aebf12d639748 | racket/typed-racket | float.rkt | #lang racket/base
(require syntax/parse racket/sequence racket/flonum racket/promise
syntax/parse/experimental/specialize
syntax/id-table
(for-template racket/base racket/flonum racket/unsafe/ops racket/math)
"../utils/utils.rkt"
"../utils/tc-utils.rkt"
"../types/n... | null | https://raw.githubusercontent.com/racket/typed-racket/6ea20bec8d41e1a188d7f831c35423293a89c98e/typed-racket-lib/typed-racket/optimizer/float.rkt | racket | unlike binary-float-ops
if the result of an operation is of type float, its non float arguments
can be promoted, and we can use unsafe float operations
note: none of the unary operations have types where non-float arguments
can result in float (as opposed to real) results
we can convert literals right away
real... | #lang racket/base
(require syntax/parse racket/sequence racket/flonum racket/promise
syntax/parse/experimental/specialize
syntax/id-table
(for-template racket/base racket/flonum racket/unsafe/ops racket/math)
"../utils/utils.rkt"
"../utils/tc-utils.rkt"
"../types/n... |
6766369fd81b94b984237d85c4a4db69b1006a3538841946970ab445e441609d | vans163/stargate | stargate_sup.erl | -module(stargate_sup).
-behaviour(supervisor).
-compile(export_all).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
Spec = {
stargate_child_gen, {stargate_child_gen, start_link, []},
permanent, 5000, worker, [stargate_child_gen]
},
{ok,
... | null | https://raw.githubusercontent.com/vans163/stargate/0860dc5f8901dcb51db25224d35885ed6e0f5ff3/src/app/stargate_sup.erl | erlang | -module(stargate_sup).
-behaviour(supervisor).
-compile(export_all).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
Spec = {
stargate_child_gen, {stargate_child_gen, start_link, []},
permanent, 5000, worker, [stargate_child_gen]
},
{ok,
... | |
465ac0921b36732fc8c4a726fbeff7c9831a00969e4a514edb0b6e389b5cf384 | ghcjs/ghcjs-dom | Document.hs | # LANGUAGE CPP #
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ConstraintKinds #-}
module GHCJS.DOM.Document (
module Export
, createElement
, createElement_
, createElementNS
, createElementNS_
) where
#ifdef GHCJS_DOM_DEBUG
import Control.Monad (void)
import Control.Mon... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom/src/GHCJS/DOM/Document.hs | haskell | # LANGUAGE PackageImports #
# LANGUAGE OverloadedStrings #
# LANGUAGE ConstraintKinds # | # LANGUAGE CPP #
module GHCJS.DOM.Document (
module Export
, createElement
, createElement_
, createElementNS
, createElementNS_
) where
#ifdef GHCJS_DOM_DEBUG
import Control.Monad (void)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Data.IORef (atomicModifyIORef', IORef, newIORef, readIORef)
imp... |
ce10db1e588dafc372e88565dea0b38c4db9990a2db02350263c9173bb833994 | niquola/reframe-template | core.cljs | (ns ui.coverage.core
(:require-macros [reagent.ratom :refer [reaction]])
(:require [reagent.core :as reagent]
[re-frame.core :as rf]
[ui.routes :refer [href]]
[ui.widgets :as wgt]
[ui.widgets.lookup :as lookup]
[ui.styles :as styles]
[clojure.s... | null | https://raw.githubusercontent.com/niquola/reframe-template/6482afabc1967d2b6cb39ddc3fc0158075535700/srcs/ui/coverage/core.cljs | clojure | [:div.form-group
[form/submit-btn save-fn "Save"]
" " | (ns ui.coverage.core
(:require-macros [reagent.ratom :refer [reaction]])
(:require [reagent.core :as reagent]
[re-frame.core :as rf]
[ui.routes :refer [href]]
[ui.widgets :as wgt]
[ui.widgets.lookup :as lookup]
[ui.styles :as styles]
[clojure.s... |
7c4d31fbde52f14bb73f8c30646cc3d70138d58ed0fb719ac02f0990bd7203eb | flavioc/cl-hurd | port.lisp |
(in-package :hurd)
;;
;; This file implements a port abstraction like port_info from libports.
;; A port-info has send count and a receive right, we can also get new rights from it.
;;
(defclass port-info ()
((right :initform (port-allocate :right-receive)
:accessor port-right
:documentation "... | null | https://raw.githubusercontent.com/flavioc/cl-hurd/982232f47d1a0ff4df5fde2edad03b9df871470a/hurd/ports/port.lisp | lisp |
This file implements a port abstraction like port_info from libports.
A port-info has send count and a receive right, we can also get new rights from it.
|
(in-package :hurd)
(defclass port-info ()
((right :initform (port-allocate :right-receive)
:accessor port-right
:documentation "Right for this port")
(mscount :initform 0
:accessor mscount
:documentation "Send rights count")))
(defmethod deallocate-send-right ((port ... |
ac23fd548974748d5ff594d99d55e021e83e9a105ec13c874c82edc01da8d53d | pNre/Hera | dispatcher.ml | open Core
let modules =
[ (module Module_dictionary : Bot.Module)
; (module Module_markets : Bot.Module)
; (module Module_feeds : Bot.Module)
; (module Module_air_quality : Bot.Module)
; (module Module_morejpeg : Bot.Module)
; (module Module_preferences : Bot.Module)
; (module Module_faces : Bot.Module)
... | null | https://raw.githubusercontent.com/pNre/Hera/f3928380eb94a61637f0459818f9cec650ee8220/hera/dispatcher.ml | ocaml | open Core
let modules =
[ (module Module_dictionary : Bot.Module)
; (module Module_markets : Bot.Module)
; (module Module_feeds : Bot.Module)
; (module Module_air_quality : Bot.Module)
; (module Module_morejpeg : Bot.Module)
; (module Module_preferences : Bot.Module)
; (module Module_faces : Bot.Module)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.