_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 |
|---|---|---|---|---|---|---|---|---|
5f4d415a4c2a843d7edeb6e5fefae8cf609cdb5f5429744aca5686fccea05d5c | reasonml-old/bs-containers | sys.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/reasonml-old/bs-containers/dfd1360dc74ede57c09e9f9d837ce59285af6fd2/doc/stdlib-cmi/sys.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
* System interface .
Every functio... |
1e582a20c2695353202fc5431fc787592710e4d37d50f064deb403efac78c512 | rizo/snowflake-os | IO.mli |
* IO - Abstract input / output
* Copyright ( C ) 2003
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your option... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/libraries/extlib/IO.mli | ocaml | * The abstract input type.
* The abstract output type, ['a] is the accumulator data, it is returned
when the [close_out] function is called.
* This exception is raised when reading on a closed input.
* This exception is raised when reading on a closed output.
* Read a single char from an input or raise [No_more_in... |
* IO - Abstract input / output
* Copyright ( C ) 2003
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2.1 of the License , or ( at your option... |
3bd15f51eef34cd4385cc718ee1ee639f4310f51a5e441fcfdaafa7b962b60d8 | qkrgud55/ocamlmulti | mtype.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/typing/mtype.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : mtype.ml 12511 2012 - 05 - 30... |
9ddda8348c0d446d94ef9348badd3a2d4c37b8f3447f7492e43bc7f4447f271f | ocamllabs/ocaml-modular-implicits | t100-pushtrap.ml | open Lib;;
try raise Not_found
with _ -> ()
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 PUSHTRAP 16
11 GETGLOBAL Not_found
13 MAKEBLOCK1 0
15 RAISE
16 PUSHCONST0
17 POP 1
19 ATOM0
20 SETGLOBAL T... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-ocaml/t100-pushtrap.ml | ocaml | open Lib;;
try raise Not_found
with _ -> ()
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 PUSHTRAP 16
11 GETGLOBAL Not_found
13 MAKEBLOCK1 0
15 RAISE
16 PUSHCONST0
17 POP 1
19 ATOM0
20 SETGLOBAL T... | |
d62ea910ebe9729fc3c0c6fd5ca99d3156e54ddae25cdc659c435627ef10f333 | gedge-platform/gedge-platform | rabbit_auth_backend_oauth2_app.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_auth_backend_oauth2_app).
-behavi... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_auth_backend_oauth2/src/rabbit_auth_backend_oauth2_app.erl | erlang |
---------------------------------------------------------------------------- | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_auth_backend_oauth2_app).
-behaviour(ap... |
37ef6aebaa0c48313cdd83eedc3bd2a5579dbb48937f46e6e7b76932d1da0b74 | nedap/formatting-stack | has_duplicates_3.clj | (ns functional.formatting-stack.formatters.clean-ns.has-duplicates-3
(:require
[clojure.string :as string]
[clojure.string]))
| null | https://raw.githubusercontent.com/nedap/formatting-stack/c43e74d5409e9338f208457bb8928ce437381a3f/test/functional/formatting_stack/formatters/clean_ns/has_duplicates_3.clj | clojure | (ns functional.formatting-stack.formatters.clean-ns.has-duplicates-3
(:require
[clojure.string :as string]
[clojure.string]))
| |
6b460505fcd2d323fe89970f3b6de08019e29ef1066d208f18ca8a8682330995 | LambdaCon/2015 | hackney_multipart.erl | %%% -*- erlang -*-
%%%
This file is part of released under the Apache 2 license .
%%% See the NOTICE for more information.
%%%
Copyright ( c ) 2012 - 2015 < >
Copyright ( c ) 2012 < >
Copyright ( c ) 2011 , < >
%%%
%% @doc module to encode/decode multipart
-module(hackney_multipart).
-include("hack... | null | https://raw.githubusercontent.com/LambdaCon/2015/0149877454b88815b9fcb9cba8ffd9b37c149026/Elixir%20love%20at%20first%20sip/src/demos/currencies_skeleton/deps/hackney/src/hackney_lib/hackney_multipart.erl | erlang | -*- erlang -*-
See the NOTICE for more information.
@doc module to encode/decode multipart
Parts can be under the form:
- `{file, Path}' : to send a file
- `{file, Path, ExtraHeaders}' : to send a file with extra headers
- `{mp_mixed, Name, Boundart}' to send a mixed multipart.
- `{mp_mixed_eof, Boundary... | This file is part of released under the Apache 2 license .
Copyright ( c ) 2012 - 2015 < >
Copyright ( c ) 2012 < >
Copyright ( c ) 2011 , < >
-module(hackney_multipart).
-include("hackney_lib.hrl").
-export([encode_form/1, encode_form/2,
decode_form/2,
boundary/0,
parse... |
b9e67930761323d6f5773faf71ba18a98b2e8be4e291a165f7a1d40e194c9030 | fgalassi/cs61a-sp11 | test-dealer-sensitive.scm | (load "load-simply")
(load "dealer-sensitive")
(load "assert")
(assert equal? (dealer-sensitive '(as) '2s) #t "as (2s) -> #t")
(assert equal? (dealer-sensitive '(as) '6s) #t "as (6s) -> #t")
(assert equal? (dealer-sensitive '(as) '7s) #t "as (7s) -> #t")
(assert equal? (dealer-sensitive '(as) '10s) #t "as (10s) -> #t"... | null | https://raw.githubusercontent.com/fgalassi/cs61a-sp11/66df3b54b03ee27f368c716ae314fd7ed85c4dba/projects/blackjack/normal/test-dealer-sensitive.scm | scheme | (load "load-simply")
(load "dealer-sensitive")
(load "assert")
(assert equal? (dealer-sensitive '(as) '2s) #t "as (2s) -> #t")
(assert equal? (dealer-sensitive '(as) '6s) #t "as (6s) -> #t")
(assert equal? (dealer-sensitive '(as) '7s) #t "as (7s) -> #t")
(assert equal? (dealer-sensitive '(as) '10s) #t "as (10s) -> #t"... | |
bf5af235c364b8e4db9454d3b0c239bdd55efa99f851965845a557e75c6ba52d | froggey/Mezzano | room.lisp | ;;;; ROOM and other heap groveling functions
(in-package :mezzano.internals)
(defparameter *object-tags-to-basic-types*
#(array-t ; #b000000
# b000001
# b000010
array-unsigned-byte-2 ; #b000011
array-unsigned-byte-4 ; #b000100
# b000101
# b000110
# b000111
array-un... | null | https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/system/room.lisp | lisp | ROOM and other heap groveling functions
#b000000
#b000011
#b000100
#b001000
#b001001
#b001010
#b001011
#b001100
#b001101
#b001111
#b010010
#b010011
#b010110
#b010111
#b011000
#b011010
#b011011
#b011100
#b100001
#b100100
#b100101
#b101001
#b101010
#b101101
#b110000
#b110001
#b110010
#b110011... |
(in-package :mezzano.internals)
(defparameter *object-tags-to-basic-types*
# b000001
# b000010
# b000101
# b000110
# b000111
# b001110
# b010000
# b010001
# b010100
# b010101
# b011001
# b011101
# b011110
# b011111
# b100000
# b100010
# b100011
# b100110
# b100111
# b101000
#... |
dfe4514ca1ab97f792447b8fa9887d53008bf5e4d26f89ef6989172868802c68 | fulcrologic/fulcro-rad-demo | invoice.cljc | (ns com.example.model.invoice
(:require
#?(:clj [com.example.components.database-queries :as queries])
[cljc.java-time.local-date :as ld]
[cljc.java-time.local-date-time :as ldt]
[com.fulcrologic.rad.attributes :refer [defattr]]
[com.fulcrologic.rad.attributes-options :as ao]
[com.fulcrologic.... | null | https://raw.githubusercontent.com/fulcrologic/fulcro-rad-demo/10d898149944e103b1f7d611b95d64c747320e3b/src/shared/com/example/model/invoice.cljc | clojure |
Statistics attributes. Note that these are to-many, and are used by
reports that expect a given attribute to be grouped/filtered and possibly
aggregated values. Each of these statistics will output the same number of
items for given input groups, one for each group.
These depend on the `groups` that are generat... | (ns com.example.model.invoice
(:require
#?(:clj [com.example.components.database-queries :as queries])
[cljc.java-time.local-date :as ld]
[cljc.java-time.local-date-time :as ldt]
[com.fulcrologic.rad.attributes :refer [defattr]]
[com.fulcrologic.rad.attributes-options :as ao]
[com.fulcrologic.... |
879f427b4b6d7a956698359a06fb21324d8073da67122ff1aa78ce4b1c494939 | ralsei/bingus | data-def-parsing.rkt | #lang racket
(provide add-all-dd)
A DataDefinition is ( cons Symbol Symbol )
; ds->dd : String -> DataDefinition
(define (ds->dd ds)
(let* ([data-def (regexp-match
#px"(?mi:^[\\s;]*an?\\s+(.*\\S)\\s+is\\s+(?:an?\\s+)?(.*\\S)\\s*$)"
ds)]
[from-type (second data-def)... | null | https://raw.githubusercontent.com/ralsei/bingus/c08cf67534088a19987c6c35bf7006d9a3a39171/bingus-lib/parser/from-checkers/data-def-parsing.rkt | racket | ds->dd : String -> DataDefinition | #lang racket
(provide add-all-dd)
A DataDefinition is ( cons Symbol Symbol )
(define (ds->dd ds)
(let* ([data-def (regexp-match
#px"(?mi:^[\\s;]*an?\\s+(.*\\S)\\s+is\\s+(?:an?\\s+)?(.*\\S)\\s*$)"
ds)]
[from-type (second data-def)]
[to-type (third data-def)... |
448316ee3fa4d2a16cd2757b3fe80f41f8a89fca547379fb91c92fbe7a483ed6 | htmfilho/minimily | inventory.clj | (ns minimily.inventory.web.ui.inventory
(:require [minimily.web.ui.layout :refer [layout]]
[minimily.utils.web.wrapper :refer [http-headers]]
[minimily.web.model.menu :refer [menu-items]]
[minimily.web.ui.home :refer [menu-item-template]]))
(defn inventory-page [sessi... | null | https://raw.githubusercontent.com/htmfilho/minimily/b317b6b67bc79773163f1a6f7c3b46db795ef979/src/minimily/inventory/web/ui/inventory.clj | clojure | (ns minimily.inventory.web.ui.inventory
(:require [minimily.web.ui.layout :refer [layout]]
[minimily.utils.web.wrapper :refer [http-headers]]
[minimily.web.model.menu :refer [menu-items]]
[minimily.web.ui.home :refer [menu-item-template]]))
(defn inventory-page [sessi... | |
e445f6052973c8a7516bed5d9e0868f73dcc85bc4a8093f0dd373e58f0675734 | exoscale/telex | ring1.clj | (ns exoscale.telex.interceptor.ring1
(:require [exoscale.interceptor :as ix]
[exoscale.telex.interceptor :as interceptor]
[exoscale.telex.request :as request]
[exoscale.telex.response :as response]))
(def request-keys [:url :body :method :query :headers :url
;; ... | null | https://raw.githubusercontent.com/exoscale/telex/3effada3a3089dcda232c900d3b8d386cac86e20/src/exoscale/telex/interceptor/ring1.clj | clojure | exts | (ns exoscale.telex.interceptor.ring1
(:require [exoscale.interceptor :as ix]
[exoscale.telex.interceptor :as interceptor]
[exoscale.telex.request :as request]
[exoscale.telex.response :as response]))
(def request-keys [:url :body :method :query :headers :url
:fo... |
aaa57d5ea7851dd4f2b8d76c3d2191975fd295b65fe98e8e86070e64943a6ed6 | mirage/ocaml-diet | test.ml |
* Copyright ( C ) 2013 Citrix Inc
*
* Permission to use , copy , modify , and/or distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... | null | https://raw.githubusercontent.com/mirage/ocaml-diet/d0cca45f8543f8edb3603fa0de90ee085a34e183/lib_test/test.ml | ocaml | take away every other block |
* Copyright ( C ) 2013 Citrix Inc
*
* Permission to use , copy , modify , and/or 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... |
1a9a4bea41bafa2815ca81e2ec5e2cb1ac83751e88fc7d57a9375f456ebc49b2 | polymeris/re-frame-realword-example-app | user.clj | (ns user
(:use [figwheel-sidecar.repl-api :as ra]))
(defn go! []
(ra/start-figwheel!)
(ra/cljs-repl "dev")) | null | https://raw.githubusercontent.com/polymeris/re-frame-realword-example-app/f57f3f62551bf9a13be1c5561ec3acc6eea1ca46/dev/user.clj | clojure | (ns user
(:use [figwheel-sidecar.repl-api :as ra]))
(defn go! []
(ra/start-figwheel!)
(ra/cljs-repl "dev")) | |
b203232dbaf69a7c89f2acdbebecbf6b99ea8f71bd55fc295eaf727b628b4ffb | status-im/status-electron | account.cljs | (ns status-desktop-front.override.account
(:require [re-frame.core :as re-frame]
[status-desktop-front.status-go :as status-go]
[status-desktop-front.storage :as storage]
[status-im.ui.screens.accounts.events :as accounts.events]
[status-im.ui.screens.accounts.recover.e... | null | https://raw.githubusercontent.com/status-im/status-electron/aad18c34c0ee0304071e984f21d5622735ec5bef/src_front/status_desktop_front/override/account.cljs | clojure | COFX
RECOVER FX | (ns status-desktop-front.override.account
(:require [re-frame.core :as re-frame]
[status-desktop-front.status-go :as status-go]
[status-desktop-front.storage :as storage]
[status-im.ui.screens.accounts.events :as accounts.events]
[status-im.ui.screens.accounts.recover.e... |
66e150fbb79cda3ab8df11cc71a7c2386c8933cc9a05ac42e0918cbea36dd0ae | mlin/PhyloCSF | PhyloCSFModel.ml | open Batteries
open Printf
open CamlPaml
open CamlPaml.Expr
module PM = CamlPaml.PhyloModel
module Codon = CamlPaml.Code.Codon64
Construct rate matrix parameterization from symmetric exchangeability matrix s
let pivar i = Var i
let make_q_p14n s =
let sq =
Array.init Codon.dim
fun i ->
let si = s.(i)
... | null | https://raw.githubusercontent.com/mlin/PhyloCSF/6a26e7f7f40b43eac8b76cc1fe295a584d7d8b38/src/PhyloCSFModel.ml | ocaml | dot product...
Instantiate a codon model
Calculate log-probability of the alignment
Simultaneously, calculate expected log-probability of the ancestral sequence
| open Batteries
open Printf
open CamlPaml
open CamlPaml.Expr
module PM = CamlPaml.PhyloModel
module Codon = CamlPaml.Code.Codon64
Construct rate matrix parameterization from symmetric exchangeability matrix s
let pivar i = Var i
let make_q_p14n s =
let sq =
Array.init Codon.dim
fun i ->
let si = s.(i)
... |
015d83aaf17f3c40aa34fea7ca469b790aad2aa3292a6b43f3e695e64f88201f | intermine/bluegenes | subs.cljs | (ns bluegenes.pages.querybuilder.subs
(:require [re-frame.core :refer [reg-sub]]
[clojure.string :refer [join blank?]]
[bluegenes.pages.querybuilder.logic :as con-logic]))
(reg-sub
:qb/constraint-logic
(fn [db]
(join "" (drop-last (rest (apply vector (str (con-logic/vec->list (get-in db ... | null | https://raw.githubusercontent.com/intermine/bluegenes/f2c291dd4b32122329d5561c01e26a70eaa3186e/src/cljs/bluegenes/pages/querybuilder/subs.cljs | clojure | Returns either nil or the index (sort priority) of `path`. | (ns bluegenes.pages.querybuilder.subs
(:require [re-frame.core :refer [reg-sub]]
[clojure.string :refer [join blank?]]
[bluegenes.pages.querybuilder.logic :as con-logic]))
(reg-sub
:qb/constraint-logic
(fn [db]
(join "" (drop-last (rest (apply vector (str (con-logic/vec->list (get-in db ... |
7dbab628b5d050ca72ce1bd822ddf392d3ee295baa0ef9868326a3311e66587b | shirok/Gauche | hashutil.scm | ;;;
;;; auxiliary hashtable utilities. to be autoloaded.
;;;
Copyright ( c ) 2000 - 2022 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistributions of source code must r... | null | https://raw.githubusercontent.com/shirok/Gauche/b773899dbe0b2955e1c4f1daa066da874070c1e4/lib/gauche/hashutil.scm | scheme |
auxiliary hashtable utilities. to be autoloaded.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and th... | Copyright ( c ) 2000 - 2022 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(define-module gauche.hashutil
(export st... |
60ca60a7fcd357ea0ef9bdf36f54f6beb29d4b5725eb4cd0d423d601945ecaa1 | McCLIM/McCLIM | package.lisp | ;;; ---------------------------------------------------------------------------
;;; License: LGPL-2.1+ (See file 'Copyright' for details).
;;; ---------------------------------------------------------------------------
;;;
( c ) Copyright 2019 by < >
;;;
;;; -----------------------------------------------------... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/c079691b0913f8306ceff2620b045b6e24e2f745/Backends/PDF/test/package.lisp | lisp | ---------------------------------------------------------------------------
License: LGPL-2.1+ (See file 'Copyright' for details).
---------------------------------------------------------------------------
---------------------------------------------------------------------------
| ( c ) Copyright 2019 by < >
(defpackage #:clim-pdf.test
(:use
#:cl
#:fiveam)
(:export
#:run-tests))
(in-package #:clim-pdf.test)
(def-suite* :clim-pdf)
(defun run-tests ()
(run! :clim-pdf))
|
c620fa4745b754dd1ad2ba58e1a249f49cbdf11c02923d2275b762f64f4918cf | jordanthayer/ocaml-search | recording_speedy.ml | (** Recording for uniform cost searches *)
open Recording_astar
let make_expand recorder expand f_hd r_hd =
(** Takes the domain expand function and a heuristic calculator
and creates an expand function which returns search nodes. *)
(fun n ->
let children =
List.map (fun (dat, g) ->
let h... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/recording/recording_speedy.ml | ocaml | * Recording for uniform cost searches
* Takes the domain expand function and a heuristic calculator
and creates an expand function which returns search nodes. |
open Recording_astar
let make_expand recorder expand f_hd r_hd =
(fun n ->
let children =
List.map (fun (dat, g) ->
let h,d = f_hd dat
and rh, rd = r_hd dat in
{ data = dat;
parent = n;
f = d;
g = g;
h = h;
d = d;
rev_h = rh;
... |
80b16578972d9d5550d4c6c91698464949a3665a69ab761b51bddfa90d02c88b | valderman/haste-compiler | HaskellConstants.hs |
import Data.Bits (shiftL)
import Data.Word
import Data.Int
-- This magical #include brings in all the everybody-knows-these magic
constants unfortunately , we need to be * explicit * about which one
-- we want; if we just hope a -I... will get the right one, we could
-- be in trouble.
Pull in the autoconf define... | null | https://raw.githubusercontent.com/valderman/haste-compiler/47d942521570eb4b8b6828b0aa38e1f6b9c3e8a8/include/HaskellConstants.hs | haskell | This magical #include brings in all the everybody-knows-these magic
we want; if we just hope a -I... will get the right one, we could
be in trouble.
#include "../include/dist-derivedconstants/header/DerivedConstants.h"
import Util
All pretty arbitrary:
Should really match the number
of decls in Data.Tuple
spec... |
import Data.Bits (shiftL)
import Data.Word
import Data.Int
constants unfortunately , we need to be * explicit * about which one
Pull in the autoconf defines ( HAVE_FOO ) , but do n't include
ghcconfig.h , because that will include which has the
wrong platform settings for the compiler ( it has the platform ... |
225746cd85a4ca4a6d098ec216bf3e8665450851e84c13120719ece94fd4db08 | tek/ribosome | MenuState.hs | module Ribosome.Menu.MenuState (
module Ribosome.Menu.Class.MenuMode,
module Ribosome.Menu.Class.MenuState,
module Ribosome.Menu.Data.FilterMode,
) where
import Ribosome.Menu.Class.MenuMode (MenuMode (..))
import Ribosome.Menu.Class.MenuState (MenuState (..), entries, entryCount, itemCount, items, query)
import ... | null | https://raw.githubusercontent.com/tek/ribosome/8ab6fed463a10cddb8531dc333552707a60c7c96/packages/menu/lib/Ribosome/Menu/MenuState.hs | haskell | module Ribosome.Menu.MenuState (
module Ribosome.Menu.Class.MenuMode,
module Ribosome.Menu.Class.MenuState,
module Ribosome.Menu.Data.FilterMode,
) where
import Ribosome.Menu.Class.MenuMode (MenuMode (..))
import Ribosome.Menu.Class.MenuState (MenuState (..), entries, entryCount, itemCount, items, query)
import ... | |
fd7e748ebd7ccabd6924c2d826332a1aa60f7b9cca32b5ff0878aaeb51e4cdb7 | NorfairKing/easyspec | Evaluate.hs | module EasySpec.Evaluate where
import Import
import EasySpec.Evaluate.Build
import EasySpec.Evaluate.Evaluate
import EasySpec.Evaluate.OptParse
easyspecEvaluate :: IO ()
easyspecEvaluate = do
(disp, Settings) <- getInstructions
case disp of
DispatchEvaluate fs -> runEvaluate fs
DispatchBuild ... | null | https://raw.githubusercontent.com/NorfairKing/easyspec/b038b45a375cc0bed2b00c255b508bc06419c986/easyspec-evaluate/src/EasySpec/Evaluate.hs | haskell | module EasySpec.Evaluate where
import Import
import EasySpec.Evaluate.Build
import EasySpec.Evaluate.Evaluate
import EasySpec.Evaluate.OptParse
easyspecEvaluate :: IO ()
easyspecEvaluate = do
(disp, Settings) <- getInstructions
case disp of
DispatchEvaluate fs -> runEvaluate fs
DispatchBuild ... | |
f97c6b98292a57394f34c8979fe89cd19433b1dd2e19cca5e13fb30bd0141a3c | thheller/fulcro-expo | app.cljs | (ns test.app
(:require
["expo" :as ex]
["react-native" :as rn]
["react" :as r]
[fulcro.client :as fc]
[fulcro.client.primitives :as fp :refer (defsc)]
[shadow.expo :as expo]
))
must use defonce and must refresh full app so metro can fill these in
;; at live-reload time `require` does no... | null | https://raw.githubusercontent.com/thheller/fulcro-expo/ad04c8234ddaa961acf461bdfc06718f244238eb/src/main/test/app.cljs | clojure | at live-reload time `require` does not exist and will cause errors
must use path relative to :output-dir | (ns test.app
(:require
["expo" :as ex]
["react-native" :as rn]
["react" :as r]
[fulcro.client :as fc]
[fulcro.client.primitives :as fp :refer (defsc)]
[shadow.expo :as expo]
))
must use defonce and must refresh full app so metro can fill these in
(defonce splash-img (js/require "../ass... |
cef30668af50eec0bcd7b3dde7640d3d0519a676a3cfc08dff2d86a0a2e9b9f7 | clj-holmes/clj-watson | output.clj | (ns clj-watson.controller.output
(:require
[cheshire.core :as json]
[clj-watson.logic.sarif :as logic.sarif]
[clj-watson.logic.template :as logic.template]
[clojure.java.io :as io]
[clojure.pprint :as pprint]))
(defmulti ^:private generate* (fn [_ _ kind] (keyword kind)))
(defmethod ^:private generat... | null | https://raw.githubusercontent.com/clj-holmes/clj-watson/7990c86ab7050d91dea35f70ab71c38fc7dbdf32/src/clj_watson/controller/output.clj | clojure | (ns clj-watson.controller.output
(:require
[cheshire.core :as json]
[clj-watson.logic.sarif :as logic.sarif]
[clj-watson.logic.template :as logic.template]
[clojure.java.io :as io]
[clojure.pprint :as pprint]))
(defmulti ^:private generate* (fn [_ _ kind] (keyword kind)))
(defmethod ^:private generat... | |
55106aee6107dc7b8740d9572cbb530d14481130f7c2e0a9ded1ec1c26dbdedd | AllureOfTheStars/Allure | TileKind.hs | Copyright ( c ) 2008 - -2011
Copyright ( c ) 2010 - -2021 and others ( see git history )
This file is a part of the computer game Allure of the Stars
and is released under the terms of the GNU Affero General Public License .
-- For license and copyright information, see the file LICENSE.
--
-- | Definitions... | null | https://raw.githubusercontent.com/AllureOfTheStars/Allure/4e870f40bee205ae1dc8c5439a2efd21508c8fe3/GameDefinition/Content/TileKind.hs | haskell | For license and copyright information, see the file LICENSE.
| Definitions of tile kinds. Every terrain tile in the game is
an instantiated tile kind.
* Group name patterns
* Content
* Group name patterns
Warning, many of these are also sythesized, so typos can happen.
** Allure-specific
** Used only internal... | Copyright ( c ) 2008 - -2011
Copyright ( c ) 2010 - -2021 and others ( see git history )
This file is a part of the computer game Allure of the Stars
and is released under the terms of the GNU Affero General Public License .
module Content.TileKind
* * Used in CaveKind and perhaps elsewhere .
pattern ... |
85afd6e1696c19ce4fc7231b377a9f452dc5b5ce349eaace4da903bb410cc11c | mfikes/coal-mine | problem_41.cljc | (ns coal-mine.problem-41
(:require [coal-mine.checks :refer [defcheck-41] :rename {defcheck-41 defcheck}]
[clojure.test]
[clojure.set]))
(defcheck solution-121dc098
(fn dropn [xs n] (when (seq xs) (concat (take (dec n) xs) (dropn (drop n xs) n)))))
(defcheck solution-126b1f03
(fn [lst n]... | null | https://raw.githubusercontent.com/mfikes/coal-mine/0961d085b37f4e59489a8cf6a2b8fef0a698d8fb/src/coal_mine/problem_41.cljc | clojure | (if (empty? coll)
result
(if (= 0 (rem cur r))
(recur result (rest coll) (inc cur))
drop this
use keep-indexed
create ([inx num] ...)
using keep-indexed is a cheat (but it's faster than my solution)
This is my solution - *sigh*
(fn [coll n]
(let [[firsts lasts] (split-at (dec n) coll)... | (ns coal-mine.problem-41
(:require [coal-mine.checks :refer [defcheck-41] :rename {defcheck-41 defcheck}]
[clojure.test]
[clojure.set]))
(defcheck solution-121dc098
(fn dropn [xs n] (when (seq xs) (concat (take (dec n) xs) (dropn (drop n xs) n)))))
(defcheck solution-126b1f03
(fn [lst n]... |
1bd1cbc7d02dc0c6e224156500ce3dace567e32dc3a38289c1542f36fab3ee23 | clj-python/libpython-clj | dechunk_map.clj | (ns libpython-clj2.python.dechunk-map
"Utility namespace with a function that works like a single-sequence map but
stops chunking.")
(defn dechunk-map
"Map a function across a sequence without chunking."
[f s]
(lazy-seq
(when-let [[x] (seq s)]
(cons (f x) (dechunk-map f (rest s))))))
| null | https://raw.githubusercontent.com/clj-python/libpython-clj/e53112d00157f3744fd4c9d31809360b8460993a/src/libpython_clj2/python/dechunk_map.clj | clojure | (ns libpython-clj2.python.dechunk-map
"Utility namespace with a function that works like a single-sequence map but
stops chunking.")
(defn dechunk-map
"Map a function across a sequence without chunking."
[f s]
(lazy-seq
(when-let [[x] (seq s)]
(cons (f x) (dechunk-map f (rest s))))))
| |
9c77c1cd9ddf39b5a5f4407968fcef40e682637ec7f57a6360c0dc92749303cb | input-output-hk/bech32 | AppSpec.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module AppSpec
( spec
) where
import Prelude
import Codec.Binary.Bech32
( dataPartFromBytes, humanReadablePartFromText )
import Data.ByteArray.Encoding
( Base (..), convertToBase )
import Data.ByteString... | null | https://raw.githubusercontent.com/input-output-hk/bech32/c33dbf2edeb6930328503871e145f011cb20127e/bech32/test/AppSpec.hs | haskell | # LANGUAGE OverloadedStrings #
| Check that, for a given encoder, any encoded string can be decoded and
re-encoded to bech32 using the given prefix.
| Check that any bech32-encoded string can be decoded successfully.
Generate strings of a minimal length. | # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
module AppSpec
( spec
) where
import Prelude
import Codec.Binary.Bech32
( dataPartFromBytes, humanReadablePartFromText )
import Data.ByteArray.Encoding
( Base (..), convertToBase )
import Data.ByteString
( ByteString )
import Data.Byt... |
00a089e840c436e0a37c33b47f48496205239bdd655a7edd4eafeec5b67f6aaf | threatgrid/ctim | feedback.cljc | (ns ctim.schemas.feedback
(:require [ctim.schemas.common :as c]
#?(:clj [flanders.core :as f :refer [def-entity-type def-eq]]
:cljs [flanders.core :as f :refer-macros [def-entity-type def-eq]])))
(def type-identifier "feedback")
(def-eq FeedbackTypeIdentifier type-identifier)
(def-entit... | null | https://raw.githubusercontent.com/threatgrid/ctim/2ecae70682e69495cc3a12fd58a474d4ea57ae9c/src/ctim/schemas/feedback.cljc | clojure | (ns ctim.schemas.feedback
(:require [ctim.schemas.common :as c]
#?(:clj [flanders.core :as f :refer [def-entity-type def-eq]]
:cljs [flanders.core :as f :refer-macros [def-entity-type def-eq]])))
(def type-identifier "feedback")
(def-eq FeedbackTypeIdentifier type-identifier)
(def-entit... | |
dbc57845e129af94c1c88c03373e5761d0b5c2e0c73786fceace3803714f384f | bazqux/bazqux-urweb | FastSpring.hs | # LANGUAGE ViewPatterns , RecordWildCards , OverloadedStrings , RankNTypes #
module Payments.FastSpring
( buyPage, invoiceLink, processPayment, parseOrderNotification, productInfo
, parseOrderNotificationNew
, FastSpringOrder(..), tryDownloadFastSpringOrder, downloadFastSpringOrder
) where
import Contr... | null | https://raw.githubusercontent.com/bazqux/bazqux-urweb/bf2d5a65b5b286348c131e91b6e57df9e8045c3f/crawler/Payments/FastSpring.hs | haskell | У FastSpring в паре заказов был глюк,
Пользователей с '%' в userId нет, по-этому повторный url decode не страшен
fastSpringApiGet "/company/bazqux/order/BAZ200226-3459-20161"
fastSpringApiPost "/accounts" $
^ first , и last и email
(fmap (Left . T.intercalate "; ") . mapM errEntry . HM.toList)
... | # LANGUAGE ViewPatterns , RecordWildCards , OverloadedStrings , RankNTypes #
module Payments.FastSpring
( buyPage, invoiceLink, processPayment, parseOrderNotification, productInfo
, parseOrderNotificationNew
, FastSpringOrder(..), tryDownloadFastSpringOrder, downloadFastSpringOrder
) where
import Contr... |
5d5f75c379a79178157df0e84eaa9ffdafc966cf654ffbfbc9537af778c9cbba | greglook/vault | project.clj | (defproject mvxcvi/vault "0.4.0-SNAPSHOT"
:description "Content-addressable data store."
:url ""
:license {:name "Public Domain"
:url "/"}
:aliases {"docs" ["do" ["hiera"] ["doc"] ["marg" "--multi" "--dir" "target/doc/marginalia"]]
"tests" ["do" ["check"] ["test"] ["cloverage"]]
... | null | https://raw.githubusercontent.com/greglook/vault/3c117589c574bf5d3028c745b24bb4f1ac688098/project.clj | clojure | (defproject mvxcvi/vault "0.4.0-SNAPSHOT"
:description "Content-addressable data store."
:url ""
:license {:name "Public Domain"
:url "/"}
:aliases {"docs" ["do" ["hiera"] ["doc"] ["marg" "--multi" "--dir" "target/doc/marginalia"]]
"tests" ["do" ["check"] ["test"] ["cloverage"]]
... | |
a264bee7f97bfd78e58e76d32bf15c3632152c280b038eefc872668edaa974e6 | mbj/stratosphere | MultiMeasureMappingsProperty.hs | module Stratosphere.Timestream.ScheduledQuery.MultiMeasureMappingsProperty (
module Exports, MultiMeasureMappingsProperty(..),
mkMultiMeasureMappingsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/timestream/gen/Stratosphere/Timestream/ScheduledQuery/MultiMeasureMappingsProperty.hs | haskell | # SOURCE # | module Stratosphere.Timestream.ScheduledQuery.MultiMeasureMappingsProperty (
module Exports, MultiMeasureMappingsProperty(..),
mkMultiMeasureMappingsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.... |
85226d2cba81e9d83fbbe158135a824c2799a02d0ea6fa68e0da3e2bd31ba072 | imrehg/ypsilon | unicode-assistants.scm | #!core
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (core unicode-assistants)
(export general-category
simple-uppercase
simple-lowercase
simple-titlecase
numeric-prop... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/stdlib/core/unicode-assistants.scm | scheme | <CJK Ideograph Extension A , First>;Lo;0;L;;;;;N ; ; ; ; ;
<CJK Ideograph Extension A , Last>;Lo;0;L;;;;;N ; ; ; ; ;
4E00;<CJK Ideograph, First>;Lo;0;L;;;;;N;;;;;
<CJK Ideograph , Last>;Lo;0;L;;;;;N ; ; ; ; ;
AC00;<Hangul Syllable, First>;Lo;0;L;;;;;N;;;;;
<Hangul Syllable , Last>;Lo;0;L;;;;;N ; ; ; ; ;
D800;<Non Pr... | #!core
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (core unicode-assistants)
(export general-category
simple-uppercase
simple-lowercase
simple-titlecase
numeric-prop... |
5fa458b119e3ab58805de687e8c8a5c35873c2a37ad925fd84778c1a80e15692 | frodwith/cl-urbit | math.lisp | (defpackage #:urbit/tests/math
(:use #:cl #:fiveam #:urbit/tests #:urbit/nock/math))
(in-package #:urbit/tests/math)
(def-suite math-tests
:description "test the primitive math in urbit/math"
:in all-tests)
(in-suite math-tests)
(test met-test
(is (= 4 (met 0 8)))
(is (= 9 (met 0 256)))
... | null | https://raw.githubusercontent.com/frodwith/cl-urbit/65af924ee58c4c974056f369158bbc1401308fea/t/math.lisp | lisp | (defpackage #:urbit/tests/math
(:use #:cl #:fiveam #:urbit/tests #:urbit/nock/math))
(in-package #:urbit/tests/math)
(def-suite math-tests
:description "test the primitive math in urbit/math"
:in all-tests)
(in-suite math-tests)
(test met-test
(is (= 4 (met 0 8)))
(is (= 9 (met 0 256)))
... | |
88cace8ebb2a9907ed30e05a368b2a3315e20cae17a84797ddaf44b81bca4f8f | lucasdicioccio/deptrack-project | Debian.hs |
module Devops.Debian (
module Devops.Debian.Base
) where
import Devops.Debian.Base
| null | https://raw.githubusercontent.com/lucasdicioccio/deptrack-project/cd3d59a796815af8ae8db32c47b1e1cdc209ac71/deptrack-devops-recipes/src/Devops/Debian.hs | haskell |
module Devops.Debian (
module Devops.Debian.Base
) where
import Devops.Debian.Base
| |
1d316bccd8660487c189198bd13e5d67b111c962d8b59c285c52fbbf03c2f1d1 | coq-tactician/coq-tactician | sexpr.ml | open Names
open Constr
open Sorts
open Context
type sexpr = Node of sexpr list | Leaf of string
let rec sexpr_to_string = function
| Leaf str -> str
| Node ls -> "(" ^ (String.concat " " (List.map sexpr_to_string ls)) ^ ")"
let s2s s = Leaf s
let id2s id = s2s (Id.to_string id)
let name2s = function
| Anonym... | null | https://raw.githubusercontent.com/coq-tactician/coq-tactician/acd65b052d295c31feb96ef732f6d3020b38730a/src/sexpr.ml | ocaml | not expected
TODO: Printing is not optimal here
TODO: More info?
TODO: Verify correctness of debruijn_to_id
TODO: Improve
TODO: Check if this ordering of bound variables is correct | open Names
open Constr
open Sorts
open Context
type sexpr = Node of sexpr list | Leaf of string
let rec sexpr_to_string = function
| Leaf str -> str
| Node ls -> "(" ^ (String.concat " " (List.map sexpr_to_string ls)) ^ ")"
let s2s s = Leaf s
let id2s id = s2s (Id.to_string id)
let name2s = function
| Anonym... |
a70a45d6d3a357a65e0aa954a896be54a7153843bc17a24f0d0241bb34aeca30 | esl/amoc-arsenal-xmpp | amoc_xmpp_mam.erl | -module(amoc_xmpp_mam).
-include_lib("exml/include/exml.hrl").
-define(V(X), (fun amoc_config_validation:X/1)).
-required_variable(
[#{name => max_items_per_lookup, default_value => 5, verification => ?V(nonnegative_integer),
description => "Maximum number of messages returned per MAM lookup"},
#{name =... | null | https://raw.githubusercontent.com/esl/amoc-arsenal-xmpp/d6027d9b30ad63b5fe3be37d64c8b08e8c515d29/src/helpers/amoc_xmpp_mam.erl | erlang | Wrap around if the next result set would be incomplete
Config helpers | -module(amoc_xmpp_mam).
-include_lib("exml/include/exml.hrl").
-define(V(X), (fun amoc_config_validation:X/1)).
-required_variable(
[#{name => max_items_per_lookup, default_value => 5, verification => ?V(nonnegative_integer),
description => "Maximum number of messages returned per MAM lookup"},
#{name =... |
a57e6f7af8a9716e063c2e84d3245c33576f24db1a60138160fafdd2a8d368a3 | essen/egs | egs_store.erl | This file is part of EGS .
%%
EGS is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
%% License, or (at your option) any later version.
%%
EGS is distributed in the hope tha... | null | https://raw.githubusercontent.com/essen/egs/ceea04c3b438cee9a8470f2abc6297429bf347c5/apps/egs_store/src/egs_store.erl | erlang |
License, or (at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
API.
gen_server.
API.
gen_server. | This file is part of EGS .
EGS is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
EGS is distributed in the hope that it will be useful ,
You should have received a copy o... |
21452510e3d7e564ba27243730e3250f78f4ab5143790bbe5e284f5f1fb67769 | haskellweekly/haskellweekly | Index.hs | module HW.Handler.Index
( handler,
)
where
import qualified Data.List as List
import qualified Data.Map as Map
import qualified Data.Maybe as Maybe
import qualified Data.Ord as Ord
import qualified HW.Handler.Common as Common
import qualified HW.Template.Index as Index
import qualified HW.Type.App as App
import qu... | null | https://raw.githubusercontent.com/haskellweekly/haskellweekly/615526de6f1e590fff3bac5a7911aaaacf149b09/source/library/HW/Handler/Index.hs | haskell | module HW.Handler.Index
( handler,
)
where
import qualified Data.List as List
import qualified Data.Map as Map
import qualified Data.Maybe as Maybe
import qualified Data.Ord as Ord
import qualified HW.Handler.Common as Common
import qualified HW.Template.Index as Index
import qualified HW.Type.App as App
import qu... | |
21741f414e79e2ebaed58ba5973f99a696ee5149ea5f96b8995c2671d093804e | askvortsov1/nittany_market | client.mli | module ForQuery (Q : Queries.Query): sig
type response =
| Success of Q.t
| Unauthorized
| Forbidden
| NotFound
| TooManyRequests
| OtherError of string
[@@deriving sexp]
val query: ?url:Uri.t -> Q.t_variables -> response Lwt.t
end | null | https://raw.githubusercontent.com/askvortsov1/nittany_market/08ffcad2bb2ead9aaeb85b22b88aa2af879e36ad/frontend/graphql/client.mli | ocaml | module ForQuery (Q : Queries.Query): sig
type response =
| Success of Q.t
| Unauthorized
| Forbidden
| NotFound
| TooManyRequests
| OtherError of string
[@@deriving sexp]
val query: ?url:Uri.t -> Q.t_variables -> response Lwt.t
end | |
aa3b5ee21d4a64490410816fe67f319f4f2d57d2f396ef1372ae834667a914a2 | blindglobe/common-lisp-stat | unittests-dataframe.lisp | ;;; -*- mode: lisp -*-
;;; File: unittests-dataframe.lisp
Author : < >
Copyright : ( c)2008 - - , . Currently licensed under MIT
;;; license. See file LICENSE.mit in top-level directory
;;; for information.
;;; Purpose: unittests for the dataframe package
Time - st... | null | https://raw.githubusercontent.com/blindglobe/common-lisp-stat/0c657e10a4ee7e8d4ef3737f8c2d4e62abace2d8/src/unittests/unittests-dataframe.lisp | lisp | -*- mode: lisp -*-
File: unittests-dataframe.lisp
license. See file LICENSE.mit in top-level directory
for information.
Purpose: unittests for the dataframe package
What is this talk of 'release'? Klingons do not make software
'releases'. Our software 'escapes', leaving a blood... |
Author : < >
Copyright : ( c)2008 - - , . Currently licensed under MIT
Time - stamp : < 2009 - 09 - 24 10:30:20 tony >
Creation : < 2008 - 05 - 09 14:18:19 >
(in-package :lisp-stat-unittests)
(deftestsuite lisp-stat-ut-dataframe (lisp-stat-ut)
((my-df-1
(make-instance 'dataframe-arra... |
79a1da7943f81666f261b75aa20f199f3a4219c7e4d48ba64805fdeabe36c256 | sgbj/MaximaSharp | coeflistp.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Package : CLIMAX ; Base : 10 -*-
;;;>******************************************************************************************
> Software developed by
> using Symbolics Common Lisp ( system 425.111 , ivory revision 4 )
> at NIST - Computing and Applied Mathemati... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/contrib/format/coeflistp.lisp | lisp | Syntax : Common - lisp ; Package : CLIMAX ; Base : 10 -*-
>******************************************************************************************
it is therefore not subject to copyright .
>******************************************************************************************
(in-package 'maxima)
************... | > Software developed by
> using Symbolics Common Lisp ( system 425.111 , ivory revision 4 )
> at NIST - Computing and Applied Mathematics Laboratory
(in-package 'climax)
To run in 's Maxima comment the above and uncomment these :
( - lookup ( item alist ) ` ( assolike , item , alist ) )
( * ( arg1 ... |
e17149f56fec5a5551d516fb816e931fef13794d567f84f1f4054d4b609e2401 | ccntrq/loxomotive | Token.hs | module Loxomotive.Token where
import Loxomotive.TokenType
import Loxomotive.Object
data Token = Token
{ t_type :: TokenType
, t_lexeme :: String
, t_literal :: Maybe Object
, t_line :: Int
, t_id :: Int -- Hack to make all tokens unique
} deriving (Show, Eq, Ord)
| null | https://raw.githubusercontent.com/ccntrq/loxomotive/1d40f4e8c52921c0c09d4ec2156d13e3cc80c704/src/Loxomotive/Token.hs | haskell | Hack to make all tokens unique | module Loxomotive.Token where
import Loxomotive.TokenType
import Loxomotive.Object
data Token = Token
{ t_type :: TokenType
, t_lexeme :: String
, t_literal :: Maybe Object
, t_line :: Int
} deriving (Show, Eq, Ord)
|
64603523ab25abefc679a3dfda47dc44ffc219bef5fbd90a482833082a5aca97 | tonyrog/canopen | co_mgr.erl | %%%---- BEGIN COPYRIGHT -------------------------------------------------------
%%%
Copyright ( C ) 2007 - 2017 , Rogvall Invest AB , < >
%%%
%%% This software is licensed as described in the file COPYRIGHT, which
%%% you should have received as part of this distribution. The terms
%%% are also available at .
%%%
%%... | null | https://raw.githubusercontent.com/tonyrog/canopen/b76c0c3503e3087cc7511fe5795e6053702d449e/src/co_mgr.erl | erlang | ---- BEGIN COPYRIGHT -------------------------------------------------------
This software is licensed as described in the file COPYRIGHT, which
you should have received as part of this distribution. The terms
are also available at .
You may opt to use, copy, modify, merge, publish, distribute and/or sell
furni... | Copyright ( C ) 2007 - 2017 , Rogvall Invest AB , < >
copies of the Software , and permit persons to whom the Software is
This software is distributed on an " AS IS " basis , WITHOUT WARRANTY OF ANY
@author < >
@author < >
( C ) 2017 ,
CANopen manager interface .
Created : 5 Jun 2010 by
... |
fd27ed55ec4f1e50e498710f3afe7f2d629c56241485d370381df1320b2924f3 | hiroshi-unno/coar | hesOf.mli | val hes_of_cctl: CSyntax.cctl -> MuCLP.Problem.t
val hes_of_chmes: CSyntax.chmes -> MuCLP.Problem.t
| null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/c/hesOf.mli | ocaml | val hes_of_cctl: CSyntax.cctl -> MuCLP.Problem.t
val hes_of_chmes: CSyntax.chmes -> MuCLP.Problem.t
| |
5f00e3f1e9ea443f830cf8428e5852c35bf4ac2131dab4cc8695ee6158501940 | kupl/LearnML | original.ml | type btree = Empty | Node of (int * btree * btree)
let rec mirror (t : btree) : btree =
match t with
| Empty -> Empty
| Node (i, Empty, Empty) -> Node (i, Empty, Empty)
| Node (i, bt1, bt2) -> Node (i, mirror bt1, mirror bt2)
| null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/mirror/sub6/original.ml | ocaml | type btree = Empty | Node of (int * btree * btree)
let rec mirror (t : btree) : btree =
match t with
| Empty -> Empty
| Node (i, Empty, Empty) -> Node (i, Empty, Empty)
| Node (i, bt1, bt2) -> Node (i, mirror bt1, mirror bt2)
| |
3324ec84d5cdb1e9782dc1b3e66a3b923db33504a79ac6873b418cfe61658bb7 | polyfy/polylith | api_argument_mapping_test.clj | (ns polylith.clj.core.poly-cli.api-argument-mapping-test
(:require [clojure.test :refer :all]
[polylith.clj.core.poly-cli.api :as api]))
(deftest boolean-value
(is (= [":loc"]
(api/argument-mapping {"loc" true}))))
(deftest entity-as-string
(is (= ["workspace"]
(api/argument-mappin... | null | https://raw.githubusercontent.com/polyfy/polylith/7a1545826cea4657ac9681f70f687beb5881a1de/bases/poly-cli/test/polylith/clj/core/poly_cli/api_argument_mapping_test.clj | clojure | (ns polylith.clj.core.poly-cli.api-argument-mapping-test
(:require [clojure.test :refer :all]
[polylith.clj.core.poly-cli.api :as api]))
(deftest boolean-value
(is (= [":loc"]
(api/argument-mapping {"loc" true}))))
(deftest entity-as-string
(is (= ["workspace"]
(api/argument-mappin... | |
b1c7f3efd45e1744a5a6a68cc63eb06329ceaf609a47eb71d4f93f74cf82290c | cyverse-archive/DiscoveryEnvironmentBackend | internal_jobs.clj | (ns donkey.services.metadata.internal-jobs
(:use [slingshot.slingshot :only [throw+]])
(:require [clojure-commons.error-codes :as ce]
[donkey.clients.metadactyl :as metadactyl]
[donkey.util.config :as config]))
(defn- load-param-map
[app-id]
(->> (metadactyl/get-app app-id)
(:gro... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/Donkey/src/donkey/services/metadata/internal_jobs.clj | clojure | TODO: find a better way to associate values with parameters. | (ns donkey.services.metadata.internal-jobs
(:use [slingshot.slingshot :only [throw+]])
(:require [clojure-commons.error-codes :as ce]
[donkey.clients.metadactyl :as metadactyl]
[donkey.util.config :as config]))
(defn- load-param-map
[app-id]
(->> (metadactyl/get-app app-id)
(:gro... |
f2b5d02cb406ef004580b204ec0f54bd9aa922681d7e0b38483153ddbb50fe32 | ocaml/dune | describe.ml | open Stdune
open Import
(* This command is not yet versioned, but some people are using it in
non-released tools. If you change the format of the output, please contact:
- rotor people for "describe workspace"
- duniverse people for "describe opam-files" *)
let doc = "Describe the workspace."
let man =
... | null | https://raw.githubusercontent.com/ocaml/dune/f1ff192613b0cdfcdb09043b28b0fed4885da38c/bin/describe.ml | ocaml | This command is not yet versioned, but some people are using it in
non-released tools. If you change the format of the output, please contact:
- rotor people for "describe workspace"
- duniverse people for "describe opam-files"
* whether to sanitize absolute paths of workspace items, and their UIDs, to
... | open Stdune
open Import
let doc = "Describe the workspace."
let man =
[ `S "DESCRIPTION"
; `P
{|Describe what is in the current workspace in either human or
machine readable form.
By default, this command output a human readable description of
the current workspace. This output is ... |
9b2be13de2be8291053d07515431edc13f2d5cf159db03502f5397902fb45dec | BranchTaken/Hemlock | test_of_real_to_real.ml | open! Basis.Rudiments
open! Basis
open U16
let test () =
let rec test_rs rs = begin
match rs with
| [] -> ()
| r :: rs' -> begin
let x = of_real r in
File.Fmt.stdout
|> Fmt.fmt "of_real "
|> Real.fmt ~alt:true ~radix:Radix.Hex r
|> Fmt.fmt " -> "
|> fmt ~al... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/u16/test_of_real_to_real.ml | ocaml | open! Basis.Rudiments
open! Basis
open U16
let test () =
let rec test_rs rs = begin
match rs with
| [] -> ()
| r :: rs' -> begin
let x = of_real r in
File.Fmt.stdout
|> Fmt.fmt "of_real "
|> Real.fmt ~alt:true ~radix:Radix.Hex r
|> Fmt.fmt " -> "
|> fmt ~al... | |
f3815d44a17a0af90e98f8b6c397d49e6d4258372a39a3ebe39bb982c4191944 | opencog/opencog | filter-#18.scm | ;; antecedent should not be the anphor itself.
;; Examples:
;; This one should be obvious.
(define filter-#18
(BindLink
(VariableList
(TypedVariableLink
(VariableNode "$word-inst-antecedent")
(TypeNode "WordInstanceNode")
)
(TypedVariabl... | null | https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/opencog/nlp/anaphora/rules/filters/filter-%2318.scm | scheme | antecedent should not be the anphor itself.
Examples:
This one should be obvious.
filter |
(define filter-#18
(BindLink
(VariableList
(TypedVariableLink
(VariableNode "$word-inst-antecedent")
(TypeNode "WordInstanceNode")
)
(TypedVariableLink
(VariableNode "$word-inst-anaphor")
(TypeNode "WordIn... |
c4d87d2b96e024950ddae1310b1b4ece3e18bd2f58b50ed36bbdaf759441adc0 | scrintal/heroicons-reagent | magnifying_glass.cljs | (ns com.scrintal.heroicons.solid.magnifying-glass)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M10.5 3.75a6.75 6.75 0 100 13.5 6.75 6.75 0 000-13.5zM2.25 10.5a8.25 8.25... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/magnifying_glass.cljs | clojure | (ns com.scrintal.heroicons.solid.magnifying-glass)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M10.5 3.75a6.75 6.75 0 100 13.5 6.75 6.75 0 000-13.5zM2.25 10.5a8.25 8.25... | |
09a58ea66a3281b77502c7184ebbb387fe49088474194ceba0232ba89da4355a | luminus-framework/examples | project.clj | (defproject multi-client-ws-aleph "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:dependencies [[ch.qos.logback/logback-classic "1.2.3"]
[cheshire "5.8.1"]
[cljs-ajax "0.8.0"]
[clojure.java-time "0.3.2"]
[com.cognitect/transit... | null | https://raw.githubusercontent.com/luminus-framework/examples/cbeee2fef8f457a6a6bac2cae0b640370ae2499b/multi-client-ws-aleph/project.clj | clojure | (defproject multi-client-ws-aleph "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:dependencies [[ch.qos.logback/logback-classic "1.2.3"]
[cheshire "5.8.1"]
[cljs-ajax "0.8.0"]
[clojure.java-time "0.3.2"]
[com.cognitect/transit... | |
004369a55902816570c6b15363d364449f0a90badb2be8ca33a7e6434fbe375c | fp-works/2019-winter-Haskell-school | JoinList.hs | # OPTIONS_GHC -Wall #
module JoinList where
import Sized
data JoinList m a = Empty
| Single m a
| Append m (JoinList m a) (JoinList m a)
deriving (Eq, Show)
(+++) :: Monoid m => JoinList m a -> JoinList m a -> JoinList m a
Empty +++ a = a
a +++ Empty = a
a +++ b = Append (tag a <> tag b) a b
tag :: Monoid m ... | null | https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week7/stevemao/JoinList.hs | haskell | # OPTIONS_GHC -Wall #
module JoinList where
import Sized
data JoinList m a = Empty
| Single m a
| Append m (JoinList m a) (JoinList m a)
deriving (Eq, Show)
(+++) :: Monoid m => JoinList m a -> JoinList m a -> JoinList m a
Empty +++ a = a
a +++ Empty = a
a +++ b = Append (tag a <> tag b) a b
tag :: Monoid m ... | |
a4ab23990cb940048a739441b459ae84a0f93abfd9981c99210726e1ee2f463d | jfeser/L2 | infer.ml | open Core
open Printf
open Ast
open Collections
open Expr
open Util
exception TypeError of Error.t
let total_infer_time = ref Time.Span.zero
module Type0 = struct
type const = const_typ = Num_t | Bool_t [@@deriving compare, sexp]
type level = int [@@deriving compare, sexp]
type t = typ =
| Const_t of con... | null | https://raw.githubusercontent.com/jfeser/L2/a66659c7d75f75788c48a17b531045fb3d5f8351/lib/infer.ml | ocaml | * Normalize a type by renaming each of its quantified type variables.
* Convert a type to a string.
* Strip the type annotations from a typed expression.
* Get the type annotation of the root of a typed expression.
* Convert a typed expression to a string.
* A unifier is a mapping from free type variables to types... | open Core
open Printf
open Ast
open Collections
open Expr
open Util
exception TypeError of Error.t
let total_infer_time = ref Time.Span.zero
module Type0 = struct
type const = const_typ = Num_t | Bool_t [@@deriving compare, sexp]
type level = int [@@deriving compare, sexp]
type t = typ =
| Const_t of con... |
6e4b7c008e6bbcb1a2946bf62772c2f0673db7f9386fc7730d660ec5e41f8a28 | simingwang/emqx-plugin-kafkav5 | error_handler.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2021 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/rel/emqx_plugin_kafka/lib/kernel-8.3/src/error_handler.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 1996 - 2021 . 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(error_handler).
-compile(no_module_opt).
-export([undefined_function/3,undefined_lambda/3,breakpoint/3]).
... |
2d176da93ee91c49747986747f91683a17a8378798df17b4f81c996532d760e4 | plow-technologies/servant-streaming | Streaming.hs | module Servant.Streaming where
import Data.Proxy (Proxy (..))
import GHC.TypeLits (Nat)
import Network.HTTP.Types
import Servant.API ((:>))
import Servant.Utils.Links (HasLink (..), Link, MkLink)
-- | A request body that should be streamed.
type StreamBody ct = StreamBodyMonad ct IO
-- | A request body that should b... | null | https://raw.githubusercontent.com/plow-technologies/servant-streaming/d3c16ea26e773355d0eb8af996e80d1e94bc859b/servant-streaming/src/Servant/Streaming.hs | haskell | | A request body that should be streamed.
| A request body that should be streamed with specified server monad
| A response body that should be streamed, with specified method, status,
and content-type.
| The streaming version of the @Post@ combinator. | module Servant.Streaming where
import Data.Proxy (Proxy (..))
import GHC.TypeLits (Nat)
import Network.HTTP.Types
import Servant.API ((:>))
import Servant.Utils.Links (HasLink (..), Link, MkLink)
type StreamBody ct = StreamBodyMonad ct IO
data StreamBodyMonad (contentTypes :: [*]) (m :: * -> *)
data StreamResponse ... |
7a2bbcbbb56ecc5c52d50a362741d22a9c56450c278fb1403ce5f63b5ed27631 | ocsigen/obrowser | scanf.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocsigen/obrowser/977c09029ea1e4fde4fb0bf92b4d893835bd9504/rt/caml/scanf.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : scanf.mli 10457 2010 - 05 - ... |
86de283f7efcf38efd3f4205b9a8672494753a4a2732109c82d468f16dc961eb | snowleopard/hadrian | GenPrimopCode.hs | module Settings.Builders.GenPrimopCode (genPrimopCodeBuilderArgs) where
import Settings.Builders.Common
genPrimopCodeBuilderArgs :: Args
genPrimopCodeBuilderArgs = builder GenPrimopCode ? mconcat
[ output "//PrimopWrappers.hs" ? arg "--make-haskell-wrappers"
, output "//Prim.hs" ... | null | https://raw.githubusercontent.com/snowleopard/hadrian/b9a3f9521b315942e1dabb006688ee7c9902f5fe/src/Settings/Builders/GenPrimopCode.hs | haskell | module Settings.Builders.GenPrimopCode (genPrimopCodeBuilderArgs) where
import Settings.Builders.Common
genPrimopCodeBuilderArgs :: Args
genPrimopCodeBuilderArgs = builder GenPrimopCode ? mconcat
[ output "//PrimopWrappers.hs" ? arg "--make-haskell-wrappers"
, output "//Prim.hs" ... | |
4c4665f2265716897c20b192adc3f6df94773c2f53c9337124dc4395e964ef06 | unsplash/intlc | Utils.hs | module Utils where
import Data.List (nubBy, (\\))
import Prelude
-- Borrowed from: -0.9.0.0/docs/Intro.html#v:-60--62--94-
-- | Semigroup concat lifted to an applicative context.
(<>^) :: (Applicative f, Semigroup a) => f a -> f a -> f a
(<>^) = liftA2 (<>)
infixr 6 <>^
{-# INLINE (<>^) #-}
apply... | null | https://raw.githubusercontent.com/unsplash/intlc/354e2c5cb7811661b41f274436804a3caa73153a/lib/Utils.hs | haskell | Borrowed from: -0.9.0.0/docs/Intro.html#v:-60--62--94-
| Semigroup concat lifted to an applicative context.
# INLINE (<>^) #
The dual of `nubBy`.
instance. The dual of `nub`. | module Utils where
import Data.List (nubBy, (\\))
import Prelude
(<>^) :: (Applicative f, Semigroup a) => f a -> f a -> f a
(<>^) = liftA2 (<>)
infixr 6 <>^
apply2 :: a -> b -> (a -> b -> c) -> c
apply2 x y f = f x y
| Filters out the first instance of each found value as per the predicate .
b... |
682ef9a050093c58a42e324225836e283362a55dcf62d2a2876ef96dc8efe229 | fourmolu/fourmolu | empty-haddock-four-out.hs | module Test (
test,
)
where
test ::
test
| null | https://raw.githubusercontent.com/fourmolu/fourmolu/45256f146648d8006b5a1244446c4ce6d2debafd/data/examples/other/empty-haddock-four-out.hs | haskell | module Test (
test,
)
where
test ::
test
| |
228088d1525498f4530e0de9f337ce08f9c5c7c94a8e1442ede96870d3a1ffd2 | cdosborn/lit | lit.hs | module Main where
import System.Console.GetOpt
import System.Environment
import System.Directory (doesDirectoryExist)
import System.IO
import System.Exit
import Control.Applicative
import Process
import Poll
data Options = Options { optCodeDir :: String
, optDocsDir :: String
... | null | https://raw.githubusercontent.com/cdosborn/lit/0dec600482440d552ed339a3b4c6206bac212f04/src/lit.hs | haskell | module Main where
import System.Console.GetOpt
import System.Environment
import System.Directory (doesDirectoryExist)
import System.IO
import System.Exit
import Control.Applicative
import Process
import Poll
data Options = Options { optCodeDir :: String
, optDocsDir :: String
... | |
942eb21b44d5d53d32e315a012372b78964401b25a64c41a59177c217bf93f2d | 8c6794b6/guile-tjit | t-tail-call-label-01.scm | ;;; Simple `tail-call-label'. Inner procedure `f' is called multiple
;;; times so that byte compiled code contain `tail-call-label'.
(define (loop n)
(define (f i acc)
(if (= i 0)
acc
(f (- i 1) (+ acc i))))
(list (f n 0) (f n 0) (f n 0)))
(loop #e1e3)
| null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-tail-call-label-01.scm | scheme | Simple `tail-call-label'. Inner procedure `f' is called multiple
times so that byte compiled code contain `tail-call-label'. |
(define (loop n)
(define (f i acc)
(if (= i 0)
acc
(f (- i 1) (+ acc i))))
(list (f n 0) (f n 0) (f n 0)))
(loop #e1e3)
|
bf19fbad8c3da6116dcb067cac800b788f163d71d71a558db336e9e105b924b6 | dyoo/whalesong | cs019.rkt | #lang s-exp "../lang/base.rkt"
Like the big whalesong language , but with additional ASL restrictions .
(current-print-mode "constructor")
(require (for-syntax racket/base syntax/stx racket/match))
(require "cs019-pre-base.rkt")
(provide (rename-out [cs019-lambda lambda]
[cs019-define def... | null | https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/cs019/cs019.rkt | racket | This function should only be called in an 'expression
context. In case we mess up, avoid bogus error messages.
Raise a syntax error:
The syntax error when a form's name doesn't follow a "("
verify-boolean is inserted to check for boolean results:
to ensure the illusion of left-to-right checking, make sure
ques... | #lang s-exp "../lang/base.rkt"
Like the big whalesong language , but with additional ASL restrictions .
(current-print-mode "constructor")
(require (for-syntax racket/base syntax/stx racket/match))
(require "cs019-pre-base.rkt")
(provide (rename-out [cs019-lambda lambda]
[cs019-define def... |
9ad5a273e878de03923cba493fe64abb70f323172e81671d813793d506b38755 | opencog/agi-bio | bioscience.scm | ;
; Opencog bioscience atom-types module
;
(define-module (opencog bioscience))
(use-modules (opencog))
(use-modules (opencog bio-config))
; Load the C library that calls the classserver to load the types.
(load-extension
(string-append opencog-ext-path-bio "libbioscience-types")
"bioscience_types_init")
(load-fro... | null | https://raw.githubusercontent.com/opencog/agi-bio/9c03d9b0e81cb8a8b3a58179f3134f336e5dbdb6/bioscience/bioscience.scm | scheme |
Opencog bioscience atom-types module
Load the C library that calls the classserver to load the types. | (define-module (opencog bioscience))
(use-modules (opencog))
(use-modules (opencog bio-config))
(load-extension
(string-append opencog-ext-path-bio "libbioscience-types")
"bioscience_types_init")
(load-from-path "opencog/bioscience/types/bioscience_types.scm")
|
74b300332670c9acd39e93ce3c6ed11f10f7ad0ae66cce359db435d38501c8b0 | BetterThanTomorrow/joyride | macros.cljs | (ns integration-test.macros)
(defmacro deftest-async [name opts & body]
(let [[opts body]
(if (map? opts)
[opts body]
[nil (cons opts body)])]
`(cljs.test/deftest ~name
~@(when-let [pre (:before opts)]
[pre])
(cljs.test/async
~'done
(-> (do ~@b... | null | https://raw.githubusercontent.com/BetterThanTomorrow/joyride/760e24ba61e0454f715b15ed29b7ed3d0ca01312/vscode-test-runner/workspace-1/.joyride/src/integration_test/macros.cljs | clojure | (ns integration-test.macros)
(defmacro deftest-async [name opts & body]
(let [[opts body]
(if (map? opts)
[opts body]
[nil (cons opts body)])]
`(cljs.test/deftest ~name
~@(when-let [pre (:before opts)]
[pre])
(cljs.test/async
~'done
(-> (do ~@b... | |
b7c72ab72ca1c607928c1911d2ace27b577102dd8b7530db8df31c0c5887e8e0 | purescript/purescript | Prim.hs | | This module provides documentation for the builtin Prim modules .
module Language.PureScript.Docs.Prim
( primDocsModule
, primRowDocsModule
, primTypeErrorDocsModule
, primModules
) where
import Prelude hiding (fail)
import Data.Functor (($>))
import Data.Text (Text)
import qualified Data.Text as T
impor... | null | https://raw.githubusercontent.com/purescript/purescript/5f6a6659391563cdec3c41ac6a4b2ff5263d0f68/src/Language/PureScript/Docs/Prim.hs | haskell | not exported because it is partial. | | This module provides documentation for the builtin Prim modules .
module Language.PureScript.Docs.Prim
( primDocsModule
, primRowDocsModule
, primTypeErrorDocsModule
, primModules
) where
import Prelude hiding (fail)
import Data.Functor (($>))
import Data.Text (Text)
import qualified Data.Text as T
impor... |
ea48785d6797e4477d25673c5ca36a5a0de0e936b1c208def732371d4d5764d8 | returntocorp/semgrep | Unit_immutable_buffer.ml | module B = Immutable_buffer
let test_immutable_buffer () =
let check (expected, b) =
Alcotest.(check string) expected expected (B.to_string b)
in
List.iter check
[
("just string", B.of_string "just string");
( "combine",
B.combine [ B.of_string "co"; B.of_string "mbi"; B.of_string "ne... | null | https://raw.githubusercontent.com/returntocorp/semgrep/e0d996ed1e4d76d0dafd34aec96bde3b718ac05e/libs/commons/tests/Unit_immutable_buffer.ml | ocaml | module B = Immutable_buffer
let test_immutable_buffer () =
let check (expected, b) =
Alcotest.(check string) expected expected (B.to_string b)
in
List.iter check
[
("just string", B.of_string "just string");
( "combine",
B.combine [ B.of_string "co"; B.of_string "mbi"; B.of_string "ne... | |
f033fea7993f9d10982d1aac5d7033f7a1fecf305e09abaeb18c103abe824d38 | talw/crisp-compiler | Emit.hs | # OPTIONS_GHC -fno - warn - name - shadowing #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Emit where
import qualified LLVM.General.AST as AST
import qualified LLVM.General.AST.Global as G
import qualified LLVM.General.AST.Constant as C
import qualified LLVM.General.AST.Float as F
import q... | null | https://raw.githubusercontent.com/talw/crisp-compiler/1c4d6e9897520e8089ae329d961aeeeadc4648a4/src/Emit.hs | haskell | # LANGUAGE OverloadedStrings #
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Translation of Expr values into llvm IR
--------------... | # OPTIONS_GHC -fno - warn - name - shadowing #
# LANGUAGE RecordWildCards #
module Emit where
import qualified LLVM.General.AST as AST
import qualified LLVM.General.AST.Global as G
import qualified LLVM.General.AST.Constant as C
import qualified LLVM.General.AST.Float as F
import qualified LLVM.General.AST.FloatingP... |
902baa5513101b1d60b8d37c9931cd10b88d95b00625a144c97969cda410b32d | soywod/comodoro | config.ml | open Toml
type t = {
work_time : int;
short_break_time : int;
long_break_time : int;
exec_on_start : string array;
exec_on_break : string array;
exec_on_resume : string array;
exec_on_stop : string array;
}
let empty =
{
work_time = 25 * 60;
short_break_time = 5 * 60;
long_break_time = 15 ... | null | https://raw.githubusercontent.com/soywod/comodoro/533495edc78da43fcf681d426330da49fd7a0884/lib/config.ml | ocaml | open Toml
type t = {
work_time : int;
short_break_time : int;
long_break_time : int;
exec_on_start : string array;
exec_on_break : string array;
exec_on_resume : string array;
exec_on_stop : string array;
}
let empty =
{
work_time = 25 * 60;
short_break_time = 5 * 60;
long_break_time = 15 ... | |
941098e6c8bf11a7a143fc8cfca042aa1033015bae109e66db25b8e81e9c3dce | diku-kmc/kleenexlang | KleenexParser.hs | # LANGUAGE QuasiQuotes #
{-# LANGUAGE OverloadedStrings #-}
module Tests.KleenexParser (kleenexParserTests) where
import qualified Distribution.TestSuite as TS
import qualified KMC.Kleenex.Syntax as S
import qualified KMC.Kleenex.Parser as HP
import qualified KMC.Syntax.External as R
import KMC.Util.Heredoc... | null | https://raw.githubusercontent.com/diku-kmc/kleenexlang/d474c6015339c261b2e7bf37061175fd69185baf/test/Tests/KleenexParser.hs | haskell | # LANGUAGE OverloadedStrings #
------------------------------------------------------------------
------------------------------------------------------------------
, simpleGroup True "Find locations of suppressed subterms"
[ run kp_test16
, run kp_test17
]
----... | # LANGUAGE QuasiQuotes #
module Tests.KleenexParser (kleenexParserTests) where
import qualified Distribution.TestSuite as TS
import qualified KMC.Kleenex.Syntax as S
import qualified KMC.Kleenex.Parser as HP
import qualified KMC.Syntax.External as R
import KMC.Util.Heredoc
import Tests.TestUtils
... |
e4e5b8bc002deee92e0b8adb4e6e543e23d80f36ce877eabac253f4eb91ebf18 | cyclone-scheme/winds | definition-index.scm | ((%contiguous->py-buffer (cyclone python) python)
(%initialized? (cyclone python) python)
(%long->py-bool (cyclone python) python)
(%long->py-long (cyclone python) python)
(%make-iset (cyclone iset) iset)
(%py-apply (cyclone python) python)
(%py-bool->bool (cyclone python) python)
(%py-buffer->contiguous (cyclon... | null | https://raw.githubusercontent.com/cyclone-scheme/winds/aa607b31d46f777e7ff7454351ef545687cba81a/indexes/definition-index.scm | scheme | ((%contiguous->py-buffer (cyclone python) python)
(%initialized? (cyclone python) python)
(%long->py-bool (cyclone python) python)
(%long->py-long (cyclone python) python)
(%make-iset (cyclone iset) iset)
(%py-apply (cyclone python) python)
(%py-bool->bool (cyclone python) python)
(%py-buffer->contiguous (cyclon... | |
c89a976b33718a32fa3134961cd5970a2122c3a16f833e4c52527be9677596c0 | cubicle-model-checker/cubicle | arith_status.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet Crista... | null | https://raw.githubusercontent.com/cubicle-model-checker/cubicle/00f09bb2d4bb496549775e770d7ada08bc1e4866/try-cubicle/lib-num/arith_status.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : arith_status.ml 9547 2010 - 01 - 22 12:... |
49afeee98cc7867b44fb7a45f8097e9a4f383895fc170d994ee728c7fe245ea6 | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | ShippingRateDeliveryEstimate.hs | {-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
| Contains the types generated from the schema ShippingRateDeliveryEstimate
module StripeAPI.Types.ShippingRateDeliveryEsti... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/ShippingRateDeliveryEstimate.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
# SOURCE #
| Defines the object schema located at @components.schemas.shipping_rate_delivery_estimate@ in the specification.
| maximum: The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
| minimum: The lower bound of the ... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
| Contains the types generated from the schema ShippingRateDeliveryEstimate
module StripeAPI.Types.ShippingRateDeliveryEstimate where
import qualified Control.Monad.Fail
import qualifie... |
b532d035b1ea1789821bcf8dd1861822d1287c93812316f8d040d7661f188828 | seckcoder/iu_c311 | interp.rkt | ; interpreter of let-lang
#lang eopl
(require "../base/utils.rkt")
(require "store.rkt")
(require "exception.rkt")
(require racket/file)
(require racket/match)
(provide (all-defined-out))
; expval := Int | Bool | Proc
; during the implemention, I find this datatype actually
; useless...
(define-datatype
expval ex... | null | https://raw.githubusercontent.com/seckcoder/iu_c311/a1215983b6ab08df32058ef1e089cb294419e567/racket/c5_41/interp.rkt | racket | interpreter of let-lang
expval := Int | Bool | Proc
during the implemention, I find this datatype actually
useless...
e-val: exception value
raise-saved-cont: continuation of raise expression
environment
env := '() | (var val env)
grammer
(exception-handler-push! (make-exception-handler except-id catch-body e... |
#lang eopl
(require "../base/utils.rkt")
(require "store.rkt")
(require "exception.rkt")
(require racket/file)
(require racket/match)
(provide (all-defined-out))
(define-datatype
expval expval?
(numval
(int integer?))
(boolval
(bool boolean?))
(listval
(list list?))
(procval
(proc proc?)))... |
fe590e34bb0b243ca5e4c884e929c7a1c0edc8ea3086858209f247fdd5868b0e | erlangonrails/devdb | js_driver.erl | @author < >
2009 - 2010 Basho Technologies
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to ... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/riak-0.11.0/deps/erlang_js/src/js_driver.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
limitations under the License.
@doc T... | @author < >
2009 - 2010 Basho Technologies
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
See the License for the specific language governing permissions and
-module(js_driver).
-define(DEFAULT_HEAP_SIZ... |
68921a6d081735811ca52cff59d3fa0029904366beabc41d789c6bfad8aa1b52 | Simre1/haskell-game | Buffer.hs | # LANGUAGE TypeFamilies #
-----------------------------------------------------------------------------
--
Module : Graphics . . Buffer
Copyright :
License : MIT
--
Maintainer :
-- Stability : Experimental
Portability : Portable
--
-- |
Buffers are arrays of data that resi... | null | https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/GPipe-Core/GPipe-Core/src/Graphics/GPipe/Buffer.hs | haskell | ---------------------------------------------------------------------------
Stability : Experimental
|
an object space and may be shared between contexts.
---------------------------------------------------------------------------
* Buffer data type
* Atomic buffer types
* Operating on Buffers
* Buffer ... | # LANGUAGE TypeFamilies #
Module : Graphics . . Buffer
Copyright :
License : MIT
Maintainer :
Portability : Portable
Buffers are arrays of data that resides on the GPU . A buffer is strongly typed with an immutable size , but it 's content is mutable . A buffer lives in
Buf... |
277b1cb7fc6bf228369b4bc1119941223d9dc0ab6025eca3b260ef1ca2b9e148 | garrigue/labltk | setpath.mli | (*************************************************************************)
(* *)
(* OCaml LablTk library *)
(* *)
,... | null | https://raw.githubusercontent.com/garrigue/labltk/c7f50b4faed57f1ac03cb3c9aedc35b10d36bdb6/browser/setpath.mli | ocaml | ***********************************************************************
OCaml LablTk library
... | , Kyoto University RIMS
Copyright 1999 Institut National de Recherche en Informatique et
en Automatique and Kyoto University . All rights reserved .
This file is distributed under the terms of the GNU Library
$ Id$
open Widget
val add_update_h... |
3c79280d5e459d71044822e106a83557be5f84804f19cbc3a6eff7a6ed6f2de8 | PatrickMaier/HdpH | Allgather.hs | # LANGUAGE ForeignFunctionInterface #
module Control.Parallel.HdpH.MPI.Allgather
( -- * MPI wrapper
Size(..), -- Size type (wraps an Int)
Rank(..), -- Rank type (wraps an Int)
withMPI, -- :: (Size -> Rank -> IO a) -> IO a
-- * allgather operation
allgatherByteSt... | null | https://raw.githubusercontent.com/PatrickMaier/HdpH/e836a5bcf5a6c93239f9c0d0109d7b81b459897f/hdph-mpi-allgather/src/Control/Parallel/HdpH/MPI/Allgather.hs | haskell | * MPI wrapper
Size type (wraps an Int)
Rank type (wraps an Int)
:: (Size -> Rank -> IO a) -> IO a
* allgather operation
:: ByteString -> IO [ByteString]
-----------------------------------------------------------------------------
| Wrapper type for size of MPI_COMM_WORLD.
| Wrapper type for rank in MPI_COMM_WO... | # LANGUAGE ForeignFunctionInterface #
module Control.Parallel.HdpH.MPI.Allgather
) where
import Prelude hiding (sum)
import Control.Concurrent.MVar (MVar, newEmptyMVar, putMVar, takeMVar, withMVar)
import Control.Monad (when)
import Data.ByteString (ByteString)
import qualified Data.ByteString
as BS (take, ... |
dd9137c8be0d2b902be89f0f7f08157eed542f59574530fa48ff4f45473d3e80 | jiangpengnju/htdp2e | ex17.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-advanced-reader.ss" "lang")((modname ex17) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #t #... | null | https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/fixed-size-data/functions-and-programs/ex17.rkt | racket | about the language level of this file in a form that our tools can easily process.
#true
#true
> (bool-imply #true #true)
#true
#false | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-advanced-reader.ss" "lang")((modname ex17) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #t #t none #f () #f)))
Define the function bool - imply . It consumes two Boolean values... |
a2789085c7f50d2ef35bf49551b497bf2606232efe65fb4a28ec092dd59bb2cb | erlang/erlide_kernel | erlide_debug.erl | %%% ******************************************************************************
Copyright ( c ) 2006 and others .
%%% All rights reserved. This program and the accompanying materials
%%% are made available under the terms of the Eclipse Public License v1.0
%%% which accompanies this distribution, and is avai... | null | https://raw.githubusercontent.com/erlang/erlide_kernel/763a7fe47213f374b59862fd5a17d5dcc2811c7b/debugger/erlide_debugger/src/erlide_debug.erl | erlang | ******************************************************************************
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Contributors:
************************... | Copyright ( c ) 2006 and others .
-v10.html
-module(erlide_debug).
-define(Debug(T ) , erlide_log : erlangLog(?MODULE , ? LINE , finest , T ) ) .
-define(DebugStack(T ) , erlide_log : erlangLogStack(?MODULE , ? LINE , finest , T ) ) .
-define(Info(T ) , erlide_log : erlangLog(?MODULE , ? LINE ... |
66ac3bac876fafa13f56ddff9024fd4d1b9c9a500f5b0cf4b0b3b62eb7e010d5 | wfnuser/sicp-solutions | e2-88.scm | (define (negate poly)
(make-poly (variable poly) (map (lambda (each) (make-term (order each) (- coeff each))) (term-list poly)))
)
(put 'sub '(polynomial polynomial)
(lambda (x y) (tag (add-poly x (contents (negate (tag y))))))) | null | https://raw.githubusercontent.com/wfnuser/sicp-solutions/2c94b28d8ee004dcbfe7311f866e5a346ee01d12/ch2/e2-88.scm | scheme | (define (negate poly)
(make-poly (variable poly) (map (lambda (each) (make-term (order each) (- coeff each))) (term-list poly)))
)
(put 'sub '(polynomial polynomial)
(lambda (x y) (tag (add-poly x (contents (negate (tag y))))))) | |
17e51bf164913496b958b2005a60b106560e4a9613111d0662e8726b81b0114c | acieroid/scala-am | sieve.scm | Parallel sieve of eratosthenes
(define (build-vector n init f)
(letrec ((v (make-vector n init))
(loop (lambda (i)
(if (< i n)
(begin
(vector-set! v i (f i))
(loop (+ i 1)))
v))))
(loop ... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/futures/sieve.scm | scheme | c unmarked
m multiple, mark it
c marked | Parallel sieve of eratosthenes
(define (build-vector n init f)
(letrec ((v (make-vector n init))
(loop (lambda (i)
(if (< i n)
(begin
(vector-set! v i (f i))
(loop (+ i 1)))
v))))
(loop ... |
39ae53e009db7080e5caa899e214c573891f9379e6510292eef4ae7b51af13f8 | hkoktay/the-little-schemer | test-check.scm | ;; Tests if the computed result matches the expected result.
;; Example:
( test " + " ( + 1 2 ) 3 )
;; ->
;; Testing +
;; #t
;;
( test " + " ( + 1 2 ) 2 )
;; ->
;; Testing +
;; Failed: (+ 1 2)
Expected : 2
Computed : 3
;;
;; test: s-exp s-exp -> void
(define-syntax test
(syntax-rules ()
((_ title ... | null | https://raw.githubusercontent.com/hkoktay/the-little-schemer/007e25153a4721a0cd6007c83cc8ce1305f6cf2a/test-check.scm | scheme | Tests if the computed result matches the expected result.
Example:
->
Testing +
#t
->
Testing +
Failed: (+ 1 2)
test: s-exp s-exp -> void
Returns #t if its argument, a thunk, throws an exception.
test-exception: procedure? -> #t | any | ( test " + " ( + 1 2 ) 3 )
( test " + " ( + 1 2 ) 2 )
Expected : 2
Computed : 3
(define-syntax test
(syntax-rules ()
((_ title tested-expression expected-result)
(let ((expected expected-result)
(produced tested-expression))
(begin
(display "Testing ")
... |
b595d91f344374f7054473d62da4a8fa342c2aa04dc119f5e625735855eb33d2 | madstap/recex | cron.clj | (ns madstap.recex.cron
(:require
[madstap.recex.util :as util]
[medley.core :as medley]
[clojure.string :as str]
[tick.alpha.api :as t]))
;;
;; -scheduling-with-cron
(defn split-fields [cron]
(let [fields (str/split cron #"\s+")]
(zipmap (case (count fields)
5 [ :m :h :day :mon... | null | https://raw.githubusercontent.com/madstap/recex/8414f9779e6444e6c1d442ca24b46db1d48f7dae/src/madstap/recex/cron.clj | clojure |
-scheduling-with-cron | (ns madstap.recex.cron
(:require
[madstap.recex.util :as util]
[medley.core :as medley]
[clojure.string :as str]
[tick.alpha.api :as t]))
(defn split-fields [cron]
(let [fields (str/split cron #"\s+")]
(zipmap (case (count fields)
5 [ :m :h :day :month :day-of-week]
... |
ccbb09a699b7bc2ba10bc1032817806b3cf9144f18da87a139c5d4d8a15ae9b1 | xu-hao/QueryArrow | QueryResult.hs | # LANGUAGE DeriveGeneric #
module QueryArrow.ElasticSearch.QueryResult where
import Data.Aeson
import GHC.Generics
import QueryArrow.ElasticSearch.QueryResultHits
data ESShards = ESShards {
total :: Int,
successful :: Int,
failed :: Int
} deriving (Show, Generic)
data ESQueryResult = ESQueryResult {
... | null | https://raw.githubusercontent.com/xu-hao/QueryArrow/4dd5b8a22c8ed2d24818de5b8bcaa9abc456ef0d/QueryArrow-db-elastic/src/QueryArrow/ElasticSearch/QueryResult.hs | haskell | # LANGUAGE DeriveGeneric #
module QueryArrow.ElasticSearch.QueryResult where
import Data.Aeson
import GHC.Generics
import QueryArrow.ElasticSearch.QueryResultHits
data ESShards = ESShards {
total :: Int,
successful :: Int,
failed :: Int
} deriving (Show, Generic)
data ESQueryResult = ESQueryResult {
... | |
67d3d9760bfdb537c0505cb0af9716c7961a01df0727b5483c63793e895b84a7 | vouillon/osm | coastline.ml | OSM tools
* Copyright ( C ) 2013
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your opti... | null | https://raw.githubusercontent.com/vouillon/osm/5b06ed6fc6c508b8187209628cf02129a119b50a/osm/coastline.ml | ocaml |
TODO
====
- simplification should depend on latitude
(should be done after projection)
**
**
polyline
first and unique part
let a = read_float ch in
Format.eprintf "%f@." a;
let a = read_float ch in
Format.eprintf "%f@." a;
let a = read_float ch in
Format.eprintf "%f@." a;
let a = read_float ch i... | OSM tools
* Copyright ( C ) 2013
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your opti... |
23ca4a684c3cdc9ae4b49707a083e74b220188f3ab0f01d5ce1fa53d1fc97605 | jumarko/clojure-experiments | 058_function_composition.clj | (ns four-clojure.058-function-composition
"Problem 58: Function Composition: .
Write a function that lets you do function composition.
Don't use `comp`")
First try :
(defn my-comp [& fns]
(fn [& args]
(loop [fns-to-apply (reverse fns)
fn-args-or-result args]
(if-let [f (first fns-to-appl... | null | https://raw.githubusercontent.com/jumarko/clojure-experiments/f0f9c091959e7f54c3fb13d0585a793ebb09e4f9/src/clojure_experiments/four_clojure/058_function_composition.clj | clojure | wrap in vector to make the apply work on intermediate results
Better solution?
Tests | (ns four-clojure.058-function-composition
"Problem 58: Function Composition: .
Write a function that lets you do function composition.
Don't use `comp`")
First try :
(defn my-comp [& fns]
(fn [& args]
(loop [fns-to-apply (reverse fns)
fn-args-or-result args]
(if-let [f (first fns-to-appl... |
407a3a7cbea09ddb5436a2c6fb88121588e917bbb11e406d6fb805627f49afd4 | softwarelanguageslab/maf | R5RS_gambit_destruc-4.scm | ; Changes:
* removed : 0
* added : 1
* swaps : 0
; * negated predicates: 0
; * swapped branches: 0
; * calls to id fun: 0
(letrec ((append-to-tail! (lambda (x y)
(if (null? x)
y
((letrec ((loop (lambda (a b)
... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_gambit_destruc-4.scm | scheme | Changes:
* negated predicates: 0
* swapped branches: 0
* calls to id fun: 0 | * removed : 0
* added : 1
* swaps : 0
(letrec ((append-to-tail! (lambda (x y)
(if (null? x)
y
((letrec ((loop (lambda (a b)
(if (null? b)
... |
34d19fe3c1fb40089fc1b0d4a65006cab5a95c10b0fa4573835cc7e7dca553be | mzp/coq-ruby | constrextern.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/interp/constrextern.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i
i
Translation from rawconstr to f... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ I d : constrextern.ml 1... |
458c98ed0ee115c73da8eded3b91a9b811e9ea701b371195940018bb29ee15f9 | BitGameEN/bitgamex | websocket_client_handler.erl | -module(websocket_client_handler).
-type state() :: any().
-type keepalive() :: integer().
-type close_reason() ::
% Either:
- The websocket was closed by a handler via a ` { closed , Reason , State } ` tuple
% returned from websocket_handle/3 or websocket_info/3.
- A ' close ' frame was received with cod... | null | https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/websocket_client/src/websocket_client_handler.erl | erlang | Either:
returned from websocket_handle/3 or websocket_info/3.
The local end failed to send (see #send-2
tuple is the same term that was wrapped in an `{error, Reason}` tuple by
`send/2`, i.e. `{error, closed}` will become `{local, closed}`, and not
`{local, {error, closed}}`.
The remote end either closed abruptl... | -module(websocket_client_handler).
-type state() :: any().
-type keepalive() :: integer().
-type close_reason() ::
- The websocket was closed by a handler via a ` { closed , Reason , State } ` tuple
- A ' close ' frame was received with code 1000 or 1001 .
normal |
or #send-2 ) . The second element in the
... |
7651e4d34215927407c148c81bb707dde2e80b806450b984c9e8df1271dff443 | JunSuzukiJapan/cl-reex | switch-test.lisp | (defpackage switch-test
(:use :cl
:cl-reex
:cl-reex-test.logger
:prove)
(:shadowing-import-from :cl-reex :skip))
(in-package :switch-test)
NOTE : To run this test file , execute ` ( asdf : test - system : cl - reex ) ' in your Lisp .
(plan 1)
;; blah blah blah.
(defparameter logger (make-instance ... | null | https://raw.githubusercontent.com/JunSuzukiJapan/cl-reex/94928c7949c235b41902138d9e4a5654b92d67eb/tests/switch-test.lisp | lisp | blah blah blah.
finalize | (defpackage switch-test
(:use :cl
:cl-reex
:cl-reex-test.logger
:prove)
(:shadowing-import-from :cl-reex :skip))
(in-package :switch-test)
NOTE : To run this test file , execute ` ( asdf : test - system : cl - reex ) ' in your Lisp .
(plan 1)
(defparameter logger (make-instance 'logger))
(defpara... |
89092ac0a4a556681346f55d10b32d63a80271e53bf8638c108cf794856f9aae | ocaml-gospel/gospel | test.ml | open Fmt
let result_start = "(* {gospel_expected|"
let print ppf file =
let ch = open_in file in
let rec aux ?(first = false) () =
match input_line ch with
| s when String.equal result_start s -> ()
| s ->
if first then pf ppf "%s" s else pf ppf "@\n%s" s;
aux ()
| exception End_of... | null | https://raw.githubusercontent.com/ocaml-gospel/gospel/bd213d7fdfaf224666acb413efc49f872251bca7/test/test.ml | ocaml | open Fmt
let result_start = "(* {gospel_expected|"
let print ppf file =
let ch = open_in file in
let rec aux ?(first = false) () =
match input_line ch with
| s when String.equal result_start s -> ()
| s ->
if first then pf ppf "%s" s else pf ppf "@\n%s" s;
aux ()
| exception End_of... | |
d19d5909d6cb3f67f5e1429e15d907f85312e1cbc4230fa4b87933b6aff0b32f | lehins/hip | Fourier.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE MonoLocalBinds #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
-- |
Module : Graphics . Image . Processing . Complex . Fourier
Copyright : ( c ) 2017
-- License : BSD3
Maint... | null | https://raw.githubusercontent.com/lehins/hip/11bb2b9d306b95603386625098243e911c2a2f49/hip/src/Graphics/Image/Processing/Complex/Fourier.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE ConstraintKinds #
|
License : BSD3
Stability : experimental
Portability : non-portable
| Fast Fourier Transform
| Inverse Fast Fourier Transform
# INLINE combine #
Compute a twiddle factor.
index
length | # LANGUAGE FlexibleContexts #
# LANGUAGE MonoLocalBinds #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
Module : Graphics . Image . Processing . Complex . Fourier
Copyright : ( c ) 2017
Maintainer : < >
module Graphics.Image.Processing.Complex.Fourier (
fft, ifft, isPowerOf... |
95769130c40c719602a22b41449c3ceba3cb377841ecebf70d8a4bdf04eed013 | thedavidmeister/xoroshiro128 | xoroshiro128.cljc | (ns xoroshiro128.xoroshiro128
(:require
xoroshiro128.splitmix64
xoroshiro128.prng
xoroshiro128.uuid
cljc-long.core))
#?(:clj (set! *warn-on-reflection* true))
#?(:clj (set! *unchecked-math* :warn-on-boxed))
; Xoroshiro128+
Reference C implementation
(declare xoroshiro128+)
(deftype Xoroshiro128+ [^long ... | null | https://raw.githubusercontent.com/thedavidmeister/xoroshiro128/b4d5be3255e3fa8b78289aa5e7e8e41f14f71aca/src/xoroshiro128/xoroshiro128.cljc | clojure | Xoroshiro128+
This is critical perf path, so all fn calls are inlined rather than dialing
out to cljc-long.core.
cljs advanced optimisations seems to smooth out any differences here so we
can use long-int/* normally.
/
are not enough for any serious purpose. Nonetheless, SplitMix64 is very
seed, as research has... | (ns xoroshiro128.xoroshiro128
(:require
xoroshiro128.splitmix64
xoroshiro128.prng
xoroshiro128.uuid
cljc-long.core))
#?(:clj (set! *warn-on-reflection* true))
#?(:clj (set! *unchecked-math* :warn-on-boxed))
Reference C implementation
(declare xoroshiro128+)
(deftype Xoroshiro128+ [^long a ^long b]
xor... |
0ff3b5d6da6b644943999afada1720f5c006ae8d46414a5bd5320d2b70f275fe | tonyg/racket-unix-signals | test.rkt | #!/usr/bin/env racket
#lang racket/base
(module test '#%kernel)
(require unix-signals)
(module+ main
(capture-signal! 'SIGUSR1)
(capture-signal! 'SIGUSR2)
(printf "Try 'kill -USR1 ~a' and 'kill -USR2 ~a'\n" (getpid) (getpid))
(let loop ([mode #t])
(define signum
(if mode
(read-signal)
... | null | https://raw.githubusercontent.com/tonyg/racket-unix-signals/a0c50918dac6cf5df7d0789d13dac9759eab5606/unix-signals/test.rkt | racket | #!/usr/bin/env racket
#lang racket/base
(module test '#%kernel)
(require unix-signals)
(module+ main
(capture-signal! 'SIGUSR1)
(capture-signal! 'SIGUSR2)
(printf "Try 'kill -USR1 ~a' and 'kill -USR2 ~a'\n" (getpid) (getpid))
(let loop ([mode #t])
(define signum
(if mode
(read-signal)
... | |
9144c8479381aaf3db382cb0801cb1f2446cafebe6946e928c4d6c7eea34c711 | ocaml-flambda/ocaml-jst | open_struct.ml | (* TEST
flags = "-dshape"
* expect
*)
(* Everything that couldn't go anywhere else. *)
open struct
module M = struct
type t = A
end
end
[%%expect{|
{
}
module M : sig type t = A end
|}]
include M
[%%expect{|
{
"t"[type] -> <.0>;
}
type t = M.t = A
|}]
module N = M
[%%expect{|
{
"N"[module] -> {<.2... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/5bf2820278c58f6715dcfaf6fa61e09a9b0d8db3/testsuite/tests/shapes/open_struct.ml | ocaml | TEST
flags = "-dshape"
* expect
Everything that couldn't go anywhere else.
Not open structs, but the code handling the following is currently very
similar to the one for open struct (i.e. calls [Env.enter_signature]), and
so we are likely to encounter the same bugs, if any. |
open struct
module M = struct
type t = A
end
end
[%%expect{|
{
}
module M : sig type t = A end
|}]
include M
[%%expect{|
{
"t"[type] -> <.0>;
}
type t = M.t = A
|}]
module N = M
[%%expect{|
{
"N"[module] -> {<.2>
"t"[type] -> <.0>;
};
}
module N = M
|}]
include struc... |
db5b83c7c87499d153066dcbfeaaed6c07363ddb04aa2879f4549800ad9e04cc | GNOME/gimp-tiny-fu | title-header.scm | ; GIMP - The GNU Image Manipulation Program
Copyright ( C ) 1995 and
;
; Bump-mapped title script --- create a bump-mapped title image for web pages
Copyright ( C ) 1997
;
; ************************************************************************
Changed on Feb 4 , 1999 by < >
For use with GIMP 1.1 ... | null | https://raw.githubusercontent.com/GNOME/gimp-tiny-fu/a64d85eec23b997e535488d67f55b44395ba3f2e/scripts/title-header.scm | scheme | GIMP - The GNU Image Manipulation Program
Bump-mapped title script --- create a bump-mapped title image for web pages
************************************************************************
The call to gimp-context-set-background has been given a real layer
****************************************************... | Copyright ( C ) 1995 and
Copyright ( C ) 1997
Changed on Feb 4 , 1999 by < >
For use with GIMP 1.1 .
The corresponding parameters have been replaced by an SF - FONT parameter .
( although it is not used ) otherwise gimp 1.1 crashed .
it under the terms of the GNU General Public License as publi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.