_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 |
|---|---|---|---|---|---|---|---|---|
39fcee6c90925476268f0fc41f685da6c2087909bdeef851ffba6d2ff7122a66 | nathanmarz/storm-deploy | branch.clj | (ns backtype.storm.branch)
(defn parse-branch [branch]
(map #(Integer/parseInt %) (.split branch "\\.")))
(defn branch> [branch1 branch2]
(->> (map - (parse-branch branch1) (parse-branch branch2))
(take-while #(>= % 0))
(some pos?)))
| null | https://raw.githubusercontent.com/nathanmarz/storm-deploy/b97265bb8b79f84f5907deb826c702e9c4947305/src/clj/backtype/storm/branch.clj | clojure | (ns backtype.storm.branch)
(defn parse-branch [branch]
(map #(Integer/parseInt %) (.split branch "\\.")))
(defn branch> [branch1 branch2]
(->> (map - (parse-branch branch1) (parse-branch branch2))
(take-while #(>= % 0))
(some pos?)))
| |
9045678bb739d597fb638106a54e10e8adf5d0871dee154b667b352a71a2f495 | Frama-C/Frama-C-snapshot | Scope.mli | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/scope/Scope.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
14f1aa7210fea466a08c8abd427c07e16fc97290a965f6b2c3ab6bb01a4cbdc3 | sangkilc/ofuzz | optmanager.ml | (* ofuzz - ocaml fuzzing platform *)
* option manager
@author < sangkil.cha\@gmail.com >
@since 2014 - 03 - 19
@author Sang Kil Cha <sangkil.cha\@gmail.com>
@since 2014-03-19
*)
Copyright ( c ) 2014 ,
All rights reserved .
Redistribution and use in source and binary forms ,... | null | https://raw.githubusercontent.com/sangkilc/ofuzz/ba53cc90cc06512eb90459a7159772d75ebe954f/src/optmanager.ml | ocaml | ofuzz - ocaml fuzzing platform
* knobs that ofuzz utilizes while fuzzing
global
show even program outputs for debugging
db
test-gen
test-eval
generate all test cases (for debugging)
execution timeout
scheduling
timeout for a round (in round robin)
***************************************************... |
* option manager
@author < sangkil.cha\@gmail.com >
@since 2014 - 03 - 19
@author Sang Kil Cha <sangkil.cha\@gmail.com>
@since 2014-03-19
*)
Copyright ( c ) 2014 ,
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are... |
409f14e587151a6f463705a339643ea05499221f1ff1d217cc066b74bef1195c | jiesoul/soul-talk | date_utils.clj | (ns soul-talk.utils.date-utils)
(defn now []
())
| null | https://raw.githubusercontent.com/jiesoul/soul-talk/630de08c6549b206d59023764d5f2576d97d1030/api/src/soul_talk/utils/date_utils.clj | clojure | (ns soul-talk.utils.date-utils)
(defn now []
())
| |
6319e2525fd3a217db0de3985cfd3f678d973d4bb0b3be70b3aeba5196dac10c | huangz1990/real-world-haskell-cn | naiveeq.hs | file : ch06 / naiveeq.hs
import Data.Char (isSpace)
data Color = Red | Green | Blue
colorEq :: Color -> Color -> Bool
colorEq Red Red = True
colorEq Green Green = True
colorEq Blue Blue = True
colorEq _ _ = False
stringEq :: [Char] -> [Char] -> Bool
-- Match if both are empty
stringEq [] [] = True
-... | null | https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/code/ch06/naiveeq.hs | haskell | Match if both are empty
If both start with the same char, check the rest
Everything else doesn't match
show Red = "Red"
show Green = "Green"
-- readsPrec is the main function for parsing input
readsPrec _ value =
We pass a list of pairs . Each pair has a string
and the desired return value... | file : ch06 / naiveeq.hs
import Data.Char (isSpace)
data Color = Red | Green | Blue
colorEq :: Color -> Color -> Bool
colorEq Red Red = True
colorEq Green Green = True
colorEq Blue Blue = True
colorEq _ _ = False
stringEq :: [Char] -> [Char] -> Bool
stringEq [] [] = True
stringEq (x:xs) (y:ys) = x =... |
e8774278bd939c2d1f50d5ffdf70423066d2fd02c004453097b60f72e7b8c85e | dbuenzli/mu | test.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2021 The mu programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... | null | https://raw.githubusercontent.com/dbuenzli/mu/1bb96303491fe13ee8ed7b4226797e92cbec4c1f/test/test.ml | ocaml | ---------------------------------------------------------------------------
Copyright ( c ) 2021 The mu programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... | |
62ded65933622cbffa67c90ec039d82b15aabe7ca255d3a50a7f513a6c46a613 | vinted/kafka-elasticsearch-tool | search_after_with_pit.clj | (ns source.elasticsearch.search-after-with-pit
(:require [clojure.tools.logging :as log]
[scroll.pit :as pit]
[scroll :as scroll]))
(defn records [es-host index-name query max-docs keep-alive]
(let [opts {:keep-alive keep-alive}
pit (pit/init es-host index-name opts)
; mutab... | null | https://raw.githubusercontent.com/vinted/kafka-elasticsearch-tool/ab92598cf47bf7df0b9c64bb0d7436aff544bb03/src/source/elasticsearch/search_after_with_pit.clj | clojure | mutable state is needed because PIT ID might change between calls
expects an atom
the contents of an atom will be a string with PIT ID
last element of the lazy-sequence is the output of `do` macro
that last nil will not be in the sequence because `lazy-cat` terminates if nil
TODO: support other options such as ke... | (ns source.elasticsearch.search-after-with-pit
(:require [clojure.tools.logging :as log]
[scroll.pit :as pit]
[scroll :as scroll]))
(defn records [es-host index-name query max-docs keep-alive]
(let [opts {:keep-alive keep-alive}
pit (pit/init es-host index-name opts)
latest-... |
69f638f98f8d522325bb6fa05883c19d367ee82144381823220c9678871f2593 | brendanhay/amazonka | TraceSummary.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
Derived fr... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-xray/gen/Amazonka/XRay/Types/TraceSummary.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
| Metadata generated from the segment documents in a trace.
/See:/ 'newTraceSummary' smart constructor.
| Annotations from the trace\'s segment documents.
| A list of Availability Zones for any zone corresponding to the trace
... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
Derived from AWS service descriptions , licensed under Apache 2.0 .
Mo... |
f2007d889ef2a94cc0d9019c286059db1e72eea1d54fb20930e8f305253fe251 | incjung/cl-swagger-codegen | make-apis.lisp | (ql:quickload "oauth2")
(defpackage swagger.test
(:use cl oauth2 cl-swagger))
(in-package swagger.test)
TEST 1 ) PETSTORE
(generate-client "" #p"./example/pet-api-client.lisp")
(defun rest-call (host url-path
&key params content basic-authorization
(method :get)
... | null | https://raw.githubusercontent.com/incjung/cl-swagger-codegen/23bd1d2e895cccb5a87b5a2a2798e404798e1527/example/make-apis.lisp | lisp |
Returns a single pet
* path-url : /pet/{petId}
curl -X GET "" -H "accept: application/json"
(defparameter *redirect*
(request-code
""
*client-id*
:scope "-platform"
:redirect-uri *redirect-uri*))
(defparameter *code* (read-line))
s calendar list .
* path-url : /users/me/calendarList
| (ql:quickload "oauth2")
(defpackage swagger.test
(:use cl oauth2 cl-swagger))
(in-package swagger.test)
TEST 1 ) PETSTORE
(generate-client "" #p"./example/pet-api-client.lisp")
(defun rest-call (host url-path
&key params content basic-authorization
(method :get)
... |
18d2e8271a83a65f35334eade08d263d034cef65d1b799537890ff88ef0b85ff | Quviq/epoch-eqc | names_eqc.erl | @author < >
( C ) 2019 ,
%%% @doc
%%%
%%% @end
Created : 15 Aug 2019 by < >
-module(names_eqc).
-include_lib("eqc/include/eqc.hrl").
-compile([export_all, nowarn_export_all]).
old Fortuna code :
name_hash(NameAscii) ->
Labels = binary:split(NameAscii, <<".">>, [global]),
hash_labels(list... | null | https://raw.githubusercontent.com/Quviq/epoch-eqc/87fb692697f9377b95a3fa3f04efce75d8b52f87/aens_eqc/names_eqc.erl | erlang | @doc
@end
both raise exception | @author < >
( C ) 2019 ,
Created : 15 Aug 2019 by < >
-module(names_eqc).
-include_lib("eqc/include/eqc.hrl").
-compile([export_all, nowarn_export_all]).
old Fortuna code :
name_hash(NameAscii) ->
Labels = binary:split(NameAscii, <<".">>, [global]),
hash_labels(lists:reverse(Labels)).
h... |
ebd51b9b2cef15200437970c4f8ff735853354ef7ce6b5f3f2b6fd94ec192ef9 | charlieg/Sparser | menus.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(USER LISP) -*-
copyright ( c ) 1990 Content Technologies , Inc. -- all rights reserved
;;;
;;; file: "run"
module : " interface;menus "
;;;
(in-package :user)
;;;-------------------------------------------------
;;; running over designated source directo... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/interface/AssetNet/menus.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(USER LISP) -*-
file: "run"
-------------------------------------------------
running over designated source directories
-------------------------------------------------
(install-AssetNet-menu) --executed from a menu-bar file | copyright ( c ) 1990 Content Technologies , Inc. -- all rights reserved
module : " interface;menus "
(in-package :user)
(defun install-AssetNet-menu (&aux tmp)
(if (setq tmp (find-menu "CTI"))
(ask tmp (menu-deinstall)))
(let ((menu
(oneof *menu*
:menu-title "CTI"
... |
9a67f9236c2b4971b72986f4b13f4f0035521effc950ddcd01cffd7635559189 | slyrus/cl-bio | defpackage.lisp | Copyright ( c ) 2006 - 2008 ( )
;;; 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 lis... | null | https://raw.githubusercontent.com/slyrus/cl-bio/e6de2bc7f4accaa11466902407e43fae3184973f/align/defpackage.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.
* Redistrib... | Copyright ( c ) 2006 - 2008 ( )
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package #:cl-user)
(defpackage #:bio-align
(:nicknames #:align)
(:use #:cl #:bio)
(:export #:global-align-na
#:global-a... |
c66508c9a5f6e1259f5e597e6cfd5d17c9c1407e974959ba263f2fd08f5a62da | acl2/acl2 | cgen-testing.lisp | $ ACL2s - Preamble$ ;
( include - book ; ; to fool ACL2 / cert.pl dependency scanner
" portcullis " )
( begin - book t : ttags : all);$ACL2s - Preamble$
(include-book ;; Newline to fool ACL2/cert.pl dependency scanner
"portcullis")
(begin-book t :ttags :all);$ACL2s-Preamble$|#
(in-package "ACL2S")
(include-bo... | null | https://raw.githubusercontent.com/acl2/acl2/d7853d895191a1f695b6f2ec9b3dedebbc03053e/books/acl2s/cgen-testing.lisp | lisp |
; to fool ACL2 / cert.pl dependency scanner
$ACL2s - Preamble$
Newline to fool ACL2/cert.pl dependency scanner
$ACL2s-Preamble$|# | " portcullis " )
"portcullis")
(in-package "ACL2S")
(include-book "acl2s/ccg/ccg" :uncertified-okp nil :dir :system :ttags
((:ccg)) :load-compiled-file nil)
(include-book "acl2s/base-theory" :dir :system :ttags :all)
(include-book "acl2s/custom" :dir :system :ttags :all)
(include-book "acl2s/cgen/top... |
ec7dea45e712f8ef84c02ec68d374465cfded3163a6fd0417ba06e8877057c5a | snapframework/cufp2011 | Main.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Snap.Chat.API.Handlers
import Snap.Chat.ChatRoom
import Snap.Chat.Types
import Snap.Core
import Snap.Http.Server
import Snap.Util.FileServe
import Web.ClientSession
handler :: Key -> Chat... | null | https://raw.githubusercontent.com/snapframework/cufp2011/6519513ef80d561efc9846847860b50a19c7b9f6/src/Snap/Chat/Main.hs | haskell | # LANGUAGE OverloadedStrings # |
module Main where
import Snap.Chat.API.Handlers
import Snap.Chat.ChatRoom
import Snap.Chat.Types
import Snap.Core
import Snap.Http.Server
import Snap.Util.FileServe
import Web.ClientSession
handler :: Key -> ChatRoom -> Snap ()
handler key chatRoo... |
0c514a1a336df9619ecf6cdf433b6d30c21146e0f5cbf68541e82333737f2929 | rescript-association/genType | syntaxerr.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/rescript-association/genType/c44251e969fb10d27a38d2bdeff6a5f4d778594f/src/compiler-libs-406/syntaxerr.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1997 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type error =
Unclosed of Location.t * string * Location.t * string
| Expecting of Location.t * str... |
e41edccb6ce9629987c9477cf8826d926d4c507e734c7d39a994f7424d657357 | HugoPeters1024/hs-sleuth | Shift.hs | # LANGUAGE MagicHash #
-- |
-- Module : Data.Text.Internal.Unsafe.Shift
Copyright : ( c ) 2009
--
-- License : BSD-style
-- Maintainer :
-- Stability : experimental
Portability : GHC
--
-- /Warning/: this is an internal module, and does not have a stable
-- API or name. Functions in this module m... | null | https://raw.githubusercontent.com/HugoPeters1024/hs-sleuth/385655e62031959a14a3bac5e9ccd1c42c045f0c/test-project/text-1.2.4.0/Data/Text/Internal/Unsafe/Shift.hs | haskell | |
Module : Data.Text.Internal.Unsafe.Shift
License : BSD-style
Maintainer :
Stability : experimental
/Warning/: this is an internal module, and does not have a stable
API or name. Functions in this module may not check or enforce
preconditions expected by public modules. Use at your own risk!
F... | # LANGUAGE MagicHash #
Copyright : ( c ) 2009
Portability : GHC
module Data.Text.Internal.Unsafe.Shift
(
UnsafeShift(..)
) where
import GHC.Base
import GHC.Word
| This is a workaround for poor optimisation in GHC 6.8.2 . It
to every shift . This imposes about a 10 % performance hit .
... |
4224fa41165b4cc38d432d0a438bfcfcee213dc40b147621216a4dc0a83009f6 | slegrand45/examples_ocsigen | view.ml | open Types
open Js_of_ocaml_tyxml.Tyxml_js
let part_header (r, f) =
Html5.(
header ~a:[a_class ["mdl-layout__header"]] [
div ~a:[a_class ["mdl-layout__header-row"]] [
div ~a:[a_class ["mdl-layout-spacer"]] [] ;
span ~a:[a_class ["mdl-layout-title"]] [
a ~a:[
... | null | https://raw.githubusercontent.com/slegrand45/examples_ocsigen/e2f5efe57caf7a644795ac6b14f6d6e04168e4be/jsoo/curriculum-vitae/view.ml | ocaml | main | open Types
open Js_of_ocaml_tyxml.Tyxml_js
let part_header (r, f) =
Html5.(
header ~a:[a_class ["mdl-layout__header"]] [
div ~a:[a_class ["mdl-layout__header-row"]] [
div ~a:[a_class ["mdl-layout-spacer"]] [] ;
span ~a:[a_class ["mdl-layout-title"]] [
a ~a:[
... |
92dc52bcc5f3defce8424602106e5e24d0c4cb041b77e73a56c57fe4e187dd3b | racket/math | test-utils.rkt | #lang typed/racket
(require (except-in typed/rackunit check-equal?))
(provide (all-from-out typed/rackunit)
check-equal?)
;; This gets around the fact that typed/rackunit can no longer test higher-order values for equality,
since TR has firmed up its rules on passing ` Any ' types in and out of untyped co... | null | https://raw.githubusercontent.com/racket/math/dcd2ea1893dc5b45b26c8312997917a15fcd1c4a/math-test/math/tests/test-utils.rkt | racket | This gets around the fact that typed/rackunit can no longer test higher-order values for equality, | #lang typed/racket
(require (except-in typed/rackunit check-equal?))
(provide (all-from-out typed/rackunit)
check-equal?)
since TR has firmed up its rules on passing ` Any ' types in and out of untyped code
(define-syntax-rule (check-equal? a b . message)
(check-true (equal? a b) . message))
|
91582269a4bfa8678bc0e073622df362120c459ec8110c8a29d60fb0533c4152 | gfngfn/toy-macro-ml | main.ml |
open Syntax
let main fname =
let inc = open_in fname in
let lexbuf = Lexing.from_channel inc in
let utast = ParserInterface.process lexbuf in
let (tyenv, env) = Primitives.initial_type_environment in
let (ty, eve) = Typechecker.main tyenv utast in
Format.printf "Type: %a\n" RichPrinting.pp_mono_type ty;
... | null | https://raw.githubusercontent.com/gfngfn/toy-macro-ml/7a5eecfc53691adbd91ceba78f8dac3ef8790054/src/main.ml | ocaml |
open Syntax
let main fname =
let inc = open_in fname in
let lexbuf = Lexing.from_channel inc in
let utast = ParserInterface.process lexbuf in
let (tyenv, env) = Primitives.initial_type_environment in
let (ty, eve) = Typechecker.main tyenv utast in
Format.printf "Type: %a\n" RichPrinting.pp_mono_type ty;
... | |
06405a2168eb9b7055e05d7ae507d57c5446e7573236588da6134b9e9be832fd | brendanhay/amazonka | DeleteCertificate.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused -... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-transfer/gen/Amazonka/Transfer/DeleteCertificate.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Deletes the certificate that\'s specified in the @CertificateId@
parameter.
* Creating a Request
* Request Lenses
* Destructuring the Response
| /See:/ 'newDeleteCertificate' smart constructor.
| The identifier of the certif... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
De... |
9467006ea05c99081ff3b6f9334d96faf7121f8d5aadebfcc4b5ea7920a34cbd | qoocku/erleos | erleos_sensor_srv_tests.erl | %%% ==========================================================================
@author < > < email >
@since 2011 - 02 - 24
%%% @doc TODO: Add description to erleos_usir_srv_tests
%%% @end
%%% ==========================================================================
-module (erleos_sensor_srv_tests).
-author ... | null | https://raw.githubusercontent.com/qoocku/erleos/ce14d2cfeea81053307b1fab815e0fbe3b9d1133/test/erleos_sensor_srv_tests.erl | erlang | ==========================================================================
@doc TODO: Add description to erleos_usir_srv_tests
@end
==========================================================================
read erleos app config
;
(_, _) ->
false | @author < > < email >
@since 2011 - 02 - 24
-module (erleos_sensor_srv_tests).
-author ("Damian T. Dobroczy\\'nski <> <email>").
-compile (export_all).
-include_lib ("eunit/include/eunit.hrl").
-include ("erleos/include/proto/sensor.hrl").
-include ("erleos/include/proto/usir.hrl").
-include ("erleos/include... |
e20387c45ceecbadc69087f0b37c4cef0e6a49cca4de49a58d4dcfe6e1dd6044 | juhp/koji-tool | Main.hs | # LANGUAGE CPP #
SPDX - License - Identifier : BSD-3 - Clause
module Main (main) where
import Data.Char (isDigit)
import Data.List.Extra
import SimpleCmd
import SimpleCmdArgs
import Builds
import BuildlogSizes
import User
import Install
import qualified Paths_koji_tool
import Progress
import Find
import Tasks
ma... | null | https://raw.githubusercontent.com/juhp/koji-tool/c7be357701c79fdfb89ece2ac9321c8795db8948/src/Main.hs | haskell | FIXME error if integer (eg mistakenly taskid)
FIXME any way to pass --help to install? | # LANGUAGE CPP #
SPDX - License - Identifier : BSD-3 - Clause
module Main (main) where
import Data.Char (isDigit)
import Data.List.Extra
import SimpleCmd
import SimpleCmdArgs
import Builds
import BuildlogSizes
import User
import Install
import qualified Paths_koji_tool
import Progress
import Find
import Tasks
ma... |
6ac783cc8a046ffb583d88fdc00b972b8f65efebfc19771835ee56ace76d0b15 | melhadad/fuf | verb-group.lisp | ;;; -*- Mode:Lisp; Syntax:Common-Lisp; Package: -*-
;;; -----------------------------------------------------------------------
;;; File: verb-group.lisp
;;; Description: Grammatical systems for verb group
Author :
Created : 19 Dec 1991
Modified : 18 Aug 1992 Added adverb ( inherited ... | null | https://raw.githubusercontent.com/melhadad/fuf/57bd0e31afc6aaa03b85f45f4c7195af701508b8/surge/code/verb-group.lisp | lisp | -*- Mode:Lisp; Syntax:Common-Lisp; Package: -*-
-----------------------------------------------------------------------
File: verb-group.lisp
Description: Grammatical systems for verb group
- Fixed problem of wh/inversion in
long-distance (Who do you ... | Author :
Created : 19 Dec 1991
Modified : 18 Aug 1992 Added adverb ( inherited from clause )
5 Jul 1995 SURGE 2.2 VERSION
FUF - a functional unification - based text generation system . ( . 5.4 )
Copyright ( c ) 1987 - 2014 by . all rights reserved .
THIS SOFTWARE IS ... |
a9b20169e8b80085a132acb503098e94251acc930603e23705a7f3f77085c934 | spechub/Hets | OMS.hs | module PGIP.GraphQL.Resolver.OMS (resolve) where
import PGIP.GraphQL.Resolver.ToResult
import PGIP.GraphQL.Result as GraphQLResult
import PGIP.GraphQL.Result.Action as GraphQLResultAction
import PGIP.GraphQL.Result.Mapping as GraphQLResultMapping
import PGIP.GraphQL.Result.PremiseSelection as GraphQLResultPremiseSele... | null | https://raw.githubusercontent.com/spechub/Hets/4cedaf8dbdb8909955e0066b465c331973043bbf/PGIP/GraphQL/Resolver/OMS.hs | haskell | module PGIP.GraphQL.Resolver.OMS (resolve) where
import PGIP.GraphQL.Resolver.ToResult
import PGIP.GraphQL.Result as GraphQLResult
import PGIP.GraphQL.Result.Action as GraphQLResultAction
import PGIP.GraphQL.Result.Mapping as GraphQLResultMapping
import PGIP.GraphQL.Result.PremiseSelection as GraphQLResultPremiseSele... | |
f6d5acc8cd399813f6cd752e4a7ff780da9901e7c034116ea10006962080cc25 | kach/recreational-rosette | battleship.rkt | ;; A Battleship puzzle solver.
This is not the two player Battleship game -- it is a one player
;; logic puzzle. See
;;
;;
author : ( )
license : MIT
#lang rosette
(require rosette/lib/angelic)
Maximum number used is around max(width , height ) + max ship size
For a 10x10 grid with ships of up to size ... | null | https://raw.githubusercontent.com/kach/recreational-rosette/797a8c462e8cdc820bd257428b195193f8bad995/battleship/battleship.rkt | racket | A Battleship puzzle solver.
logic puzzle. See
;
;
We could also get rid of the matrix entirely, and instead
every time we use ref we would run:
(ormap (lambda (s) (in-ship? s x y)) (puzzle-ships puzzle))
Display column sums on the last line
Constraints ;;
All submarines are surrounded by water
Water ... | This is not the two player Battleship game -- it is a one player
author : ( )
license : MIT
#lang rosette
(require rosette/lib/angelic)
Maximum number used is around max(width , height ) + max ship size
For a 10x10 grid with ships of up to size 4 , a bitwidth of 5 would
suffice ( not 4 because negati... |
cd4e4ce776b44c0e67ef3034876e1efdba125b1f152aae4ee2b0ecc2958e83fd | michaelklishin/neocons | bolt.clj | Copyright ( c ) 2011 - 2018 , , and The ClojureWerkz
Team
;;
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreei... | null | https://raw.githubusercontent.com/michaelklishin/neocons/30f30e95686a01f7a34082600bc1221877c2acbd/src/clojure/clojurewerkz/neocons/bolt.clj | clojure |
The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software. | Copyright ( c ) 2011 - 2018 , , and The ClojureWerkz
Team
Eclipse Public License 1.0 ( -1.0.php )
(ns clojurewerkz.neocons.bolt
(:require [clojure.string :as string])
(:import (java.util Map)
(org.neo4j.driver.v1 AuthTokens Config Driver
GraphDatabase Record Se... |
38e82a56cf584d8aec8b1b17aa8bbcf1e7b510066ed006dc1fbd6d271ee9b171 | clojure-interop/aws-api | AWSStorageGateway.clj | (ns com.amazonaws.services.storagegateway.AWSStorageGateway
"Interface for accessing AWS Storage Gateway.
Note: Do not directly implement this interface, new methods are added to it regularly. Extend from
AbstractAWSStorageGateway instead.
AWS Storage Gateway Service
AWS Storage Gateway is the service tha... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.storagegateway/src/com/amazonaws/services/storagegateway/AWSStorageGateway.clj | clojure | this topic
for more information, see UpdateGatewayInformation.
however, for added security, you might use it.
however, it does not delete the gateway virtual machine (VM) from | (ns com.amazonaws.services.storagegateway.AWSStorageGateway
"Interface for accessing AWS Storage Gateway.
Note: Do not directly implement this interface, new methods are added to it regularly. Extend from
AbstractAWSStorageGateway instead.
AWS Storage Gateway Service
AWS Storage Gateway is the service tha... |
954102984bf91e0b20ce8c0e63e0a4628b25648b79f8e28d333c7f9f1d81d213 | jaked/ocamljs | pa_jquery.ml | open Camlp4
module Id : Sig.Id =
struct
let name = "pa_jquery"
let version = "0.1"
end
module Make (Syntax : Sig.Camlp4Syntax) =
struct
open Sig
include Syntax
DELETE_RULE Gram expr: SELF; "#"; label END;
EXTEND Gram
expr: BEFORE "apply"
[ "#" LEFTA
[ e = SELF; "#"; lab = label -> <:ex... | null | https://raw.githubusercontent.com/jaked/ocamljs/378080ff1c8033bb15ed2bd29bf1443e301d7af8/src/jquery/pa_jquery.ml | ocaml | open Camlp4
module Id : Sig.Id =
struct
let name = "pa_jquery"
let version = "0.1"
end
module Make (Syntax : Sig.Camlp4Syntax) =
struct
open Sig
include Syntax
DELETE_RULE Gram expr: SELF; "#"; label END;
EXTEND Gram
expr: BEFORE "apply"
[ "#" LEFTA
[ e = SELF; "#"; lab = label -> <:ex... | |
3ffe27da915bef377314694c286d73d19329d68fc2362059970f0655cda14e89 | jserot/lascar | main.ml | (* This is a reformulation of ../gensig1 in which the output [s] is assigned to states *)
open Utils
open Lascar
module S =
struct
type t = Off | On [@@deriving show {with_path=false}]
let compare = Stdlib.compare
let to_string = show
end
open S
module F = Fsm.Make(S)(Fsm_value.Int)
le... | null | https://raw.githubusercontent.com/jserot/lascar/79bd11cd0d47545bccfc3a3571f37af065915c83/examples/fsm/gensig2/main.ml | ocaml | This is a reformulation of ../gensig1 in which the output [s] is assigned to states |
open Utils
open Lascar
module S =
struct
type t = Off | On [@@deriving show {with_path=false}]
let compare = Stdlib.compare
let to_string = show
end
open S
module F = Fsm.Make(S)(Fsm_value.Int)
let mk n =
let open F in
create
~inps:["start",[0;1]]
~outps:["s",[0;1]]
~va... |
f43fc81e7a615bb225debb7e1e51104184a0b1b0d1b2cffa446214f45111f4f9 | semmons99/clojure-euler | prob-029.clj | problem 029 ; ; ; ; ; ; ; ; ; ;
(use '[clojure.contrib.math :only (expt)])
(defn prob-029 []
(count (distinct (for [a (range 2 101)
b (range 2 101)]
(expt a b)))))
| null | https://raw.githubusercontent.com/semmons99/clojure-euler/3480bc313b9df7f282dadf6e0b48d96230f1bfc1/prob-029.clj | clojure | ; ; ; ; ; ; ; ; ; | (use '[clojure.contrib.math :only (expt)])
(defn prob-029 []
(count (distinct (for [a (range 2 101)
b (range 2 101)]
(expt a b)))))
|
14942026676949412a375211b82ec6b648ab69832188c7fef3b536b3f861bcb8 | yakaz/yamerl | string_list.erl | -module('string_list').
-include_lib("eunit/include/eunit.hrl").
single_test_() ->
?_assertMatch(
{yamerl_parser,
string,
[],
<<>>,
19,
true,
[],
0,
20,
4,
2,
false,
4,
2,
utf8,
false,
... | null | https://raw.githubusercontent.com/yakaz/yamerl/0032607a7b27fa2b548fc9a02d7ae6b53469c0c5/test/parsing/string_list.erl | erlang | -module('string_list').
-include_lib("eunit/include/eunit.hrl").
single_test_() ->
?_assertMatch(
{yamerl_parser,
string,
[],
<<>>,
19,
true,
[],
0,
20,
4,
2,
false,
4,
2,
utf8,
false,
... | |
8dd38780faf55f10b73469776396d4dc664266d18d9d059bf4c3cae07beda77c | rjnw/sham | id.rkt | #lang sham/cryptol
#:compile-with sham
(def
[id : {a} a -> a]
[id a = a])
(test id-pass (== (id true) true))
(test id-fail (== (id true) false))
| null | https://raw.githubusercontent.com/rjnw/sham/6e0524b1eb01bcda83ae7a5be6339da4257c6781/sham-examples/sham/cryptol/tests/id.rkt | racket | #lang sham/cryptol
#:compile-with sham
(def
[id : {a} a -> a]
[id a = a])
(test id-pass (== (id true) true))
(test id-fail (== (id true) false))
| |
c646d07862ee94161eeef7d6c7e2be41d53ad57cb763c0d4dd20b38c6a63ef84 | backtracking/mlpost | ctypes.ml | type matrix = Cairo.matrix = {
mutable xx : float;
mutable yx : float;
mutable xy : float;
mutable yy : float;
mutable x0 : float;
mutable y0 : float;
}
type point = { x : float; y : float }
| null | https://raw.githubusercontent.com/backtracking/mlpost/bd4305289fd64d531b9f42d64dd641d72ab82fd5/src/ctypes.ml | ocaml | type matrix = Cairo.matrix = {
mutable xx : float;
mutable yx : float;
mutable xy : float;
mutable yy : float;
mutable x0 : float;
mutable y0 : float;
}
type point = { x : float; y : float }
| |
e59251690588bec64efb41063bcb7dcbab4dfce0b81ffad8bdd894472e53c4db | typeclasses/dsv | Position.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving #
module DSV.Position
( RowNumber (..)
, ColumnNumber (..)
, ColumnName (..)
, Position (..)
, At (..)
, AtHeader (..)
) where
import DSV.IO
import DSV.Numbers
import DSV.Prelude
newtype RowNumber =
RowNumber ... | null | https://raw.githubusercontent.com/typeclasses/dsv/ae4eb823e27e4c569c4f9b097441985cf865fbab/dsv/library/DSV/Position.hs | haskell | ^ Position | # LANGUAGE NoImplicitPrelude #
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving #
module DSV.Position
( RowNumber (..)
, ColumnNumber (..)
, ColumnName (..)
, Position (..)
, At (..)
, AtHeader (..)
) where
import DSV.IO
import DSV.Numbers
import DSV.Prelude
newtype RowNumber =
RowNumber ... |
ab1da203914df0a369cbe7b86c694bb181056333efcc483494504367dcfdf3e0 | haskell/aeson | Text.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module: Data.Aeson.Text
Copyright : ( c ) 2012 - 2016
( c ) 2011 MailRank , Inc.
License : BSD3
Maintainer : < >
-- Stability: experimental
-- Portability: portable
--
Mos... | null | https://raw.githubusercontent.com/haskell/aeson/241f6d69cd2b77cee5ebe75e301b775c36b05017/src/Data/Aeson/Text.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
|
Module: Data.Aeson.Text
Stability: experimental
Portability: portable
(the standard JSON encoding) using 'encode'.
You can use the conversions to 'Builder's when embedding JSON messages as
parts of a protocol.
| Encode a JSON 'Value' to a "Data... | # LANGUAGE NoImplicitPrelude #
Copyright : ( c ) 2012 - 2016
( c ) 2011 MailRank , Inc.
License : BSD3
Maintainer : < >
Most frequently , you 'll probably want to encode straight to UTF-8
module Data.Aeson.Text
(
encodeToLazyText
, encodeToTextBuilder
) where
im... |
0182875209991afbca64a25f5940bad7b4aafc5fe49266230f3fc287f6b90f39 | mfoemmel/erlang-otp | wxCommandEvent.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/gen/wxCommandEvent.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
< dd><em > command_button_clicked</em > ... |
a27064e569c5d4f792265735f712f4b1de834132ab4dc0b9c68117af1db21cef | racket/slideshow | fullscreen.rkt | #lang racket
(require "fullscreen/base.rkt"
"pict.rkt")
(provide (except-out (all-from-out racket
"fullscreen/base.rkt"
"pict.rkt")
printable<%>))
(module reader syntax/module-reader
slideshow/fullscreen)
| null | https://raw.githubusercontent.com/racket/slideshow/4588507e83e9aa859c6841e655b98417d46987e6/slideshow-lib/slideshow/fullscreen.rkt | racket | #lang racket
(require "fullscreen/base.rkt"
"pict.rkt")
(provide (except-out (all-from-out racket
"fullscreen/base.rkt"
"pict.rkt")
printable<%>))
(module reader syntax/module-reader
slideshow/fullscreen)
| |
2a59277680bb939362eb2b278f2bd6e40b3f5fa50f3b0e7a65683669f6d878af | etoroxlabs/lira | IntermediateCompilerTest.hs | MIT License
--
Copyright ( c ) 2019 eToroX Labs
--
-- 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 use, copy, modif... | null | https://raw.githubusercontent.com/etoroxlabs/lira/33fae6d37c5467d0a59ab9e9759636f2468b3653/test/IntermediateCompilerTest.hs | haskell |
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
The above copyright not... | MIT License
Copyright ( c ) 2019 eToroX Labs
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND... |
2592bca7964e5bcb31daf9f7c662fa3d99b522d2cc12279a4b6f505a77dcfd35 | kokuyouwind/haskell-exercises | Chapter5.hs | module Src.Chapter5
(
applyPair
, applyN
, squares
, fromBinary
, tails
, powerSet
, pointed1
, pointFree1
, pointed2
, pointFree2
, pointed3
, pointFree3
, pointed4
, pointFree4
, pointed5
, pointFree5
, church
, unchurch
, csucc
, c... | null | https://raw.githubusercontent.com/kokuyouwind/haskell-exercises/dbc68ba477ce525c75fe7c31301f2b632da3b08a/Src/Chapter5.hs | haskell | Rewrite HERE!
Rewrite HERE!
Rewrite HERE!
Rewrite HERE!
Rewrite HERE!
Rewrite HERE!
Rewrite HERE!
Rewrite HERE!
Rewrite HERE!
Rewrite HERE!
Rewrite HERE!
(4.1.1)
Rewrite HERE!
Rewrite HERE!
(4.1.3)
Rewrite HERE!
Rewrite HERE!
Rewrite HERE!
(4.1.6)
Rewrite HERE!
Rewrite HERE!
Rewr... | module Src.Chapter5
(
applyPair
, applyN
, squares
, fromBinary
, tails
, powerSet
, pointed1
, pointFree1
, pointed2
, pointFree2
, pointed3
, pointFree3
, pointed4
, pointFree4
, pointed5
, pointFree5
, church
, unchurch
, csucc
, c... |
502268dd49d74396fcd7ee2b07e8951435b8665b40f6ef6b664db3d97c4a832d | hopv/MoCHi | print.mli | open Syntax
type config =
{ty : bool; (** print types of arguments *)
as_ocaml : bool; (** print terms in OCaml syntax *)
for_dmochi : bool; (** print terms for dmochi when as_ocaml=true *)
top : bool; (** print let/type as in top-level *)
unused : bool; (** print unused arguments *)
depth... | null | https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/src/print.mli | ocaml | * print types of arguments
* print terms in OCaml syntax
* print terms for dmochi when as_ocaml=true
* print let/type as in top-level
* print unused arguments
* max depth of printing terms | open Syntax
type config =
val config_default : config ref
val set_as_ocaml : unit -> unit
val set_unused : unit -> unit
val set_depth : int -> unit
val location : Format.formatter -> Location.t -> unit
val typ : Format.formatter -> typ -> unit
val id : Format.formatter -> id -> unit
val id_typ : Format.formatter ->... |
ef4db668ea56d504a29d378114240e52629f4af9eeca6cd568dad98bd237191f | haskus/packages | View.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE DataKinds #
-- | A view (e.g. a slice) of a buffer
--
-- Suppose we have a big buffer B.
--
-- We can have buffer views on B, say vb1 and vb2.
--
-- B <----- vb1
-- ^------- vb2
--
-- These views don... | null | https://raw.githubusercontent.com/haskus/packages/6d4a64dc26b55622af86b8b45a30a10f61d52e4d/haskus-binary/src/lib/Haskus/Memory/View.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE RankNTypes #
# LANGUAGE GADTs #
| A view (e.g. a slice) of a buffer
Suppose we have a big buffer B.
We can have buffer views on B, say vb1 and vb2.
B <----- vb1
^------- vb2
These views don't duplicate B's contents and they keep B alive.
If the views are much smaller ... | # LANGUAGE LambdaCase #
# LANGUAGE DataKinds #
To support this , we can use " weak buffer views " , say wvb1 and wvb2 .
^~~~~~~~ wvb2
module Haskus.Memory.View
( View (..)
, ViewSource (..)
, ViewPattern (..)
, viewReadWord8
, newBufferView
, newBufferWeakView
, newViewWeakView
, copyBuff... |
0a5b63ad30a077c30bd31e0723ff4166e1be0d8c5b33e42a2c7a81558fc1c32a | cedlemo/OCaml-GI-ctypes-bindings-generator | Link_button.ml | open Ctypes
open Foreign
type t = unit ptr
let t_typ : t typ = ptr void
let create =
foreign "gtk_link_button_new" (string @-> returning (ptr Widget.t_typ))
let create_with_label =
foreign "gtk_link_button_new_with_label" (string @-> string_opt @-> returning (ptr Widget.t_typ))
let get_uri =
foreign "gtk_link_b... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Link_button.ml | ocaml | open Ctypes
open Foreign
type t = unit ptr
let t_typ : t typ = ptr void
let create =
foreign "gtk_link_button_new" (string @-> returning (ptr Widget.t_typ))
let create_with_label =
foreign "gtk_link_button_new_with_label" (string @-> string_opt @-> returning (ptr Widget.t_typ))
let get_uri =
foreign "gtk_link_b... | |
ee464357619182f573aabd97637ac805a12b3bdf99a1865d36976b1a22ec88f0 | vvvvalvalval/datascript-declarative-model-example | ds_model.clj | (ns twitteur.ds-model
(:require [datascript.core :as dt]))
;;;; Model meta-data
These 2 values are DataScript Transaction Requests , i.e data structures defining writes to a DataScript database
NOTE in a real - world codebase , these 2 would typically live in different files .
(def user-model
[{:twitteur.enti... | null | https://raw.githubusercontent.com/vvvvalvalval/datascript-declarative-model-example/9028bb9ff0ccb8cd40ab0a5ab46530f5b8e823c3/src/twitteur/ds_model.clj | clojure | Model meta-data
here's a domain-specific security rule
this attribute is a reference-typed
this attribute is not stored in DB
in this one, we define the Entity Type and the Attributes separately
Entity Type
Attributes
Writing this metadata to a DataScript db
Composing DataScript transactions is as simple as th... | (ns twitteur.ds-model
(:require [datascript.core :as dt]))
These 2 values are DataScript Transaction Requests , i.e data structures defining writes to a DataScript database
NOTE in a real - world codebase , these 2 would typically live in different files .
(def user-model
[{:twitteur.entity-type/name :twitteu... |
44f6438b7460def705754612dc437cdb8e7d69081868ae1a9af37e022562adc0 | deepakjois/hs-logo | Logo.hs | {-# LANGUAGE DeriveDataTypeable #-}
module Main where
import Diagrams.Prelude
import Diagrams.Backend.SVG.CmdLine
import Diagrams.TwoD.Path.Turtle
import Logo.Types
import Logo.TokenParser
import Logo.Builtins
import Logo.Evaluator
import System.Environment (getProgName, withArgs)
import System.Console.CmdArgs.Impl... | null | https://raw.githubusercontent.com/deepakjois/hs-logo/888a65bfc40de463bd8dd9fe28aac729a3b803bd/src/Logo.hs | haskell | # LANGUAGE DeriveDataTypeable #
output file to write to
source file to read from | module Main where
import Diagrams.Prelude
import Diagrams.Backend.SVG.CmdLine
import Diagrams.TwoD.Path.Turtle
import Logo.Types
import Logo.TokenParser
import Logo.Builtins
import Logo.Evaluator
import System.Environment (getProgName, withArgs)
import System.Console.CmdArgs.Implicit
import qualified Data.Map as M... |
6431d19394abb53bc6158d93a328500f0049da3fd06e0af6b0c0eaf26ab67b88 | OCamlPro/typerex-lint | plugin_typedtree.check_identifier.4.ml | Pervasives.at_exit (fun () -> print_string "end")
| null | https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/tools/ocp-lint-doc/examples/plugin_typedtree.check_identifier.4.ml | ocaml | Pervasives.at_exit (fun () -> print_string "end")
| |
e04b3200142b74c1e96ac14035accc8dbaaf817ec40fa79f4113ce937811cd54 | ocurrent/ocurrent-deployer | test_index.ml | module Index = Deployer.Index
let test_simple () =
let owner = "owner" in
let name = "name" in
let repo = { Current_github.Repo_id.owner; name } in
let hash = "abc" in
let _ = Lazy.force Current.Db.v in
Index.init ();
Index.record ~repo ~hash [ ("build", Some "job1"); ("deploy", None) ];
Alcotest.(chec... | null | https://raw.githubusercontent.com/ocurrent/ocurrent-deployer/e60eb1677ec70c8b9e1b28ef312eff97368f3b4c/test/test_index.ml | ocaml | module Index = Deployer.Index
let test_simple () =
let owner = "owner" in
let name = "name" in
let repo = { Current_github.Repo_id.owner; name } in
let hash = "abc" in
let _ = Lazy.force Current.Db.v in
Index.init ();
Index.record ~repo ~hash [ ("build", Some "job1"); ("deploy", None) ];
Alcotest.(chec... | |
501bcdca9f238bbb82b12705d28cbb3e02d49eebe442c3b779942efee464ee3c | louispan/data-diverse | ATraversable.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
module Data.Diverse.ATraversable where
import Data.Diverse.TypeLevel
| Given a ' Data . Diverse . Case ' that transforms each type in the typelist within an
' Applicative ' context @m@ , convert a @f xs@ to @m ( f ( ' TraverseResults ' c m xs))@ ,
-- w... | null | https://raw.githubusercontent.com/louispan/data-diverse/4033c90c44dab5824f76d64b7128bb6dea2b5dc7/src/Data/Diverse/ATraversable.hs | haskell | where @('TraverseResults' c m xs)@ corresponds to @('CaseResults' (c m) xs)@ with the
@m@ layer peeled off from each result.
This is primarily meant to be used with 'Data.Diverse.Case.Case's from the
Throws a type error when the 'Case' is stuck
(most likely because the kind does not match).
(confusing) type erro... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
module Data.Diverse.ATraversable where
import Data.Diverse.TypeLevel
| Given a ' Data . Diverse . Case ' that transforms each type in the typelist within an
' Applicative ' context @m@ , convert a @f xs@ to @m ( f ( ' TraverseResults ' c m xs))@ ,
" ... |
42a15fde8afe2485db55e1625b49a627b8a18c0e0da211e5c0729a2254c26fd6 | brownplt/TeJaS | patSets.ml | open Prelude
module StringSet = Set.Make (String)
module StringSetExt = SetExt.Make (StringSet)
type t =
| Finite of StringSet.t
| CoFinite of StringSet.t
let parse pos str =
failwith "PatSets.parse not implemented"
let singleton str = Finite (StringSet.singleton str)
let singleton_string v = match v with
... | null | https://raw.githubusercontent.com/brownplt/TeJaS/a8ad7e5e9ad938db205074469bbde6a688ec913e/src/patterns/patSets.ml | ocaml | There is always some element not in the set of excluded strings that
is common to both co-finite sets.
The finite set must be contained in the excluded elements of the
co-finite set. Any element not explicitly excluded is in cfset.
The finite set must be in the complement | open Prelude
module StringSet = Set.Make (String)
module StringSetExt = SetExt.Make (StringSet)
type t =
| Finite of StringSet.t
| CoFinite of StringSet.t
let parse pos str =
failwith "PatSets.parse not implemented"
let singleton str = Finite (StringSet.singleton str)
let singleton_string v = match v with
... |
2a354dec3c9a601aab48e4e46327fe542418630036b86b132acbf36957f49e8d | irastypain/sicp-on-language-racket | exercise_2_28.rkt | #lang racket
Процедура , которая приводит дерево к
(define (fringe tree)
(if (null? tree)
`()
(if (pair? tree)
(append (fringe (car tree)) (fringe (cdr tree)))
(list tree))))
(provide fringe) | null | https://raw.githubusercontent.com/irastypain/sicp-on-language-racket/0052f91d3c2432a00e7e15310f416cb77eeb4c9c/src/chapter02/exercise_2_28.rkt | racket | #lang racket
Процедура , которая приводит дерево к
(define (fringe tree)
(if (null? tree)
`()
(if (pair? tree)
(append (fringe (car tree)) (fringe (cdr tree)))
(list tree))))
(provide fringe) | |
4c100ad3b9336144d57bcdfec427e561495db763d76229508cd233d1a346ac50 | sourcegraph/srclib-haskell | Haddock.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE UnicodeSyntax #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_GHC -fwarn - unused - imports #
module Haddock where
import ClassyPrelude... | null | https://raw.githubusercontent.com/sourcegraph/srclib-haskell/b138c73a7d06680300dce4a39d2b98974064b29a/src/Haddock.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables #
The issue is that haskell allows multiple definitions for the same
handle different pattern matches are all definitions from the perspective
of the grapher.
TODO Using `read` directly is not safe.
We generate a lot of temporary directories:
... | # LANGUAGE LambdaCase #
# LANGUAGE UnicodeSyntax #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_GHC -fwarn - unused - imports #
module Haddock where
import ClassyPrelude hiding ((</>), (<.>), maximumBy)
import qualified Prelude
import ... |
21e7b61ea985f263c7b59bf8d40fb0ab85598e21b54790143b461ad19079c0f6 | facebook/infer | Procedures.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/4ee1c2a8e783ee770b61547a38ff1715d6ed75fe/infer/src/backend/Procedures.ml | ocaml | repeat the [condition] check so that we do not deserialize if there's nothing to do
we could also register this statement but it's typically used only once per run so just prepare
it inside the function |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
07770b1875761c1983c18d18fe7daa37f24816a2911bda1f963e3d64313ad983 | janestreet/ecaml | major_mode.mli | include Major_mode_intf.Major_mode
| null | https://raw.githubusercontent.com/janestreet/ecaml/bd95b93799ccf809be26436b8379410c29282c4f/src/major_mode.mli | ocaml | include Major_mode_intf.Major_mode
| |
3bf79e607f4575f8fb3daef53a48d13641b38d5ee69afe0c4b779f126b23f4cd | jonase/eastwood | classify_invoke.clj | Copyright ( c ) , Rich Hickey & contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be b... | null | https://raw.githubusercontent.com/jonase/eastwood/c5b7d9f8ad8f8b38dc7138d853cc65f6987d6058/copied-deps/eastwood/copieddeps/dep2/clojure/tools/analyzer/passes/jvm/classify_invoke.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , Rich Hickey & contributors .
(ns eastwood.copieddeps.dep2.clojure.tools.analyzer.passes.jvm.classify-invoke
(:require [eastwood.copieddeps.dep1.clojure.tools.analyzer.utils :refer [arglist-for-arity protocol-node? source-info]]
[eastwood.copieddeps.dep2.clojure.tools.analyzer.jvm.... |
aa6550214abaa653eb4b0478eab5c5132732357ddab4260cc4288936d6ed49d5 | noprompt/meander | epsilon.cljc | (ns ^:no-doc meander.substitute.epsilon
(:refer-clojure :exclude [compile])
#?(:cljs (:require-macros [meander.substitute.epsilon]))
(:require [clojure.set :as set]
[clojure.walk :as walk]
[meander.match.epsilon :as r.match]
[meander.match.runtime.epsilon :as r.match.runtime]
... | null | https://raw.githubusercontent.com/noprompt/meander/c24c7f1477879ee491fbc09fbf75a8777a705a20/src/meander/substitute/epsilon.cljc | clojure | ---------------------------------------------------------------------
Environment utilities
TODO: This definition is weak.
---------------------------------------------------------------------
Compilation
Normalize elements to vector and recur.
Process each element in the sequence from left to right.
Handle unq... | (ns ^:no-doc meander.substitute.epsilon
(:refer-clojure :exclude [compile])
#?(:cljs (:require-macros [meander.substitute.epsilon]))
(:require [clojure.set :as set]
[clojure.walk :as walk]
[meander.match.epsilon :as r.match]
[meander.match.runtime.epsilon :as r.match.runtime]
... |
ab1b92a6618d77af789471bf7801889e375170e1add0741df8adc16cc924d22e | CommonDoc/common-doc | gnuplot.lisp | (in-package :cl-user)
(defpackage common-doc.gnuplot
(:use :cl)
(:import-from :common-doc
:text
:children
:make-text
:make-image
:define-node)
(:import-from :common-doc.macro
:macro-node
:expand-macro)
... | null | https://raw.githubusercontent.com/CommonDoc/common-doc/bcde4cfee3d34482d9830c8f9ea45454c73cf5aa/contrib/gnuplot/gnuplot.lisp | lisp | Configuration
Classes
Macroexpansion
Run | (in-package :cl-user)
(defpackage common-doc.gnuplot
(:use :cl)
(:import-from :common-doc
:text
:children
:make-text
:make-image
:define-node)
(:import-from :common-doc.macro
:macro-node
:expand-macro)
... |
88d728b82c099efd0cc89925ec8894f727ee004a62816b473037e4850e9f57b6 | ocaml-multicore/tezos | test_qty.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_protocol/test/unit/test_qty.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETH... |
1f6577741a40ce92506b80db0d6972cafd615271319f861e0ad7160f70702d18 | fourier/ppath | generic.lisp | (defpackage ppath.details.generic
(:use :cl :alexandria :ppath.details.constants)
(:export path-error string-type getenv getcwd concat getpid get-temp-path
commonprefix splitext split-components))
(in-package ppath.details.generic)
(define-condition path-error
(error)
((function :initarg... | null | https://raw.githubusercontent.com/fourier/ppath/eb1a8173b4d1d691ea9a7699412123462f58c3ce/src/details/generic.lisp | lisp | the tests could override it
Using uiop:getcwd.
the tests could override it
encountered slash from right
return whole path
check if between slash and dot exist other letters,
process * mask
process ?
range found
(extract-range i)
find closing ]
found, replace \ with \\
increase current position t... | (defpackage ppath.details.generic
(:use :cl :alexandria :ppath.details.constants)
(:export path-error string-type getenv getcwd concat getpid get-temp-path
commonprefix splitext split-components))
(in-package ppath.details.generic)
(define-condition path-error
(error)
((function :initarg... |
c8662e7897c9c12c9221a68d8105c303204ec78ade6fb5546fb9ea8d932fa12c | pflanze/chj-schemelib | interrupts.scm | Copyright 2013 - 2019 by < >
;;; This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
;;; (at your option) any later version.
(require ;;c... | null | https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/posix/interrupts.scm | scheme | This file is free software; you can redistribute it and/or modify
(at your option) any later version.
cj-queue
(list-util map-iota)
(compile #t)
(exports
; many SIGxxx names . how to export those automatically ?
SIGPOLL
;;...
; = SIGPOLL
signal-number->name ;; takes int. dies on non-existing signals.[... | Copyright 2013 - 2019 by < >
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
cj-alist
cj-env
)
SIGCHLD
SIGQUEUE_ERROR
SIGQUEUE_SUCCESS
(define-constant-from-C SIGCHLD)
(define... |
4764fba6852d5400fbbf2b275d1cf93af496b2b7de8332f54233da09b03b08c1 | haskell-servant/servant-cassava | Cassava.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE ScopedTypeV... | null | https://raw.githubusercontent.com/haskell-servant/servant-cassava/8c81f070bb402dd88833ec1b6f66c6e74f70374e/src/Servant/CSV/Cassava.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
@cassava@'s encoding and decoding classes.
>>> type Eg = Get '[CSV' 'HasHeader MyEncodeOptions] [(Int, String)]
Default encoding and decoding options are also provided, along ... | # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
| A @CSV@ empty datatype with ` MimeRender ` and ` MimeUnrender ` instances for
> > > type = Get ' [ CSV ] [ ( Int , String ) ]
module ... |
eb3d21686be5a0abe00874884ad26e624057f6f433f49a7ad1adbd57415848df | inconvergent/weird | simplify-path.lisp |
(in-package :simplify)
(deftype int-vector () `(vector veq:pn))
; TODO: make 3d version similar to vert-utils?
(veq:fvdef -simplify (pts lim &key left right)
(declare #.*opt* (veq:fvec pts) (veq:ff lim) (veq:pn left right))
(let ((res (make-adjustable-vector :type 'veq:pn))
(dmax -1f0)
(index 0)... | null | https://raw.githubusercontent.com/inconvergent/weird/106d154ec2cd0e4ec977c3672ba717d6305c1056/src/draw/simplify-path.lisp | lisp | TODO: make 3d version similar to vert-utils?
:8338
this is kind of inefficient. but it works just fine. |
(in-package :simplify)
(deftype int-vector () `(vector veq:pn))
(veq:fvdef -simplify (pts lim &key left right)
(declare #.*opt* (veq:fvec pts) (veq:ff lim) (veq:pn left right))
(let ((res (make-adjustable-vector :type 'veq:pn))
(dmax -1f0)
(index 0))
(declare (int-vector res) (veq:pn index) ... |
cd334243e2c60a983518269008aa7159497000e43827ecc822420f384a1b3df0 | ntoronto/drbayes | language.rkt | #lang typed/racket/base
(require "language/functions.rkt"
"language/macros.rkt")
(provide (all-from-out
"language/functions.rkt"
"language/macros.rkt"))
| null | https://raw.githubusercontent.com/ntoronto/drbayes/e59eb7c7867118bf4c77ca903e133c7530e612a3/drbayes/private/language.rkt | racket | #lang typed/racket/base
(require "language/functions.rkt"
"language/macros.rkt")
(provide (all-from-out
"language/functions.rkt"
"language/macros.rkt"))
| |
7f0a162f0561aeb7d9e80863e93992c166b144a9b4f80b21995296964fcce6e6 | antifuchs/sbcl | filesys.lisp | ;;;; file system interface functions -- fairly Unix-centric, but with
;;;; differences between Unix and Win32 papered over.
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon Univers... | null | https://raw.githubusercontent.com/antifuchs/sbcl/789bf105edca031aff991ad16a5fd207812336a0/src/code/filesys.lisp | lisp | file system interface functions -- fairly Unix-centric, but with
differences between Unix and Win32 papered over.
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
Unix pathname host support
... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!IMPL")
( chapter 19 makes a lot of requirements for documenting
- If the first character is a dot , it... |
fd4b7c4627f92a42cb5182c4e978ca4c839704431eacfda07aa3d74fd1c06b56 | kadena-io/chainweb-node | TransactionExec.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE BangPatterns #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
-- |
Module : Chainweb . Pact . TransactionExec
Copyright : C... | null | https://raw.githubusercontent.com/kadena-io/chainweb-node/2dcdc28b6ccfa2102a16051165ed5d4e100b9084/src/Chainweb/Pact/TransactionExec.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
|
License : (see the file LICENSE)
Stability : experimental
* Transaction Execution
* Gas Execution
* Coinbase Execution
* Command Helpers
* Utilities
internal Pact modules
----------------------------------------------... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
Module : Chainweb . Pact . TransactionExec
Copyright : Copyright © 2018 Kadena LLC .
Maintainer : < > , < >
Pact command execution and coin ... |
1c72e25ebf574f096b1ea71f153a5f762ce5e478a98aad14cae1173dde5cba25 | janestreet/universe | signal.ml | type t = int
(* this function is a copy&paste from stdune *)
let name =
let table =
let open Sys in
[ (sigabrt, "ABRT")
; (sigalrm, "ALRM")
; (sigfpe, "FPE")
; (sighup, "HUP")
; (sigill, "ILL")
; (sigint, "INT")
; (sigkill, "KILL")
; (sigpipe, "PIPE")
; (sigquit, "QUIT")
;... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/shexp/process-lib/src/signal.ml | ocaml | this function is a copy&paste from stdune | type t = int
let name =
let table =
let open Sys in
[ (sigabrt, "ABRT")
; (sigalrm, "ALRM")
; (sigfpe, "FPE")
; (sighup, "HUP")
; (sigill, "ILL")
; (sigint, "INT")
; (sigkill, "KILL")
; (sigpipe, "PIPE")
; (sigquit, "QUIT")
; (sigsegv, "SEGV")
; (sigterm, "TERM")
;... |
7cbb567ec6b55610566dbf52db38b164fefb4326d4eb15b6c6b23d343e630019 | ucsd-progsys/dsolve | stable_sort2.ml | let show x = x
let rec split_aux lst left right =
match lst with
| [] -> (left, right)
| [x] -> (x :: left, right)
| x :: y :: ys -> split_aux ys (x :: left) (y :: right)
let split lst =
split_aux lst [] []
let rec len xs =
match xs with
| [] -> 0
| x::xs' -> 1 + len xs'
let re... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/postests/stable_sort2.ml | ocaml | let show x = x
let rec split_aux lst left right =
match lst with
| [] -> (left, right)
| [x] -> (x :: left, right)
| x :: y :: ys -> split_aux ys (x :: left) (y :: right)
let split lst =
split_aux lst [] []
let rec len xs =
match xs with
| [] -> 0
| x::xs' -> 1 + len xs'
let re... | |
a6b811e3904562e6e5dbd0a48185b1914ee552693e19ef1576a011028714f710 | Kalimehtar/gtk-cffi | adjustment.lisp | ;;;
;;; adjustment.lisp -- GtkAdjustment
;;;
Copyright ( C ) 2012 , < >
;;;
(in-package :gtk-cffi)
(defclass adjustment (g-object)
())
(defcfun gtk-adjustment-new :pointer
(value :double) (lower :double) (upper :double)
(step-increment :double) (page-increment :double) (page-size :double))
(defmethod gc... | null | https://raw.githubusercontent.com/Kalimehtar/gtk-cffi/fbd8a40a2bbda29f81b1a95ed2530debfe2afe9b/gtk/adjustment.lisp | lisp |
adjustment.lisp -- GtkAdjustment
| Copyright ( C ) 2012 , < >
(in-package :gtk-cffi)
(defclass adjustment (g-object)
())
(defcfun gtk-adjustment-new :pointer
(value :double) (lower :double) (upper :double)
(step-increment :double) (page-increment :double) (page-size :double))
(defmethod gconstructor ((adjustment adjustment) &key value lo... |
5b417fced224b24a0bcdaf30fa4f0b7f7c0cae4d530895f7e85352cdb67bd2d2 | janestreet/sexp_grammar | test_disobedient_generator.ml | open! Base
open! Import
open Disobedient_generator.Private
(* silence unused constructor warnings *)
[@@@warning "-37"]
(* silence unused type warnings *)
[@@@warning "-34"]
module type S = sig
type t [@@deriving sexp_grammar]
end
(* This expect test is deterministic, but unstable. Small changes in percentages ar... | null | https://raw.githubusercontent.com/janestreet/sexp_grammar/2906f35acd036522f6d9dc4d4229673f05f2ea56/validation/test/test_disobedient_generator.ml | ocaml | silence unused constructor warnings
silence unused type warnings
This expect test is deterministic, but unstable. Small changes in percentages are
expected if quickcheck distributions or random seeds change.
variants
polymorphic variants
records
very permissive record, as in some config files | open! Base
open! Import
open Disobedient_generator.Private
[@@@warning "-37"]
[@@@warning "-34"]
module type S = sig
type t [@@deriving sexp_grammar]
end
let%expect_test "Yield of invalid sexps" =
let test (module M : S) =
let generator = create_unfiltered M.t_sexp_grammar in
let accepts =
Staged.... |
7ae4fdbd3adba393c634a81d77985e9edf6e55c63df4a434164b31a93b356d5e | fyquah/hardcaml_zprize | prove_modulo_adder_subtractor_pipe.mli | open Core
val test
: op:[ `Add | `Sub ]
-> bits:int
-> stages:int
-> num_inputs:int
-> unit Or_error.t
| null | https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/libs/field_ops/test/prove_modulo_adder_subtractor_pipe.mli | ocaml | open Core
val test
: op:[ `Add | `Sub ]
-> bits:int
-> stages:int
-> num_inputs:int
-> unit Or_error.t
| |
c92eff63bd5013f0104ad985207b58da402d157ee6aab343f423c935902e8b4c | ddmcdonald/sparser | create-categories.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER COMMON-LISP) -*-
copyright ( c ) 2013 - 2019 -- all rights reserved
Copyright ( c ) 2007 - 2010 BBNT Solutions LLC . All Rights Reserved
;;;
;;; File: "create-categories"
Module : " grammar;rules : SDM&P :
Version : July 2019
Initiated ... | null | https://raw.githubusercontent.com/ddmcdonald/sparser/5a16c18417f725575e8c8c4a58fde433519e86cb/Sparser/code/s/grammar/rules/sdmp/create-categories.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER COMMON-LISP) -*-
File: "create-categories"
rules : SDM&P :
8/14/08 Fell through the assumption that there would be a form category
for the case of literal words in rules, but it lead to coniptions with "."
elevation of segment edge of verb cases to vg from... | copyright ( c ) 2013 - 2019 -- all rights reserved
Copyright ( c ) 2007 - 2010 BBNT Solutions LLC . All Rights Reserved
Version : July 2019
Initiated 2/9/07 . Elaborated through 8/6 . Refactored the head form
elevator 2/4/08 . Added cases through 4/24 , then through 6/16 .
to elevate : edge over a... |
25f922e2d283fac1e798390adc282d841cd616bb906b4afd804e50ac47a0517d | mflatt/macro-dsl-tutorial | point-with-method.rkt | #lang racket/base
(require "with-method.rkt"
racket/math)
(define point-class
(class
(hash 'get-x
(lambda (this) (get-field this 'x))
'get-y
(lambda (this) (get-field this 'y))
'set-x
(lambda (this v) (set-field! this 'x v))
'set-y
(l... | null | https://raw.githubusercontent.com/mflatt/macro-dsl-tutorial/76e979d24c2e05bd1457e3a859645cddfee0cbd1/objects/point-with-method.rkt | racket | #lang racket/base
(require "with-method.rkt"
racket/math)
(define point-class
(class
(hash 'get-x
(lambda (this) (get-field this 'x))
'get-y
(lambda (this) (get-field this 'y))
'set-x
(lambda (this v) (set-field! this 'x v))
'set-y
(l... | |
20a05dbc79b2c31e806e46603cabf2618541967d2e36363b49f4cad361d3c5fa | facebook/flow | ephemeralConnection.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/monitor/connections/ephemeralConnection.ml | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
c9a9bff3d2319bea69503cc93d7de3ea4c6871058cba93db2b45159c3d87b80c | MLstate/opalang | baseArg.mli |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/ocamllib/libbase/baseArg.mli | ocaml | * no completion possible
* completion matching the bash pattern
* any directory
* a finite set of possibilities
*
The type of bash completions
The list represents the completion of consecutive arguments
The boolean is true when completion should stop here (after '--' for instance)
* beware... |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... |
6b738f5b09a54ff22f84a601fc73d0dc9d507bbb1b2bd5bba6e44dc98266e30e | MagnusS/okra | test_reports.ml |
* Copyright ( c ) 2021 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/MagnusS/okra/c4a922f3c9b86876acaaeca21a4770fc5224dbb9/test/test_reports.ml | ocaml | also check that time adds up |
* Copyright ( c ) 2021 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
66f25f6fecf845dd07ea9d78a700d346cddcb692c6d4d66a77d822d07000f334 | ruricolist/serapeum | generalized-arrays.lisp | (in-package :serapeum.tests)
(def-suite generalized-arrays :in serapeum)
(in-suite generalized-arrays)
(defun count* (n)
(range 1 (1+ n)))
(test reshape
(let* ((count (count* 48))
(shape '(2 3 3 2))
(array (reshape shape count)))
(is (equal (shape array) '(2 3 3 2)))
(is (= (last-elt (r... | null | https://raw.githubusercontent.com/ruricolist/serapeum/d98b4863d7cdcb8a1ed8478cc44ab41bdad5635b/tests/generalized-arrays.lisp | lisp | (in-package :serapeum.tests)
(def-suite generalized-arrays :in serapeum)
(in-suite generalized-arrays)
(defun count* (n)
(range 1 (1+ n)))
(test reshape
(let* ((count (count* 48))
(shape '(2 3 3 2))
(array (reshape shape count)))
(is (equal (shape array) '(2 3 3 2)))
(is (= (last-elt (r... | |
4c999950fe5bec4c66e339b60e292e72d73b9e784564a9f60e96e388104a0ec9 | DaMSL/K3 | Evaluation.hs | {-# LANGUAGE DoAndIfThenElse #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE PatternGuards #
{-# LANGUAGE Rank2Types #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
# LANGUAGE TypeFamilies #
module Language.K3.Interpreter.Evaluat... | null | https://raw.githubusercontent.com/DaMSL/K3/51749157844e76ae79dba619116fc5ad9d685643/src/Language/K3/Interpreter/Evaluation.hs | haskell | # LANGUAGE DoAndIfThenElse #
# LANGUAGE Rank2Types #
| Monadic message passing primitive for the interpreter.
Interpretation
| Default values for specific types
| Interpretation of Constants.
| Common Numeric-Operation handling, with casing for int/real promotion.
| Common boolean operation handling.
| Common c... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE PatternGuards #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
# LANGUAGE TypeFamilies #
module Language.K3.Interpreter.Evaluation where
import Control.Arrow hiding ( (+++) )
import Contr... |
533d4ff8f3b21c81f93e5a00bd6c55fc9476b893f1adbefce865120d8649cb66 | w3ntao/programming-in-haskell | Exercise_6_8_6.hs | # OPTIONS_GHC -Wall #
module Exercise_6_8_6 where
import Prelude hiding (and, concat, replicate, (!!), elem)
and :: [Bool] -> Bool
and [] = True
and (x : xs) = if not x
then False
else and xs
concat :: [[a]] -> [a]
concat [] = []
concat (x : xs) = x ++ concat xs
rep... | null | https://raw.githubusercontent.com/w3ntao/programming-in-haskell/c2769fa19d8507aad209818c83f67e82c3698f07/Chapter-6/Exercise_6_8_6.hs | haskell | # OPTIONS_GHC -Wall #
module Exercise_6_8_6 where
import Prelude hiding (and, concat, replicate, (!!), elem)
and :: [Bool] -> Bool
and [] = True
and (x : xs) = if not x
then False
else and xs
concat :: [[a]] -> [a]
concat [] = []
concat (x : xs) = x ++ concat xs
rep... | |
72c97dea9e4d69db30f572e3550a5a5eb3605c653047ecf27a069d5e24b95bfa | ocaml-sf/learn-ocaml-corpus | test.ml | open Report
open Test_lib
let sample_char () =
Char.chr (Random.int 7 * 3 + Char.code 'a')
let sample_trie, sample_string =
let sample_word () =
String.init (Random.int 2 + 2) (fun i -> sample_char ()) in
let prefix s =
String.sub s 0 (Random.int (String.length s - 1)) in
let of_list l =
List.fold... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/mooc/week3/seq2/ex2/test.ml | ocaml | open Report
open Test_lib
let sample_char () =
Char.chr (Random.int 7 * 3 + Char.code 'a')
let sample_trie, sample_string =
let sample_word () =
String.init (Random.int 2 + 2) (fun i -> sample_char ()) in
let prefix s =
String.sub s 0 (Random.int (String.length s - 1)) in
let of_list l =
List.fold... | |
d712bbeea67260ff6e354920d745900a5b4545fa6a05a06fec1ef89c2b16158d | bobbae/gosling-emacs | killer.ml | ; -*-mlisp-*-
;
; This file contains alternate definitions for the delete/yank commands.
; They offer the advantage of a kill ring (holding 9 saves), with
; appending of consecutive kills to a single element of the ring. (also,
; yank-from-kill-ring leaves the mark at the beginning of the yank,
; facilitating u... | null | https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/lib/maclib/utah/killer.ml | ocaml | ; -*-mlisp-*-
;
; This file contains alternate definitions for the delete/yank commands.
; They offer the advantage of a kill ring (holding 9 saves), with
; appending of consecutive kills to a single element of the ring. (also,
; yank-from-kill-ring leaves the mark at the beginning of the yank,
; facilitating u... | |
40b23f71c4d175c0a40d018da5a566f6aad9f706873868d61b7417c935876c8a | JustusAdam/language-haskell | T0015.hs | SYNTAX TEST " source.haskell " " Deriving for ADTs with sums and records "
data Feed =
BuildTask {
blokName :: String,
outPathBuild :: FilePath,
relPath :: FilePath,
srcFile :: Files.File
}
deriving Eq
-- <~~-------- meta.deriving.haskell
data Query
= All
| Some {
feeds :: [S... | null | https://raw.githubusercontent.com/JustusAdam/language-haskell/c9ee1b3ee166c44db9ce350920ba502fcc868245/test/tickets/T0015.hs | haskell | <~~-------- meta.deriving.haskell
<~~---------- meta.deriving.haskell
<~~---------- meta.deriving.haskell | SYNTAX TEST " source.haskell " " Deriving for ADTs with sums and records "
data Feed =
BuildTask {
blokName :: String,
outPathBuild :: FilePath,
relPath :: FilePath,
srcFile :: Files.File
}
deriving Eq
data Query
= All
| Some {
feeds :: [String],
cats :: [String],
... |
c020387dbe9cf1c46ab88f7068f41c99237b60d174e11f8c9f995d1caf00b889 | marigold-dev/deku | block.ml | open Deku_stdlib
open Deku_crypto
open Deku_concepts
open Deku_protocol
open Deku_ledger
type block =
| Block of {
key : Key.t;
signature : Signature.t;
hash : Block_hash.t;
author : Key_hash.t;
level : Level.t;
(* TODO: nonce *)
previous : Block_hash.t;
tezos_operatio... | null | https://raw.githubusercontent.com/marigold-dev/deku/cdf82852196b55f755f40850515580be4fd9a3fa/deku-p/src/core/consensus/block.ml | ocaml | TODO: nonce | open Deku_stdlib
open Deku_crypto
open Deku_concepts
open Deku_protocol
open Deku_ledger
type block =
| Block of {
key : Key.t;
signature : Signature.t;
hash : Block_hash.t;
author : Key_hash.t;
level : Level.t;
previous : Block_hash.t;
tezos_operations : Tezos_operation.t l... |
699f21a28648230cf3732d13d4c2856c7505ad65fff58f361e5e229ac1872323 | clojure/core.typed | hset_utils.clj | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/src/clojure/core/typed/checker/hset_utils.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns clojure.core.typed.checker.hset-utils)
(def valid-fixed? (some-fn string? symbol? keyword? nil? number?
char? boolean?))
|
5043aa3d30ec1f1b09ac6e0601760e513f126377ca0985624c8f437e57045c10 | appleshan/cl-http | w4-client.lisp | ;;;
;;; **********************************************************************
This code was written by and has been placed in
;;; the Public domain, and is provided 'as is'.
;;;
;;; **********************************************************************
;;;
CMUCL specific W4 Web Walker client support .
(in-pack... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/cmucl/client/w4-client.lisp | lisp |
**********************************************************************
the Public domain, and is provided 'as is'.
**********************************************************************
Binary stream copy into a byte vector.
Text or CRLF stream copy into a string.
Fast chunked transfer capture.
Modified ... | This code was written by and has been placed in
CMUCL specific W4 Web Walker client support .
(in-package "HTTP")
(defun stream-copy-into-8-bit-array (stream length)
(declare (fixnum length)
(optimize (speed 3)))
(let ((vector (make-array length :element-type '(unsigned-byte 8))))
(dotimes (i lengt... |
ef44d02e32a9c98e83652753317a3bc277870f228666869d2d11469d8d47f057 | achirkin/vulkan | VK_MVK_macos_surface.hs | # OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_HADDOCK not - home #
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE ForeignFunctionInterface #
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LA... | null | https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_MVK_macos_surface.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE MagicHash #
# LANGUAGE PatternSynonyms #
# LANGUAGE Strict #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
> #include "vk_platform.h"
Error codes: 'VK_ERROR... | # OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_HADDOCK not - home #
# LANGUAGE FlexibleInstances #
# LANGUAGE ForeignFunctionInterface #
module Graphics.Vulkan.Ext.VK_MVK_macos_surface
(AHardwareBuffer(), ANativeWindow(), CAMetalLayer(), VkBool32(..),
VkDeviceAddress(..), VkDeviceSize(..), VkFla... |
d519cfe3ab6b2303f440e5d7052215b705126ad3e5cca4018f1dc746e10ff9e0 | poscat0x04/telegram-types | SetMyCommands.hs | module Web.Telegram.Types.Internal.API.SetMyCommands where
import Common
import Web.Telegram.Types.Internal.BotCommand
newtype SetMyCommands = SetMyCommands
{commands :: [BotCommand]}
deriving stock (Show, Eq)
mkLabel ''SetMyCommands
deriveToJSON snake ''SetMyCommands
makeMethod ''SetMyCommands
| null | https://raw.githubusercontent.com/poscat0x04/telegram-types/3de0710640f5303638a83e409001b0342299aeb8/src/Web/Telegram/Types/Internal/API/SetMyCommands.hs | haskell | module Web.Telegram.Types.Internal.API.SetMyCommands where
import Common
import Web.Telegram.Types.Internal.BotCommand
newtype SetMyCommands = SetMyCommands
{commands :: [BotCommand]}
deriving stock (Show, Eq)
mkLabel ''SetMyCommands
deriveToJSON snake ''SetMyCommands
makeMethod ''SetMyCommands
| |
2dbdd652345fcb513a8b7c1f4ad24cacacd801c5603ed49ec294a15f8c6fa23e | rotty/texinfo | indexing.scm | ( texinfo indexing ) -- indexing stexinfo
Copyright ( C ) 2003,2004 < wingo at pobox dot com >
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;; ... | null | https://raw.githubusercontent.com/rotty/texinfo/362a147831ba3ae8926eea6af33b2708d79e05dd/scheme/texinfo/private/indexing.scm | scheme | This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public ... | ( texinfo indexing ) -- indexing stexinfo
Copyright ( C ) 2003,2004 < wingo at pobox dot com >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
Note t... |
54975951655bb43da06cdb4048454be4b0323eec1521ba40d9e36cefef38071d | baskeboler/cljs-karaoke-client | queue.cljs | (ns cljs-karaoke.remote-control.queue
(:require [cljs.core.async :as async :refer [go go-loop <! >! chan]]))
(defonce remote-commands-queue (chan))
(defn ^export queue-remote-command [cmd]
(go
(>! remote-commands-queue cmd)))
(println "Remote control queue initiated.")
| null | https://raw.githubusercontent.com/baskeboler/cljs-karaoke-client/bb6512435eaa436d35034886be99213625847ee0/src/main/cljs_karaoke/remote_control/queue.cljs | clojure | (ns cljs-karaoke.remote-control.queue
(:require [cljs.core.async :as async :refer [go go-loop <! >! chan]]))
(defonce remote-commands-queue (chan))
(defn ^export queue-remote-command [cmd]
(go
(>! remote-commands-queue cmd)))
(println "Remote control queue initiated.")
| |
4a4264e4adce0ac501f1d8bff2c0a2f31abc5a2de1392ceb486e50fcccc9da57 | MyDataFlow/ttalk-server | meck_history_tests.erl | %%%============================================================================
Copyright 2013
%%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%% you may not use this file except in compliance with the License.
%%% You may obtain a copy of the License at
%%%
%%% -2.0
%%%
%%% Unless requ... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/meck/test/meck_history_tests.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 expr... | Copyright 2013
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(meck_history_tests).
-include_lib("eunit/include/eunit.hrl").
num_calls_with_arity_test() ->
meck:new(test, [non_strict]),
meck:expect(test... |
aec7c52087b0acbe2a7f7fa40e054404851bfb93d11e0962152e1294db535a4c | lpw25/talks | fiber.ml | open Import
module Eq = struct
type ('a, 'b) t = T : ('a, 'a) t
let cast (type a) (type b) (T : (a, b) t) (x : a) : b = x
end
module Var0 = struct
module Key = struct
type 'a t = ..
end
module type T = sig
type t
type 'a Key.t += T : t Key.t
val id : int
end
type 'a t = (module T with... | null | https://raw.githubusercontent.com/lpw25/talks/89b565f66be567795d08c520aea3b03d527d64b2/nyc-2018/fiber.ml | ocaml | This callback must never raise
Number of fibers running in this execution
context
We can't abort the execution at this point, so we just dump
the error on stderr | open Import
module Eq = struct
type ('a, 'b) t = T : ('a, 'a) t
let cast (type a) (type b) (T : (a, b) t) (x : a) : b = x
end
module Var0 = struct
module Key = struct
type 'a t = ..
end
module type T = sig
type t
type 'a Key.t += T : t Key.t
val id : int
end
type 'a t = (module T with... |
07b5463c8a0e001e1ec3b826b9a63ad79f6b7685f9a92ca9a4f6b3f0586097f0 | simonmar/par-tutorial | kmeans2.hs | -- Modified version of kmeans.hs: uses divide-and-conquer instead of flat parList.
import System.IO
import KMeansCommon
import Data.Array
import Text.Printf
import Data.List
import Data.Function
import Data.Binary (decodeFile)
import Debug.Trace
import Control.Parallel.Strategies
import Control.DeepSeq
import System.E... | null | https://raw.githubusercontent.com/simonmar/par-tutorial/f9061ea177800eb4ed9660bcabc8d8d836e1c73c/code/kmeans/kmeans2.hs | haskell | Modified version of kmeans.hs: uses divide-and-conquer instead of flat parList.
assign each vector to the nearest cluster centre
v. important: filter out any clusters that have
no points. This can happen when a cluster is not
close to any points. If we leave these in, then |
import System.IO
import KMeansCommon
import Data.Array
import Text.Printf
import Data.List
import Data.Function
import Data.Binary (decodeFile)
import Debug.Trace
import Control.Parallel.Strategies
import Control.DeepSeq
import System.Environment
import Data.Time.Clock
import Control.Exception
main = do
points <- d... |
d4d32fb042b3cb05e819ac10c5f92757ceef3ea77b658353aaea968ba29193b6 | poroh/ersip | ersip_dialog_test.erl | %%%
Copyright ( c ) 2018 , 2021 Dmitry Poroh
%%% All rights reserved.
Distributed under the terms of the MIT License . See the LICENSE file .
%%%
%%% Common dialog support test
%%%
%%% TODO:
%%% - Check that Record-route are ignored for target_refresher
%%% messages
%%%
-module(ersip_dialog_test).
-include_... | null | https://raw.githubusercontent.com/poroh/ersip/60afa92a53898f6692f3a30d04b5b88a580c8153/test/ersip_dialog_test.erl | erlang |
All rights reserved.
Common dialog support test
TODO:
- Check that Record-route are ignored for target_refresher
messages
===================================================================
Cases
===================================================================
====================
Sending BYE throug... | Copyright ( c ) 2018 , 2021 Dmitry Poroh
Distributed under the terms of the MIT License . See the LICENSE file .
-module(ersip_dialog_test).
-include_lib("eunit/include/eunit.hrl").
dialog_create_test() ->
InvReq = invite_request(),
InvSipMsg = ersip_request:sipmsg(InvReq),
InvResp180UAS = invite_... |
1726660f93e221514fcc6ee19072a11d53a57dc65b7b865124f907ef935fb041 | donaldsonjw/bigloo | sha2.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / runtime / Unsafe / sha2.scm * /
;* ------------------------------------------------------------- */
* Author : and * /
* Creation : Mon May 2... | null | https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/runtime/Unsafe/sha2.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* SHA-256 Bigloo implementation */
*===========================... | * serrano / prgm / project / bigloo / runtime / Unsafe / sha2.scm * /
* Author : and * /
* Creation : Mon May 26 08:40:27 2008 * /
* Last change : Tue Jun 17 17:28:49 2014 ( serrano ) * /
* Copyright : ... |
ec5b0cb89ff1e7bf73a838c036f3cadb229172a2a4a7ab35258541071e9448a6 | clojure-interop/aws-api | AWSStorageGatewayClientBuilder.clj | (ns com.amazonaws.services.storagegateway.AWSStorageGatewayClientBuilder
"Fluent builder for AWSStorageGateway. Use of the builder is preferred
over using constructors of the client class."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.services.storagegateway AWSStorageGatewayClientBu... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.storagegateway/src/com/amazonaws/services/storagegateway/AWSStorageGatewayClientBuilder.clj | clojure | (ns com.amazonaws.services.storagegateway.AWSStorageGatewayClientBuilder
"Fluent builder for AWSStorageGateway. Use of the builder is preferred
over using constructors of the client class."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaws.services.storagegateway AWSStorageGatewayClientBu... | |
f21d22fd372e233bcb4b8bbc8ea6921e5a4b729ec16ad7a493931e52e5fb3641 | pokepay/paras | compiler.lisp | (defpackage #:paras/compiler
(:use #:cl
#:paras/errors
#:paras/types)
(:shadowing-import-from #:paras/errors
#:end-of-file
#:undefined-function)
(:import-from #:paras/builtin)
(:import-from #:paras/user)
(:export #:compiled-form
#:... | null | https://raw.githubusercontent.com/pokepay/paras/4809fd49f279aaf06e6e4feb3edc0f2a87371cd4/compiler.lisp | lisp | The function is not allowed to be called. | (defpackage #:paras/compiler
(:use #:cl
#:paras/errors
#:paras/types)
(:shadowing-import-from #:paras/errors
#:end-of-file
#:undefined-function)
(:import-from #:paras/builtin)
(:import-from #:paras/user)
(:export #:compiled-form
#:... |
2ff3cb59948ca95aafdd112a71ec25968a780beca5161f9086cd443cd5776458 | Daniel-Diaz/processing | random.hs |
{-# LANGUAGE OverloadedStrings #-}
import Graphics.Web.Processing.Mid
import Graphics.Web.Processing.Html
import Control.Applicative ((<$>))
main :: IO ()
main = writeHtml "processing.js" "random.pde" "Random demo" "random.html" randomDemo
randomDemo :: ProcScript
randomDemo = execScriptM $ do
vi <- newVar 0
vj... | null | https://raw.githubusercontent.com/Daniel-Diaz/processing/f7e6661e533abf7a8d47abd273b0a8ab61eb47ad/examples/random.hs | haskell | # LANGUAGE OverloadedStrings #
Random color
Top position
Bottom position
Line
Update top position |
import Graphics.Web.Processing.Mid
import Graphics.Web.Processing.Html
import Control.Applicative ((<$>))
main :: IO ()
main = writeHtml "processing.js" "random.pde" "Random demo" "random.html" randomDemo
randomDemo :: ProcScript
randomDemo = execScriptM $ do
vi <- newVar 0
vj <- newVar 0
rv <- newVar 0
gv ... |
ad367006b07fd59784806329aa10c345897bb6fe8020e6780dccb27b26a8240a | rd--/hsc3 | Enum.hs | -- | Data types for enumerated and non signal unit generator inputs.
module Sound.Sc3.Ugen.Enum where
import Sound.Sc3.Common.Envelope {- hsc3 -}
import Sound.Sc3.Common.Enum {- hsc3 -}
import Sound.Sc3.Ugen.Ugen {- hsc3 -}
-- | Type specialised envelope curve.
type EnvCurve = Envelope_Curve Ugen
| Lift to Ugen .... | null | https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Sound/Sc3/Ugen/Enum.hs | haskell | | Data types for enumerated and non signal unit generator inputs.
hsc3
hsc3
hsc3
| Type specialised envelope curve. | module Sound.Sc3.Ugen.Enum where
type EnvCurve = Envelope_Curve Ugen
| Lift to Ugen .
from_buffer :: Buffer Ugen -> Ugen
from_buffer b =
case b of
Buffer_Id i -> constant i
Buffer u -> u
|
7819ca9e05783085b3d3105d315cc6d71bc442ad9bd37c568f25546829e7f90e | carl-eastlund/dracula | syntax-checks.rkt | #lang racket/base
(provide (all-defined-out))
;; Constants must be surrounded with asterisks.
(define (legal-constant-name? x)
(and (identifier? x)
(regexp-match-exact?
(regexp "[*].+[*]")
(symbol->string (syntax-e x)))))
;; is stx an identifier whose name starts with a colon?
(define (keywo... | null | https://raw.githubusercontent.com/carl-eastlund/dracula/a937f4b40463779246e3544e4021c53744a33847/lang/syntax-checks.rkt | racket | Constants must be surrounded with asterisks.
is stx an identifier whose name starts with a colon? | #lang racket/base
(provide (all-defined-out))
(define (legal-constant-name? x)
(and (identifier? x)
(regexp-match-exact?
(regexp "[*].+[*]")
(symbol->string (syntax-e x)))))
(define (keyword-syntax? stx)
(and (identifier? stx)
(let ([str (symbol->string (syntax-e stx))])
(e... |
f7c482d0f8f0a1e51494c4e3afa1434a81c6b896f8fa47cafcb013423e49c4a2 | rbonichon/smtpp | obfuscator.ml | (*********************************************************************************)
Copyright ( c ) 2015 , INRIA , Universite de Nancy 2 and Universidade Federal
do Rio Grande do Norte .
(* ... | null | https://raw.githubusercontent.com/rbonichon/smtpp/57eb74bccbb0f30293ee058ded4b01baa1067756/src/obfuscator.ml | ocaml | *******************************************************************************
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
... | Copyright ( c ) 2015 , INRIA , Universite de Nancy 2 and Universidade Federal
do Rio Grande do Norte .
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER I... |
0b055bec8386ecc584b067ad133030353c49fedae0601ba28cf0ff2db055cd74 | remyzorg/pendulum | test_typing.ml | [@@@warning "-27"]
[@@@warning "-32"]
[@@@warning "-33"]
open Pendulum
open Program
open Signal
let p =
let%sync react_obj a =
loop begin
!(Format.printf "%d\n" !!a)
; pause
end in react_obj#create 0
let () = p#a 10; ignore @@ p#react
(* 'a -> < react : Pendulum.Program.state; x : 'a -> unit > *)
... | null | https://raw.githubusercontent.com/remyzorg/pendulum/a532681c6f99d77129e31fbe27cc56c396a7c63c/tests/ppx/test_typing.ml | ocaml | 'a -> < react : Pendulum.Program.state; x : 'a -> unit > | [@@@warning "-27"]
[@@@warning "-32"]
[@@@warning "-33"]
open Pendulum
open Program
open Signal
let p =
let%sync react_obj a =
loop begin
!(Format.printf "%d\n" !!a)
; pause
end in react_obj#create 0
let () = p#a 10; ignore @@ p#react
let%sync p2 = loop pause
let _ : < react : unit; status : stat... |
531aec5847ed63298b3d91a84a580e949e5402c6f3cb27d0f0b5e36025feb0e1 | dgiot/dgiot | emqx_connection.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2018 - 2021 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/a6b816a094b1c9bd024ce40b8142375a0f0289d8/src/emqx_connection.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 ) 2018 - 2021 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(emqx_connection).
-include("emqx.hrl").
-include("emqx_mqtt.hrl").
-include("logger.hrl... |
bc9a88f08b8fd227ef8a15834eb725e5e8519d18a018632959705987929c24e6 | machinedgod/helda | TileMap.hs | # LANGUAGE UnicodeSyntax #
# LANGUAGE TemplateHaskell #
module TileMap
( Width
, Height
, TileMap(TileMap)
, name
, width
, height
, mapData
, loadFromFile
, linear2Coord
, coord2Linear
) where
import Control.Lens (makeLenses)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Linear (V2(V2))
impo... | null | https://raw.githubusercontent.com/machinedgod/helda/d9da022bae77001a77892a2a65c7a1a1f9b2bce2/src/TileMap.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------ | # LANGUAGE UnicodeSyntax #
# LANGUAGE TemplateHaskell #
module TileMap
( Width
, Height
, TileMap(TileMap)
, name
, width
, height
, mapData
, loadFromFile
, linear2Coord
, coord2Linear
) where
import Control.Lens (makeLenses)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Linear (V2(V2))
impo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.