_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 |
|---|---|---|---|---|---|---|---|---|
8c0b6120fb2a4bade08ebc3a8f1638e2b519bd8122e8bfac73e85401e6dca8fd | marigold-dev/chusai | arg.mli | MIT License
Copyright ( c ) 2022 Marigold < >
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal in
the Software without restriction , including without limitation the rights to
u... | null | https://raw.githubusercontent.com/marigold-dev/chusai/09f798c585121d3b02bf3fed0f52f15c3bdc79a1/layer2/lib/chusai_cli/arg.mli | ocaml | * Describes the [--rpc-address] arg.
* Describes the [--rpc-port] arg.
* Describes the [--endpoint] arg.
* Describes the [--operator] arg.
* Describes the [--wallet], an adress that refer the [Wallet_sc] used to interact with
[Mint_sc].
* Describes the [--rollup], an address that refer the rollup semantic.
* ... | MIT License
Copyright ( c ) 2022 Marigold < >
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal in
the Software without restriction , including without limitation the rights to
u... |
30a50db385d50eb422333bcf777d1a1d0390a639e75c6d027dbed2d79330549b | dcos/dcos-net | dcos_net_sysmon.erl | -module(dcos_net_sysmon).
-behavior(gen_server).
-export([
start_link/0,
init_metrics/0
]).
%% gen_server callbacks
-export([init/1, handle_call/3,
handle_cast/2, handle_info/2]).
-include_lib("kernel/include/logger.hrl").
-record(state, {}).
-spec(start_link() -> {ok, Pid :: pid()} | ignore | {error, ... | null | https://raw.githubusercontent.com/dcos/dcos-net/7bd01ac237ff4b9a12a020ed443e71c45f7063f4/apps/dcos_net/src/dcos_net_sysmon.erl | erlang | gen_server callbacks
===================================================================
gen_server callbacks
===================================================================
===================================================================
===================================================================
====... | -module(dcos_net_sysmon).
-behavior(gen_server).
-export([
start_link/0,
init_metrics/0
]).
-export([init/1, handle_call/3,
handle_cast/2, handle_info/2]).
-include_lib("kernel/include/logger.hrl").
-record(state, {}).
-spec(start_link() -> {ok, Pid :: pid()} | ignore | {error, Reason :: term()}).
star... |
e00156b4166b3c335b038c594cff3ff0cb0c4d007d3e51b616a2657370f52908 | xmonad/xmonad-contrib | Sift.hs | -----------------------------------------------------------------------------
-- |
Module : XMonad . Actions . Sift
-- Description : Functions for sifting windows up and down.
Copyright : ( c ) 2020 < >
-- License : BSD3-style (see LICENSE)
--
Maintainer : < >
-- Stability : stable... | null | https://raw.githubusercontent.com/xmonad/xmonad-contrib/3058d1ca22d565b2fa93227fdde44d8626d6f75d/XMonad/Actions/Sift.hs | haskell | ---------------------------------------------------------------------------
|
Description : Functions for sifting windows up and down.
License : BSD3-style (see LICENSE)
Stability : stable
Portability : unportable
like a swap would, a sift causes the windows at either end of the stack
to trade positi... | Module : XMonad . Actions . Sift
Copyright : ( c ) 2020 < >
Maintainer : < >
Functions for sifting windows up and down . Sifts behave identically to
swaps ( i.e. ' ' and ' swapDown ' from " XMonad . StackSet " ) , except in
the wrapping case : rather than rotating the entire stack by... |
5c3fa5e3829b0cab9de4f12d7cde4bca0add57daa0b41c55ac5937a50ad1bb0c | Plutonomicon/plutarch-plutus | HList.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
module Plutarch.DataRepr.Internal.HList (
-- * HRec and Label types
HRec (HNil, HCons),
HRecGeneric (HRecGeneric),
Labeled (Labeled, unLabeled),
-- * Field indexing functions
hrecField,
hrecField',
-- * ... | null | https://raw.githubusercontent.com/Plutonomicon/plutarch-plutus/3140f47adefae4523a0ca777fc09e724703d9269/Plutarch/DataRepr/Internal/HList.hs | haskell | * HRec and Label types
* Field indexing functions
* Type families
* Internal utils
------------------------------------------------------------------------------
------ HList and HRec types
-------- Field indexing functions
| Index HRec using Elem
-------- Internal utils
Example:
>>> natElem @_ @0
He... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
module Plutarch.DataRepr.Internal.HList (
HRec (HNil, HCons),
HRecGeneric (HRecGeneric),
Labeled (Labeled, unLabeled),
hrecField,
hrecField',
type IndexList,
type IndexLabel,
type SingleItem,
type Drop... |
82b070a2c72d4f5d9427c7d0082ef05241ce7fe420faa8a215a6544b41ff5cb0 | skanev/playground | 20-tests.scm | (require rackunit rackunit/text-ui)
(require eopl)
(load-relative "../20.scm")
(define eopl-1.20-tests
(test-suite
"Tests for EOPL exercise 1.20"
(check-equal? (count-occurences 'x '((f x) y (((x z) x))))
3)
(check-equal? (count-occurences 'x '((f x) y (((x z) () x))))
... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/01/tests/20-tests.scm | scheme | (require rackunit rackunit/text-ui)
(require eopl)
(load-relative "../20.scm")
(define eopl-1.20-tests
(test-suite
"Tests for EOPL exercise 1.20"
(check-equal? (count-occurences 'x '((f x) y (((x z) x))))
3)
(check-equal? (count-occurences 'x '((f x) y (((x z) () x))))
... | |
73b10720a64383ff4878fe704d0f594049d54c2a76bb1961dae3e81c2f579edb | timjb/halma | AwsLambdaMain.hs | # LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
Halma AWS Lambda Executable
This serverless chatbot executable expects
- an update event from the Telegram Bot API , provided as JSON via stdin
- the Telegram API token in the environment variable TELEGRAM_TOKE... | null | https://raw.githubusercontent.com/timjb/halma/0267d636dbed0de03d2d6527ca35458637a0021c/halma-telegram-bot/AwsLambdaMain.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NamedFieldPuns #
module Main (main) where
Halma AWS Lambda Executable
This serverless chatbot executable expects
- an update event from the Telegram Bot API , provided as JSON via stdin
- the Telegram API token in the environment variable TELEGRAM_TOKEN
- the name of the S3 bucket... |
035c84aa3ec471845254920195402255a3f667897f69a0de79502bf54cd1b12c | mirage/conan | test.mli | type 'a t = private
| True : 'a t
| False : 'a t
| Numeric : 'a Integer.t * 'a Comparison.t -> 'a t
| Float : float Comparison.t -> float t
| Unicode_string : [ `BE | `LE ] * string Comparison.t -> string t
| String : string Comparison.t -> string t
| Length : int Comparison.t -> string t
| Regex : Re.t... | null | https://raw.githubusercontent.com/mirage/conan/fb144c7785ff0aa4ec6d8c87e58ca2a0c2d328db/src/test.mli | ocaml | type 'a t = private
| True : 'a t
| False : 'a t
| Numeric : 'a Integer.t * 'a Comparison.t -> 'a t
| Float : float Comparison.t -> float t
| Unicode_string : [ `BE | `LE ] * string Comparison.t -> string t
| String : string Comparison.t -> string t
| Length : int Comparison.t -> string t
| Regex : Re.t... | |
96f807fc65c89de3e56c6a6210bf66f5c68f671eee5fe726d515afb3ad59811b | rowangithub/DOrder | term2.ml | let rec loop x z =
if (x<100 && 100<z) then
if (Random.bool ()) then loop (x+1) z
else loop (x-1) (z-1)
else assert (x >= 100 || z <= 100)
let main x y z =
if (x < 100 && z < 100) then loop x z
else ()
let _ = main (-1) (-1) (-1) | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/icfp/term2.ml | ocaml | let rec loop x z =
if (x<100 && 100<z) then
if (Random.bool ()) then loop (x+1) z
else loop (x-1) (z-1)
else assert (x >= 100 || z <= 100)
let main x y z =
if (x < 100 && z < 100) then loop x z
else ()
let _ = main (-1) (-1) (-1) | |
f00314f18523ec5de278a0063dbccd58d9c8a3d687da9b72db68dfeab6c58005 | mokus0/junkbox | BFCell.hs | {-# OPTIONS_GHC -fglasgow-exts #-}
module BFCell (
BFCell(..)
) where
class (Monad m, Num b, Ord b) => BFCell m a b | m a -> b
where
inc :: a -> m ()
inc = incNTimes 1
dec :: a -> m ()
dec = incNTimes (-1)
isZero :: a -> m Bool
isZero = isN 0
output :: a -> m b
input :: a -> b -> m ()
-- ... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Projects/BrainFuck%20take%202/BFCell.hs | haskell | # OPTIONS_GHC -fglasgow-exts #
optimized forms, with default implementations |
module BFCell (
BFCell(..)
) where
class (Monad m, Num b, Ord b) => BFCell m a b | m a -> b
where
inc :: a -> m ()
inc = incNTimes 1
dec :: a -> m ()
dec = incNTimes (-1)
isZero :: a -> m Bool
isZero = isN 0
output :: a -> m b
input :: a -> b -> m ()
incNTimes :: b -> a -> m ()
incNTime... |
7a2cf0c10bcb04f59b54b22a8c35110f73f36ee35bf3133ae0455bf6a250a9c1 | rd--/hsc3 | rd-20060909.hs | diffraction ( rd , 2006 - 09 - 09 )
let diffraction_p _ =
let x = mouseX kr 0.001 0.02 Exponential 0.1
y = mouseY kr 120 400 Exponential 0.1
f = mce2 32 64 * lfNoise0 kr 4
s = pulse ar f (x * lfNoise0 kr 32)
in resonz s (y + 0.1 * lfNoise0 kr 2) (lfNoise0 kr 6 * 0.4 + 0.8) * ... | null | https://raw.githubusercontent.com/rd--/hsc3/fb2ae8fb1923515938b69481a8971cc6b6d7a258/Help/Graph/rd-20060909.hs | haskell | diffraction ( rd , 2006 - 09 - 09 )
let diffraction_p _ =
let x = mouseX kr 0.001 0.02 Exponential 0.1
y = mouseY kr 120 400 Exponential 0.1
f = mce2 32 64 * lfNoise0 kr 4
s = pulse ar f (x * lfNoise0 kr 32)
in resonz s (y + 0.1 * lfNoise0 kr 2) (lfNoise0 kr 6 * 0.4 + 0.8) * ... | |
bc55166cfc539192ef14e69f32d32181c301ffa4cec7327e39cecc6d1f0fcaa0 | tamarit/pn_suite | pn_select_html.erl | -module( pn_select_html ).
-export( [create/0] ).
-include("pn.hrl").
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Create select options
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
create() ->
Directories =
[
"mcc_models/2011/FMS",
"mcc_models/2011/Kanban",
"mcc_models/2011/MAPK",
"... | null | https://raw.githubusercontent.com/tamarit/pn_suite/d497add0d2e60f0bdcc5d2ffb1aedec166be3542/src/pn_select_html.erl | erlang |
Create select options
io:format("examples/" ++ Dir ++ "\n"),
io:format("examples/" ++ Dir ++ "\n"), | -module( pn_select_html ).
-export( [create/0] ).
-include("pn.hrl").
create() ->
Directories =
[
"mcc_models/2011/FMS",
"mcc_models/2011/Kanban",
"mcc_models/2011/MAPK",
"mcc_models/2011/Peterson",
"mcc_models/2011/Philosophers",
... |
6f201a1a904fcb983d6898b95169e30b3c3e733a646ad6af7f5d24a465e674ff | emillon/ocaml-noise | test_cipher_state.ml | open OUnit2
module Data = struct
let key = Noise.Private_key.of_bytes @@ Cstruct.of_hex "12"
let make nonce =
Noise.Cipher_state.create
~unsafe_nonce:nonce
key
let other_key = Noise.Private_key.of_bytes @@ Cstruct.of_hex "34"
end
let test_with_ =
let test cipher_state expected ctxt =
let... | null | https://raw.githubusercontent.com/emillon/ocaml-noise/d5a3e0f634fba1f8d948a91c70a1dad6470722b0/test/unit/test_cipher_state.ml | ocaml | open OUnit2
module Data = struct
let key = Noise.Private_key.of_bytes @@ Cstruct.of_hex "12"
let make nonce =
Noise.Cipher_state.create
~unsafe_nonce:nonce
key
let other_key = Noise.Private_key.of_bytes @@ Cstruct.of_hex "34"
end
let test_with_ =
let test cipher_state expected ctxt =
let... | |
558f1fd3736a3500113915d271b6e7a9cdc316ad6a4c3eadc77fd9fd34ef4242 | LexiFi/menhir | lr0.ml | (******************************************************************************)
(* *)
(* *)
... | null | https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/lr0.ml | ocaml | ****************************************************************************
file LICEN... |
, Paris
, PPS , Université Paris Diderot
. All rights reserved . This file is distributed under the
terms of the GNU General Public License version 2 , as... |
eb8052d547a9e82ccf543bb499259b10b4ba4a73af31046a6648d57bc565535d | robert-strandh/SICL | methods.lisp | (cl:in-package #:sicl-describe)
(defmethod describe-object :around (object stream)
(call-next-method)
(format stream "~%")
(values))
(defmethod describe-object (object stream)
(format stream "Object of unknown type."))
(defmethod describe-object ((object standard-object) stream)
(format stream "A standard ... | null | https://raw.githubusercontent.com/robert-strandh/SICL/57e2f48f1068d8e9d63754a8e9f5243f4e727cbb/Code/Environment/Describe/methods.lisp | lisp | FIXME: say "proper list", "dotted list" and "circular list", and
state the number of CONS cells. | (cl:in-package #:sicl-describe)
(defmethod describe-object :around (object stream)
(call-next-method)
(format stream "~%")
(values))
(defmethod describe-object (object stream)
(format stream "Object of unknown type."))
(defmethod describe-object ((object standard-object) stream)
(format stream "A standard ... |
f0330b7a64afecf34b2d41a2b3ecbc036f15fcbcf34c797cfba6a6cb38fa11dc | ruricolist/lisp-magick-wand | packages.lisp | ImageMagick binding for Common Lisp
Copyright ( c ) 2006 , 2007 , 2008 , 2009 < >
;;;; All rights reserved.
;;;;
;;;; Redistribution and use in source and binary forms, with or without
;;;; modification, are permitted provided that the following conditions are met:
;;;;
;;;; * Redistributions of source cod... | null | https://raw.githubusercontent.com/ruricolist/lisp-magick-wand/82ee7b8a9c3bbbd871602f5aad9b29d109f2fb8d/packages.lisp | lisp | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redis... | ImageMagick binding for Common Lisp
Copyright ( c ) 2006 , 2007 , 2008 , 2009 < >
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO ,
(in-package :cl-user)
(defpackage :lisp-magick-wand
(:nicknames :magick... |
d33331465819466cdb33134b71c2bbe93a4809dcbba3c5352b00acad6e0162e1 | Engelberg/project-alchemy | ecc.clj | (ns ^{:author "Mark Engelberg",
:doc "A Clojure port of chapters 1-4 of Programming Bitcoin"}
project-alchemy.ecc
(:refer-clojure :exclude [+ - * / cond])
(:require [clojure.math.numeric-tower :as nt]
[better-cond.core :refer [cond defnc defnc-]]
[project-alchemy.helper :refer [has... | null | https://raw.githubusercontent.com/Engelberg/project-alchemy/c791fb495341ddf703e2f23a05cb5d283a486ded/src/project_alchemy/ecc.clj | clojure | which is a point on the secp256k1 curve
Serialization
Currently doesn't give meaningful errors if bytes are wrong length
Base 58 encoding
Addresses
WIF format for private key
Printing utilities
Print secp256k1 points in hex notation | (ns ^{:author "Mark Engelberg",
:doc "A Clojure port of chapters 1-4 of Programming Bitcoin"}
project-alchemy.ecc
(:refer-clojure :exclude [+ - * / cond])
(:require [clojure.math.numeric-tower :as nt]
[better-cond.core :refer [cond defnc defnc-]]
[project-alchemy.helper :refer [has... |
ccaa6e96152001d8142826d52133f1f31dc321cfc6b789f0b7ca4cdfadcf0bac | kelamg/HtDP2e-workthrough | ex352.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex352) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Intertwined-Data/ex352.rkt | racket | about the language level of this file in a form that our tools can easily process.
– Number
– Symbol
– (make-add BSL-var-expr BSL-var-expr)
– (make-mul BSL-var-expr BSL-var-expr)
BSL-var-expr Symbol Number -> BSL-var-expr
produces a BSL-var-expr like ex
with all occurences of x replaced by v | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex352) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(require 2htdp/abstraction)
(define-struct add (left ... |
b2d6e27326bfb9cc3115fc61e468e28b2e05266fc4284c999610e5ef338cf30d | ragkousism/Guix-on-Hurd | telephony.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2015 , 2016 < >
Copyright © 2016 < >
Copyright © 2016 < >
Copyright © 2016 ng0 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you c... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/telephony.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2014 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2015 , 2016 < >
Copyright © 2016 < >
Copyright © 2016 < >
Copyright © 2016 ng0 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public L... |
258d5e7d5e1d55f7a7d40be0f13ea41c73b051468eb0968f4277f16903b2a8f8 | georgjz/raylib-gambit-scheme | quaternion.scm | ;;;-----------------------------------------------------------------------------
;;; This file is the interface to the struct Quaternion in raylib.
;;;-----------------------------------------------------------------------------
(c-declare #<<c-declare-end
#include "raylib.h"
Quaternion MakeQuaternion( float x, floa... | null | https://raw.githubusercontent.com/georgjz/raylib-gambit-scheme/df7ea6db54a3196d13c66dac4909c64cea6e5a88/src/raylibbinding/structs/quaternion.scm | scheme | -----------------------------------------------------------------------------
This file is the interface to the struct Quaternion in raylib.
-----------------------------------------------------------------------------
|
(c-declare #<<c-declare-end
#include "raylib.h"
Quaternion MakeQuaternion( float x, float y, float z, float w )
{
}
c-declare-end
)
(c-define-type quaternion "Quaternion" "VECTOR4_to_SCMOBJ" "SCMOBJ_to_VECTOR4" #f)
(define make-quaternion (c-lambda (float float float float) quaternion "MakeQuaternion"))
|
678fc19310e3d720101b8054bc509114d70b0a5f18db915d4f5af535f59202fe | TorXakis/TorXakis | TestVexprToSMT.hs |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
{-# LANGUAGE OverloadedStrings #-}
modul... | null | https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/solve/test/TestVexprToSMT.hs | haskell | # LANGUAGE OverloadedStrings #
-------------------------------------------------------------------------
Tests
------------------------------------------------------------------------- |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
module TestVexprToSMT
(
testVexprToSMTLi... |
7d40bc6f545934927049d56bb7433a2b382f3b5decd6df9abf04e9e00ed603cd | dbuenzli/topkg | lint.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2016 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/dbuenzli/topkg/ea1e0981a18ce4160ec21e8a73f67cb748059671/src-bin/lint.ml | ocaml | Command line interface | ---------------------------------------------------------------------------
Copyright ( c ) 2016 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... |
edef2927f097ed22ada7da458a8f7184711144bb0aa3d3e4580e5702eddb71be | dym/movitz | image.lisp | ;;;;------------------------------------------------------------------
;;;;
Copyright ( C ) 2001,2000 , 2002 - 2005 ,
Department of Computer Science , University of Tromso , Norway .
;;;;
;;;; Filename: image.lisp
Description : Construction of Movitz images .
Author : < >
Created a... | null | https://raw.githubusercontent.com/dym/movitz/56176e1ebe3eabc15c768df92eca7df3c197cb3d/image.lisp | lisp | ------------------------------------------------------------------
Filename: image.lisp
Distribution: See the accompanying file COPYING.
------------------------------------------------------------------
keep this at the top.
A non-GC-root scratch register
tag-specific c... | Copyright ( C ) 2001,2000 , 2002 - 2005 ,
Department of Computer Science , University of Tromso , Norway .
Description : Construction of Movitz images .
Author : < >
Created at : Sun Oct 22 00:22:43 2000
$ I d : image.lisp , v 1.126 2008 - 07 - 18 13:15:40 ffjeld Exp $
(in-package ... |
0581549d228a44a76d8397daa4f1fe6304829873711d7643d40d733d0bdeda60 | grin-compiler/ghc-grin | basic02.hs | # LANGUAGE ForeignFunctionInterface #
foreign import ccall "_prim_int_print" prim_int_print :: Int -> IO ()
main = prim_int_print (1 + 2)
| null | https://raw.githubusercontent.com/grin-compiler/ghc-grin/ebc4dca2e1f5b3581d4b84726730564ce909d786/ghc-grin-benchmark/basic/basic02.hs | haskell | # LANGUAGE ForeignFunctionInterface #
foreign import ccall "_prim_int_print" prim_int_print :: Int -> IO ()
main = prim_int_print (1 + 2)
| |
a84cb05bd572319e260c7fcdc8f57838c511d1c0c3d1dc5f5303f9c2a0f42388 | Rainist/kubeletter | kubectl_test.clj | (ns kubeletter.harvester.kubectl-test
(:require [clojure.test :refer :all]
[kubeletter.harvester.kubectl :refer :all]))
(defn exit-code [result]
@(:exit-code result))
(deftest success-test
;; UNCOMMENT ONLY IF YOUR INTERGRATION TESTING TOOLS PROVIDE HAS RIGHT ENVIRONMENT OR TO TEST LOCALLY
;;
( ... | null | https://raw.githubusercontent.com/Rainist/kubeletter/da326a067147f45b069a49d22730ea07675f9e16/kubeletter/test/kubeletter/harvester/kubectl_test.clj | clojure | UNCOMMENT ONLY IF YOUR INTERGRATION TESTING TOOLS PROVIDE HAS RIGHT ENVIRONMENT OR TO TEST LOCALLY
exit-code
(= 0)
not
is
(testing "fail"))
(->> (ping)
exit-code
(= 0)
is
(testing "cluster-info"))
exit-code
(= 0)
is
(testing "hpa"))
(->> ... | (ns kubeletter.harvester.kubectl-test
(:require [clojure.test :refer :all]
[kubeletter.harvester.kubectl :refer :all]))
(defn exit-code [result]
@(:exit-code result))
(deftest success-test
( - > > ( kubectl " fail " )
( - > > ( hpa " production " )
)
|
da0258ed52cd619c59d3c680d0c664112124dc677f5d7b4584e9b3684f57465a | GracielaUSB/graciela | Pragma.hs | module Language.Graciela.Pragma
( Pragma (..)
) where
--------------------------------------------------------------------------------
data Pragma
= LogicAnywhere
| EnableTrace
| GetAddressOf
deriving (Eq, Ord, Show)
| null | https://raw.githubusercontent.com/GracielaUSB/graciela/db69c8b225d6172aaa0ff90a67f4a997e4d8a0c6/src/Haskell/Language/Graciela/Pragma.hs | haskell | ------------------------------------------------------------------------------ | module Language.Graciela.Pragma
( Pragma (..)
) where
data Pragma
= LogicAnywhere
| EnableTrace
| GetAddressOf
deriving (Eq, Ord, Show)
|
a5047209c3b106d6d4b3d12ba79bccb693c8e0eb8d40c6211646131b2df7231d | dylex/zip-stream | zip.hs | # LANGUAGE CPP #
import Control.Arrow ((+++))
import Control.Monad (filterM, void)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Control.Monad.Trans.Resource (MonadResource, runResourceT)
import qualified Data.ByteString.Char8 as BSC
import qualified Data.Conduit as C
im... | null | https://raw.githubusercontent.com/dylex/zip-stream/735fe015a4a19b4c93b096a8761efb206b6b89f4/cmd/zip.hs | haskell | zip files only want forward slashes
FIXME: timezone | # LANGUAGE CPP #
import Control.Arrow ((+++))
import Control.Monad (filterM, void)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Control.Monad.Trans.Resource (MonadResource, runResourceT)
import qualified Data.ByteString.Char8 as BSC
import qualified Data.Conduit as C
im... |
fb0271162aee6584838cb38ed5bd650d39ff13d838a309ab82bf9b876ecd2e41 | PeterDWhite/Osker | DirectoryIF.hs | Copyright ( C ) , 2002 , 2003
Copyright ( c ) OHSU , 2002 , 2003
module DirectoryIF
interface
interface
interface
interface
, D.DIR (..) -- Directory structure, re-exported
) where
----------------------------------------------------------------------
-- The POSIX.1 directory interfaces
---... | null | https://raw.githubusercontent.com/PeterDWhite/Osker/301e1185f7c08c62c2929171cc0469a159ea802f/Posix/DirectoryIF.hs | haskell | Directory structure, re-exported
--------------------------------------------------------------------
The POSIX.1 directory interfaces
--------------------------------------------------------------------
--------------------------------------------------------------------
closedir ( DIR *dirp )
Close the director... | Copyright ( C ) , 2002 , 2003
Copyright ( c ) OHSU , 2002 , 2003
module DirectoryIF
interface
interface
interface
interface
) where
imports
import qualified SystemCall as SC
import qualified DirectoryData as D
closedir ::
closedir dir = SC.osker (SC.CloseDirReq dir)
opendir ( char * )
o... |
d3e54ccc35712ff17ef0ffb9d123e85d8cfb76eb89454d81d13d0c1e803c51c1 | sjl/clojurecraft | units.clj | (ns clojurecraft.units
(:use [clojurecraft.util])
)
(defn to-pixels [n type]
(case type
:pixels [n :pixels]
:meters [(* 32 n) :meters]))
(defn to-meters [n type]
(case type
:meters [n :meters]
:pixels [(/ n 32) :pixels]))
| null | https://raw.githubusercontent.com/sjl/clojurecraft/c4f27cd3a4953c6a439b0ef9b37241fd51731083/src/clojurecraft/units.clj | clojure | (ns clojurecraft.units
(:use [clojurecraft.util])
)
(defn to-pixels [n type]
(case type
:pixels [n :pixels]
:meters [(* 32 n) :meters]))
(defn to-meters [n type]
(case type
:meters [n :meters]
:pixels [(/ n 32) :pixels]))
| |
3ea4dfeaf90531a388bffbcec3176766fc5f29bb2b5511a6c83064d7ce27adce | ulrikstrid/ocaml-oidc | Token.mli | (** Types and functions to work with the token endpoint *)
* { { : -connect-core-1_0.html#TokenEndpoint } OpenID Connect Core 1.0 TokenEndpoint }
module Response : sig
type token_type = Bearer
type t = {
token_type : token_type;
scope : Scopes.t list;
expires_in : int option;
access_token : strin... | null | https://raw.githubusercontent.com/ulrikstrid/ocaml-oidc/8a9159a26bb1c2c56ac06a9e9c1db8224fe2e347/oidc/Token.mli | ocaml | * Types and functions to work with the token endpoint
* A token response
* Types and functions to work with the token endpoint
* A token request
* Creates the body for the token request
* Parses a request body into a t
* {2 Utils}
* Creates a valid Basic auth header from [client_id] and [secret] |
* { { : -connect-core-1_0.html#TokenEndpoint } OpenID Connect Core 1.0 TokenEndpoint }
module Response : sig
type token_type = Bearer
type t = {
token_type : token_type;
scope : Scopes.t list;
expires_in : int option;
access_token : string option;
refresh_token : string option;
id_token :... |
d59f9f029240ac62639af4a8433c91ebaa682338354adcc75ac617fc4a8a790f | athanclark/dag | DAGSpec.hs | module Data.Graph.DAGSpec (main, spec) where
import Data.Graph.DAG
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Instances
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "someFunction" $ do
it "should work fine" $ do
property someFunction
someFunction :: Bool -> Bool ... | null | https://raw.githubusercontent.com/athanclark/dag/805d83ee42d32e6ed2e5bc140a5001e03b2dec50/test/Data/Graph/DAGSpec.hs | haskell | module Data.Graph.DAGSpec (main, spec) where
import Data.Graph.DAG
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Instances
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "someFunction" $ do
it "should work fine" $ do
property someFunction
someFunction :: Bool -> Bool ... | |
558ff9ea03d85d239bbbc5e12ca1a878d4f480828b683488eeea5b59ab7dfcaf | falsetru/htdp | 16.3.3.scm | (load "16.3.1.scm")
(define file? symbol?)
(define (du-dir dir)
(+ (du-dir-files-in-dirs (dir-dirs dir))
(du-dir-files (dir-files dir))))
(define (du-dir-files-in-dirs dirs)
(cond [(empty? dirs) 0]
[else (+ (du-dir (first dirs)) (du-dir-files-in-dirs (rest dirs)))]))
(define (du-dir-files files)
... | null | https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/16/16.3.3.scm | scheme | (load "16.3.1.scm")
(define file? symbol?)
(define (du-dir dir)
(+ (du-dir-files-in-dirs (dir-dirs dir))
(du-dir-files (dir-files dir))))
(define (du-dir-files-in-dirs dirs)
(cond [(empty? dirs) 0]
[else (+ (du-dir (first dirs)) (du-dir-files-in-dirs (rest dirs)))]))
(define (du-dir-files files)
... | |
3d7737a006e89d1e00a6dbd14bbba269f16a3180216b452088329afc6daa1f59 | clj-easy/graalvm-clojure | main.clj | (ns simple.main
(:gen-class))
(defn -main [& args]
(println "Hello GraalVM!"))
| null | https://raw.githubusercontent.com/clj-easy/graalvm-clojure/5de155ad4f95d5dac97aac1ab3d118400e7d186f/clojure/src/simple/main.clj | clojure | (ns simple.main
(:gen-class))
(defn -main [& args]
(println "Hello GraalVM!"))
| |
492917742d77cab31aa6d7287210202d7653e8662a68cb818f586eb21e1a2b3d | ondrap/json-stream | JStreamParse.hs | # LANGUAGE BangPatterns , OverloadedStrings #
import Control.Exception
import Control.Monad
import Data.Time.Clock
import System.Environment (getArgs)
import System.IO
import qualified Data.ByteString as B
import Data.JsonStream.Parser
import Data.Aeson.Types (Value(..))
parseWith :: IO B.ByteString -> Parser a -> B.... | null | https://raw.githubusercontent.com/ondrap/json-stream/d97da63181255bbc4b8c81b1411b14d769b104e6/benchmarks/JStreamParse.hs | haskell | # LANGUAGE BangPatterns , OverloadedStrings #
import Control.Exception
import Control.Monad
import Data.Time.Clock
import System.Environment (getArgs)
import System.IO
import qualified Data.ByteString as B
import Data.JsonStream.Parser
import Data.Aeson.Types (Value(..))
parseWith :: IO B.ByteString -> Parser a -> B.... | |
b70259fffade5a55d0ae4c98b7971aa04bfd0604c7bf82f3d71ecef1bf150708 | dgiot/dgiot | prop_emqx_psk.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2022 EMQ 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 o... | null | https://raw.githubusercontent.com/dgiot/dgiot/c601555e45f38d02aafc308b18a9e28c543b6f2c/test/props/prop_emqx_psk.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 - 2022 EMQ 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(prop_emqx_psk).
-include_lib("proper/include/proper.hrl").
-define(ALL(Vars, Types, E... |
713cf1c5bfea30921603fadecc27637156fd097caaee0c73aa8632524c9aad6e | bcrafton/processor | types.ml | (* Abstract syntax of (a small subset of) x86 assembly instructions *)
let word_size = 1
;;
let opcode_nop = 0
let opcode_add = 1
let opcode_sub = 2
let opcode_not = 3
let opcode_and = 4
let opcode_or = 5
let opcode_nand = 6
let opcode_nor = 7
let opcode_mov = 8
let opcode_sar = 9
let opcode_shr = 10
let opcode_shl =... | null | https://raw.githubusercontent.com/bcrafton/processor/4f8e7b853eab6ec6586e7208c42f675e696c431f/assembler/types.ml | ocaml | Abstract syntax of (a small subset of) x86 assembly instructions
R-TYPE
I-TYPE
name, where used
name of fun, where used
name, where used, where defined
name, where used, where defined
name, where used, where defined
value, where used
intended arity, actual arity, where called
these belong to assemb... | let word_size = 1
;;
let opcode_nop = 0
let opcode_add = 1
let opcode_sub = 2
let opcode_not = 3
let opcode_and = 4
let opcode_or = 5
let opcode_nand = 6
let opcode_nor = 7
let opcode_mov = 8
let opcode_sar = 9
let opcode_shr = 10
let opcode_shl = 11
let opcode_xor = 12
let opcode_test = 13
let opcode_cmp = 14
let o... |
d7f93537d89575f36a82d70aca02560e3e10588f862b23f5768e3321bb2fb054 | huangz1990/real-world-haskell-cn | NewtypeDiff.hs | file : ch06 / NewtypeDiff.hs
-- 可以:任意数量的构造器和字段
data TwoFields = TwoFields Int Int
-- 可以:一个字段
newtype Okay = ExactlyOne Int
-- 可以:可以使用类型变量
newtype Param a b = Param (Either a b)
可以:可以使用记录语法
newtype Record = Record {
getInt :: Int
}
-- 不可以:没有字段
newtype TooFew = TooFew
-- 不可以:多于一个字段
newtype TooManyFie... | null | https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/code/ch06/NewtypeDiff.hs | haskell | 可以:任意数量的构造器和字段
可以:一个字段
可以:可以使用类型变量
不可以:没有字段
不可以:多于一个字段
不可以:多于一个构造器 | file : ch06 / NewtypeDiff.hs
data TwoFields = TwoFields Int Int
newtype Okay = ExactlyOne Int
newtype Param a b = Param (Either a b)
可以:可以使用记录语法
newtype Record = Record {
getInt :: Int
}
newtype TooFew = TooFew
newtype TooManyFields = Fields Int Int
newtype TooManyCtors = Bad Int
... |
d2395511e5b427f423bd5d4c4dbda0b94a381450aab7b93c9cb0eb932e647bfc | kraison/vivace-graph-v3 | pcons.lisp | (in-package :graph-db)
(defstruct (pcons
(:constructor %make-pcons)
(:conc-name %pcons-)
(:print-function
(lambda (c s d)
(declare (ignore d))
(format s "#P(~A ~A (deleted-p ~A))"
(%pcons-car c) (%pcons-cdr c) ... | null | https://raw.githubusercontent.com/kraison/vivace-graph-v3/cf2caaf26baccec9afd4d6a79375cd9ff5fe0613/pcons.lisp | lisp | (in-package :graph-db)
(defstruct (pcons
(:constructor %make-pcons)
(:conc-name %pcons-)
(:print-function
(lambda (c s d)
(declare (ignore d))
(format s "#P(~A ~A (deleted-p ~A))"
(%pcons-car c) (%pcons-cdr c) ... | |
270fbe05b6ca92505c3958f5fa64f12b25e6c1fad01e0862297f923e79015c7d | clklein/decompose-plug | citations.rkt | #lang at-exp racket
(require scribble/manual
scriblib/autobib)
(provide (all-defined-out))
(define-cite ~cite citet generate-bibliography)
;; ----------------------------------------
(define ACM "ACM ")
(define IEEE "IEEE ")
(define IEEE/ACM "IEEE/ACM ")
(define SIGPLAN "SIGPLAN ")
(define International "I... | null | https://raw.githubusercontent.com/clklein/decompose-plug/5bb1acff487d055386c075581b395eb3cfdc12e9/aplas2011/citations.rkt | racket | ----------------------------------------
---------------------------------------- | #lang at-exp racket
(require scribble/manual
scriblib/autobib)
(provide (all-defined-out))
(define-cite ~cite citet generate-bibliography)
(define ACM "ACM ")
(define IEEE "IEEE ")
(define IEEE/ACM "IEEE/ACM ")
(define SIGPLAN "SIGPLAN ")
(define International "Intl. ")
(define Conference "Conf. ")
(define... |
5b152a32495854a9a07bc60427f608b86c0185133593d6cf6c2ac3878c257539 | ghollisjr/cl-ana | package.lisp | cl - ana is a Common Lisp data analysis library .
Copyright 2016
;;;;
This file is part of cl - ana .
;;;;
;;;; cl-ana is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License ,... | null | https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/makeres-utils/package.lisp | lisp |
cl-ana is free software: you can redistribute it and/or modify it
(at your option) any later version.
cl-ana is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License... | cl - ana is a Common Lisp data analysis library .
Copyright 2016
This file is part of cl - ana .
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
You may... |
212537c3787ceb48a366c45b2f840d7f60a59f6a3f0456d09a66bfd95950ad06 | wdebeaum/DeepSemLex | ticket.lisp | ;;;;
;;;; W::ticket
;;;;
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::ticket
(SENSES
((meta-data :origin plow :entry-date 20060615 :change-date nil :wn ("ticket%1:10:01" "ticket%1:10:00") :comments pq)
(LF-PARENT ONT::official-document)
(example "do you have a ticket")
)
)... | null | https://raw.githubusercontent.com/wdebeaum/DeepSemLex/ce0e7523dd2b1ebd42b9e88ffbcfdb0fd339aaee/trips/src/LexiconManager/Data/new/ticket.lisp | lisp |
W::ticket
|
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::ticket
(SENSES
((meta-data :origin plow :entry-date 20060615 :change-date nil :wn ("ticket%1:10:01" "ticket%1:10:00") :comments pq)
(LF-PARENT ONT::official-document)
(example "do you have a ticket")
)
)
)
))
|
fa0a9b1eedf86cdb310789e45f3749d68f0e249aaf3a908dc719b32f2a87dd99 | jimcrayne/jhc | read044.hs | test case from # 1091
main =
case True of {- | -}
True -> putStrLn "Hello World\n"
False {- | -} -> putStrLn "Goodbye Cruel World\n"
| null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/0_parse/2_pass/ghc/read044.hs | haskell | |
| | test case from # 1091
main =
True -> putStrLn "Hello World\n"
|
3a6406aaba2ceb14ad18d4c5b7af4c2b7da6ccd6444c64328423343bcc141dd9 | xh4/web-toolkit | char-info.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - UNICODE ; Base : 10 -*-
$ Header : /usr / local / cvsrep / cl - unicode / build / char - info.lisp , v 1.6 2012 - 05 - 04 21:17:45 edi Exp $
Copyright ( c ) 2008 - 2012 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/cl-unicode-20190521-git/build/char-info.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - UNICODE ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... | $ Header : /usr / local / cvsrep / cl - unicode / build / char - info.lisp , v 1.6 2012 - 05 - 04 21:17:45 edi Exp $
Copyright ( c ) 2008 - 2012 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILI... |
1f2e4c7c6ce5e5f624fda2c0b5e2453c09aece1be8bd37a709b2ccea27ba8aa2 | fetburner/Coq2SML | modops.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/checker/modops.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i
i
Various operations on modules a... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Util
open Names
open Uni... |
7864381e8b24cbb1bea461fec5e5612ec4a065bd1adc006aebea6337aff2864e | vnarek/jude | channel.mli | type 'a t
val create : unit -> 'a t
val send : 'a t -> 'a -> unit
val recv : 'a t -> 'a option
val close : 'a t -> unit
val consume : 'a t -> ('a -> unit) -> unit
| null | https://raw.githubusercontent.com/vnarek/jude/b1e9387d0242cd83b3b72695bce267c970de1857/lib/channel.mli | ocaml | type 'a t
val create : unit -> 'a t
val send : 'a t -> 'a -> unit
val recv : 'a t -> 'a option
val close : 'a t -> unit
val consume : 'a t -> ('a -> unit) -> unit
| |
67e46c79e0083ee748942c6191a3e674cae7ee5ada64454964f6a1dc89440bc6 | solita/mnt-teet | example_tuck_test.cljs | (ns teet.example-tuck-test
(:require [teet.project.project-controller]
[teet.drtest :as drt :include-macros true]
[tuck.core :as t]))
(defrecord MakeBackendRequest [])
(extend-protocol t/Event
MakeBackendRequest
(process-event [_ app]
(t/fx app
{:tuck.effect/type :command!
... | null | https://raw.githubusercontent.com/solita/mnt-teet/7a5124975ce1c7f3e7a7c55fe23257ca3f7b6411/app/frontend/test/teet/example_tuck_test.cljs | clojure | :screenshots? true ... TODO update drtest so that these can be run
without clj-chrome-devtools | (ns teet.example-tuck-test
(:require [teet.project.project-controller]
[teet.drtest :as drt :include-macros true]
[tuck.core :as t]))
(defrecord MakeBackendRequest [])
(extend-protocol t/Event
MakeBackendRequest
(process-event [_ app]
(t/fx app
{:tuck.effect/type :command!
... |
4c10bf24f8da1cc3d3711f5620783c172f3144d4c7ef0422467cd5d7628b37f5 | UBTECH-Walker/WalkerSimulationFor2020WAIC | _package_CruiserJointSetting.lisp | (cl:in-package cruiser_msgs-msg)
(cl:export '(JOINT_NUM-VAL
JOINT_NUM
CMD-VAL
CMD
JOINTINDEX-VAL
JOINTINDEX
PARAMETER-VAL
PARAMETER
)) | null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_16.04_v1.2_20200616/walker_install/share/common-lisp/ros/cruiser_msgs/msg/_package_CruiserJointSetting.lisp | lisp | (cl:in-package cruiser_msgs-msg)
(cl:export '(JOINT_NUM-VAL
JOINT_NUM
CMD-VAL
CMD
JOINTINDEX-VAL
JOINTINDEX
PARAMETER-VAL
PARAMETER
)) | |
23216ac4a72e24d685bf723912a488bf14317fd828e8f421a8072be1cb53c14e | michaelliao/cljweb | core.clj | (ns cljweb.core)
(defn foo
"I don't do a whole lot."
[x]
(println x "Hello, World!"))
(println (foo "Clojure:"))
定义自然数序列
(defn natuals []
(iterate inc 1))
定义奇数序列
(defn odds []
(filter odd? (natuals)))
;; 定义偶数序列
(defn evens []
(filter even? (natuals)))
;; 定义斐波那契数列
(defn fib []
(defn fib-iter [a b... | null | https://raw.githubusercontent.com/michaelliao/cljweb/d833635a334f1e821e2e7144782b41a7bda700b5/src/cljweb/core.clj | clojure | 定义偶数序列
定义斐波那契数列
打印前10个数 | (ns cljweb.core)
(defn foo
"I don't do a whole lot."
[x]
(println x "Hello, World!"))
(println (foo "Clojure:"))
定义自然数序列
(defn natuals []
(iterate inc 1))
定义奇数序列
(defn odds []
(filter odd? (natuals)))
(defn evens []
(filter even? (natuals)))
(defn fib []
(defn fib-iter [a b]
(lazy-seq (cons ... |
6180337beec4ef31ec60018cb4c65017cc2ecaa3f92b5434de73b291c3cc035f | tlaplus/tlapm | p_subst.ml |
* proof / subst.ml --- proofs ( substitution )
*
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* proof/subst.ml --- proofs (substitution)
*
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
open Ext
open Property
open Expr.T
open Expr.Subst
open P_t
let rec app... | null | https://raw.githubusercontent.com/tlaplus/tlapm/b82e2fd049c5bc1b14508ae16890666c6928975f/src/proof/p_subst.ml | ocaml | definition + negated original goal
definition + negated original goal |
* proof / subst.ml --- proofs ( substitution )
*
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* proof/subst.ml --- proofs (substitution)
*
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
open Ext
open Property
open Expr.T
open Expr.Subst
open P_t
let rec app... |
fe78004195b4692cb32178c0845a5664ca22aead1997d94320f4f0ef9001f6b7 | tact-lang/tact-obsolete | cp.ml | type codepage = Codepage of int
| null | https://raw.githubusercontent.com/tact-lang/tact-obsolete/675fc19d6a76a4a44b671227ef62427d961f2bde/tonvm/cp.ml | ocaml | type codepage = Codepage of int
| |
ae24988d0a718fb252c57e3d59d929317825533a6c54fd7e4f21ba5e2246528f | Haskallywags/school-of-haskell | HigherOrder.hs | module HW4.HigherOrder
( Tree (..)
, fun1
, fun2
, foldTree
, xor
, map'
, myFoldl
, sieveSundaram
) where
import Data.List
data Tree a = Leaf
| Node Integer (Tree a) a (Tree a)
deriving (Show, Eq)
fun1 :: [Integer] -> Integer
fun1 = undefined
fun2 :: Integer -> Integer
fun2 = undefined
fol... | null | https://raw.githubusercontent.com/Haskallywags/school-of-haskell/bf4475d2b1dff6165ea20461d87f4ce77aaedcf9/cis194/homework-4/src/HW4/HigherOrder.hs | haskell | private functions | module HW4.HigherOrder
( Tree (..)
, fun1
, fun2
, foldTree
, xor
, map'
, myFoldl
, sieveSundaram
) where
import Data.List
data Tree a = Leaf
| Node Integer (Tree a) a (Tree a)
deriving (Show, Eq)
fun1 :: [Integer] -> Integer
fun1 = undefined
fun2 :: Integer -> Integer
fun2 = undefined
fol... |
8e84f06b48c260745021183231d3b575b2d98006b2ae4bcc7cc395b44f9e8207 | bytekid/mkbtt | completion.mli | Copyright 2010
* GNU Lesser General Public License
*
* This file is part of MKBtt .
*
* is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either version 3 of the License , or (... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mascott/src/completion.mli | ocaml | ** TYPES **************************************************************
** EXCEPTIONS *********************************************************
** VALUES ************************************************************* | Copyright 2010
* GNU Lesser General Public License
*
* This file is part of MKBtt .
*
* is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either version 3 of the License , or (... |
ad8e2dcb7907bdb0421706e3865b25c756a88d0f13575155ba5a6df6bbcafd11 | Helium4Haskell/helium | ClassInstaneError14.hs | class X a where
f :: a -> Int
class X a => Y a where
g :: a -> Bool
g = f | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeClasses/ClassInstaneError14.hs | haskell | class X a where
f :: a -> Int
class X a => Y a where
g :: a -> Bool
g = f | |
c02f6b46bf7e69da6a2fb2c569bf10f951823b3cdaff9655ab2afad732e1dd6c | psg-mit/marshall | dyadic.mli | module type DYADIC =
sig
type t
type rounding_mode
type rand_state
val down : rounding_mode
val up : rounding_mode
val anti : rounding_mode -> rounding_mode
val of_int : ?prec:int -> round:rounding_mode -> int -> t
val make_int : ?prec:int -> round:rounding_mode -> int -> int -> t
val zero : t
val ... | null | https://raw.githubusercontent.com/psg-mit/marshall/65f20ebe02ce71c306c4bb334d119d939f1afdf9/src/dyadic.mli | ocaml | module type DYADIC =
sig
type t
type rounding_mode
type rand_state
val down : rounding_mode
val up : rounding_mode
val anti : rounding_mode -> rounding_mode
val of_int : ?prec:int -> round:rounding_mode -> int -> t
val make_int : ?prec:int -> round:rounding_mode -> int -> int -> t
val zero : t
val ... | |
13e0eb2aaddd395559c327a8a88050b4b2f39e4e584312206bd8b9a976021650 | spurious/sagittarius-scheme-mirror | server.scm | (import (rnrs)
(net server)
(sagittarius)
(sagittarius socket)
(util concurrent)
(rfc tls)
(rfc x.509)
(crypto)
(srfi :18)
(srfi :19)
(srfi :64))
(define (print . args) (for-each display args) (newline))
(test-begin "Simple server framework")
(define-constant +shutdown-port+ "7500")
;; use default config
;... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/tests/net/server.scm | scheme | use default config
no IPv6, no shutdown port and signel thread
wait until it's started
multi threading server
IPv6 may not be supported
more than max thread
test both sockets
IPv6 may not be supported
test both socket
stop server by accessing shutdown port
the thread management is done outside of our threads... | (import (rnrs)
(net server)
(sagittarius)
(sagittarius socket)
(util concurrent)
(rfc tls)
(rfc x.509)
(crypto)
(srfi :18)
(srfi :19)
(srfi :64))
(define (print . args) (for-each display args) (newline))
(test-begin "Simple server framework")
(define-constant +shutdown-port+ "7500")
(let ()
(define (hand... |
42b514e4aaad48409996117cff81ddacc606f3518b7a19dd84ac2a44e3ecd0a6 | input-output-hk/ouroboros-network | B.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE EmptyCase #-}
{-# LANGUAGE EmptyDataDeriving #-}
# LANGUAGE F... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/32af91686b86dac7454eee8b8a8d6e97a80638da/ouroboros-consensus-test/test-consensus/Test/Consensus/HardFork/Combinator/B.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DerivingVia #
# LANGUAGE EmptyCase #
# LANGUAGE EmptyDataDeriving #
# LANGUAGE GADTs #
... | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -Wno - orphans #
m... |
17c820a37aca3c0708287de198c01c356474310b02d4a635f76ca334b4d3aa88 | expipiplus1/vulkan | PipelineCache.hs | {-# language CPP #-}
No documentation found for Chapter " PipelineCache "
module Vulkan.Core10.PipelineCache ( createPipelineCache
, withPipelineCache
, destroyPipelineCache
, getPipelineCacheData
... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/ebc0dde0bcd9cf251f18538de6524eb4f2ab3e9d/src/Vulkan/Core10/PipelineCache.hs | haskell | # language CPP #
| vkCreatePipelineCache - Creates a new pipeline cache
= Description
Note
Applications /can/ track and manage the total host memory size of a
pipeline cache object using the @pAllocator@. Applications /can/ limit
the amount of data retrieved from a pipeline cache object in
'getPipelineCacheDa... | No documentation found for Chapter " PipelineCache "
module Vulkan.Core10.PipelineCache ( createPipelineCache
, withPipelineCache
, destroyPipelineCache
, getPipelineCacheData
... |
dfc8dc13d70c794620061753cbd09259ca3d851c66fc0cb13cff5b9747be0e36 | patricoferris/ocaml-multicore-monorepo | bench_semaphore.ml | open Eio.Std
let run_sender ~n_iters ~batch_size ~ack sem =
for i = 1 to n_iters do
Eio.Semaphore.release sem;
if i mod batch_size = 0 then
Eio.Semaphore.acquire ack
done
let run_bench ~domain_mgr ~clock ~use_domains ~n_iters ~batch_size =
let sem = Eio.Semaphore.make 0 in
let ack = Eio.Semaphor... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/624b3293ee41e83736fe7ac3a79f810c2b70f68b/duniverse/eio/bench/bench_semaphore.ml | ocaml | open Eio.Std
let run_sender ~n_iters ~batch_size ~ack sem =
for i = 1 to n_iters do
Eio.Semaphore.release sem;
if i mod batch_size = 0 then
Eio.Semaphore.acquire ack
done
let run_bench ~domain_mgr ~clock ~use_domains ~n_iters ~batch_size =
let sem = Eio.Semaphore.make 0 in
let ack = Eio.Semaphor... | |
cf102e75e0287713d8ad0262efba1ef269b8204b93125305b61734156bc1d70a | avsm/platform | opamParallel.ml | (**************************************************************************)
(* *)
Copyright 2012 - 2015 OCamlPro
Copyright 2012 INRIA
(* ... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/opam-client.2.0.5%2Bdune/src/core/opamParallel.ml | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2012 - 2015 OCamlPro
Copyright 2012 INRIA
GNU Lesser General Public License version 2.1 , with the special
open OpamStd.Op
open OpamProcess.Job.Op
let log fmt = OpamConsole.log "PARALLEL" fmt
let slog... |
047ae169af5dbcfb8e3e60c03c8926ada9e21e574281a7d22f6daefc37702dee | haskell-suite/base | IO.hs | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude #
# LANGUAGE ForeignFunctionInterface #
-----------------------------------------------------------------------------
-- |
-- Module : System.IO
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/... | null | https://raw.githubusercontent.com/haskell-suite/base/1ee14681910c76d0a5a436c33ecf3289443e65ed/System/IO.hs | haskell | ---------------------------------------------------------------------------
|
Module : System.IO
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : stable
Portability : portable
---------------------------------------------------------------------------
* Fil... | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude #
# LANGUAGE ForeignFunctionInterface #
Copyright : ( c ) The University of Glasgow 2001
The standard IO library .
module System.IO (
* The IO monad
IO,
fixIO,
FilePath,
| GHC note : a ' Handle ' will be automatically closed whe... |
523bf86672a0ef0addf098ed032b922dff0f248a1db495a2f85439bdf92dbeb7 | diasbruno/language-js | Imports.hs | module Test.Imports where
import Test.Hspec
import Test.Helpers
testImports = do
shouldBe (testTopLevelStatement "import \"test.js\"")
"Right (SImportFile (LS \"test.js\"))"
shouldBe (testTopLevelStatement "import * as A from \"test.js\"")
"Right (SImport (Left (Namespace (LI \"A\"))) (LS \"test.js\"))"
... | null | https://raw.githubusercontent.com/diasbruno/language-js/c986bb904e717fa8dd84f52473440ea726a275be/t/Test/Imports.hs | haskell | module Test.Imports where
import Test.Hspec
import Test.Helpers
testImports = do
shouldBe (testTopLevelStatement "import \"test.js\"")
"Right (SImportFile (LS \"test.js\"))"
shouldBe (testTopLevelStatement "import * as A from \"test.js\"")
"Right (SImport (Left (Namespace (LI \"A\"))) (LS \"test.js\"))"
... | |
f9fd9110e770a9f547357e45bd1d4b5cb6a7e7bd0e62b802b255e912dc011c7b | kunstmusik/score | accumulator.clj | (ns
^{ :author "Steven Yi"
:doc "Accumulator. Based on Andre Bartetzki's CMask." }
score.mask.accumulator
(:require [score.core :refer [wrap-generator]]))
Documentation for accumulate taken from CMask Manual
(defn accumulate
"The accumulator continuously sums all its input values to an inital val... | null | https://raw.githubusercontent.com/kunstmusik/score/87b532ec2e3e273f077be9bdd878427a25d0534c/src/main/score/mask/accumulator.clj | clojure | value, low, high, range
value, low, high, range | (ns
^{ :author "Steven Yi"
:doc "Accumulator. Based on Andre Bartetzki's CMask." }
score.mask.accumulator
(:require [score.core :refer [wrap-generator]]))
Documentation for accumulate taken from CMask Manual
(defn accumulate
"The accumulator continuously sums all its input values to an inital val... |
33890e4b4567b6c37436978af7fc574a5bce2606b89776148b7364d9bb3c6279 | funcool/suricatta | proto.clj | Copyright ( c ) 2014 - 2015 < >
;; All rights reserved.
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions are met:
;;
;; * Redistributions of source code must retain the above copyright notice, this
;; list of conditions... | null | https://raw.githubusercontent.com/funcool/suricatta/58e5d2080815aee19ee0893f8ed1b04043525c81/src/suricatta/proto.clj | clojure | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions ... | Copyright ( c ) 2014 - 2015 < >
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR LIABLE
FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXE... |
0fb7b10b865924fe966b3d96355d595d08d604d47132e738d7792bcee5146ad5 | footprintanalytics/footprint-web | refresh_slack_channel_user_cache.clj | (ns metabase.task.refresh-slack-channel-user-cache
(:require [clojure.tools.logging :as log]
[clojurewerkz.quartzite.jobs :as jobs]
[clojurewerkz.quartzite.schedule.cron :as cron]
[clojurewerkz.quartzite.schedule.simple :as simple]
[clojurewerkz.quartzite.triggers :as t... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/task/refresh_slack_channel_user_cache.clj | clojure | (ns metabase.task.refresh-slack-channel-user-cache
(:require [clojure.tools.logging :as log]
[clojurewerkz.quartzite.jobs :as jobs]
[clojurewerkz.quartzite.schedule.cron :as cron]
[clojurewerkz.quartzite.schedule.simple :as simple]
[clojurewerkz.quartzite.triggers :as t... | |
841bb8936837f729d3b073ae5953dac92cd80731def60352cbfac548a7c6c44e | bmeurer/ocamljit2 | Test.ml | module type S = sig type t and s = t end;;
module type S' = S with type t := int;;
module type S = sig module rec M : sig end and N : sig end end;;
module type S' = S with module M := String;;
| null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/testsuite/tests/typing-modules/Test.ml | ocaml | module type S = sig type t and s = t end;;
module type S' = S with type t := int;;
module type S = sig module rec M : sig end and N : sig end end;;
module type S' = S with module M := String;;
| |
89fede3dff90d834f76d292f38a1445257d173e0f7281502d1e8f2dd7b9bd282 | monadicsystems/okapi | Response.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
module Conduit.Type.Response where
import Control.Applicative
import Control.Monad.Combinators
import Data.Aeson
import Data.Int
import Data.Text
import Data.Time
impo... | null | https://raw.githubusercontent.com/monadicsystems/okapi/2ff768fac047770137c6fd09258218fd132efd0e/examples/realworld-json/Conduit/Type/Response.hs | haskell | # LANGUAGE OverloadedStrings #
userToken :: Text,
{
"errors":{
"body": [
"can't be empty"
]
}
}
| # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
module Conduit.Type.Response where
import Control.Applicative
import Control.Monad.Combinators
import Data.Aeson
import Data.Int
import Data.Text
import Data.Time
import GHC.Generics
data User = User
... |
b4d6196069ea041c82bde70a770e130e7c54b6075c8b928fec9db3d92459e36b | habit-lang/alb | Driver.hs | # LANGUAGE Rank2Types , OverloadedStrings , PatternGuards , TupleSections #
module Main where
import Prelude hiding ((<$>), pure)
import Control.Monad
import Data.IORef
import Data.Char
import Data.List (intercalate, nub)
import qualified Data.Map as Map
import Data.Maybe (fromMaybe, isNothing)
import quali... | null | https://raw.githubusercontent.com/habit-lang/alb/567d4c86194a884cc1ceeffca9663211de2d554c/src/Driver.hs | haskell | Data structures for describing command line options/settings:
Additional sources of options
Main compiler pipeline:
| # LANGUAGE Rank2Types , OverloadedStrings , PatternGuards , TupleSections #
module Main where
import Prelude hiding ((<$>), pure)
import Control.Monad
import Data.IORef
import Data.Char
import Data.List (intercalate, nub)
import qualified Data.Map as Map
import Data.Maybe (fromMaybe, isNothing)
import quali... |
ef6726d1bb5eaeafb02c9ff7c6870be0d0d425407a1664d9c4f8b10f2b0e762f | jgpc42/jmh-clojure | state.clj | (ns ^:internal ^:no-doc jmh.state
"Fns for assembling jmh state proxy classes."
(:require [jmh.util :as util]
[jmh.instrument :as instrument])
(:import [io.github.jgpc42.jmh Util]
[clojure.lang IFn RT]
[org.openjdk.jmh.annotations Param Setup State TearDown]))
(def ^{:private tr... | null | https://raw.githubusercontent.com/jgpc42/jmh-clojure/78f6ebcd59d782b0ca3b4f04d15a037657b87304/src/jmh/state.clj | clojure | (ns ^:internal ^:no-doc jmh.state
"Fns for assembling jmh state proxy classes."
(:require [jmh.util :as util]
[jmh.instrument :as instrument])
(:import [io.github.jgpc42.jmh Util]
[clojure.lang IFn RT]
[org.openjdk.jmh.annotations Param Setup State TearDown]))
(def ^{:private tr... | |
660e41175babb057d7b361ab34beb01b4e97bcc7670034e5459e7b659b5d5bed | mauny/the-functional-approach-to-programming | xHelv-O.ml | (*************************************************************************)
(* *)
(* Projet Formel *)
(* *)
CAML - light :... | null | https://raw.githubusercontent.com/mauny/the-functional-approach-to-programming/1ec8bed5d33d3a67bbd67d09afb3f5c3c8978838/cl-75/MLGRAPH.DIR/MLgraph.lib/Lib/xHelv-O.ml | ocaml | ***********************************************************************
Projet Formel
... | CAML - light :
45 rue d'Ulm
75005 PARIS
France
#open "MLgraph";;
let fn =
Helvetica_Oblique,{font_descr_filename="preloaded"... |
fb2dce358a4f94d36f7545b806c5ac21845fff9f133ebcde1e4d525017274146 | JacquesCarette/Drasil | Import.hs | # LANGUAGE PostfixOperators , Rank2Types #
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
module Language.Drasil.Code.Imperative.Import (codeType, spaceCodeType,
publicFunc, privateMethod, publicInOutFunc, privateInOutMethod,
genConstructor, mkVar, mkVal, convExpr, convStmt, genModDef, genModFuncs,
genModClass... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/f7eaea75e0bcf270040c9fa4af214cd467410ddd/code/drasil-code/lib/Language/Drasil/Code/Imperative/Import.hs | haskell | # OPTIONS_GHC -Wno-redundant-constraints #
| Gets a chunk's 'CodeType', by checking which 'CodeType' the user has chosen to
match the chunk's 'Space' to.
| Gets the 'CodeType' for a 'Space', based on the user's choice.
If 'UID' is for a constant and user has chosen 'Inline', convert the constant's
Otherwise, jus... | # LANGUAGE PostfixOperators , Rank2Types #
module Language.Drasil.Code.Imperative.Import (codeType, spaceCodeType,
publicFunc, privateMethod, publicInOutFunc, privateInOutMethod,
genConstructor, mkVar, mkVal, convExpr, convStmt, genModDef, genModFuncs,
genModClasses, readData, renderC
) where
import Language.... |
f24a09a541074d01e0fbfa6ff8f2630ed819444530dca6ceaefc6c816dce4e9d | privet-kitty/cl-competitive | reference-bit.lisp | ;;;
;;; This is an implementation of binary indexed tree, specialized for the
;;; ordinary `+' operation. You'd better use abstract-bit.lisp instead. I leave
;;; it just for my reference.
;;;
(defpackage :cp/reference-bit
(:use :cl)
(:export #:cp/bitree-inc! #:cp/bitree-sum #:coerce-to-bitree! #:count-inversions))... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/reference-bit.lisp | lisp |
This is an implementation of binary indexed tree, specialized for the
ordinary `+' operation. You'd better use abstract-bit.lisp instead. I leave
it just for my reference.
Example: count inversions in a sequence |
(defpackage :cp/reference-bit
(:use :cl)
(:export #:cp/bitree-inc! #:cp/bitree-sum #:coerce-to-bitree! #:count-inversions))
(in-package :cp/reference-bit)
(declaim (inline bitree-inc!))
(defun bitree-inc! (bitree index delta)
"Destructively increments the vector: vector[INDEX] += DELTA"
(let ((len (length bit... |
2dcae51f39e5d26972f97d38037b2488f542c1922e7d52a021aed8aadbb958e8 | EveryTian/Haskell-Codewars | Series.hs | module Series (slices) where
import Data.Char (digitToInt)
slices :: Int -> String -> [[Int]]
slices n s = f n s (length s)
where f n s l
| n > l = []
| otherwise = map digitToInt (take n s) : f n (tail s) (l - 1)
| null | https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/exercism/series/src/Series.hs | haskell | module Series (slices) where
import Data.Char (digitToInt)
slices :: Int -> String -> [[Int]]
slices n s = f n s (length s)
where f n s l
| n > l = []
| otherwise = map digitToInt (take n s) : f n (tail s) (l - 1)
| |
c9cbbbb16eaf3bb0229339d3921155ed9f9ea01ccf32000f5ab2cd671908f1a8 | golems/motion-grammar-kit | parse.lisp | ;;;; -*- Lisp -*-
;;;;
Copyright ( c ) 2012 , Georgia Tech Research Corporation
;;;; All rights reserved.
;;;;
Author(s ): < >
Georgia Tech Humanoid Robotics Lab
Under Direction of Prof.
;;;;
;;;; This file is provided under the following "BSD-style" License:
;;;;
;;;; Redistribution and use in source a... | null | https://raw.githubusercontent.com/golems/motion-grammar-kit/42e8e19e25c4333f76cba4b3c4e589b24f98d660/src/parse.lisp | lisp | -*- Lisp -*-
All rights reserved.
This file is provided under the following "BSD-style" License:
Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following
conditions are met:
* Redistributions of source code must retain the above
c... | Copyright ( c ) 2012 , Georgia Tech Research Corporation
Author(s ): < >
Georgia Tech Humanoid Robotics Lab
Under Direction of Prof.
CONTRIBUTORS " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES ,
DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMA... |
af6cb794465973da3bff48d9163aba0e95327dbbd0bdfd1eb31362bf4f7fd7c5 | uwplse/synapse | piecewise-test.rkt | #lang s-exp rosette
(require
"../opsyn/metasketches/piecewise.rkt" "../opsyn/metasketches/imetasketch.rkt"
"../opsyn/metasketches/cost.rkt" "../opsyn/metasketches/iterator.rkt"
"../opsyn/engine/metasketch.rkt" "../opsyn/engine/eval.rkt" "../opsyn/engine/util.rkt"
"../opsyn/bv/lang.rkt"
"util.rkt"
racket/ge... | null | https://raw.githubusercontent.com/uwplse/synapse/10f605f8f1fff6dade90607f516550b961a10169/test/piecewise-test.rkt | racket | y = -x^2, x ≤ 0
y = x_1 + x_2, otherwise
The number of points in the postcondition is important: we could overfit with
n degree-0 polynomials.
the solution is y=2
check that it's y=2
check that it's y=2
Tests the correctness of M0.
check that it's y=x
check that it's y=x | #lang s-exp rosette
(require
"../opsyn/metasketches/piecewise.rkt" "../opsyn/metasketches/imetasketch.rkt"
"../opsyn/metasketches/cost.rkt" "../opsyn/metasketches/iterator.rkt"
"../opsyn/engine/metasketch.rkt" "../opsyn/engine/eval.rkt" "../opsyn/engine/util.rkt"
"../opsyn/bv/lang.rkt"
"util.rkt"
racket/ge... |
cb1537fbbb86635dd1343cd1f0ab7e0252eb95a416ffb9e400141d36d2a2c9a3 | ajhc/ajhc | Prim.hs | # LANGUAGE UnboxedTuples , ForeignFunctionInterface , NoImplicitPrelude #
module Jhc.Prim(module Jhc.Prim.Bits, module Jhc.Prim, module Jhc.Prim.Prim, module Jhc.Prim.IO, module Jhc.Prim.Type.Basic, module Jhc.Prim.Type.Word) where
import Jhc.Prim.Bits
import Jhc.Prim.IO
-- | this is wrapped around arbitrary expressi... | null | https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/lib/jhc/Jhc/Prim.hs | haskell | | this is wrapped around arbitrary expressions and just evaluates them to whnf | # LANGUAGE UnboxedTuples , ForeignFunctionInterface , NoImplicitPrelude #
module Jhc.Prim(module Jhc.Prim.Bits, module Jhc.Prim, module Jhc.Prim.Prim, module Jhc.Prim.IO, module Jhc.Prim.Type.Basic, module Jhc.Prim.Type.Word) where
import Jhc.Prim.Bits
import Jhc.Prim.IO
foreign import primitive "seq" runRaw :: a -> ... |
3e01bdf4804b6760207d58190587b457d6fa76a8a2810fcef1771f926d7cd876 | cyga/real-world-haskell | Fold.hs | -- file: ch04/Fold.hs
foldl :: (a -> b -> a) -> a -> [b] -> a
foldl step zero (x:xs) = foldl step (step zero x) xs
foldl _ zero [] = zero
-- file: ch04/Fold.hs
foldl (+) 0 (1:2:3:[])
== foldl (+) (0 + 1) (2:3:[])
== foldl (+) ((0 + 1) + 2) (3:[])
== foldl (+) (((... | null | https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch04/Fold.hs | haskell | file: ch04/Fold.hs
file: ch04/Fold.hs
file: ch04/Fold.hs
file: ch04/Fold.hs
file: ch04/Fold.hs
file: ch04/Fold.hs
file: ch04/Fold.hs
file: ch04/Fold.hs
file: ch04/Fold.hs
file: ch04/Fold.hs
file: ch04/Fold.hs
file: ch04/Fold.hs
file: ch04/Fold.hs
file: ch04/Fold.hs
file: ch04/Fold.hs
file: ch04/Fold.hs
... | foldl :: (a -> b -> a) -> a -> [b] -> a
foldl step zero (x:xs) = foldl step (step zero x) xs
foldl _ zero [] = zero
foldl (+) 0 (1:2:3:[])
== foldl (+) (0 + 1) (2:3:[])
== foldl (+) ((0 + 1) + 2) (3:[])
== foldl (+) (((0 + 1) + 2) + 3) []
== (... |
12e0942cc081bc951176c69053d84fdd5a731229bd06bc8de896868bf001b165 | jafingerhut/thalia | core.contracts-0.0.5-project.clj | (defproject core.contracts "0.0.5-SNAPSHOT"
;; This file is identical to project.clj from the core.contracts
;; github repo, except I have added the following line needed to run
;; lein-clojuredocs.
:eval-in :leiningen
:description "Contracts programming for Clojure."
:dependencies [[org.clojure/clojure "1.... | null | https://raw.githubusercontent.com/jafingerhut/thalia/20c98eec8168ff72c5b3965cc048b817d34a4583/scripts/core.contracts-0.0.5-project.clj | clojure | This file is identical to project.clj from the core.contracts
github repo, except I have added the following line needed to run
lein-clojuredocs. | (defproject core.contracts "0.0.5-SNAPSHOT"
:eval-in :leiningen
:description "Contracts programming for Clojure."
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/core.unify "0.5.3"]]
:plugins [[lein-swank "1.4.4"]
[lein-marginalia "0.7.1"]]
:profiles {:1.2 {:dependenci... |
b98684db0f9e280d3a4d80b82813c068a7fd6ba4b522646671c381a96a739319 | zippy/anansi | ceptr.cljs | (ns ss.ceptr
(:require
[clojure.string :as string]
[goog.events :as events]
[goog.Uri :as uri]
[goog.net.XhrIo :as xhr]
[ss.debug :as debug]
[ss.utils :as u]
))
(def ceptr-url (goog.Uri. "/api"))
(defn command
"Send command to a ... | null | https://raw.githubusercontent.com/zippy/anansi/881aa279e5e7836f3002fc2ef7623f2ee1860c9a/public/ss/src/ceptr.cljs | clojure | (ns ss.ceptr
(:require
[clojure.string :as string]
[goog.events :as events]
[goog.Uri :as uri]
[goog.net.XhrIo :as xhr]
[ss.debug :as debug]
[ss.utils :as u]
))
(def ceptr-url (goog.Uri. "/api"))
(defn command
"Send command to a ... | |
1c2ee343cce1ba5b6df72d92c005b9afbd24fe4d8dcab946ebc51155e5bf3a68 | mnasoft/math | ls-rotation.lisp | ;;;; ./src/tests/ls-rotation.lisp
(in-package #:math/tests)
(def-suite ls-rotation
:description "Мастер-набор всех тестов math/ls-rotation решение системы
линейных уравнений методом вращения."
:in all)
(in-suite ls-rotation)
(def-test ls-rotation-solve-x ()
(is-true
(math/core:semi-equal
(let ((m '((... | null | https://raw.githubusercontent.com/mnasoft/math/dca9f4212c800b418aa7ed4422fbe5ac7001bf35/src/tests/ls-rotation.lisp | lisp | ./src/tests/ls-rotation.lisp |
(in-package #:math/tests)
(def-suite ls-rotation
:description "Мастер-набор всех тестов math/ls-rotation решение системы
линейных уравнений методом вращения."
:in all)
(in-suite ls-rotation)
(def-test ls-rotation-solve-x ()
(is-true
(math/core:semi-equal
(let ((m '((1 2 3 14)
(2 1 1 7) ... |
8e9ae095e50af31351a9229ddfab9d70b2316c23a55c40fee49f8e70ad178c26 | dreyk/etsdb | etsdb_mput_fsm.erl | %% -------------------------------------------------------------------
%%
%%
Copyright ( c ) Dreyk . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of th... | null | https://raw.githubusercontent.com/dreyk/etsdb/f0bca0cb09ff4b692b8370749a995922545e6f4e/src/etsdb_mput_fsm.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissi... | Copyright ( c ) Dreyk . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(etsdb_mput_fsm).
-beh... |
c05115832397e05f20755dd7c96337281ca00c194345dd750fdce3fa06949968 | pixlsus/GIMP-Scripts | script-foo-batch-example.scm | (script-fu-register ;Here we start registering our script in the
's procedural database ( so it will appear
;in the Help>>Procedure Browser) and any other
;script will be able to run it
... | null | https://raw.githubusercontent.com/pixlsus/GIMP-Scripts/d1b121aa26ac4ac79772c993199cfa022abafb61/script-foo-batch-example.scm | scheme | Here we start registering our script in the
in the Help>>Procedure Browser) and any other
script will be able to run it
Next you have to set a few required parameters:
you give a name to your script, anything
you want, but better if it begins with "script-fu".
It will be used along the script
the name of the script sho... | 's procedural database ( so it will appear
"Batch process to sharpen images\
RGB , RGBA , GRAY , , INDEXED or INDEXEDA )
the first parameter has to be a
this first parameter will be labeled as " Images "
the second parameter relates to the
sharpen plugin . It has to be a number ( SF - VALUE ) ,
the third pa... |
8a68101aa95d8c8c457e93daf0223c5e6d90513cafa1c0562ae145d071c5983d | binaryage/chromex | resources_private.clj | (ns chromex.app.resources-private
"resourcesPrivate.
* available since Chrome 47"
(:refer-clojure :only [defmacro defn apply declare meta let partial])
(:require [chromex.wrapgen :refer [gen-wrap-helper]]
[chromex.callgen :refer [gen-call-helper gen-tap-all-events-call]]))
(declare api-table)
... | null | https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/apps_private/chromex/app/resources_private.clj | clojure | -- convenience ------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------
-- API TABLE --------------------------------------------------------... | (ns chromex.app.resources-private
"resourcesPrivate.
* available since Chrome 47"
(:refer-clojure :only [defmacro defn apply declare meta let partial])
(:require [chromex.wrapgen :refer [gen-wrap-helper]]
[chromex.callgen :refer [gen-call-helper gen-tap-all-events-call]]))
(declare api-table)
... |
02197bce3b6f102e8a3bfe7e6577a81bb3cab10300a0edb9c7cfe061b2648f0e | LuisThiamNye/chic | interop.clj | (ns jl.interop
(:require
[chic.util :as util :refer [loop-zip]]
[jl.compiler.op :as op]
[jl.compiler.type :as type]
[jl.interop :as interop])
(:import
(org.objectweb.asm Type Opcodes)
(java.lang.reflect Method Field Modifier Constructor Executable)))
"Accessible -6.html#jls-6.6
and applica... | null | https://raw.githubusercontent.com/LuisThiamNye/chic/5cd7c951b5ac97db2b9434e0dc4b3961f5d9dddb/src/jl/interop.clj | clojure | Ensure class initialises via its own classloader
of the same name
Class can only satisfy classes that already exist
could also implement by keeping set of visited bases and only checking the unvisited
(-elementType [self])
(-arrayType [self])
(-getInterfaces [self] nil)
(-getDeclaredMethods [self] )
(-getDecla... | (ns jl.interop
(:require
[chic.util :as util :refer [loop-zip]]
[jl.compiler.op :as op]
[jl.compiler.type :as type]
[jl.interop :as interop])
(:import
(org.objectweb.asm Type Opcodes)
(java.lang.reflect Method Field Modifier Constructor Executable)))
"Accessible -6.html#jls-6.6
and applica... |
1d23c432ee823a913d19d729666cf9156e5feeedaa34eabb95af11bd89aa99e0 | thi-ng/geom | core.cljc | (ns thi.ng.geom.core
(:refer-clojure :exclude [into]))
(def ^:dynamic *resolution* 20)
(defprotocol IDistance
(dist [_ a])
(dist-squared [_ a]))
(defprotocol IHeading
(heading [_])
(heading-xy [_])
(heading-xz [_])
(heading-yz [_])
(angle-between [_ a])
(slope-xy [_])
(slope-xz [_])
(slope-yz [... | null | https://raw.githubusercontent.com/thi-ng/geom/85783a1f87670c5821473298fa0b491bd40c3028/src/thi/ng/geom/core.cljc | clojure | (ns thi.ng.geom.core
(:refer-clojure :exclude [into]))
(def ^:dynamic *resolution* 20)
(defprotocol IDistance
(dist [_ a])
(dist-squared [_ a]))
(defprotocol IHeading
(heading [_])
(heading-xy [_])
(heading-xz [_])
(heading-yz [_])
(angle-between [_ a])
(slope-xy [_])
(slope-xz [_])
(slope-yz [... | |
a1a62a2783501211d5964c7743da2c31ccb1e687ff803d851011cd8960d628c5 | dbuenzli/cmdliner | cmdliner_manpage.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2011 The cmdliner programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright ... | null | https://raw.githubusercontent.com/dbuenzli/cmdliner/f239981642aefc2792382a1417c690bb6eaeb264/src/cmdliner_manpage.ml | ocaml | Standard sections
Section order
Section maps
Section maps, maps section names to their section order and reversed
content blocks (content is not reversed in `Block blocks). The sections
are listed in reversed order. Unknown sections get the order of the last
known section.
N.B. this flattens `Blocks... | ---------------------------------------------------------------------------
Copyright ( c ) 2011 The cmdliner programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright ... |
a45827cbe914e78385055cb0658600feec4e601160a6308bf68d968fc325a3cf | iu-parfunc/lvars | ST.hs | # LANGUAGE BangPatterns #
# LANGUAGE CPP #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNe... | null | https://raw.githubusercontent.com/iu-parfunc/lvars/78e73c96a929aa75aa4f991d42b2f677849e433a/src/par-transformers/Control/Par/ST.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE GADTs #
# LANGUAGE Rank2Types #
# LANGUAGE TypeSynonymInstances #
|
This file provides a basic capability for parallel in-place modification of
implicit vector in the background, whi... | # LANGUAGE BangPatterns #
# LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables ... |
356750c2cae3bf73823ae387613fb65575a7d3ae213bd3bd9e001cbde1a81f74 | adamwalker/clash-riscv | Prog.hs | module Prog where
import Prelude
import RiscV.RV32I
fib :: [Instr]
fib = [
Initialize the first 2 fibbonnacci numbers - in X1 and X2
RIInstr $ IInstr ADDI (Word12 0) X0 X1,
RIInstr $ IInstr ADDI (Word12 1) X0 X2,
Initialize the counter
RIInstr $ IInstr ADDI (Word12 11) X0 X3,
... | null | https://raw.githubusercontent.com/adamwalker/clash-riscv/84a90731a07c3427695b4926d7159f9e9902c1a1/src/Prog.hs | haskell | Do the addition
Decrement the counter
Branch
Write the output in a loop | module Prog where
import Prelude
import RiscV.RV32I
fib :: [Instr]
fib = [
Initialize the first 2 fibbonnacci numbers - in X1 and X2
RIInstr $ IInstr ADDI (Word12 0) X0 X1,
RIInstr $ IInstr ADDI (Word12 1) X0 X2,
Initialize the counter
RIInstr $ IInstr ADDI (Word12 11) X0 X3,
... |
ded34b48c8160fc13b76344e9e1f8bc54c50d742c08a35813849d6bd14a1ab67 | kana-sama/sicp | core.scm | (define (identity x) x)
(define (always x) (lambda (y) x))
(define (flip f)
(lambda args
(apply f (reverse args))))
(define (partial f . args1)
(lambda (#!rest args2)
(apply f (append args1 args2))))
(define (compose . fns)
(lambda (x)
(fold-right (lambda (f x) (f x)) x fns)))
(define (square x) (... | null | https://raw.githubusercontent.com/kana-sama/sicp/fc637d4b057cfcae1bae3d72ebc08e1af52e619d/core.scm | scheme | (define (identity x) x)
(define (always x) (lambda (y) x))
(define (flip f)
(lambda args
(apply f (reverse args))))
(define (partial f . args1)
(lambda (#!rest args2)
(apply f (append args1 args2))))
(define (compose . fns)
(lambda (x)
(fold-right (lambda (f x) (f x)) x fns)))
(define (square x) (... | |
d9d906219b7291313e52ea971a7d533c05dd81102bd9ccbeb610e1b369730d41 | propan/circular-buffer | circular_buffer.clj | (ns hamakar.circular-buffer)
(defn- default-value
[t]
(case t
:any nil
:boolean false
0))
(defn- empty-vector
[t size default]
(if (= t :any )
(vec (repeat size default))
(into (vector-of t) (repeat size default))))
(defn- ^long circular-nth
[^long i ^long start ^long size direction]
... | null | https://raw.githubusercontent.com/propan/circular-buffer/0bfe882dda8633d36dc2257d398dfb29f3096faf/src/hamakar/circular_buffer.clj | clojure | (ns hamakar.circular-buffer)
(defn- default-value
[t]
(case t
:any nil
:boolean false
0))
(defn- empty-vector
[t size default]
(if (= t :any )
(vec (repeat size default))
(into (vector-of t) (repeat size default))))
(defn- ^long circular-nth
[^long i ^long start ^long size direction]
... | |
d72730995e2091de622f8beb623d3a851a3144b4e58ca265f72baf5a772c5c10 | anmonteiro/ocaml-h2 | http1_handler.ml | open Httpaf
let redirect_handler : Reqd.t Gluten.reqd -> unit =
fun { Gluten.reqd; _ } ->
let response =
Response.create
~headers:
(Headers.of_list
[ "Location", ":9443"; "Connection", "close" ])
`Moved_permanently
in
Reqd.respond_with_string reqd response ""
let redirect_err... | null | https://raw.githubusercontent.com/anmonteiro/ocaml-h2/fceaad2cfa198f090b47d6d72cb1c4ea9dee4a07/examples/alpn/mirage/http1_handler.ml | ocaml | open Httpaf
let redirect_handler : Reqd.t Gluten.reqd -> unit =
fun { Gluten.reqd; _ } ->
let response =
Response.create
~headers:
(Headers.of_list
[ "Location", ":9443"; "Connection", "close" ])
`Moved_permanently
in
Reqd.respond_with_string reqd response ""
let redirect_err... | |
c8801ef0cc6c18b33c4eb6e5279cb0229d5407cdc417fd62d5a69959878658d8 | spawnfest/eep49ers | wx_basic_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2017 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/test/wx_basic_SUITE.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 2008 - 2017 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Author : < >
Created : 3 Nov 2008 by < >
-module(wx_basic_SUITE).
-export([all/0, suite/0,groups/0,init... |
c50176c11e035a3cd785d0bc3147ecf7087e3f573faae2a86e267b7fec250178 | lesguillemets/sicp-haskell | 2.73.hs | # LANGUAGE ExistentialQuantification #
module SymbolicDifferentiation where
-- class Operator a where
-- derivRule :: a -> Equation -> Equation -> Equation
--
--
data Equation = Value Int
-- | Var String
-- | forall a. (Show a,Operator a) => Node a Equation Equation
class Show a => D... | null | https://raw.githubusercontent.com/lesguillemets/sicp-haskell/df524a1e28c45fb16a56f539cad8babc881d0431/exercise/chap02/sect4/2.73.hs | haskell | class Operator a where
derivRule :: a -> Equation -> Equation -> Equation
| Var String
| forall a. (Show a,Operator a) => Node a Equation Equation
$setup
>>> let x = Var "x"
>>> let y = Var "y"
>>> let eq0 = Exp $ Prod x y
>>> let eq1 = Exp $ Sum x eq0
|
>>> deriv (Exp x) x
... | # LANGUAGE ExistentialQuantification #
module SymbolicDifferentiation where
data Equation = Value Int
class Show a => Differentiable a where
deriv :: a -> Variable -> Expression
data Expression = forall a. Differentiable a => Exp a
newtype Value = Value Int deriving (Eq)
newtype Variable = Var String deriving... |
3bd32686cdae3535cb82f8bb83b6595765078826e78cbaaa7534f91facb7674e | hammerlab/coclobas | client_server.ml |
open Nonstd
module String = Sosa.Native_string
let test_out fmt =
ksprintf (fun s -> printf ">>>>> %s\n%!" s) fmt
let failf fmt =
ksprintf (fun s -> Lwt.fail (Failure s)) fmt
let command ~bin args : Lwt_process.command =
(bin, Array.of_list (bin :: args))
let coclobas args : Lwt_process.command =
command ~... | null | https://raw.githubusercontent.com/hammerlab/coclobas/5341ea53fdb5bcea0dfac3e4bd94213b34a48bb9/src/test/client_server.ml | ocaml |
open Nonstd
module String = Sosa.Native_string
let test_out fmt =
ksprintf (fun s -> printf ">>>>> %s\n%!" s) fmt
let failf fmt =
ksprintf (fun s -> Lwt.fail (Failure s)) fmt
let command ~bin args : Lwt_process.command =
(bin, Array.of_list (bin :: args))
let coclobas args : Lwt_process.command =
command ~... | |
ec5a4eb45eb70b01eaab08a4c0dee7805bfb5ab7dba80033329b690230159987 | DKurilo/hackerrank | solution-sa.hs | # LANGUAGE OverloadedStrings , UnicodeSyntax #
module Main where
so no we can use ← , ∷ , etc
so now we can use ≫ , ≫= , etc .
import Control.Monad
import Debug.Trace
import System.Environment
import System.IO
import Data.List (sortOn)
import qualified Data.Vector as V
import qualified Data.ByteString.Char8 as B
... | null | https://raw.githubusercontent.com/DKurilo/hackerrank/37063170567b397b25a2b7123bc9c1299d34814a/string-function-calculation/solution-sa.hs | haskell | /~cs548/references/linear_lcp.pdf | # LANGUAGE OverloadedStrings , UnicodeSyntax #
module Main where
so no we can use ← , ∷ , etc
so now we can use ≫ , ≫= , etc .
import Control.Monad
import Debug.Trace
import System.Environment
import System.IO
import Data.List (sortOn)
import qualified Data.Vector as V
import qualified Data.ByteString.Char8 as B
... |
38b531ee171a8d87987cc797f6a6dcf14de707b87dabc8f35a410e4665625420 | orthecreedence/ghostie | window.lisp | (in-package :ghostie)
(defvar *quit* nil)
(defvar *window-width* 0)
(defvar *window-height* 0)
(defvar *last-time* 0)
(defvar *render-objs* nil)
(defun init-opengl ()
;; set up blending
(gl:enable :blend)
(gl:blend-func :src-alpha :one-minus-src-alpha)
;; set up culling
(gl:enable :cull-face)
(gl:cull-... | null | https://raw.githubusercontent.com/orthecreedence/ghostie/6e6f77e1f33511d5311319db4656960de1c6f668/window.lisp | lisp | set up blending
set up culling
create our shader programs
set our camera matrix into the program
enable depth testing
antialiasing (or just fixes gaps betwen polygon triangles)
set up the viewport
set window size AND setup our view translation matrices
glfw:+fullscreen+
run our init forms
we track this manua... | (in-package :ghostie)
(defvar *quit* nil)
(defvar *window-width* 0)
(defvar *window-height* 0)
(defvar *last-time* 0)
(defvar *render-objs* nil)
(defun init-opengl ()
(gl:enable :blend)
(gl:blend-func :src-alpha :one-minus-src-alpha)
(gl:enable :cull-face)
(gl:cull-face :back)
(gl:front-face :ccw)
(se... |
d428604d4864978691bf7c34bb0f56533e30a9cfea0574db31146620ac04ca9f | release-project/benchmarks | logger.erl | %%%--------------------------------------------------------------------
%%% LOGGER MODULE
%%%
@author :
( C ) 2014 , RELEASE project
%%% @doc
%%% Logger module is a recorder of messages sent between clients
logged in the IM system .
%%%
%%% This module allows to run throughput and latency experiments... | null | https://raw.githubusercontent.com/release-project/benchmarks/55f042dca3a2c680e2967c59edc9636456047bd5/IM/RD-IM/logger.erl | erlang | --------------------------------------------------------------------
LOGGER MODULE
@doc
Logger module is a recorder of messages sent between clients
This module allows to run throughput and latency experiments,
@end
--------------------------------------------------------------------
---------------------... | @author :
( C ) 2014 , RELEASE project
logged in the IM system .
by recording these measurementes .
Created : 30 Mar 2014 by
Modified : 25 Aug 2014 by
-module(logger).
-export([start/2, start_throughput/5, start_latency/4, launch/9, launch/10,
launch_latency/7, launch_latency/8]).
s... |
6d89e0bfd3b6113e96bceccfb38447363aded89d50e7a7ee32fccffeffa0fbaa | ragkousism/Guix-on-Hurd | suckless.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 < >
Copyright © 2015 < >
Copyright © 2016 < >
Copyright © 2016 , 2017 ng0 < >
Copyright © 2015 >
Copyright © 2015 < >
Copyright © 2016 < >
Copyright © 2017 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU ... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/suckless.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 < >
Copyright © 2015 < >
Copyright © 2016 < >
Copyright © 2016 , 2017 ng0 < >
Copyright © 2015 >
Copyright © 2015 < >
Copyright © 2016 < >
Copyright © 2017 < >
under the terms of the GNU General Public License as published by
You should have received a copy of... |
e4ad2cab088f68d9241ebb9aee56cf4ac991044fbbee22a41bd2d4ee43a6661e | liquidz/misaki | 03-edit-template.html.clj | (h2 "Template file")
(p "Template files are compiled with [hiccup](/).")
(h3 "Example")
#-CLJ
;; Define template options here
@layout default
; @title misaki
;; define a custom clojure function
(defn header [s] [:header [:h1 s]])
;; passing the "site" variable for access to template options
(header (:title si... | null | https://raw.githubusercontent.com/liquidz/misaki/b8104e632058e3b3da4487513d10e666e5914ec9/doc/.template/posts/03-edit-template.html.clj | clojure | Define template options here
@title misaki
define a custom clojure function
passing the "site" variable for access to template options
or you can write posts list manually
(for [p (:posts site)]
/Example
@key value
/Template options
/Functions
/Posts
/Post tags
/Pagination
/Code Highlight
/Example
... | (h2 "Template file")
(p "Template files are compiled with [hiccup](/).")
(h3 "Example")
#-CLJ
@layout default
(defn header [s] [:header [:h1 s]])
(header (:title site))
(h2 "Posts")
(post-list)
(: title p ) ] ) ]
CLJ
(h3 "Template options")
(p "Template option format:")
#-CLJ
CLJ
(h4 "Spec... |
c592c2aacc521bce6038bc28afec1a94c57f607e79516250519abddff9945b99 | commercialhaskell/curator | HackageDistro.hs | {-# LANGUAGE OverloadedStrings #-}
module Curator.HackageDistro
( uploadHackageDistro
) where
import Curator.Types
import Data.ByteString.Builder (toLazyByteString)
import Distribution.Types.PackageName
import Network.HTTP.Client
import Network.HTTP.Client.TLS (tlsManagerSettings)
import Pantry
import RIO
impo... | null | https://raw.githubusercontent.com/commercialhaskell/curator/1ef870178f6a0544fe5a3fd23a83fc075aabd695/src/Curator/HackageDistro.hs | haskell | # LANGUAGE OverloadedStrings #
^ distro name
^ Hackage username
^ Hackage password | module Curator.HackageDistro
( uploadHackageDistro
) where
import Curator.Types
import Data.ByteString.Builder (toLazyByteString)
import Distribution.Types.PackageName
import Network.HTTP.Client
import Network.HTTP.Client.TLS (tlsManagerSettings)
import Pantry
import RIO
import qualified RIO.List as L
import q... |
aff499eeb5d7767bfe1358daa493c8221bf76ac51d1abff80b2d5375f6a19ade | rtoy/ansi-cl-tests | logtest.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Thu Sep 11 23:22:46 2003
;;;; Contains: Tests for LOGTEST
(in-package :cl-test)
;;; Error tests
(deftest logtest.error.1
(signals-error (logtest) program-error)
t)
(deftest logtest.error.2
(signals-error (logtest 0) program-error)
t)
(deftest logtest.er... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/logtest.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests for LOGTEST
Error tests
Non-error tests | Author :
Created : Thu Sep 11 23:22:46 2003
(in-package :cl-test)
(deftest logtest.error.1
(signals-error (logtest) program-error)
t)
(deftest logtest.error.2
(signals-error (logtest 0) program-error)
t)
(deftest logtest.error.3
(signals-error (logtest 0 0 nil) program-error)
t)
(deftest lo... |
f4867a705fdabbda39598af9db7924f0ba6294bf3a75390ae959158d53f87cde | OCamlPro/ocp-build | fileGen.ml | (**************************************************************************)
(* *)
(* Typerex Libraries *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/libs/ocplib-file/fileGen.ml | ocaml | ************************************************************************
Typerex Libraries
... | Copyright 2011 - 2017 OCamlPro SAS
the GNU Lesser General Public License version 2.1 , with the
Currently , we have no distinction between implicit and .-relative
filenames . We should probably do that .
filenames. We should probably do that.
*)
open... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.