_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 |
|---|---|---|---|---|---|---|---|---|
4e40de1f88b6881e4fbc8f596c590d15f17c260c4bafba09d4f46c444eec4f01 | mcorbin/meuse | user_test.clj | (ns meuse.db.actions.user-test
(:require [meuse.auth.password :as password]
[meuse.db :refer [database]]
[meuse.db.actions.user :refer :all]
[meuse.db.actions.crate :as crate-db]
[meuse.db.actions.role :as role-db]
[meuse.db.actions.token :as token-db]
... | null | https://raw.githubusercontent.com/mcorbin/meuse/d2b74543fce37c8cde770ae6f6097cabb509a804/test/meuse/db/actions/user_test.clj | clojure | name not updated | (ns meuse.db.actions.user-test
(:require [meuse.auth.password :as password]
[meuse.db :refer [database]]
[meuse.db.actions.user :refer :all]
[meuse.db.actions.crate :as crate-db]
[meuse.db.actions.role :as role-db]
[meuse.db.actions.token :as token-db]
... |
475a8639db5ac7d1283b11ec971092a191316c5f6ad777230739fcca523a20f4 | objectionary/try-phi | EOParser.hs | {-# LANGUAGE RankNTypes #-}
module EOParser
( module EOParser,
module A,
module PrettyPrintTerm,
module PrettyPrintTree,
module TT,
pack
)
where
import Data.Text (Text, pack)
import EnumerateNodes (getIndexedProgram)
import ParseEO as A (THeadTerminal (..), TProgram, tProgram)
import PrettyPr... | null | https://raw.githubusercontent.com/objectionary/try-phi/9eb9879c46decc4eb1e6f34beaa6a2736224b649/back/language-utils/eo-utils/src/EOParser.hs | haskell | # LANGUAGE RankNTypes #
parseCSTProgram :: Text -> Either (ParseErrorBundle Text) TProgram | module EOParser
( module EOParser,
module A,
module PrettyPrintTerm,
module PrettyPrintTree,
module TT,
pack
)
where
import Data.Text (Text, pack)
import EnumerateNodes (getIndexedProgram)
import ParseEO as A (THeadTerminal (..), TProgram, tProgram)
import PrettyPrintTerm (pprintTermProgram)
... |
ecdf7f17e5e63b1d6228009d2fc54bf9e488cf380a7e61701ba56bc652f138e7 | TomerAberbach/programming-in-haskell-exercises | 5-and-6.hs | data Expr = Val Int | Add Expr Expr
folde :: (Int -> a) -> (a -> a -> a) -> Expr -> a
folde f _ (Val n) = f n
folde f g (Add l r) = g (folde f g l) (folde f g r)
eval :: Expr -> Int
eval e = folde id (+) e
size :: Expr -> Int
size e = folde (const 1) (+) e
| null | https://raw.githubusercontent.com/TomerAberbach/programming-in-haskell-exercises/a66830529ebc9c4d84d0e4c6e0ad58041b46bc32/parts/1/chapters/8/5-and-6.hs | haskell | data Expr = Val Int | Add Expr Expr
folde :: (Int -> a) -> (a -> a -> a) -> Expr -> a
folde f _ (Val n) = f n
folde f g (Add l r) = g (folde f g l) (folde f g r)
eval :: Expr -> Int
eval e = folde id (+) e
size :: Expr -> Int
size e = folde (const 1) (+) e
| |
8656fd3e11a0a943188d4b0536c9256145e251e50db6122827ca5831d44e4836 | ghc/packages-Cabal | setup.test.hs | import Test.Cabal.Prelude
-- This is a control on ../TargetSpecificDeps1/setup.test.hs; it should
-- succeed.
main = setupAndCabalTest $ setup_build []
| null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/BuildDeps/TargetSpecificDeps2/setup.test.hs | haskell | This is a control on ../TargetSpecificDeps1/setup.test.hs; it should
succeed. | import Test.Cabal.Prelude
main = setupAndCabalTest $ setup_build []
|
e58228855d260ee6a18971de63d8ad4bccb2e2af8dc1183e273fe6a07cd9a194 | lindig/lua-ml | luacamllib.ml | module IO = Luaiolib
module Make (T : Lua.Lib.TYPEVIEW with type 'a t = 'a Luaiolib.t)
: Lua.Lib.USERCODE with type 'a userdata' = 'a T.combined =
struct
type 'a userdata' = 'a T.combined
module M (C : Lua.Lib.CORE with type 'a V.userdata' = 'a userdata') =
struct
module V = C.V
let ( *... | null | https://raw.githubusercontent.com/lindig/lua-ml/f79726b92f2822994207a83dbfed7ab140804de2/src/luacamllib.ml | ocaml | M
Make | module IO = Luaiolib
module Make (T : Lua.Lib.TYPEVIEW with type 'a t = 'a Luaiolib.t)
: Lua.Lib.USERCODE with type 'a userdata' = 'a T.combined =
struct
type 'a userdata' = 'a T.combined
module M (C : Lua.Lib.CORE with type 'a V.userdata' = 'a userdata') =
struct
module V = C.V
let ( *... |
55b239c6ae9df3a9f3f78ee3cb7b05f9add1cb2c0e7823cc9dc7ed6bc091887b | frenetic-lang/netkat-automata | Frenetic_Decide_Ast.ml | open Core.Std
open Sexplib.Conv
open Frenetic_Decide_Util
module FieldMap = Map.Make(Field)
type packet = Value.t FieldMap.t with sexp,compare
type point = packet * packet with sexp, compare
module PacketSet = Set.Make (struct
type t = packet with sexp, compare
end)
let packet_to_string pkt = Printf.sprintf "[%s]... | null | https://raw.githubusercontent.com/frenetic-lang/netkat-automata/a4c3809e40e7c2ce500182043a74131ac9c19579/src/Frenetic_Decide_Ast.ml | ocaml | TODO: Copy fixpoint code from Frenetic
type t = TermBase.term with sexp, compare
let hash = Hashtbl.hash
end)
Collect the possible values of each variable | open Core.Std
open Sexplib.Conv
open Frenetic_Decide_Util
module FieldMap = Map.Make(Field)
type packet = Value.t FieldMap.t with sexp,compare
type point = packet * packet with sexp, compare
module PacketSet = Set.Make (struct
type t = packet with sexp, compare
end)
let packet_to_string pkt = Printf.sprintf "[%s]... |
813ebaa097a7030e395c4109e3a9a4de86972c1c89e1d4d1b05ab4e4b8803faf | AndrasKovacs/cubeval | Conversion.hs |
module Conversion where
import Common
import CoreTypes
import Core
import Interval
import Substitution
----------------------------------------------------------------------------------------------------
class Conv a where
conv :: NCofArg => DomArg => a -> a -> Bool
instance Conv Val where
conv t t' = case (,)... | null | https://raw.githubusercontent.com/AndrasKovacs/cubeval/27375c795447e132a7099cf20e06cc7ea858a6da/src/Conversion.hs | haskell | --------------------------------------------------------------------------------------------------
rigid match
This is useful for testing elaboration, where it's annoying to fail on
course it can be unsound.
eta |
module Conversion where
import Common
import CoreTypes
import Core
import Interval
import Substitution
class Conv a where
conv :: NCofArg => DomArg => a -> a -> Bool
instance Conv Val where
conv t t' = case (,) $$! unF (frc t) $$! unF (frc t') of
(VNe n _ , VNe n' _ ) -> conv n n'
(VGl... |
a35c4f9c4e70fb4a4e2715cbc9079823ace0735f3584deb7b2fb8cbee53a2b1f | vmchale/dickinson | Eval.hs | {-# LANGUAGE OverloadedStrings #-}
module Eval ( evalTests
) where
import Control.Monad ((<=<))
import qualified Data.Text as T
import Language.Dickinson.File
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit ... | null | https://raw.githubusercontent.com/vmchale/dickinson/5b7d9d48bdb2aa902cddc0161dca3a6e7f3e0aea/test/Eval.hs | haskell | # LANGUAGE OverloadedStrings # |
module Eval ( evalTests
) where
import Control.Monad ((<=<))
import qualified Data.Text as T
import Language.Dickinson.File
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit (Assertion, testCase, (@?=))
eval... |
d01ef3f750b8191214eda61662c41dc5a2d422a098239e9414dd76b552b0dd35 | rowangithub/DOrder | term3.ml | let rec loop x y =
if x < 100 then
loop (x+y) y
else x, y
let main x y =
let x, y =
if (y > 0) then
loop x y
else x, y in
assert (y<=0 || (y>0 && x>=100))
let _ = main 2 2
let _ = main (-2) (-2) | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/icfp/term3.ml | ocaml | let rec loop x y =
if x < 100 then
loop (x+y) y
else x, y
let main x y =
let x, y =
if (y > 0) then
loop x y
else x, y in
assert (y<=0 || (y>0 && x>=100))
let _ = main 2 2
let _ = main (-2) (-2) | |
22576b92c6acdf97671fb6ee026e108c4962086330b1a7650594238dd675d328 | janestreet/bonsai | ansi_table_tests.ml | open! Core
open! Bonsai_web
open! Bonsai_web_test
open! Incr_map_collate
open! Bonsai.Let_syntax
open Shared
module Table = Bonsai_web_ui_partial_render_table
let table_to_string
~include_stats
?(include_num_column = true)
?(selected_header = ">")
?num_filtered_rows
(res : _ Table.Focus_b... | null | https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/web_ui/partial_render_table/test/ansi_table_tests.ml | ocaml | Because the component uses edge-triggering to propagate rank-range, we need to
run the view-computers twice.
just make sure nothing weird happens
See that focus_down with the default rank_range works as intended
After setting the [rank_range], focus down no longer focuses an item
notice that visual sele... | open! Core
open! Bonsai_web
open! Bonsai_web_test
open! Incr_map_collate
open! Bonsai.Let_syntax
open Shared
module Table = Bonsai_web_ui_partial_render_table
let table_to_string
~include_stats
?(include_num_column = true)
?(selected_header = ">")
?num_filtered_rows
(res : _ Table.Focus_b... |
52ae434bb41d2cd057438bf38a815bdd19053df4cf7d44ae2a300cb2b4ccfc11 | mirage/mirage-tcpip | options.mli |
* Copyright ( c ) 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 PROVIDED " AS... | null | https://raw.githubusercontent.com/mirage/mirage-tcpip/edb9e7d20f53d1b54ba97ee36d793b334d5a31e4/src/tcp/options.mli | ocaml | * TCP options parsing
how many bytes are required to marshal this list |
* Copyright ( c ) 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 PROVIDED " AS... |
4084d33aaf9ebb9744a60a363a3e98eff47d0706fbf2cd703f451a048f604101 | borkdude/fly_io_clojure | app.clj | (ns acme.app
(:require [hiccup2.core :refer [html]]
[org.httpkit.server :as server])
(:gen-class))
(def port (or (some-> (System/getenv "PORT")
parse-long)
8090))
(defn -main [& _args]
(server/run-server
(fn [_req]
{:body
(str (html
[:htm... | null | https://raw.githubusercontent.com/borkdude/fly_io_clojure/ce887b514e7926b58667e8d618a5f62ade4fb0e5/src/acme/app.clj | clojure | (ns acme.app
(:require [hiccup2.core :refer [html]]
[org.httpkit.server :as server])
(:gen-class))
(def port (or (some-> (System/getenv "PORT")
parse-long)
8090))
(defn -main [& _args]
(server/run-server
(fn [_req]
{:body
(str (html
[:htm... | |
1fd79fb27c558b06f5b8ac732811adad7eb69749dc55d62477e98a26b78f1804 | namin/lambdajam | factorial-sol.scm | (load "test-check.scm")
(load "pmatch.scm")
(load "sugar.scm")
(define (factorial-tests factorial)
(eg (factorial 6) 720))
(let ()
(define factorial
(lambda (n)
(if (= n 0) 1
(* n (factorial (- n 1))))))
(factorial-tests factorial))
CPS
(let ()
(define factorial-cps
(lambda (n k)
... | null | https://raw.githubusercontent.com/namin/lambdajam/58824eeccc15b11f09a02db5a3e3660fbdfe9c3d/factorial-sol.scm | scheme | Trampoline
First-Order Representation for Continuations
(,k (procedure? k) (k v))
Registerization of factorial-cps
Full registration | (load "test-check.scm")
(load "pmatch.scm")
(load "sugar.scm")
(define (factorial-tests factorial)
(eg (factorial 6) 720))
(let ()
(define factorial
(lambda (n)
(if (= n 0) 1
(* n (factorial (- n 1))))))
(factorial-tests factorial))
CPS
(let ()
(define factorial-cps
(lambda (n k)
... |
b147f1ea21d4efd6424410ea5951355fb5b0edede25bb5da6b35b7a6c586aad4 | jkoppel/ecta | Term.hs | module Data.ECTA.Term (
Symbol(Symbol)
, Term(..)
) where
import Data.ECTA.Internal.Term | null | https://raw.githubusercontent.com/jkoppel/ecta/865cf95fea1c875c2732991db6415d963c5d6189/src/Data/ECTA/Term.hs | haskell | module Data.ECTA.Term (
Symbol(Symbol)
, Term(..)
) where
import Data.ECTA.Internal.Term | |
b8525f257a8665271668dca3d4a2026bd33ed24bed2e2a7634b8eace902867d4 | wiredsister/OpenTransplant | distance.ml |
open Cohttp_lwt_unix
open Lwt.Infix
open Yojson.Basic
open Yojson.Basic.Util
module Location = struct
type t =
{
latitude : float;
longitude : float;
name : string;
zipcode : string;
}
end
module GeoLocationClient = struct
exception GeoLocationC... | null | https://raw.githubusercontent.com/wiredsister/OpenTransplant/d7b37038361c3c350363041448478fc8327aeda8/opentransplant/OpenTransplant/lib/distance.ml | ocaml | * Construct URI for talking to open map data for location information over HTTPS
* Make HTTP Request and return location data in promise value
* Construct URI for talking to a to b open map tool over HTTPS
* Parse distance value from JSON response
* Make HTTP Request and return distance result in miles in promise v... |
open Cohttp_lwt_unix
open Lwt.Infix
open Yojson.Basic
open Yojson.Basic.Util
module Location = struct
type t =
{
latitude : float;
longitude : float;
name : string;
zipcode : string;
}
end
module GeoLocationClient = struct
exception GeoLocationC... |
ebbecb7e5fd5cceb723023080ac35e0a719e4d48df4bdf7995b98416a945c1de | 8c6794b6/guile-tjit | mapping.scm | ;;; installed-scm-file
Copyright ( C ) 1996 , 2001 , 2006 , 2013 Free Software Foundation , Inc.
;;;;
;;;; 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... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/ice-9/mapping.scm | scheme | installed-scm-file
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PA... |
Copyright ( C ) 1996 , 2001 , 2006 , 2013 Free Software Foundation , Inc.
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA
(define-module (ice-9 mapp... |
d187aeed18659da7127cf286e1da3d4bfdce0e42931555e1ce7e660337e85b62 | johnwhitington/graphicspdf | graphicspdftest.ml | (* Graphicspdf Test *)
module Graphics = Graphicspdf
let _ =
Graphics.open_pdf "graph.pdf";
Graphics.open_graph " 1280x1024";
Graphics.set_window_title "My OCaml Document";
Printf.printf "size is %i by %i\n" (Graphics.size_x ()) (Graphics.size_y ());
Graphics.moveto 200 200;
Graphics.rmoveto 20 20;
Graph... | null | https://raw.githubusercontent.com/johnwhitington/graphicspdf/50e18fe97c013c774b845a6344a7265462e05de0/examples/graphicspdftest.ml | ocaml | Graphicspdf Test | module Graphics = Graphicspdf
let _ =
Graphics.open_pdf "graph.pdf";
Graphics.open_graph " 1280x1024";
Graphics.set_window_title "My OCaml Document";
Printf.printf "size is %i by %i\n" (Graphics.size_x ()) (Graphics.size_y ());
Graphics.moveto 200 200;
Graphics.rmoveto 20 20;
Graphics.set_line_width 2;
... |
8ba227bba36c20c74eb1225f8c22eb29c4df066145568cfad4103cd166c8a583 | xapi-project/xen-api | varstore_deprivileged_cli.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/xapi-project/xen-api/8d17b53bc236e23aa1ec455137773f7367665d83/ocaml/xapi-idl/varstore/deprivileged/varstore_deprivileged_cli.ml | ocaml |
* 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... | |
19effb2a0b0e49420e74623090d8b10b4b67bc9e53cc34e543728ef622e0cd98 | batterseapower/test-framework | Table.hs | module Test.Framework.Runners.Console.Table (
Cell(..), Column(..), renderTable
) where
import Test.Framework.Utilities
import Text.PrettyPrint.ANSI.Leijen hiding (column)
data Cell = TextCell Doc
| SeperatorCell
data Column = Column [Cell]
| SeperatorColumn
type ColumnWidth = In... | null | https://raw.githubusercontent.com/batterseapower/test-framework/eefad382c3377d734aa3f0df4f84e4077b8362d6/core/Test/Framework/Runners/Console/Table.hs | haskell | module Test.Framework.Runners.Console.Table (
Cell(..), Column(..), renderTable
) where
import Test.Framework.Utilities
import Text.PrettyPrint.ANSI.Leijen hiding (column)
data Cell = TextCell Doc
| SeperatorCell
data Column = Column [Cell]
| SeperatorColumn
type ColumnWidth = In... | |
3267281c39ad87feab1d3093383b389563ff60cca2420dd048ed78bf31011fd1 | jscl-project/jscl | std-method.lisp | -*- mode : lisp ; coding : utf-8 -*-
DEFMETHOD
Original code closette.lisp , lines 919 - 1316
Modification for JSCL @vlad - km , 2019
;;;
JSCL compilation mode - : both
;;;
;;; Release note
;;; - The names of some functions have been changed from !name to !name, to prevent naming conflicts
when host co... | null | https://raw.githubusercontent.com/jscl-project/jscl/98376589572908d26c33ad536228abd6672a1dfd/src/clos/std-method.lisp | lisp | coding : utf-8 -*-
Release note
- The names of some functions have been changed from !name to !name, to prevent naming conflicts
So, added setf-... functions
- all modification marked with tag @vlad-km
Several tedious functions for analyzing lambda lists
Just the keywords
Just the variable names
Variable ... |
DEFMETHOD
Original code closette.lisp , lines 919 - 1316
Modification for JSCL @vlad - km , 2019
JSCL compilation mode - : both
when host compiling . See FSET section from macros.lisp for full list .
- Some forms ( setf ... ) have been replaced by ( setf- ... ) .
- In some places the argument lists w... |
c5200d61d463c4539d6fb3c9af7889a15cb09674b98a07248b13f91b27072587 | tsloughter/rebar3_tests | jiffytest.erl | -module('jiffytest').
%% API exports
-export([]).
%%====================================================================
%% API functions
%%====================================================================
%%====================================================================
Internal functions
%%=============... | null | https://raw.githubusercontent.com/tsloughter/rebar3_tests/090bfef7d3a4790bb6b16e4c38df6e4c0460b4b2/jiffytest/src/jiffytest.erl | erlang | API exports
====================================================================
API functions
====================================================================
====================================================================
==================================================================== | -module('jiffytest').
-export([]).
Internal functions
|
890e21374e933a1af26fe5505348bce66e0abfadc8d4b381f7b231ff1bb72b53 | vernemq/vernemq | vmq_webhooks_app.erl | Copyright 2018 Erlio GmbH Basel Switzerland ( )
%%
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, sof... | null | https://raw.githubusercontent.com/vernemq/vernemq/eb1a262035af47e90d9edf07f36c1b1503557c1f/apps/vmq_webhooks/src/vmq_webhooks_app.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 2018 Erlio GmbH Basel Switzerland ( )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(vmq_webhooks_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
vmq... |
62c8a7a1e9f996dd795045faa635426f226772f7c8ea5d28d071a0c42378a504 | haskell-opengl/OpenGLRaw | StaticData.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.IBM.StaticData
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
---------------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/IBM/StaticData.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.IBM.StaticData
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enums
* Functions | # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.IBM.StaticData (
glGetIBMStaticData,
gl_IBM_static_data,
pattern GL_ALL_STATIC_DATA_IBM,
pattern GL_STATIC_VERTEX_ARRAY_IBM,
glFlushStaticDataIBM
) where
import Graphics.GL.ExtensionPredicates
import Gr... |
a22f4338745e89bbd7e9a07d0bf79b74162607babefebaba2c4a3b01db797411 | capnproto/capnp-ocaml | defaults.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* capnp - ocaml
*
* Copyright ( c ) 2013 - 2014 ,
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without ... | null | https://raw.githubusercontent.com/capnproto/capnp-ocaml/dda3d811aa7734110d7af051465011f1f823ffb9/src/compiler/defaults.mli | ocaml | * [create ()] constructs a new, empty instance for recording default values.
* [add_struct defaults ident s] adds a deep copy of struct [s] to the
defaults message, making it accessible under the specified identifier.
* [make_ident id field_name] constructs an identifier for the default value
associated with ... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* capnp - ocaml
*
* Copyright ( c ) 2013 - 2014 ,
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without ... |
aa36964ffff7ebfffc31c3f821313eda9c9f311024718e8622d719e8bbbb8b55 | blockmason/lndr | PushData.hs | {-# LANGUAGE OverloadedStrings #-}
module Lndr.Db.PushData where
import Data.Maybe (listToMaybe)
import Data.Text (Text)
import Database.PostgreSQL.Simple
import Lndr.Db.Types
import Lndr.Types
import Network.Ethereum.Web3
insertPushDatum :: Address -> Text... | null | https://raw.githubusercontent.com/blockmason/lndr/58fe5f82d5d057e463be23821454e3a0515ef9b9/lndr-backend/src/Lndr/Db/PushData.hs | haskell | # LANGUAGE OverloadedStrings # |
module Lndr.Db.PushData where
import Data.Maybe (listToMaybe)
import Data.Text (Text)
import Database.PostgreSQL.Simple
import Lndr.Db.Types
import Lndr.Types
import Network.Ethereum.Web3
insertPushDatum :: Address -> Text -> Text -> Connection -> IO Int
in... |
ae60e3d0a74a31e2c0d72df857633753bda67f84dfbe35db958f623ac6068dfb | byron-network/byron-dex | UseCases.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE NumericUnderscores #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
# OPTIONS_GHC -Wno - orphans #
module Spec.UseCases (main, tests) where
import Control.Monad.Freer.Extras as Extras
import Data.Default
import qualified Data... | null | https://raw.githubusercontent.com/byron-network/byron-dex/e8d541deb106e14142183f18844bb328c5cfbd40/dex/test/Spec/UseCases.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE OverloadedStrings #
W1 is a performer
W1 is a performer
W1 is a performer
W2 meets fitting offer from W1
W2 meets fitting offer from W1
W1 is a performer
W2 meets fitting offer from W1
W2 meets fitting offer from W1
script holds 404ee
W2 meets fitting offer from W1
... | # LANGUAGE NumericUnderscores #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -Wno - orphans #
module Spec.UseCases (main, tests) where
import Control.Monad.Freer.Extras as Extras
import Data.Default
import qualified Data.Map as Map
import Plutus.Trace.Emulator ... |
8c5d40ba9a530d3a77fe40696afc8eae4a249bebdfaefb8bca8f01a01b703d65 | processone/rtb | mod_mqtt.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2002 - 2019 ProcessOne , SARL . All Rights Reserved .
%%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%% you may not use this file except in compliance with the License.
%%% You may obtain a cop... | null | https://raw.githubusercontent.com/processone/rtb/ede10174af8e135bc78df11ad7c68d242e6e6534/src/mod_mqtt.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 o... | @author < >
( C ) 2002 - 2019 ProcessOne , SARL . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(mod_mqtt).
-compile([{parse_transform, lager_transform}]).
-behaviour(p1_fsm).
-behaviour... |
7b48dd4cbfb225fcde65b6b43c73ad5f0e786657a05250fa76f36aff4fad880a | samcoy3/advent-of-code-template | Color.hs | module Program.Color where
import System.Console.ANSI
withColor :: Color -> IO a -> IO a
withColor col action = do
setSGR [SetColor Foreground Vivid col]
res <- action
setSGR [SetDefaultColor Foreground]
return res
| null | https://raw.githubusercontent.com/samcoy3/advent-of-code-template/ddc27cfd7ca36d6ebf0df2a2297347d02ee0f1a6/src/Program/Color.hs | haskell | module Program.Color where
import System.Console.ANSI
withColor :: Color -> IO a -> IO a
withColor col action = do
setSGR [SetColor Foreground Vivid col]
res <- action
setSGR [SetDefaultColor Foreground]
return res
| |
c7e0452c7809a5839e577c006dac6b4e4854f5f753d5fd0b8ff249448884cbd7 | kit-ty-kate/visitors | expr_import.ml | type expr =
[%import: Expr.expr]
[@@deriving visitors { variety = "iter" }]
| null | https://raw.githubusercontent.com/kit-ty-kate/visitors/fc53cc486178781e0b1e581eced98e07facb7d29/test/expr_import.ml | ocaml | type expr =
[%import: Expr.expr]
[@@deriving visitors { variety = "iter" }]
| |
10a32b959d5af63354ed2f9c582fd759c1ce1dbf68066c47c69f957802805b96 | astrada/ocaml-extjs | ext_util_Format.mli | * This class is a centralized place for formatting f ...
{ % < p > This class is a centralized place for formatting functions . It includes
functions to format various different types of data , such as text , dates and numeric >
< h2 > >
< p > This class contains several options for localization . Thes... | null | https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/ext_util_Format.mli | ocaml | * {% <p>Formats an object of name value properties as HTML element attribute values suitable for using when creating textual markup.</p> %}
{b Parameters}:
{ul {- attributes: [_ Js.t]
{% <p>An object containing the HTML attributes as properties eg: <code>\{height:40, vAlign:'top'\}</code></p> %}
}
... | * This class is a centralized place for formatting f ...
{ % < p > This class is a centralized place for formatting functions . It includes
functions to format various different types of data , such as text , dates and numeric >
< h2 > >
< p > This class contains several options for localization . Thes... |
4626bb710d64fd25ec440ea2fb6b5c44c3537d47fea109b2aca7dc867fd5c57a | codinuum/cca | spec_base.ml |
Copyright 2012 - 2020 Codinuum Software Lab < >
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 wri... | null | https://raw.githubusercontent.com/codinuum/cca/c22bbe5b4d8824695a5844b23309a8652d371e70/src/ast/analyzing/common/spec_base.ml | ocaml |
label
label and digest
label and _digest (subtree)
for delta
of class type node_data_t_shared
of class type tree_t_shared |
Copyright 2012 - 2020 Codinuum Software Lab < >
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 wri... |
af7f64237423f16f5075909cb8ea49541d73e3b71a630bb44c563fd45faa93a2 | patricoferris/ocaml-multicore-monorepo | eml.ml | This file is part of Dream , released under the MIT license . See LICENSE.md
for details , or visit .
Copyright 2021
for details, or visit .
Copyright 2021 Anton Bachin *)
(* Location handling is done by updating a reference with the location of the
last character read. This is pretty fragi... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/dream/src/eml/eml.ml | ocaml | Location handling is done by updating a reference with the location of the
last character read. This is pretty fragile, and depends on the tokenizer
never looking so far forward as to invalidate the locations that it cares
about. Locations are 0-based.
We need to retain the locations of code tokens, so we c... | This file is part of Dream , released under the MIT license . See LICENSE.md
for details , or visit .
Copyright 2021
for details, or visit .
Copyright 2021 Anton Bachin *)
module Location :
sig
val current : unit -> int * int
val adjust : int -> unit
val reset : unit -> unit
val stream... |
824d4b4e584dee01a73c7999150898117dcf70d8fb08326bb946132c531676d2 | chetmurthy/poly-protobuf | clexer.ml | (* camlp5r *)
(* plexer.ml,v *)
Copyright ( c ) INRIA 2007 - 2017
#load "pa_lexer.cmo";
open Versdep;
value simplest_raw_strings = ref False ;
value no_quotations = ref False;
value error_on_unknown_keywords = ref False;
value dollar_for_antiquotation = ref True;
value specific_space_dot = ref False;
value force... | null | https://raw.githubusercontent.com/chetmurthy/poly-protobuf/1f80774af6472fa30ee2fb10d0ef91905a13a144/clexer.ml | ocaml | camlp5r
plexer.ml,v
let hex_float_literal =
'0' ['x' 'X']
['0'-'9' 'A'-'F' 'a'-'f'] ['0'-'9' 'A'-'F' 'a'-'f' '_']*
('.' ['0'-'9' 'A'-'F' 'a'-'f' '_']* )?
(['p' 'P'] ['+' '-']? ['0'-'9'] ['0'-'9' '_']* )?
let literal_modifier = ['G'-'Z' 'g'-'z']
let hex_float_literal =
'0' ['x' 'X']
['0'-'9' 'A'-'F' 'a... | Copyright ( c ) INRIA 2007 - 2017
#load "pa_lexer.cmo";
open Versdep;
value simplest_raw_strings = ref False ;
value no_quotations = ref False;
value error_on_unknown_keywords = ref False;
value dollar_for_antiquotation = ref True;
value specific_space_dot = ref False;
value force_antiquot_loc = ref False;
type... |
68328c293df6e57e709c8013d232e9822552ae1b0f42a4010da9d87e33276b76 | league/yesod-crud | Home.hs | module Handler.Home where
import Import
import Yesod.Contrib.League.Crud
-- This is a handler function for the GET request method on the HomeR
-- resource pattern. All of your resource patterns are defined in
-- config/routes
--
The majority of the code you will write in Yesod lives in these handler
-- functions. Y... | null | https://raw.githubusercontent.com/league/yesod-crud/6cf3a1871dd6471e9423348c38aff6920d5b4bce/example/Handler/Home.hs | haskell | This is a handler function for the GET request method on the HomeR
resource pattern. All of your resource patterns are defined in
config/routes
functions. You can spread them across multiple files if you are so
inclined, or create a single monolithic file. | module Handler.Home where
import Import
import Yesod.Contrib.League.Crud
The majority of the code you will write in Yesod lives in these handler
getHomeR :: Handler Html
getHomeR = defaultLayout $ do
setTitle "Welcome to the Yesod CRUD demo!"
$(widgetFile "homepage")
|
171b06f321f27df104a2bc3768322b8310fb6cb3169f146af79f8e97457dd46f | Bogdanp/racket-gui-easy | position.rkt | #lang racket/base
(require racket/gui/easy
racket/gui/easy/operator)
(define (pos x y) (list x y))
(define (pos+x p amt) (list (max 0 (+ amt (car p))) (cadr p)))
(define (pos+y p amt) (list (car p) (max 0 (+ amt (cadr p)))))
(define @p (obs (pos 0 0)))
(render
(window
#:title (@p . ~> . (λ (p)
... | null | https://raw.githubusercontent.com/Bogdanp/racket-gui-easy/53f0bf9912b826bdd4ce0d070a04f1620b688978/examples/position.rkt | racket | #lang racket/base
(require racket/gui/easy
racket/gui/easy/operator)
(define (pos x y) (list x y))
(define (pos+x p amt) (list (max 0 (+ amt (car p))) (cadr p)))
(define (pos+y p amt) (list (car p) (max 0 (+ amt (cadr p)))))
(define @p (obs (pos 0 0)))
(render
(window
#:title (@p . ~> . (λ (p)
... | |
3b05ea12c9dd10c839d1df11951506586a757b76a078903ac4eb1256f54db060 | ageldama/cl-state-machine | package.lisp | (in-package :cl-user)
(defpackage #:cl-state-machine-examples
(:use :common-lisp))
(defpackage #:cl-state-machine-examples/tamagochi
(:use :common-lisp :cl-state-machine :alexandria)
(:export
:run
:run+quit))
(defpackage #:cl-state-machine-examples/graphviz
(:use :common-lisp :cl-state-machine :cl-stat... | null | https://raw.githubusercontent.com/ageldama/cl-state-machine/eb5d59f7a864c2fc38822fc258162f9cda56adb4/src-examples/package.lisp | lisp | (in-package :cl-user)
(defpackage #:cl-state-machine-examples
(:use :common-lisp))
(defpackage #:cl-state-machine-examples/tamagochi
(:use :common-lisp :cl-state-machine :alexandria)
(:export
:run
:run+quit))
(defpackage #:cl-state-machine-examples/graphviz
(:use :common-lisp :cl-state-machine :cl-stat... | |
fdb1e35865e605a44bc6c6172e1b375a07cc755a262ddd35dbbc4b310c562053 | hamler-lang/hamler | Read.erl | -module('Read').
-export([
readIntImpl/1,
readFloatImpl/1,
readCharImpl/1,
readAtomImpl/1,
readPidImpl/1
]).
readIntImpl(X) -> case string:to_integer(X) of
{error, R} -> error(R);
{I, _} -> I
end.
readFloatImpl(X) -> case string:to_float(X) of
{error, R} -> error(R);
{F, _} -> ... | null | https://raw.githubusercontent.com/hamler-lang/hamler/37f37c9b01b94c7d21c27b681de7068c29ee56e9/lib/Data/Read.erl | erlang | -module('Read').
-export([
readIntImpl/1,
readFloatImpl/1,
readCharImpl/1,
readAtomImpl/1,
readPidImpl/1
]).
readIntImpl(X) -> case string:to_integer(X) of
{error, R} -> error(R);
{I, _} -> I
end.
readFloatImpl(X) -> case string:to_float(X) of
{error, R} -> error(R);
{F, _} -> ... | |
42af3b417338138b8aac04fa0d2e6e3bce612d2353f7338f4540789e91cce02c | zellio/incrementum | tests-1.7-req.scm |
(add-tests-with-string-output "procedures"
[(letrec () 12) => "12\n"]
[(letrec () (let ([x 5]) (fx+ x x))) => "10\n"]
[(letrec ([f (lambda () 5)]) 7) => "7\n"]
[(letrec ([f (lambda () 5)]) (let ([x 12]) x)) => "12\n"]
[(letrec ([f (lambda () 5)]) (f)) => "5\n"]
[(letrec ([f (lambda () 5)]) (let ([x (f)]) x... | null | https://raw.githubusercontent.com/zellio/incrementum/12060fefdcc2883ffda38c9233a37aad6b20625e/test/scheme/tests-1.7-req.scm | scheme |
(add-tests-with-string-output "procedures"
[(letrec () 12) => "12\n"]
[(letrec () (let ([x 5]) (fx+ x x))) => "10\n"]
[(letrec ([f (lambda () 5)]) 7) => "7\n"]
[(letrec ([f (lambda () 5)]) (let ([x 12]) x)) => "12\n"]
[(letrec ([f (lambda () 5)]) (f)) => "5\n"]
[(letrec ([f (lambda () 5)]) (let ([x (f)]) x... | |
0e6bee6c83998e1393643e96632d3e22d97a3b2d591316343a96842cf91b58a6 | metaocaml/ber-metaocaml | targetint.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/utils/targetint.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
, LexiFi
Copyright 2016 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* Target processor - native integers .
... |
1126f1198d468fa7e5b6267d975f1791c26cdfb1cd58a415464cfb504f8187f0 | racket/eopl | interp.rkt | #lang eopl
interpreter for the LEXADDR language .
(require "lang.rkt")
(require "data-structures.rkt")
(require "environments.rkt")
(provide value-of-translation value-of)
;;;;;;;;;;;;;;;; the interpreter ;;;;;;;;;;;;;;;;
value - of - translation : Nameless - program - > ExpVal
(define value-of-translation
... | null | https://raw.githubusercontent.com/racket/eopl/43575d6e95dc34ca6e49b305180f696565e16e0f/tests/chapter3/lexaddr-lang/interp.rkt | racket | the interpreter ;;;;;;;;;;;;;;;; | #lang eopl
interpreter for the LEXADDR language .
(require "lang.rkt")
(require "data-structures.rkt")
(require "environments.rkt")
(provide value-of-translation value-of)
value - of - translation : Nameless - program - > ExpVal
(define value-of-translation
(lambda (pgm)
(cases program pgm
(a-prog... |
044cf2fabbf29eb0e6fde6dbd43f5cddd3f7be77246049a601158d9f3f4f02b8 | ix/lazyboy | ASM.hs | |
Module : Lazyboy . Target . ASM
Description : ASM backend for Lazyboy
Copyright : ( c ) Rose 2019
License : BSD3
Maintainer :
Stability : experimental
Portability : POSIX
This module provides a backend to format opcodes as ASM and
produce asse... | null | https://raw.githubusercontent.com/ix/lazyboy/83838f5e36906fe0262e9d53e6e692796f214e6b/src/Lazyboy/Target/ASM.hs | haskell | # LANGUAGE OverloadedStrings #
| Compilation errors.
| An instance of Show for printing compiler errors.
| A custom Show instance which formats Instructions as assembly.
handle some special cases for ld rr,nn
stack manipulation
jumps
call and return
arithmetic and comparisons
CPU control
Bit manipulation
RGB... | |
Module : Lazyboy . Target . ASM
Description : ASM backend for Lazyboy
Copyright : ( c ) Rose 2019
License : BSD3
Maintainer :
Stability : experimental
Portability : POSIX
This module provides a backend to format opcodes as ASM and
produce asse... |
c6483305c745ea04841a7102c44bc2f5604bbb01714d80d03f4e83e84970636d | jpjodoin/sunshower | raincloud_handler.erl | -module(raincloud_handler).
-include_lib("kernel/include/logger.hrl").
-include("type.hrl").
-export([init/2, terminate/3, start/0]).
-export([
websocket_init/1, websocket_handle/2,
websocket_info/2
]).
start() ->
Dispatch = cowboy_router:compile([
{'_', [
{"/api/[...]", management_rest... | null | https://raw.githubusercontent.com/jpjodoin/sunshower/b86d6f46f1589124e13bd9b60e270c8aed998bd0/src/raincloud_handler.erl | erlang | TODO: move to commands
When using pusher:connection_established, the client doesn't call the next HTTP method, so we just skip it as it will work very well without it.
TODO: make this configurable as removing this allows old unit that were not updated with the latest firmware to work.
TODO: move to commands
Start sett... | -module(raincloud_handler).
-include_lib("kernel/include/logger.hrl").
-include("type.hrl").
-export([init/2, terminate/3, start/0]).
-export([
websocket_init/1, websocket_handle/2,
websocket_info/2
]).
start() ->
Dispatch = cowboy_router:compile([
{'_', [
{"/api/[...]", management_rest... |
0334d74cec2d37786ccc45473494cfec50c0fe58078f9d9647959d9e8d661115 | conal/Fran | Main6.hs | module Main where
import qualified Editor6 as Editor
import Fran (setInitialViewSize)
import NewCurve -- (saveDouble)
main = do
setInitialViewSize 3.0 1.5
saveDouble
Editor.main | null | https://raw.githubusercontent.com/conal/Fran/a113693cfab23f9ac9704cfee9c610c5edc13d9d/demos/CurveEditor/Main6.hs | haskell | (saveDouble)
| module Main where
import qualified Editor6 as Editor
import Fran (setInitialViewSize)
main = do
setInitialViewSize 3.0 1.5
saveDouble
Editor.main |
b63a67c9aa831180cf72c60650f190f67f30f57a40ce987b18e13bc30abfa6b8 | bennn/dissertation | board.rkt | #lang typed/racket
;; ---------------------------------------------------------------------------------------------------
;; a data representation for the board with operations for
;; -- inspecting the board to strategize
;; -- placing tiles on the board to realize a player's action
;; the actions do not enforce th... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/acquire/typed/board.rkt | racket | ---------------------------------------------------------------------------------------------------
a data representation for the board with operations for
-- inspecting the board to strategize
-- placing tiles on the board to realize a player's action
the actions do not enforce the rules of the game only consi... | #lang typed/racket
(provide
(struct-out tile)
tile<=?
tile->string
ALL-TILES
( Listof Tile )
STARTER-TILES#
Natural
FOUNDING GROWING MERGING SINGLETON IMPOSSIBLE
(rename-out [board make-board])
board-tiles
( - > Board ( Listof Tile ) )
(rename-out [ext:what-kind-of-spot what-kind-of-spot])
... |
9337116b140db2e4e8a7bcba11da2b8d55630b59e1714816e7ec00d9701014ed | yokolet/clementine | radial.cljs | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/yokolet/clementine/b26c2318625e49606b5cc3b95cc9e1f5085ac309/ext/clojure-clojurescript-bef56a7/samples/twitterbuzz/src/twitterbuzz/radial.cljs | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns twitterbuzz.radial
(:require [clojure.set :as set]
[goog.math :as math]))
(defn get-mentions
"Returns the set of mentions for k in mentions-data"
[mentions-data k]
(-> (get-in mentions-data [k :mentions])
keys
set))
(defn get-descendan... |
1fa7b6ee147711b3e3a268dc9549f266658bc10115a3e5d1601ba5c4fe730208 | manu291/dypgen | parse_tree.ml | type tree = Int of int | Ident of string | Plus of (tree * tree) | Let of (tree * tree) | Binding of (string * tree)
let print_tree t =
let rec aux t = match t with
| Int x -> print_int x
| Ident x -> print_string x
| Plus (t1,t2) -> (
print_string "(";
aux t1;
print_string "+";
... | null | https://raw.githubusercontent.com/manu291/dypgen/59d11b4c70b8d0971348ca6913839ff1fb4f9b5f/demos/local_data/parse_tree.ml | ocaml | type tree = Int of int | Ident of string | Plus of (tree * tree) | Let of (tree * tree) | Binding of (string * tree)
let print_tree t =
let rec aux t = match t with
| Int x -> print_int x
| Ident x -> print_string x
| Plus (t1,t2) -> (
print_string "(";
aux t1;
print_string "+";
... | |
c5cd93b0693c7cb80a4d2299669faf98aab24c777f0327a50487ba6a7cbe416a | jorinvo/googlesheets-sql-sync | interval.clj | (ns googlesheets-sql-sync.interval
(:require
[clojure.core.async :refer [<! >! chan close! sliding-buffer go pipeline-async timeout]]
[clojure.string :as string]))
(defn ->ms [interval]
(let [t interval
d (-> t (get :days 0) (* 24))
h (-> t (get :hours 0) (+ d) (* 60))
m (-... | null | https://raw.githubusercontent.com/jorinvo/googlesheets-sql-sync/b9fb4c8d7fba36859d4225140778e465142be180/src/googlesheets_sql_sync/interval.clj | clojure | (ns googlesheets-sql-sync.interval
(:require
[clojure.core.async :refer [<! >! chan close! sliding-buffer go pipeline-async timeout]]
[clojure.string :as string]))
(defn ->ms [interval]
(let [t interval
d (-> t (get :days 0) (* 24))
h (-> t (get :hours 0) (+ d) (* 60))
m (-... | |
9778f49838caae98118b39720cdf4961796b4251263653df2860f3e92a95c36d | fogfish/datum | datum_cat_option.erl | %% @doc
%% category pattern: option category
-module(datum_cat_option).
%% (/=)
-export(['/='/1]).
%% (.) operation
-export(['.'/3, chain/1, curry/1]).
%% category transformers
-export([unit/1, fail/1, require/3, sequence/1, flatten/1, optionT/1, eitherT/1, tryT/1]).
%%
%%
'/='(Arrow) ->
Arrow.
%%
%% compose ... | null | https://raw.githubusercontent.com/fogfish/datum/f5e8f0b5deb8b74d6febe046333dbb4f38b086d8/src/category/datum_cat_option.erl | erlang | @doc
category pattern: option category
(/=)
(.) operation
category transformers
compose function(s) using AST notation
ignore tail arrow
return dot-composition chain.
curry do-composition chain into partial application
------------------------------------------------------------------
transforme... | -module(datum_cat_option).
-export(['/='/1]).
-export(['.'/3, chain/1, curry/1]).
-export([unit/1, fail/1, require/3, sequence/1, flatten/1, optionT/1, eitherT/1, tryT/1]).
'/='(Arrow) ->
Arrow.
f ( _ ) . ( _ ) - > case f ( _ ) of undefined - > undefined ; X - > g(X ) end
'.'(_, {option, VarX, G}, {call, Ln,... |
9f1b46f8e18a500642df8d662a037a63b5e124f54f012c7ae9a29fdeaa07ac6c | protz/mezzo | Permissions.mli | (*****************************************************************************)
(* Mezzo, a programming language based on permissions *)
Copyright ( C ) 2011 , 2012 and
(* *)
(* This program is free softwar... | null | https://raw.githubusercontent.com/protz/mezzo/4e9d917558bd96067437116341b7a6ea02ab9c39/typing/Permissions.mli | ocaml | ***************************************************************************
Mezzo, a programming language based on permissions
This program is free software: you can redistribute it and/or modify
(at your optio... | Copyright ( C ) 2011 , 2012 and
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
open TypeCore
open Derivations
open E... |
32dc2476ac8378e46ca3af4cce19172dfa719fb289939d7dda78f8666763fd2c | Ramarren/cl-symbolic-math | operations.lisp | (in-package :cl-symbolic-math)
;;;; Top level operations and wrappers
(defun execute-expression (math-expression &optional (variable-bindings nil))
(let ((s-variable-bindings (if (and variable-bindings
(not (consp (car variable-bindings))))
(plist-alist variable-bindings)
variable-bindings)))
... | null | https://raw.githubusercontent.com/Ramarren/cl-symbolic-math/7c26dda2bf8017bce68708cc0edbfb463a398232/operations.lisp | lisp | Top level operations and wrappers | (in-package :cl-symbolic-math)
(defun execute-expression (math-expression &optional (variable-bindings nil))
(let ((s-variable-bindings (if (and variable-bindings
(not (consp (car variable-bindings))))
(plist-alist variable-bindings)
variable-bindings)))
(funcall (symbolic-compile math-expre... |
6345eb56d47572fce230c2651873c2aac7cc9d994fbeebe199a20c3987420f5b | input-output-hk/cardano-sl | Redeem.hs | # LANGUAGE MonoLocalBinds #
module Pos.Crypto.Signing.Types.Redeem
( RedeemSecretKey (..)
, RedeemPublicKey (..)
, RedeemSignature (..)
, redeemPkB64F
, redeemPkB64UrlF
, redeemPkB64ShortF
, fromAvvmPk
, redeemPkBuild
, redeemToPublic
) where
import... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/crypto/Pos/Crypto/Signing/Types/Redeem.hs | haskell | --------------------------------------------------------------------------
--------------------------------------------------------------------------
| Wrapper around 'Ed25519.SecretKey'.
| Base64url Format for 'RedeemPublicKey'.
| Public key derivation function.
-----------------------------------------------------... | # LANGUAGE MonoLocalBinds #
module Pos.Crypto.Signing.Types.Redeem
( RedeemSecretKey (..)
, RedeemPublicKey (..)
, RedeemSignature (..)
, redeemPkB64F
, redeemPkB64UrlF
, redeemPkB64ShortF
, fromAvvmPk
, redeemPkBuild
, redeemToPublic
) where
import... |
7e5d962812a7c8979cc132b24b3bd5cde6b31062ef17b21496f8f931d47f4cd0 | dgiot/dgiot | dgiot_ffmpeg_channel.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy... | null | https://raw.githubusercontent.com/dgiot/dgiot/a6b816a094b1c9bd024ce40b8142375a0f0289d8/apps/dgiot_ffmpeg/src/dgiot_ffmpeg_channel.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(dgiot_ffmpeg_channel).
-behavior(dgiot_channelx).
-author("johnliu").
-include_lib("dgi... |
8542d9188d6c53cab2ac77543fa8aea5b194441cd1a7d84b3d985f7eca9fbbbd | racket/xrepl | info.rkt | #lang info
(define name "eXtended REPL")
(define scribblings '(("xrepl.scrbl" () (tool-library))))
| null | https://raw.githubusercontent.com/racket/xrepl/334f40aa3c3cf8616eaf05349c4d3ec99501ced3/xrepl-doc/xrepl/info.rkt | racket | #lang info
(define name "eXtended REPL")
(define scribblings '(("xrepl.scrbl" () (tool-library))))
| |
7200907365781c2be36830873f4ee2a741b3c3b5f30d961f15719d2f9ef6f9a0 | anurudhp/CPHaskell | c.hs | import Control.Arrow ((>>>))
import qualified Data.ByteString.Lazy.Char8 as C
import Data.List (sortBy)
import Data.Maybe (fromMaybe)
import Data.Ord (comparing)
main :: IO ()
main =
C.interact $
C.lines >>>
drop 1 >>>
map (C.words >>> map readInteger) >>>
process >>> map (show >>> C.pack) >>> C.unlines
wh... | null | https://raw.githubusercontent.com/anurudhp/CPHaskell/01ae8dde6aab4f6ddfebd122ded0b42779dd16f1/contests/codeforces/1443/c.hs | haskell | import Control.Arrow ((>>>))
import qualified Data.ByteString.Lazy.Char8 as C
import Data.List (sortBy)
import Data.Maybe (fromMaybe)
import Data.Ord (comparing)
main :: IO ()
main =
C.interact $
C.lines >>>
drop 1 >>>
map (C.words >>> map readInteger) >>>
process >>> map (show >>> C.pack) >>> C.unlines
wh... | |
63aec5c95fab77e7e821db6ff3dcd5397b2566d2286f8d2dc25b2bccfe55f16e | amnh/PCG | ParseStreamError.hs | -----------------------------------------------------------------------------
-- |
Module : Data . FileSource . ParseStreamError
Copyright : ( c ) 2015 - 2021 Ward Wheeler
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
-- Composable error t... | null | https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/file-source/src/Data/FileSource/ParseStreamError.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
Composable error type representing failure to parse an input stream.
------------------------------------------------------------------------... | Module : Data . FileSource . ParseStreamError
Copyright : ( c ) 2015 - 2021 Ward Wheeler
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE UnboxedSums #
module Data.FileSource.ParseStreamError
( ParseStreamError()
, makeInvalidPre... |
455484145926022153157f0a1f406a7947bb6c6239b12e03edee7254b81227d1 | julienXX/clj-slack | search.clj | (ns clj-slack.search
(:require [clj-slack.core :refer [slack-request stringify-keys]]))
(defn all
"Searches for messages and files matching a query.
Optional arguments are:
- sort: return matches sorted by either score or timestamp
- sort_dir: change sort direction
- highlight: enable query highlight marke... | null | https://raw.githubusercontent.com/julienXX/clj-slack/ff5649161646f11dd8d52d1315c0e74dc723eeb7/src/clj_slack/search.clj | clojure | (ns clj-slack.search
(:require [clj-slack.core :refer [slack-request stringify-keys]]))
(defn all
"Searches for messages and files matching a query.
Optional arguments are:
- sort: return matches sorted by either score or timestamp
- sort_dir: change sort direction
- highlight: enable query highlight marke... | |
9b0df29621cc15c1eed4a2e649d6a7f639ad9c953137a8d258fb20b2fc503d8b | fission-codes/fission | Types.hs | module Fission.URL.Subdomain.Types (Subdomain (..)) where
import qualified RIO.ByteString.Lazy as Lazy
import qualified RIO.Text as Text
import Data.Swagger
import Database.Persist.Sql
import Servant.API
import Fission.Prelude
import qualified Fission.App.Nam... | null | https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-core/library/Fission/URL/Subdomain/Types.hs | haskell | | Type safety wrapper for subdomains | module Fission.URL.Subdomain.Types (Subdomain (..)) where
import qualified RIO.ByteString.Lazy as Lazy
import qualified RIO.Text as Text
import Data.Swagger
import Database.Persist.Sql
import Servant.API
import Fission.Prelude
import qualified Fission.App.Nam... |
297c78929b769af7b99e71677a65e8fe0cf91c6ef1f4175f130a4c38e5211f3e | scalar-labs/scalar-jepsen | elle_append.clj | (ns scalardb.elle-append
(:require [clojure.string :as str]
[clojure.tools.logging :refer [info]]
[jepsen.client :as client]
[jepsen.generator :as gen]
[jepsen.independent :as independent]
[jepsen.tests.cycle.append :as append]
[cassandra.conduct... | null | https://raw.githubusercontent.com/scalar-labs/scalar-jepsen/d63d33ff1a1e88e6a89e65a98dc5a214195c53e7/scalardb/src/scalardb/elle_append.clj | clojure | add tables for the next sequence | (ns scalardb.elle-append
(:require [clojure.string :as str]
[clojure.tools.logging :refer [info]]
[jepsen.client :as client]
[jepsen.generator :as gen]
[jepsen.independent :as independent]
[jepsen.tests.cycle.append :as append]
[cassandra.conduct... |
c41a40efd18eb0f5ac7f9cf9d7188afe81dd0b72462b4a3849268c03eadbe9dc | technomancy/leiningen | project.clj | (defproject sample2 "1.0.0-SNAPSHOT"
:description "FIXME: write"
:dependencies [[org.clojure/clojure "1.1.0"]
[org.clojure/clojure-contrib "1.1.0"]]) | null | https://raw.githubusercontent.com/technomancy/leiningen/24fb93936133bd7fc30c393c127e9e69bb5f2392/test_projects/sample/checkouts/sample2/project.clj | clojure | (defproject sample2 "1.0.0-SNAPSHOT"
:description "FIXME: write"
:dependencies [[org.clojure/clojure "1.1.0"]
[org.clojure/clojure-contrib "1.1.0"]]) | |
1f4307bcf93840d1a2f7d5b22a151b416c7a1ff1f228719e663c772c89ca7277 | lasp-lang/lasp-bench | lasp_bench_stats_writer.erl | %% -------------------------------------------------------------------
%%
%% lasp_bench: Benchmarking Suite
%%
Copyright ( c ) 2009 - 2014 Basho Techonologies
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License ... | null | https://raw.githubusercontent.com/lasp-lang/lasp-bench/d9b3e78d64ea4709ca10ec062c7fc969c1c503d4/src/lasp_bench_stats_writer.erl | erlang | -------------------------------------------------------------------
lasp_bench: Benchmarking Suite
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
spec... | Copyright ( c ) 2009 - 2014 Basho Techonologies
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
HOWTO :
{ stats , } .... |
d5031fe57b6ace2a97920d8c501575b3e1d66a2034bed79f0bd37b1374a956df | TyOverby/mono | auth.mli | { { { Copyright ( c ) 2012 - 2014 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 PROVI... | null | https://raw.githubusercontent.com/TyOverby/mono/8d6b3484d5db63f2f5472c7367986ea30290764d/vendor/mirage-ocaml-cohttp/cohttp/src/auth.mli | ocaml | * HTTP Authentication and Authorization header parsing and generation
* HTTP authentication challenge types
* Basic authentication within a realm
* HTTP authorization credential types
* Basic authorization with a username and password
* An unknown credential type that will be passed straight through
to the a... | { { { Copyright ( c ) 2012 - 2014 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 PROVI... |
216249d2c6bfae7172b4fd15ae36df38e1bb789d3ab31d2366ec0a7ffda21366 | jaredponn/Fly-Plane-Fly | Logger.hs | # LANGUAGE InstanceSigs #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
module Logger where
import Control.Monad.IO.Class (MonadIO(..))
import TimeManager
import GameVars
import Util
class Monad m => Logger m where
logText :: String -> m ()
logToFile :: FilePath -> String -> m ()
ins... | null | https://raw.githubusercontent.com/jaredponn/Fly-Plane-Fly/8e250f29216f2f75dac2dd0235a2b0243d601620/src/Logger.hs | haskell | # LANGUAGE InstanceSigs #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
module Logger where
import Control.Monad.IO.Class (MonadIO(..))
import TimeManager
import GameVars
import Util
class Monad m => Logger m where
logText :: String -> m ()
logToFile :: FilePath -> String -> m ()
ins... | |
87466fbb7442ef8c84a943839a6193b292b1167668496a66fb34f3d3b051f278 | AlexCharlton/Hypergiant | run.scm | (use test hypergiant miscmacros lolevel srfi-1)
(test-begin "load-iqm")
(test-assert (load-iqm "./cube.iqm"))
(test-error (load-iqm "../hypergiant.scm"))
(test-end)
Utils
(define delta 0.0005)
(define mrfixit (load-iqm "./mrfixit.iqm"))
(define n-joints (length (iqm-joints mrfixit)))
(define (nth-3x4-matrix m n) ... | null | https://raw.githubusercontent.com/AlexCharlton/Hypergiant/5f1ae8c209715980b2bb061d3eb4d93132e34305/tests/run.scm | scheme | (use test hypergiant miscmacros lolevel srfi-1)
(test-begin "load-iqm")
(test-assert (load-iqm "./cube.iqm"))
(test-error (load-iqm "../hypergiant.scm"))
(test-end)
Utils
(define delta 0.0005)
(define mrfixit (load-iqm "./mrfixit.iqm"))
(define n-joints (length (iqm-joints mrfixit)))
(define (nth-3x4-matrix m n) ... | |
e608364882133cd1c355487549b05dd366d702b6abf5184681ed9a1cd1dfcdae | TrustInSoft/tis-kernel | map_Lattice.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/kernel_services/abstract_interp/map_Lattice.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 ... |
db591e40bea79eddcfba961817369dac9d3844010c98949398fcbc676aa4a7f4 | G-Corp/kafe | kafe_consumer_statem.erl | % @hidden
% see +0.9+Consumer+Rewrite+Design
-module(kafe_consumer_statem).
-compile([{parse_transform, lager_transform}]).
-behaviour(gen_statem).
-include("../include/kafe.hrl").
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
%% API.
-export([start_link/2]).
%% gen_statem.
-export([
init/1
... | null | https://raw.githubusercontent.com/G-Corp/kafe/78e014ae5b6d7e1077aa5cabf4adc21ed7abe203/src/kafe_consumer_statem.erl | erlang | @hidden
see +0.9+Consumer+Rewrite+Design
API.
gen_statem.
API.
@hidden
gen_statem.
@hidden
client_id
leader_id
generation_id
members
protocol_group
@hidden
@hidden
@hidden
@hidden
@hidden
@hidden
never append ? | -module(kafe_consumer_statem).
-compile([{parse_transform, lager_transform}]).
-behaviour(gen_statem).
-include("../include/kafe.hrl").
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
-export([start_link/2]).
-export([
init/1
, callback_mode/0
, terminate/3
, code_ch... |
ed32d82a87bef028d0a1e38dfa2f997b232d1862dd943e0ad4a14bc2f60b48ac | seanhess/yeti | Spec.hs | import Prelude
main :: IO ()
main = putStrLn "Test suite not yet implemented"
| null | https://raw.githubusercontent.com/seanhess/yeti/5542ed557a4501f073fa850f0645f555d941179b/test/Spec.hs | haskell | import Prelude
main :: IO ()
main = putStrLn "Test suite not yet implemented"
| |
2630c124b107f81c3e956eb499bc8252da9061b7ccbf0e6e3dfa52ddbd64f2d4 | marigold-dev/deku | address.mli | open Deku_crypto
type t =
| Implicit of Key_hash.t
| Originated of { contract : Contract_hash.t; entrypoint : string option }
[@@deriving eq, ord, show]
(* TODO: explain why this encoding? TLDR fixed size and no entrypoint *)
val contract_encoding : t Data_encoding.t
val encoding : t Data_encoding.t
val to_strin... | null | https://raw.githubusercontent.com/marigold-dev/deku/cdf82852196b55f755f40850515580be4fd9a3fa/deku-p/src/core/tezos/address.mli | ocaml | TODO: explain why this encoding? TLDR fixed size and no entrypoint | open Deku_crypto
type t =
| Implicit of Key_hash.t
| Originated of { contract : Contract_hash.t; entrypoint : string option }
[@@deriving eq, ord, show]
val contract_encoding : t Data_encoding.t
val encoding : t Data_encoding.t
val to_string : t -> string
val of_string : string -> t option
val cmdliner_converter... |
a3def188cf20265f2207b9a10fdb8e92e45605143a103f5633ed7323fa22b56a | AeneasVerif/aeneas | InterpreterLoopsFixedPoint.ml | module T = Types
module PV = PrimitiveValues
module V = Values
module E = Expressions
module C = Contexts
module Subst = Substitute
module A = LlbcAst
module L = Logging
open TypesUtils
open ValuesUtils
module Inv = Invariants
module S = SynthesizeSymbolic
open Cps
open InterpreterUtils
open InterpreterLoopsCore
open I... | null | https://raw.githubusercontent.com/AeneasVerif/aeneas/1535b37ae84ddb1d2679c19b8fcc734351e5ce5d/compiler/InterpreterLoopsFixedPoint.ml | ocaml | * The local logger
* Reorder the loans and borrows in the fresh abstractions.
We do this in order to enforce some structure in the environments: this
allows us to find fixed-points. Note that this function needs to be
called typically after we merge abstractions together (see {!collapse_ctx}
for insta... | module T = Types
module PV = PrimitiveValues
module V = Values
module E = Expressions
module C = Contexts
module Subst = Substitute
module A = LlbcAst
module L = Logging
open TypesUtils
open ValuesUtils
module Inv = Invariants
module S = SynthesizeSymbolic
open Cps
open InterpreterUtils
open InterpreterLoopsCore
open I... |
003f7ba38c0e753b5bc87341214d9f06953d3025606713f2957470e136c8701f | webyrd/mediKanren | sri-reference-kg-0.3.0.rkt | #lang racket
(provide nodes edges)
(require "../base.rkt" (except-in racket/match ==))
(define columns-of-nodes
'(
0 - 4
5 - 9
created deprecated election_strategy gene_associated_with_condition genomic_sequence_localization_object
15 - 19
20 - 24
25 - 29
)
(define stcolumns-of-nodes (map symbol->string columns-... | null | https://raw.githubusercontent.com/webyrd/mediKanren/1bc61aa1324ca4e8bbb49b1d4a2458d5d2b41bb7/medikanren2/db/sri-reference-kg-0.3.0.rkt | racket | 'tables '((curie name value))
'indexes '((name value))
default index is: id subject object
implicit: lookup ending in id
implicit: lookup ending in id | #lang racket
(provide nodes edges)
(require "../base.rkt" (except-in racket/match ==))
(define columns-of-nodes
'(
0 - 4
5 - 9
created deprecated election_strategy gene_associated_with_condition genomic_sequence_localization_object
15 - 19
20 - 24
25 - 29
)
(define stcolumns-of-nodes (map symbol->string columns-... |
d09cc3a6e9c254cfe0cd0357de77b59b85c81e6c5f26e809d6eec7af38663173 | Cahu/krpc-hs | InfernalRobotics.hs | module KRPCHS.InfernalRobotics
( Servo
, ServoGroup
, servoGroupWithName
, servoGroupWithNameStream
, servoGroupWithNameStreamReq
, servoGroupMoveCenter
, servoGroupMoveLeft
, servoGroupMoveNextPreset
, servoGroupMovePrevPreset
, servoGroupMoveRight
, servoGroupServoWithName
, servoGroupServoWithNameStream
, servoGroup... | null | https://raw.githubusercontent.com/Cahu/krpc-hs/418f88f2acad8d50dd716d9a3477178332f00806/src/KRPCHS/InfernalRobotics.hs | haskell |
- Represents a servo. Obtained using
- <see cref="M:InfernalRobotics.ServoGroup.Servos" />,
- <see cref="M:InfernalRobotics.ServoGroup.ServoWithName" />
- or <see cref="M:InfernalRobotics.ServoWithName" />.
- Moves all of the servos in the group to the center.
- Moves all of the servos in the group to the ... | module KRPCHS.InfernalRobotics
( Servo
, ServoGroup
, servoGroupWithName
, servoGroupWithNameStream
, servoGroupWithNameStreamReq
, servoGroupMoveCenter
, servoGroupMoveLeft
, servoGroupMoveNextPreset
, servoGroupMovePrevPreset
, servoGroupMoveRight
, servoGroupServoWithName
, servoGroupServoWithNameStream
, servoGroup... |
5b09912eb9909cb44e6109eb6b96529d192916db5ac3aaf5798630b9f99c49cc | ocaml-ppx/ocamlformat | unclosed_class7.ml | class c = (object end
| null | https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/9324ea439a77b4f3a31e9302b97ce1812cf8f17d/vendor/parser-recovery/test/expect/structure/unclosed_class7.ml | ocaml | class c = (object end
| |
435566865bb02b2155d0513554b8b916b149f303136269dce9d1f3a567ecbd3f | Mesabloo/nihil | Kind.hs | module Nihil.TypeChecking.Rules.Solving.Kind where
import Nihil.TypeChecking.Unification
import Nihil.TypeChecking.Core
import Nihil.TypeChecking.Substitution
import Nihil.TypeChecking.Constraint
import Nihil.TypeChecking.Common
import Nihil.TypeChecking.Rules.Unification.Kind()
import Nihil.TypeChecking.Environment
i... | null | https://raw.githubusercontent.com/Mesabloo/nihil/3821052ca5691a6492b23bd8a46bfe70567d374f/src/typechecker/Nihil/TypeChecking/Rules/Solving/Kind.hs | haskell | | Runs the kind constraint solver given an environment and returns a substitution to 'apply'. | module Nihil.TypeChecking.Rules.Solving.Kind where
import Nihil.TypeChecking.Unification
import Nihil.TypeChecking.Core
import Nihil.TypeChecking.Substitution
import Nihil.TypeChecking.Constraint
import Nihil.TypeChecking.Common
import Nihil.TypeChecking.Rules.Unification.Kind()
import Nihil.TypeChecking.Environment
i... |
0f3144c542c840e01327d0f626a96ab29b600cf468134156f493df4ec7732348 | kayhman/lisphys | matrixad.lisp | (in-package #:lisphys)
(defclass matrixad (math-ad matrix) ())
| null | https://raw.githubusercontent.com/kayhman/lisphys/4e339022f2e2ea886d598dfce2365958ff5b87bb/src/lib/matrixad.lisp | lisp | (in-package #:lisphys)
(defclass matrixad (math-ad matrix) ())
| |
2ee4235822250bd21373a08606ad11f8e9c11fc523b811a72f59531b8523765d | chiroptical/optics-by-example | Lib.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Lib where
import Control.Lens
import Data.Char (isUpper, toLower, toUpper)
import Data.List (intercalate, transpose)
import q... | null | https://raw.githubusercontent.com/chiroptical/optics-by-example/3ee33546ee18c3a6f5510eec17a69d34e750198e/chapter10/src/Lib.hs | haskell | # LANGUAGE OverloadedStrings #
("Trust", "Fall")
Exercises - Intro to Isos
b. Focus the last element of a list
Traversal
Prism
Traversal
f. Focusing an IntSet from a Set Int
at the same time, i.e.
Input: [String]
Output: String
Map: String -> Text
Exercises - Projected Isos
("egA","Beauty")
[False, True, ... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Lib where
import Control.Lens
import Data.Char (isUpper, toLower, toUpper)
import Data.List (intercalate, transpose)
import qualified Data.List as L
import Data... |
606c637f1c89b49ffe9825d48ef042ad75df5a7836a3ed8fd21dd92111ab38f4 | altsun/My-Lisps | (+) Cong cac Text va ghi vao Text.lsp |
(defun c:+() ;;; cong
(prompt "\nChon text de cong:")
(setq ss (ssget '((0 . "TEXT")))
tong 0)
(while (and ss (> (sslength ss) 0))
(setq tong (+ tong (atof (cdr (assoc 1 (entget (setq ent (ssname ss 0))))))))
(ssdel ent ss))
(setq s1 (entget (car (entsel "Chon Text ghi ket qua: "))))
(setq o... | null | https://raw.githubusercontent.com/altsun/My-Lisps/85476bb09b79ef5e966402cc5158978d1cebd7eb/Text-Dim-Leader/Calculate/(%2B)%20Cong%20cac%20Text%20va%20ghi%20vao%20Text.lsp | lisp | cong |
(prompt "\nChon text de cong:")
(setq ss (ssget '((0 . "TEXT")))
tong 0)
(while (and ss (> (sslength ss) 0))
(setq tong (+ tong (atof (cdr (assoc 1 (entget (setq ent (ssname ss 0))))))))
(ssdel ent ss))
(setq s1 (entget (car (entsel "Chon Text ghi ket qua: "))))
(setq otext (assoc 1 s1))
(setq ... |
e7565b6989039bc90fc3239887ef5f43ca14e7fb4669caed6305d15f28479eba | 7bridges-eu/clj-odbp | core.clj | Copyright 2017 7bridges s.r.l .
;;
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 u... | null | https://raw.githubusercontent.com/7bridges-eu/clj-odbp/5a92515c2e4c6198bd1093ace83da96e30b90829/src/clj_odbp/core.clj | clojure |
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 permiss... | Copyright 2017 7bridges s.r.l .
distributed under the License is distributed on an " AS IS " BASIS ,
(ns clj-odbp.core
(:require [clj-odbp
[utils :refer [defcommand defconnection]]]
[clj-odbp.network.socket :as s]
[clj-odbp.operations
[command :as command]
... |
348dd74c83866ce3d66a908be8ca887c57f1d8734c063a4ac622b520fb289de4 | ahrefs/ocaml-bpf-match-string | bpf_match_string.ml | open Printf
open EBPF
type label = int
type t = label EBPF.insn list
type code =
| Skip of int
| MatchString of string
| MatchChars of char list
| MismatchChars of char list
| CheckEOS of bool
| SkipToChar of char
| And of code list list
| Or of code list list
| Not of code list
(* buffer global c... | null | https://raw.githubusercontent.com/ahrefs/ocaml-bpf-match-string/6df9d9ac922dcaafd33f086e24dd5d93d1cfd581/src/bpf_match_string.ml | ocaml | buffer global context : R1 = ptr R2 = len
stack pointers : R10 = frame R9 = stack
ptr += delta
len = old_len
XXX slow could be unrolled / vectorized | open Printf
open EBPF
type label = int
type t = label EBPF.insn list
type code =
| Skip of int
| MatchString of string
| MatchChars of char list
| MismatchChars of char list
| CheckEOS of bool
| SkipToChar of char
| And of code list list
| Or of code list list
| Not of code list
let ptr = R1
let l... |
209066ee242241cd684b5c507231915a21ce474daf1684a1f4c099c30805ef8c | Leonidas-from-XIV/slacko | fake_slack.ml | (* A (currently pretty useless) fake slack implementation to run tests
against. *)
open Lwt
open Cohttp_lwt_unix
(* The only "valid" token we accept. *)
let valid_token = "xoxp-testtoken"
(* The following values come from data captured by a relay proxy between slacko
and slack.com. They need to be replaced with... | null | https://raw.githubusercontent.com/Leonidas-from-XIV/slacko/784c5b70f521b4bb50f757782bad681e53ec6b4a/test/fake_slack.ml | ocaml | A (currently pretty useless) fake slack implementation to run tests
against.
The only "valid" token we accept.
The following values come from data captured by a relay proxy between slacko
and slack.com. They need to be replaced with something more generic that
doesn't depend on the arbitrary details of a ... | open Lwt
open Cohttp_lwt_unix
let valid_token = "xoxp-testtoken"
let ch_general = "C3UK9TS3C"
let ch_random = "C3TTWNCTA"
let ch_archivable = "C3XTJPLFL"
let ch_archived = "C3XTHDCTC"
let gr_seekrit = "G536YKXPE"
slacko does n't have a lookup function for us , so we just use it directly .
let im_slackbot = "D3UMJU8... |
1c85e8f4f2654f0f3a1992969d76b00d807670356abd5b55a40423010da4b4fc | bitemyapp/bloodhound | Analysis.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
module Database.Bloodhound.Internal.Analysis where
import Bloodhound.Import
import qualified Data.Map.Strict as M
import qualified Data.Text as T
import Database.Bloodhound.Internal.Newtypes
import Database.Bloodhoun... | null | https://raw.githubusercontent.com/bitemyapp/bloodhound/7402e66455adebaa2b2fd9ae1e8c60bb4b48505c/src/Database/Bloodhound/Internal/Analysis.hs | haskell | # LANGUAGE OverloadedStrings #
| Character filters are used to preprocess the stream of characters
before it is passed to the tokenizer.
| Token filters are used to create custom analyzers.
| The set of languages that can be passed to various analyzers,
that have a 'Language' field are actually only actually t... | # LANGUAGE DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
module Database.Bloodhound.Internal.Analysis where
import Bloodhound.Import
import qualified Data.Map.Strict as M
import qualified Data.Text as T
import Database.Bloodhound.Internal.Newtypes
import Database.Bloodhound.Internal.StringlyTyped
import GHC... |
3827d356ee73f8e5527d07491e9189cafa8059b8eeebd0b8929d4e57e7df26c3 | mflatt/not-a-box | mutated.rkt | #lang racket/base
(require "wrap.rkt"
"match.rkt"
"known.rkt"
"import.rkt"
"simple.rkt"
"find-definition.rkt"
"struct-type-info.rkt"
"mutated-state.rkt")
(provide mutated-in-body)
;; See "mutated-state.rkt" for information on the content of the
;; `mutate... | null | https://raw.githubusercontent.com/mflatt/not-a-box/b6c1af4fb0eb877610a3a20b5265a8c8d2dd28e9/schemify/mutated.rkt | racket | See "mutated-state.rkt" for information on the content of the
`mutated` table.
We don't have to worry about errors or escapes that prevent the
definition of an identifier, because that will abort the enclosing
linklet.
Find all `set!`ed variables, and also record all bindings
that might be used too early
Define... | #lang racket/base
(require "wrap.rkt"
"match.rkt"
"known.rkt"
"import.rkt"
"simple.rkt"
"find-definition.rkt"
"struct-type-info.rkt"
"mutated-state.rkt")
(provide mutated-in-body)
(define (mutated-in-body l exports prim-knowns knowns imports)
(define ... |
dbd356eb31293c38a30c0532ae1ed4284ed061670bc1b85d654b7f18a0837eea | liquidz/misaki | core.clj | (ns misaki.compiler.default.html.core
"HTML utility for template"
(:require
[misaki.compiler.default.config :refer [*site*]]
[misaki.compiler.default.html.conv :refer [post-title->url] :as conv]
[misaki.config :as cnf]
[misaki.util.date :as date]
[hiccup.c... | null | https://raw.githubusercontent.com/liquidz/misaki/b8104e632058e3b3da4487513d10e666e5914ec9/src/misaki/compiler/default/html/core.clj | clojure | ## Utilities
=> \"b\"
=> \"a/b\""
=escape-markdown
=unescape-markdown
[hello](world)
;=> <a href="world">hello</a>
[hello](title: POST TITLE)
;=> <a href="POST URL">hello</a>
*hello*
= > < em > hello</em >
**hello**
;=> <strong>hello</strong>
`hello`
;=> <cod... | (ns misaki.compiler.default.html.core
"HTML utility for template"
(:require
[misaki.compiler.default.config :refer [*site*]]
[misaki.compiler.default.html.conv :refer [post-title->url] :as conv]
[misaki.config :as cnf]
[misaki.util.date :as date]
[hiccup.c... |
c2df06bcf7cf5b5cb40f40d244c7602d94a220718b826508f8c360f36f278c58 | TheLortex/mirage-monorepo | driver.ml |
* Copyright ( c ) 2014 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2014 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
(* Stub generation driver for... | null | https://raw.githubusercontent.com/TheLortex/mirage-monorepo/b557005dfe5a51fc50f0597d82c450291cfe8a2a/duniverse/ocaml-ctypes/tests/test-funptrs/stub-generator/driver.ml | ocaml | Stub generation driver for the foreign value tests. |
* Copyright ( c ) 2014 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2014 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
let cheader = "extern char *... |
3ce2781b769769d4d13efb12167f3c1f3eafe44f89d484be5b427903ee96a270 | cl-axon/cl-aima | test-uncertainty.lisp | (deftest uncertainty
"Test code for reasoning with uncertainty. Currently, just MDPs."
"Given the MDP (Markov Decision Process) for the 4x3 grid from Ch.s 17, 20,"
"create an agent, and an environment corresponding to the MDP."
((setq agent (make-mdp-agent :mdp *4x3-mdp*
:algorithm 'value-iteration-p... | null | https://raw.githubusercontent.com/cl-axon/cl-aima/1e6915fa9f3e5f2c6fd75952d674ebec53558d04/uncertainty/test-uncertainty.lisp | lisp | (deftest uncertainty
"Test code for reasoning with uncertainty. Currently, just MDPs."
"Given the MDP (Markov Decision Process) for the 4x3 grid from Ch.s 17, 20,"
"create an agent, and an environment corresponding to the MDP."
((setq agent (make-mdp-agent :mdp *4x3-mdp*
:algorithm 'value-iteration-p... | |
3d49198c17416177687de5244f379d2e2857d6595f0ded2d086a34d860645dbf | facebookarchive/pfff | flag_parsing_csharp.ml |
let verbose_lexing = ref false
let verbose_parsing = ref false
let debug_lexer = ref false
| null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_csharp/parsing/flag_parsing_csharp.ml | ocaml |
let verbose_lexing = ref false
let verbose_parsing = ref false
let debug_lexer = ref false
| |
afb280bd8b3ee4aa4ad0169568c3cbe42122af7aa08342ed621f891d91a2c5ba | CardanoSolutions/kupo | DatabaseSpec.hs | 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 /.
# LANGUAGE RecordWildCards #
module Test.Kupo.Data.DatabaseSpec
( spec
) where
import Kupo.Prelude
import Data.List
( maximum
... | null | https://raw.githubusercontent.com/CardanoSolutions/kupo/1ee9006d1513037cf0b662feaecbc444d6584bce/test/Test/Kupo/Data/DatabaseSpec.hs | haskell |
Properties
Helpers
| 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 /.
# LANGUAGE RecordWildCards #
module Test.Kupo.Data.DatabaseSpec
( spec
) where
import Kupo.Prelude
import Data.List
( maximum
... |
d3652594ceb6929f25dd1eb4ec061530f23598e691b928a7da9e3181f082a516 | esl/erlang-web | e_mod_inets.erl | The contents of this file are subject to the Erlang Web Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
Erlang Web Public License along with this software . If not , it can be
%% retrieved via the world... | null | https://raw.githubusercontent.com/esl/erlang-web/2e5c2c9725465fc5b522250c305a9d553b3b8243/lib/eptic-1.4.1/src/e_mod_inets.erl | erlang | compliance with the License. You should have received a copy of the
retrieved via the world wide web at -consulting.com/.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
---------------------------------... | The contents of this file are subject to the Erlang Web Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
Erlang Web Public License along with this software . If not , it can be
Software distributed under the License is distributed on an " AS IS "
The Initial Developer o... |
3db0c5d9a152ab6b0b395439126c2a1a742927069f1a2bb5f065b15440f58899 | fission-codes/fission | Connect.hs | -- | Module for connecting to the Fission IPFS service
module Fission.CLI.IPFS.Connect
( swarmConnectWithRetry
, swarmDisconnect
, couldNotSwarmConnect
) where
import qualified RIO.NonEmpty as NonEmpty
import qualified System.Console.ANSI as ANSI
import Network.IPFS
import qualifie... | null | https://raw.githubusercontent.com/fission-codes/fission/26eab8914e440335d2953618747f5bad1acc8032/fission-cli/library/Fission/CLI/IPFS/Connect.hs | haskell | | Module for connecting to the Fission IPFS service
| Connect to the Fission IPFS network with a set amount of retries
| Create a could not connect to Fission peer message for the terminal | module Fission.CLI.IPFS.Connect
( swarmConnectWithRetry
, swarmDisconnect
, couldNotSwarmConnect
) where
import qualified RIO.NonEmpty as NonEmpty
import qualified System.Console.ANSI as ANSI
import Network.IPFS
import qualified Network.IPFS.Peer as IPFS.Peer
import qualifie... |
075ff0e31a543d5863fe74b5c56bd5b0ae5ff36746014a6bc47c3d23dbb821d3 | TrustInSoft/tis-kernel | cfg.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/kernel_internals/typing/cfg.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
Copyright ( C ) 2001 - 2003
< > ... |
8c510f39a4e7bbba50fd22a549280d5132ac27b78f8098ccec07d5ba8ec93f8c | LudoTheHUN/adatx | core.clj | (ns adatx.core
; (:use [clojail.core :only [sandbox]]
; [clojail.testers :only [blacklist-symbols blacklist-objects]]
; [clojure.pprint]
; [clojure.walk]
[ adatx.progseq : as ] )
)
TODOs 2013 - 0 - 24
;TODO DONE move genprog and spec_iterate to their own namespace (and anything supportin... | null | https://raw.githubusercontent.com/LudoTheHUN/adatx/ea6a7fa79354bcc1e9c66116ff18f1d66ef62e28/src/adatx/core.clj | clojure | (:use [clojail.core :only [sandbox]]
[clojail.testers :only [blacklist-symbols blacklist-objects]]
[clojure.pprint]
[clojure.walk]
TODO DONE move genprog and spec_iterate to their own namespace (and anything supporting them)
inspect correct arrities
DONE create known function store - symlookup
create... | (ns adatx.core
[ adatx.progseq : as ] )
)
TODOs 2013 - 0 - 24
TODO
TODO
TODO Identify all the critical errors that only sb can survive
DONE Setting up sandbox in clojail
|
a04532a189ea296cc331822d2cfe719cd67981f0f4e0d5eeb637753d3fd2692f | ayazhafiz/plts | eval.ml | open Language
let rec isnumeric t =
match t with
| TmZero _ -> true
| TmSucc (_, term) -> isnumeric term
| _ -> false
let rec isval ctx t =
match t with
| term when isnumeric term -> true
| TmTrue _ | TmFalse _ | TmUnit _ | TmString _ | TmFloat _ | TmInert _ -> true
| TmTag (_, _, term, _) -> isval ct... | null | https://raw.githubusercontent.com/ayazhafiz/plts/59b3996642f4fd5941c96a4987643303acc3dee6/tapl/11-full_simply_typed/eval.ml | ocaml | open Language
let rec isnumeric t =
match t with
| TmZero _ -> true
| TmSucc (_, term) -> isnumeric term
| _ -> false
let rec isval ctx t =
match t with
| term when isnumeric term -> true
| TmTrue _ | TmFalse _ | TmUnit _ | TmString _ | TmFloat _ | TmInert _ -> true
| TmTag (_, _, term, _) -> isval ct... | |
0234d02fe617c7ada7ab8a1fbe9d1ed549c21ed5a4f754ff5a39c853ec8c9eed | bsansouci/bsb-native | bool.mli | (***********************************************************************)
(* *)
(* ocamlbuild *)
(* *)
, , projet Galliu... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/ocamlbuild/bool.mli | ocaml | *********************************************************************
ocamlbuild
... | , , projet Gallium , INRIA Rocquencourt
Copyright 2007 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 .
Original author :
type 'a boolean =
And of ... |
287a41091d100ac526ecacd60f837a02a53f57c5bea8cb8c6f66324e7ae4e3e3 | elaforge/karya | SaveGitT.hs | Copyright 2015
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
| Types used by " Cmd . SaveGit " . This is so Cmd . Cmd does n't have to incur
a dependency on the bindings . This does n't matter so much now that
-- it's an external package, ... | null | https://raw.githubusercontent.com/elaforge/karya/de1b6e8cb0a17870801cc4dd49de8de62eb6c5fe/Cmd/SaveGitT.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
it's an external package, but it still seems like isolating dependencies
is a good thing.
| History to be saved to disk. The updates are post-diff to know which bits
of state to write, and the commit is wha... | Copyright 2015
| Types used by " Cmd . SaveGit " . This is so Cmd . Cmd does n't have to incur
a dependency on the bindings . This does n't matter so much now that
module Cmd.SaveGitT where
import qualified Util.GitT as GitT
import qualified Util.Pretty as Pretty
import qualified Ui.Ui as Ui
import qualif... |
a1b52362ef874dec15fc344d0d935c983dc91ecfc11a029324691f6759bdfe83 | alexander-yakushev/compliment | t_resources.clj | (ns compliment.sources.t-resources
(:require [clojure.java.io :as io]
[compliment.context :as ctx]
[compliment.sources.resources :as src]
[compliment.t-helpers :refer :all]
[fudje.sweet :refer :all]
[clojure.test :refer :all]))
(deftest resources-test
(fa... | null | https://raw.githubusercontent.com/alexander-yakushev/compliment/34c2d85cfa14afa8ca3ff0faf69ef85be9f9dc82/test/compliment/sources/t_resources.clj | clojure | (ns compliment.sources.t-resources
(:require [clojure.java.io :as io]
[compliment.context :as ctx]
[compliment.sources.resources :as src]
[compliment.t-helpers :refer :all]
[fudje.sweet :refer :all]
[clojure.test :refer :all]))
(deftest resources-test
(fa... | |
2324f8f079fd19b506d789db2640e0563244e864dfa723de2c52f65fcb7ba3ba | artyom-poptsov/guile-smc | set.scm | (add-to-load-path (getenv "abs_top_srcdir"))
(use-modules (srfi srfi-64)
(oop goops)
(tests common)
(smc core set))
(define %test-name "set")
(configure-test-logging! %test-name)
(test-begin %test-name)
(test-equal "initialize: empty set"
'()
(let ((set (make <set>)))... | null | https://raw.githubusercontent.com/artyom-poptsov/guile-smc/bfee22bf82ff54c4c83924c611f4671e3aee8049/tests/set.scm | scheme | (add-to-load-path (getenv "abs_top_srcdir"))
(use-modules (srfi srfi-64)
(oop goops)
(tests common)
(smc core set))
(define %test-name "set")
(configure-test-logging! %test-name)
(test-begin %test-name)
(test-equal "initialize: empty set"
'()
(let ((set (make <set>)))... | |
56f4fe640e4c376634cd7dfd428291036142b29ea6f4442dc39c181190e50d9c | statusfailed/cartographer-string-diagrammatic-reasoning | Type.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleContexts #
# LANGUAGE TupleSections #
module Data.Hypergraph.Type
( Signature(..)
, HyperEdgeId(..)
, Port(..)
, ClosedHypergraph(..)
, OpenHypergraph(..... | null | https://raw.githubusercontent.com/statusfailed/cartographer-string-diagrammatic-reasoning/7559db3f6de17dfa2dc13a6bf29f95c9cebcf7c4/cartographer/src/Data/Hypergraph/Type.hs | haskell | Used to turn a type-level Source/Target into a value level one.
| Uniquely identify each edge of a hypergraph.
NOTE: Does not say what the "shape" of each generator is.
phantom types for type safety
the diagram without having to repeat code for each type.
| Ports of a hyperedge.
This is parametrised by f to allo... | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleContexts #
# LANGUAGE TupleSections #
module Data.Hypergraph.Type
( Signature(..)
, HyperEdgeId(..)
, Port(..)
, ClosedHypergraph(..)
, OpenHypergraph(..... |
47bd5fda845d3c0c7280f89fa5704c706632820295dc00d08f04c88f8430cc17 | chuchao333/6.945 | utils.scm | (declare (usual-integrations))
(define (identity x) x)
(define (any? x) #t)
(define ((compose f g) x) (f (g x)))
;;; This is to keep the Scheme printer from going into an infinite
;;; loop if you try to print a circular data structure, such as an
;;; environment
(set! *unparser-list-depth-limit* 10)
(set! *unpa... | null | https://raw.githubusercontent.com/chuchao333/6.945/c50bb28aadf0c3fcda3c8e56b4a61b9a2d582552/ps4/code/utils.scm | scheme | This is to keep the Scheme printer from going into an infinite
loop if you try to print a circular data structure, such as an
environment | (declare (usual-integrations))
(define (identity x) x)
(define (any? x) #t)
(define ((compose f g) x) (f (g x)))
(set! *unparser-list-depth-limit* 10)
(set! *unparser-list-breadth-limit* 10)
|
19ad2f7378df6826ad6a2d8bf6243028ba568d32a6ab82c8d71f243f5c79422a | CloudI/CloudI | rec_test1.erl | -*- coding : utf-8 -*-
-*- erlang - indent - level : 2 -*-
%%% -------------------------------------------------------------------
Copyright 2010 - 2019 < > ,
< >
and < >
%%%
This file is part of PropEr .
%%%
%%% PropEr is free software: you can redistribute it a... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/proper/test/rec_test1.erl | erlang | -------------------------------------------------------------------
PropEr is free software: you can redistribute it and/or modify
(at your option) any later version.
PropEr is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITN... | -*- coding : utf-8 -*-
-*- erlang - indent - level : 2 -*-
Copyright 2010 - 2019 < > ,
< >
and < >
This file is part of PropEr .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the Licens... |
45195665076b6508754dac08d523e32b31fe2a240d12a9eb4b2299a4dddf9ba2 | zotonic/zotonic | m_l10n.erl | @author < >
2011
@doc Localization of Zotonic . Country , and other lookups .
Copyright 2011
%%
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
%%
%% U... | null | https://raw.githubusercontent.com/zotonic/zotonic/3c870c01b45b4803e4c241caa8a53069230d17db/apps/zotonic_mod_l10n/src/models/m_l10n.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... | @author < >
2011
@doc Localization of Zotonic . Country , and other lookups .
Copyright 2011
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(m_l10n).
-author("Marc Worrell <>").
-behaviour(zotoni... |
d5ba3ebe51a588e4d9379f649dbc869bd4ce595dceba2e1fac633a53e56a0648 | input-output-hk/cardano-rt-view | CheckEvents.hs | # LANGUAGE RecordWildCards #
module Cardano.RTView.Notifications.CheckEvents
( launchNotifications
) where
import Control.Concurrent.STM.TVar (TVar, readTVarIO)
import Control.Monad (forM, forever, when)
import qualified Data.HashMap.Strict as HM
import Data.Text (Text, pack)
imp... | null | https://raw.githubusercontent.com/input-output-hk/cardano-rt-view/0ff669a5acc8d81a35aa5a924cbb79978d0999a8/src/Cardano/RTView/Notifications/CheckEvents.hs | haskell | # LANGUAGE RecordWildCards #
module Cardano.RTView.Notifications.CheckEvents
( launchNotifications
) where
import Control.Concurrent.STM.TVar (TVar, readTVarIO)
import Control.Monad (forM, forever, when)
import qualified Data.HashMap.Strict as HM
import Data.Text (Text, pack)
imp... | |
4f097b3be03a22104dbb2a51a163b15a9085ac4ce5f11a3e1003e5d267d18296 | apache/couchdb-rebar | java.erl | -*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% ex: ts=4 sw=4 ft=erlang et
-module(java).
-export([factory/0]).
-include("lambda.hrl").
-include("extra.hrl").
factory() ->
?FUN.
| null | https://raw.githubusercontent.com/apache/couchdb-rebar/8578221c20d0caa3deb724e5622a924045ffa8bf/inttest/erlc_dep_graph/src/java.erl | erlang | ex: ts=4 sw=4 ft=erlang et | -*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*-
-module(java).
-export([factory/0]).
-include("lambda.hrl").
-include("extra.hrl").
factory() ->
?FUN.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.