_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 |
|---|---|---|---|---|---|---|---|---|
f80ae388836f08cdf6cc74a0550286280436b9be384bc876c4946cc70b4c3842 | facebook/pyre-check | unannotatedGlobal.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/83bf380892b3a4cbbe6962f3bcc403275f80c37f/source/ast/unannotatedGlobal.ml | ocaml | TODO(T132410158) Add a module-level doc comment.
`target` must be an unqualified identifier
Don't register x.* as a global when a user writes `from x import *`.
TODO(T28732125): Properly take an intersection here. |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
2e10a794bd42ab3c8c16678e63805bfca75f3eaf4a72af199850fc4befdba140 | gethop-dev/sql-utils | sql_utils_test.clj | (ns dev.gethop.sql-utils-test
(:require [clojure.java.jdbc :as jdbc]
[clojure.spec.test.alpha :as stest]
[clojure.test :refer :all]
[dev.gethop.sql-utils :as sql-utils]
[duct.logger :as logger])
(:import dev.gethop.sql_utils.JDBCArray
java.util.UUID
... | null | https://raw.githubusercontent.com/gethop-dev/sql-utils/e3775b2d5a59270fdb90c52eb27b1456048b344d/test/dev/gethop/sql_utils_test.clj | clojure | Empty role table to prepare for multiple insertion tests.
Empty role table to prepare for update-or-insert! tests.
Populate role table to prepare for execute! tests. | (ns dev.gethop.sql-utils-test
(:require [clojure.java.jdbc :as jdbc]
[clojure.spec.test.alpha :as stest]
[clojure.test :refer :all]
[dev.gethop.sql-utils :as sql-utils]
[duct.logger :as logger])
(:import dev.gethop.sql_utils.JDBCArray
java.util.UUID
... |
6629dcfdd38af5de9f11ee8ffd696f27f0cdfec305c424adbfcaba6950be0e21 | avsm/mirage-duniverse | namespace.ml |
module type IO = sig
val exists: Transaction.t -> Perms.t -> Store.Path.t -> bool
val mkdir: ?with_watch:bool -> Transaction.t -> int -> Perms.t -> Store.Path.t -> unit
val read: Transaction.t -> Perms.t -> Store.Path.t -> string
val write: Transaction.t -> int -> Perms.t -> Store.Path.t -> string -> unit
val lis... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/xenstore/server/namespace.ml | ocaml |
module type IO = sig
val exists: Transaction.t -> Perms.t -> Store.Path.t -> bool
val mkdir: ?with_watch:bool -> Transaction.t -> int -> Perms.t -> Store.Path.t -> unit
val read: Transaction.t -> Perms.t -> Store.Path.t -> string
val write: Transaction.t -> int -> Perms.t -> Store.Path.t -> string -> unit
val lis... | |
93c83a823b49c3f78b065edd33f370c188e3852e4fb093949ea2c8a8e5c1838a | chaoxu/fancy-walks | A.hs | # LANGUAGE MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances #
{-# OPTIONS_GHC -O2 #-}
import Data.List
import Data.Maybe
import Data.Char
import Data.Array.IArray
import Data.Array.Unboxed (UArray)
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control ... | null | https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/codeforces.com/91/A.hs | haskell | # OPTIONS_GHC -O2 #
--------------------------------------------------------------------
--------------------------------------------------------------------
-------------------------------------------------------------------- | # LANGUAGE MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances #
import Data.List
import Data.Maybe
import Data.Char
import Data.Array.IArray
import Data.Array.Unboxed (UArray)
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control . Monad . State
import C... |
edd5e56191b41da6fbb0330b7cd162e9b2433fb462e432b9128178cf0e4eca8c | static-analysis-engineering/codehawk | jCHCollectors.ml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author :
------------------------------------------------------------------------------
The MIT License ( MIT )
... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchpoly/jCHCollectors.ml | ocaml | chutil
jchlib
jchpre
jchsys
variables that are changed in a loop in a way that could make them
* potentially unsafe bounds even if they are in a finite range
Have READ_WRITE variables which do not change
pc -> variables that are not used afterwards
last read in the current state
the result of an ... | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author :
------------------------------------------------------------------------------
The MIT License ( MIT )
... |
fb4b604fb3d079602a2833025c99179038d8fc346fddb7df72ac46941fd5d8ca | gebi/jungerl | esmb_gettext.erl | %%%-------------------------------------------------------------------
Created : 12 Jul 2005 by < >
%%% File : esmb_gettext.erl
Desc . : An example on how to use the jungerl - gettext app .
%%%-------------------------------------------------------------------
-module(esmb_gettext).
-export([start/0]).
-i... | null | https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/esmb/src/esmb_gettext.erl | erlang | -------------------------------------------------------------------
File : esmb_gettext.erl
------------------------------------------------------------------- | Created : 12 Jul 2005 by < >
Desc . : An example on how to use the jungerl - gettext app .
-module(esmb_gettext).
-export([start/0]).
-include("../../gettext/include/gettext.hrl").
start() ->
?TXT("Hello World").
|
7ba9572dd431ceb51b0be98054d50fa52f807f418ebd197a5afae53344c27466 | redbadger/karma-tracker | update.clj | (ns karma-tracker.update
(:require [karma-tracker.github :as gh]
[karma-tracker.events-repository :as events]))
(defn update-events [github-conn storage organisation]
(->> organisation
(gh/organisation-performed-events github-conn)
(events/add storage)))
| null | https://raw.githubusercontent.com/redbadger/karma-tracker/c5375f32f4cd0386f6bb1560d979b79bceea19e2/src/karma_tracker/update.clj | clojure | (ns karma-tracker.update
(:require [karma-tracker.github :as gh]
[karma-tracker.events-repository :as events]))
(defn update-events [github-conn storage organisation]
(->> organisation
(gh/organisation-performed-events github-conn)
(events/add storage)))
| |
59b2e42a582b19c8dbaa40c0d58b94135d0bbaffbcae985302c7f18aff6c0dba | mochi/statebox | statebox_identity.erl | %% @doc Functions for uniquely identifying events.
-module(statebox_identity).
-export([entropy/2, entropy/0]).
-type entropy() :: 1..4294967296.
-export_type([entropy/0]).
%% @equiv entropy(node(), statebox_clock:now())
-spec entropy() -> entropy().
entropy() ->
entropy(node(), statebox_clock:now()).
%% @doc R... | null | https://raw.githubusercontent.com/mochi/statebox/680bccb0a25a2658b70e14a4d21dcefaf663fd6a/src/statebox_identity.erl | erlang | @doc Functions for uniquely identifying events.
@equiv entropy(node(), statebox_clock:now())
@doc Return an integer that can be expected to be reasonably unique | -module(statebox_identity).
-export([entropy/2, entropy/0]).
-type entropy() :: 1..4294967296.
-export_type([entropy/0]).
-spec entropy() -> entropy().
entropy() ->
entropy(node(), statebox_clock:now()).
at a given msec timestamp .
-spec entropy(node(), statebox_clock:t_now()) -> entropy().
entropy(Node,... |
c03022ee37d4d849fdaf9dfb3077f73477837df36b5bda516b4c75cb88a93183 | inclojure-org/intermediate-clojure-workshop | in_mem.clj | (ns workshop-app.db.in-mem
(:refer-clojure :rename {update cc-update
read cc-read}))
(def conn (atom {}))
(defn create!
"Create an entry for k in our given in memory datastore."
[c k v]
(assert (some? k) "key cannot be nil.")
(swap! c assoc k v))
(defn update!
"Update the e... | null | https://raw.githubusercontent.com/inclojure-org/intermediate-clojure-workshop/3338a476aa815a587fa9e0b8b3804aa43492d15e/save-points/final/src/workshop_app/db/in_mem.clj | clojure | (ns workshop-app.db.in-mem
(:refer-clojure :rename {update cc-update
read cc-read}))
(def conn (atom {}))
(defn create!
"Create an entry for k in our given in memory datastore."
[c k v]
(assert (some? k) "key cannot be nil.")
(swap! c assoc k v))
(defn update!
"Update the e... | |
67b17c0b08b5026f144143937a8a58a621a299109b67c18fc0f6ca78fb497581 | cedlemo/OCaml-GI-ctypes-bindings-generator | Stack_transition_type.mli | open Ctypes
type t = None | Crossfade | Slide_right | Slide_left | Slide_up | Slide_down | Slide_left_right | Slide_up_down | Over_up | Over_down | Over_left | Over_right | Under_up | Under_down | Under_left | Under_right | Over_up_down | Over_down_up | Over_left_right | Over_right_left
val of_value:
Unsigned.uint3... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Stack_transition_type.mli | ocaml | open Ctypes
type t = None | Crossfade | Slide_right | Slide_left | Slide_up | Slide_down | Slide_left_right | Slide_up_down | Over_up | Over_down | Over_left | Over_right | Under_up | Under_down | Under_left | Under_right | Over_up_down | Over_down_up | Over_left_right | Over_right_left
val of_value:
Unsigned.uint3... | |
d407c599475476ad49119ac01ecd35ba2884af021a21c4547e6ba1c476b544a7 | libguestfs/virt-v2v | output.ml | virt - v2v
* Copyright ( C ) 2009 - 2021 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ... | null | https://raw.githubusercontent.com/libguestfs/virt-v2v/d2b01e487ff4ef56d139a5e0f22efd9b2ed9b64c/output/output.ml | ocaml | Check nbdkit is installed and has the required plugin.
Only allow compressed with -of qcow2.
not compressed | virt - v2v
* Copyright ( C ) 2009 - 2021 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ... |
79c79136a615a2752ad507fc89dc9d882a9b9b80ba9eee5e113e7f30c3de0799 | REPROSEC/dolev-yao-star | Vale_Test_X64_Vale_memcpy.ml | open Prims
let (va_code_InnerMemcpy :
unit ->
(Vale_X64_Decls.ins, Vale_X64_Decls.ocmp) Vale_X64_Machine_s.precode)
=
fun uu___ ->
Vale_X64_Machine_s.Block
[Vale_X64_InsMem.va_code_Load64_buffer Prims.int_zero
(Vale_X64_Machine_s.OReg Prims.int_zero)
(Vale_X64_Machine_s.OReg (Prims... | null | https://raw.githubusercontent.com/REPROSEC/dolev-yao-star/d97a8dd4d07f2322437f186e4db6a1f4d5ee9230/concrete/hacl-star-snapshot/ml/Vale_Test_X64_Vale_memcpy.ml | ocaml | open Prims
let (va_code_InnerMemcpy :
unit ->
(Vale_X64_Decls.ins, Vale_X64_Decls.ocmp) Vale_X64_Machine_s.precode)
=
fun uu___ ->
Vale_X64_Machine_s.Block
[Vale_X64_InsMem.va_code_Load64_buffer Prims.int_zero
(Vale_X64_Machine_s.OReg Prims.int_zero)
(Vale_X64_Machine_s.OReg (Prims... | |
7d28b5c1b9d4d5cb8a5ef646e58a68aee4ba2fceee8801e144117b01f01b4c98 | jship/monad-logger-aeson | MetadataYesThreadContextYes.hs | # LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
module TestCase.LogError.MetadataYesThreadContextYes
( testCase
) where
import Control.Monad.Logger.Aeson
( (.=), Loc(..), LogLevel(..), LoggedMessage(..), Message(..), logError, withThreadContext
)
import Data.Aeson.QQ.Sim... | null | https://raw.githubusercontent.com/jship/monad-logger-aeson/b983befb790818628f1c4a5f02a2b96b08dcf6ce/monad-logger-aeson/test-suite/TestCase/LogError/MetadataYesThreadContextYes.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NamedFieldPuns #
# LANGUAGE QuasiQuotes #
module TestCase.LogError.MetadataYesThreadContextYes
( testCase
) where
import Control.Monad.Logger.Aeson
( (.=), Loc(..), LogLevel(..), LoggedMessage(..), Message(..), logError, withThreadContext
)
import Data.Aeson.QQ.Simple (aesonQQ)
import Data.Time (UTC... |
1dd7dd42d5cdf20b37fa7d83cb65e4f959fa98eb45339df022aba6e4fbb473a7 | savonet/ocaml-srt | gen_types_c.ml | let c_headers =
{|
#include <srt/srt.h>
#if (SRT_VERSION_MAJOR <= 1) && (SRT_VERSION_MINOR <= 4) && (SRT_VERSION_PATCH <= 1)
#define SRT_EPOLL_EVENT_STR SRT_EPOLL_EVENT_
#endif
|}
let () =
let fname = Sys.argv.(1) in
let oc = open_out_bin fname in
let format = Format.formatter_of_out_channel oc in
Format.fp... | null | https://raw.githubusercontent.com/savonet/ocaml-srt/db2ae0cd784080c2102adea305d1245b6ef6c532/src/generator/gen_types_c.ml | ocaml | let c_headers =
{|
#include <srt/srt.h>
#if (SRT_VERSION_MAJOR <= 1) && (SRT_VERSION_MINOR <= 4) && (SRT_VERSION_PATCH <= 1)
#define SRT_EPOLL_EVENT_STR SRT_EPOLL_EVENT_
#endif
|}
let () =
let fname = Sys.argv.(1) in
let oc = open_out_bin fname in
let format = Format.formatter_of_out_channel oc in
Format.fp... | |
a1776bc1119386766a618d6cd31fa090bceca8ad2c936061c37a713f5274d974 | dyoo/whalesong | dots-should-be-syntax-error.rkt | #lang whalesong/cs019
.. ;; should raise a teaching syntax error
| null | https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/tests/more-tests/dots-should-be-syntax-error.rkt | racket | should raise a teaching syntax error | #lang whalesong/cs019
|
bc595e21c3d4de83909be05d8b0bf91be87938bc157012ad5e93ec8c673fdbf9 | shirok/Gauche | txt2rtf.scm | ;;
Convert plain text COPYING into rtf format , for Wix needs it .
;;
(use file.filter)
(use file.util)
(use srfi.13)
(use util.match)
(define (main args)
(match args
[(_ in out) (file-filter doit :input in :output out)]
[_ (exit 1 "Usage: ~a <input-file> <output-file>" (car args))])
0)
... | null | https://raw.githubusercontent.com/shirok/Gauche/be584db97075272881089fccc8aa5d5638141877/winnt/wix/txt2rtf.scm | scheme | Convert plain text COPYING into rtf format , for Wix needs it .
(use file.filter)
(use file.util)
(use srfi.13)
(use util.match)
(define (main args)
(match args
[(_ in out) (file-filter doit :input in :output out)]
[_ (exit 1 "Usage: ~a <input-file> <output-file>" (car args))])
0)
(define... | |
ef347b54565a3fde76d5c773d3d1ad828f76dfe682364fe01590b628e5219679 | rescript-lang/rescript-compiler | ast_core_type_class_type.mli | Copyright ( C ) 2018 Authors of ReScript
*
* 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 , either version 3 of the License , or
* ( at your option ) any later version .... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/75faddbac84af97157bb7d1912ea35c96645e5b8/jscomp/frontend/ast_core_type_class_type.mli | ocaml | Copyright ( C ) 2018 Authors of ReScript
*
* 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 , either version 3 of the License , or
* ( at your option ) any later version .... | |
1a57a77b44cc9a0f22bfca4113fe3f0405819fae1b935e71c09cb56a5fd01167 | sgbj/MaximaSharp | dlasd3.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 2edcbd958861 2012/05/30 03:34:52 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 3fe93de3be82 2012/05/06 02:17:14 toy ... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/lapack/lapack/dlasd3.lisp | lisp | Compiled by f2cl version:
Using Lisp CMU Common Lisp 20d (20D Unicode)
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 2edcbd958861 2012/05/30 03:34:52 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 3fe93de3be82 2012/05/06 02:17:14 toy $ "
" f2cl6.l , v 1d5cbacbb... |
d78f8075db31a68ca447db597cae3ddd560b4e418ba90c5f7271ca2f88086715 | onedata/op-worker | space_transfers_middleware_handler.erl | %%%-------------------------------------------------------------------
@author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% This module handles middleware ope... | null | https://raw.githubusercontent.com/onedata/op-worker/6a3243adadc769c9c6459363e6cff55fc86f1b5c/src/middleware/plugins/space/handlers/space_transfers_middleware_handler.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
This module handles middleware operations (create, get, update, delete)
corresponding to space transfers aspects.
@end
--------------------------------------------------... | @author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(space_transfers_middleware_handler).
-author("Bartosz Walkowicz").
-behaviour(middleware_handler).
-include("middleware/middleware.hrl").
-include("modules/datastore/transfer.hrl").
-inclu... |
8bacc8e10fc2eabcbb702a14cecfedd430e9ebbefab291ddc48c3eb44da4a4fa | Simre1/haskell-game | Context.hs | # LANGUAGE TypeFamilies , RankNTypes , GeneralizedNewtypeDeriving , FlexibleContexts , FlexibleInstances , GADTs , DeriveDataTypeable #
module Graphics.GPipe.Internal.Context
(
ContextHandler(..),
ContextT(),
GPipeException(..),
runContextT,
newWindow,
deleteWindow,
swapWindowBuffers,
g... | null | https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/GPipe-Core/GPipe-Core/src/Graphics/GPipe/Internal/Context.hs | haskell | | Implementation specific context handler parameters, eg error handling and event processing policies
| Implementation specific window type
| Implementation specific window parameters, eg initial size and border decoration
| Create a context handler. Called from the main thread
| Create a new context sharing all o... | # LANGUAGE TypeFamilies , RankNTypes , GeneralizedNewtypeDeriving , FlexibleContexts , FlexibleInstances , GADTs , DeriveDataTypeable #
module Graphics.GPipe.Internal.Context
(
ContextHandler(..),
ContextT(),
GPipeException(..),
runContextT,
newWindow,
deleteWindow,
swapWindowBuffers,
g... |
4c334c107651149ded9078b92abd52e30f45ee39955f0f6bf15046177ce58be5 | modular-macros/ocaml-macros | edit_distance.ml | let edit_distance = Misc.edit_distance
let show_cutoff n =
if n = max_int then "max_int" else Printf.sprintf "%d" n
;;
let test =
let counter = ref 0 in
fun a b cutoff expected ->
let show_result = function
| None -> "None"
| Some d -> "Some " ^ string_of_int d in
incr counter;
Printf.pr... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/utils/edit_distance.ml | ocaml | check for bugs where a small common suffix, or common prefix, is
enough to make the distance goes down
check that using "max_int" as cutoff works
check empty strings | let edit_distance = Misc.edit_distance
let show_cutoff n =
if n = max_int then "max_int" else Printf.sprintf "%d" n
;;
let test =
let counter = ref 0 in
fun a b cutoff expected ->
let show_result = function
| None -> "None"
| Some d -> "Some " ^ string_of_int d in
incr counter;
Printf.pr... |
ad7b7b46a9611a4b95934846421fa31323c63652dcc5d61e6244a313544d4c1c | typedclojure/typedclojure | shim.clj | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/013229c0c8fe58af6d04dde985bc0463fa37b0d5/typed/clj.spec/src/typed/clj/spec/impl/shim.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns typed.clj.spec.impl.shim
(:require [clojure.alpha.spec :as s]
[clojure.alpha.spec :as s2]
[clojure.spec.alpha :as s1]
[clojure.alpha.spec.gen :as gen2]
[clojure.alpha.spec.protocols :as protocols2]
[typed.clj.... |
9c457365508614bf0f5d7d06d5bc2a2f3043e83b9de104381be071f1928c0355 | IFCA/opencl | test-opencl.hs | Copyright ( c ) 2011 ,
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
* Redistributions of source code must retain the above copyright
notice , this list of conditions and ... | null | https://raw.githubusercontent.com/IFCA/opencl/80d0cb9d235819cd53e6a36d7a9258bc19d564ab/src/test/test-opencl.hs | haskell | -----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Initialize Kernel
Execute Kernel
Get Result
-----------------------------------------------------------------------------
-----------------------------------... | Copyright ( c ) 2011 ,
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
* Redistributions of source code must retain the above copyright
notice , this list of conditions and ... |
0c5dec451aa5b5580cb1a0e08d5f570ec58855781dee4b5cb524e27898e51ec2 | UBTECH-Walker/WalkerSimulationFor2020WAIC | uwbRelocalizition.lisp | ; Auto-generated. Do not edit!
(cl:in-package cruiser_msgs-srv)
;//! \htmlinclude uwbRelocalizition-request.msg.html
(cl:defclass <uwbRelocalizition-request> (roslisp-msg-protocol:ros-message)
((data
:reader data
:initarg :data
:type cl:integer
:initform 0))
)
(cl:defclass uwbRelocalizition-requ... | null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_16.04_v1.2_20200616/walker_install/share/common-lisp/ros/cruiser_msgs/srv/uwbRelocalizition.lisp | lisp | Auto-generated. Do not edit!
//! \htmlinclude uwbRelocalizition-request.msg.html
//! \htmlinclude uwbRelocalizition-response.msg.html |
(cl:in-package cruiser_msgs-srv)
(cl:defclass <uwbRelocalizition-request> (roslisp-msg-protocol:ros-message)
((data
:reader data
:initarg :data
:type cl:integer
:initform 0))
)
(cl:defclass uwbRelocalizition-request (<uwbRelocalizition-request>)
())
(cl:defmethod cl:initialize-instance :after... |
9f5b46ce7389719338ffc9ca2521cfabb66294706b0827daa2cf32db8a717aed | bvaugon/ocapic | simul1.ml | (*************************************************************************)
(* *)
(* OCaPIC *)
(* *)
... | null | https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/tests/serial2/simul1.ml | ocaml | ***********************************************************************
OCaPIC
... |
This file is distributed under the terms of the CeCILL license .
open Serial;;
Type des valeurs transferees le simulateur
type t = Clear | Moveto of int * int | Int of int | Text of string
Cannal de communication avec le simulateur
let (cha... |
680c8da9df67216682eff57970b1eeb8526696e2fee05608d3e8d19697cf0707 | let-def/cuite | qtCore_classes.ml | open Mlspec.Decl
let qList name t =
let self = qstruct name in
with_class self [
constructor "" [];
constructor "" [arg "other" self];
(*dynamic "swap" [arg' `Ref "other" self];*)
dynamic "size" [] ~ret:int;
dynamic "isEmpty" [] ~ret:bool;
dynamic "clear" [];
dynamic "at" [arg "i" int] ... | null | https://raw.githubusercontent.com/let-def/cuite/42629a91c573ecbf1b01f213f1bf35a456d2b1af/spec/qtCore_classes.ml | ocaml | dynamic "swap" [arg' `Ref "other" self];
let qList'const_iterator = qclass "QList::const_iterator"
let qList'iterator = qclass "QList::iterator"
let qFlags = qclass "QFlags"
let qFutureWatcher = qextends "QFutureWatcher" qFutureWatcherBase
let qStack = qextends "QStack" qVector
let qAtomicInteger = qextends "QAtomicInt... | open Mlspec.Decl
let qList name t =
let self = qstruct name in
with_class self [
constructor "" [];
constructor "" [arg "other" self];
dynamic "size" [] ~ret:int;
dynamic "isEmpty" [] ~ret:bool;
dynamic "clear" [];
dynamic "at" [arg "i" int] ~ret:t;
dynamic "reserve" [arg "alloc" int];
... |
a8435c602710cce42baa25cf72b35d27ca9706b13350d3194e79a9687222e68b | mfelleisen/Fish | server.rkt | #lang racket
;; a tournament server that signs up players over TCP and runs a tournament
;
;
; ;;;
; ; ... | null | https://raw.githubusercontent.com/mfelleisen/Fish/b2add976606603f609554da073d695a5b868d987/Remote/server.rkt | racket | a tournament server that signs up players over TCP and runs a tournament
;;;
; ... | #lang racket
(require (only-in Fish/Admin/manager results/c))
(require Fish/Lib/hash-contract)
(define port/c (and/c natural-number/c (</c 60000) (>/c 10000)))
(define player#/c natural-number/c)
(define PORT 'port)
(define SERVER-TRIES 'server-tries)
(define SERVER-WAIT 'server-wait)
(define T-PLAYERS 't-players)... |
2e7abd9ef6f2bc7f91641f3d0aa8675d576243cc8a2854ff69cdca7e5cbbee5f | tek/ribosome | Options.hs | module Ribosome.App.Options where
import Options.Applicative (
CommandFields,
Mod,
Parser,
ReadM,
argument,
command,
customExecParser,
fullDesc,
header,
help,
helper,
hsubparser,
info,
long,
metavar,
option,
prefs,
progDesc,
readerError,
short,
showHelpOnEmpty,
showHelpOnErr... | null | https://raw.githubusercontent.com/tek/ribosome/a676b4f0085916777bfdacdcc761f82d933edb80/packages/app/lib/Ribosome/App/Options.hs | haskell | module Ribosome.App.Options where
import Options.Applicative (
CommandFields,
Mod,
Parser,
ReadM,
argument,
command,
customExecParser,
fullDesc,
header,
help,
helper,
hsubparser,
info,
long,
metavar,
option,
prefs,
progDesc,
readerError,
short,
showHelpOnEmpty,
showHelpOnErr... | |
48882d2e4c1bf7f372be12eda5667e4d07da7abc5470c45f419bdea45c93f294 | Deducteam/Dedukti | universo.ml | (** Main file *)
module B = Kernel.Basic
module C = Common.Constraints
module E = Elaboration.Elaborate
module F = Common.Files
module L = Common.Log
module M = Api.Meta
module P = Parsers.Parser
module S = Kernel.Signature
module O = Common.Oracle
module U = Common.Universes
* Direct the control flow of Universo . T... | null | https://raw.githubusercontent.com/Deducteam/Dedukti/abbe11318189c32ae236671ccd8dcf3c89525065/universo/commands/universo.ml | ocaml | * Main file
* The path that contains the configuration file
Load path is not needed since no importation is done by the
[P] processor.
* [add_rules sg rs] add the rewrite rules [rs] to the signature [sg]
Several rules might be bound to different constant
* [to_elaboration_env f] generates a fresh environe... | module B = Kernel.Basic
module C = Common.Constraints
module E = Elaboration.Elaborate
module F = Common.Files
module L = Common.Log
module M = Api.Meta
module P = Parsers.Parser
module S = Kernel.Signature
module O = Common.Oracle
module U = Common.Universes
* Direct the control flow of Universo . The control flow o... |
ea048b41ff02fd734f3e72021d2fc45d11b631058201debc215b66ab0c848048 | zack-bitcoin/chalang | chalang_sup.erl | -module(chalang_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
%% Helper macro for declaring children of supervisor
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
%% ===========================================================... | null | https://raw.githubusercontent.com/zack-bitcoin/chalang/a728e6bb9a60ac6eca189ee7d6873a891825fa9a/src/chalang_sup.erl | erlang | API
Supervisor callbacks
Helper macro for declaring children of supervisor
===================================================================
API functions
===================================================================
===================================================================
Supervisor callback... | -module(chalang_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
Word = 2 ,
Children = [
],
{ok, { {one_fo... |
e2c265e4ecc8ed322c33758565198dd0fb48cd62c8878910b2f4c6cc7facd9a5 | pbv/codex | Code.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
--
-- Code exercise handlers
--
module Codex.Handlers.Code
( codeHandlers
) where
import Codex.Types
import Codex.Application
import Codex.Utils
import Codex.Handlers
import Codex.Page
import Code... | null | https://raw.githubusercontent.com/pbv/codex/1a5a81965b12f834b436e2165c07120360aded99/src/Codex/Handlers/Code.hs | haskell | # LANGUAGE OverloadedStrings #
Code exercise handlers
| check for an exercise page
| get a coding exercise
| report a code submission
| splices related to code exercises
| splices relating to a list of submissions | # LANGUAGE RecordWildCards #
module Codex.Handlers.Code
( codeHandlers
) where
import Codex.Types
import Codex.Application
import Codex.Utils
import Codex.Handlers
import Codex.Page
import Codex.Submission
import Codex.AceEditor
import Codex.... |
b4fe06bc1e558fccd381cc1ba0d962800634ef72940bfaac85880aedba8ec27e | Feuerlabs/exometer_core | exometer_cache.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved .
%%
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 obtai... | null | https://raw.githubusercontent.com/Feuerlabs/exometer_core/8dabf3f485245a09dbf7d9da53fe1e0c4009575d/src/exometer_cache.erl | erlang | -------------------------------------------------------------------
-------------------------------------------------------------------
Cancel the timer?
This function currently doesn't cancel any timers. The cost of doing
so would outweigh the cost of reacting to any timers that happen to
delete the wrong ent... | Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved .
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 /.
-module(exometer_cache).
-behaviour(gen_server).
-export([start... |
88d3d6db23dd977cd058024f2b073592e828fb7b954c4a06b8d6c707ab07cc46 | Frama-C/Frama-C-snapshot | segfault_datatypes_B.ml | module StateA =
State_builder.Option_ref
(Datatype.Int)
(struct
let name = "Project.Test.StateA"
let dependencies = []
end)
let () = StateA.set 3
| null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/tests/saveload/segfault_datatypes_B.ml | ocaml | module StateA =
State_builder.Option_ref
(Datatype.Int)
(struct
let name = "Project.Test.StateA"
let dependencies = []
end)
let () = StateA.set 3
| |
da89631deca1a919ef606af6e5b3b37108862cde02906ba74d600cd1c94ef0b4 | mitchellwrosen/planet-mitchell | Printf.hs | module Printf
( module Text.Printf
) where
import Text.Printf
| null | https://raw.githubusercontent.com/mitchellwrosen/planet-mitchell/18dd83204e70fffcd23fe12dd3a80f70b7fa409b/planet-mitchell/src/Printf.hs | haskell | module Printf
( module Text.Printf
) where
import Text.Printf
| |
e7ea12d71decd7cd9453b976b536fb6a752f514565f591dba6e7b02a64288ad4 | chanshunli/wechat-clj | wxpay.cljs | (ns wechat-clj.wxpay)
(defn choose-wxpay
[{:keys [time-stamp nonce-str prepay-id pay-sign
sign-type success-fn cencel-fn fail-fn]
:or {sign-type "MD5"
success-fn (fn [res] (js/alert (str "支付成功" res)))
cencel-fn (fn [res] (js/alert (str "支付取消" res)))
fail-fn (fn [res] (js/a... | null | https://raw.githubusercontent.com/chanshunli/wechat-clj/145a99825669b743a09a8565fa1301d90480c91b/src/cljs/wechat_clj/wxpay.cljs | clojure | (ns wechat-clj.wxpay)
(defn choose-wxpay
[{:keys [time-stamp nonce-str prepay-id pay-sign
sign-type success-fn cencel-fn fail-fn]
:or {sign-type "MD5"
success-fn (fn [res] (js/alert (str "支付成功" res)))
cencel-fn (fn [res] (js/alert (str "支付取消" res)))
fail-fn (fn [res] (js/a... | |
b57e16479d5823fabb0ecac76253014aa5fcc92dcef98c1f458ba675dde24be0 | dialohq/ocaml-grpc | client.ml | open! Core
open! Async
type response_handler = H2.Client_connection.response_handler
type do_request =
?flush_headers_immediately:bool ->
?trailers_handler:(H2.Headers.t -> unit) ->
H2.Request.t ->
response_handler:response_handler ->
H2.Body.Writer.t
let make_request ~scheme ~service ~rpc ~headers =
let... | null | https://raw.githubusercontent.com/dialohq/ocaml-grpc/7e27ac6c1d6874833d5df63e9ec645c0bf68a934/lib/grpc-async/client.ml | ocaml | This should never happen, but just in case.
In case no grpc-status appears in headers or trailers. | open! Core
open! Async
type response_handler = H2.Client_connection.response_handler
type do_request =
?flush_headers_immediately:bool ->
?trailers_handler:(H2.Headers.t -> unit) ->
H2.Request.t ->
response_handler:response_handler ->
H2.Body.Writer.t
let make_request ~scheme ~service ~rpc ~headers =
let... |
3635643fda57fa3fef2b68cd546e9fd5f224c7e8d33dffd4ef29bb2aa988f28f | input-output-hk/cardano-rest | ClientTypesSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module Test.Explorer.Web.ClientTypesSpec
( spec
) where
import Cardano.Chain.Common
( maxLovelaceVal )
import Cardano.Db
( Ada (..), word64ToAda )
import Data.Word
( Word64 )
import Explorer.Web.ClientTypes
( adaToCCoin, cCoinToAda )
import Hedgehog
( Gen, Pr... | null | https://raw.githubusercontent.com/input-output-hk/cardano-rest/040b123b45af06060aae04479d92fada68820f12/explorer-api/test/Test/Explorer/Web/ClientTypesSpec.hs | haskell | # LANGUAGE OverloadedStrings #
Full range
Small values
----------------------------------------------------------------------------- |
module Test.Explorer.Web.ClientTypesSpec
( spec
) where
import Cardano.Chain.Common
( maxLovelaceVal )
import Cardano.Db
( Ada (..), word64ToAda )
import Data.Word
( Word64 )
import Explorer.Web.ClientTypes
( adaToCCoin, cCoinToAda )
import Hedgehog
( Gen, PropertyT )
import Test.Hspec
( S... |
260a042704d1f2db855929193dc207daf4f95370fda7c1ba41362192fadd5faf | K2InformaticsGmbH/imem | imem_dal_skvh_ct.erl | %%%-------------------------------------------------------------------
%%% File : imem_dal_skvh_ct.erl
%%% Description : Common testing imem_dal_skvh.
%%%
%%% Created : 09.11.2017
%%%
Copyright ( C ) 2017 K2 Informatics GmbH
%%%-------------------------------------------------------------------
-module(im... | null | https://raw.githubusercontent.com/K2InformaticsGmbH/imem/602b6cd31ea1af00041a9318119ab0c3e4d5b59a/test/imem_dal_skvh_ct.erl | erlang | -------------------------------------------------------------------
File : imem_dal_skvh_ct.erl
Description : Common testing imem_dal_skvh.
Created : 09.11.2017
-------------------------------------------------------------------
--------------------------------------------------------------------
Test ... | Copyright ( C ) 2017 K2 Informatics GmbH
-module(imem_dal_skvh_ct).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-export([
end_per_testcase/2,
init_per_testcase/2,
skvh_concurrency/1,
skvh_operations/1,
skvh_purge_history/1
]).
-define(AUDIT_SUFFIX, "Aud... |
461134b0009c569701900aa5b82918dd670a0e07fe825b0670c7968c94d07343 | rnons/ted2srt | Home.hs | module View.Home where
import Data.Aeson.Text (encodeToLazyText)
import qualified Data.Text.Lazy as LT
import Lucid
import Lucid.Base (makeAttribute)
import Models.Talk (getTalks)
import RIO
import Types
import View.Bundle
import ... | null | https://raw.githubusercontent.com/rnons/ted2srt/7456f109bce2b9f07d0c929bef2fd42e6bc4f75d/backend/src/View/Home.hs | haskell | module View.Home where
import Data.Aeson.Text (encodeToLazyText)
import qualified Data.Text.Lazy as LT
import Lucid
import Lucid.Base (makeAttribute)
import Models.Talk (getTalks)
import RIO
import Types
import View.Bundle
import ... | |
20c9951cc433b7f7c05e094446c6d02dacff1231ae0aee4d0bc5f7e6bd3865c3 | processone/ejabberd | mod_sip_proxy.erl | %%%-------------------------------------------------------------------
File :
Author : < >
%%% Purpose :
Created : 21 Apr 2014 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2014 - 2023 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
modify it under the terms of the... | null | https://raw.githubusercontent.com/processone/ejabberd/c103182bc7e5b8a8ab123ce02d1959a54e939480/src/mod_sip_proxy.erl | erlang | -------------------------------------------------------------------
Purpose :
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty... | File :
Author : < >
Created : 21 Apr 2014 by < >
ejabberd , Copyright ( C ) 2014 - 2023 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public Li... |
316ff4e5f9cf9b71e6193c6567f7d5439cc9f151694ea4728e8652431d81c355 | footprintanalytics/footprint-web | plural.clj | (ns metabase.util.i18n.plural
"Resources for parsing the Plural-Forms header from a translation file and determining which of multiple
pluralities to use for a translated string."
(:require [clojure.core.memoize :as memoize]
[instaparse.core :as insta]))
(def ^:private plural-form-parser
"This is a... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/util/i18n/plural.clj | clojure | `
'>? <s>
This cache size is pretty arbitrary; can be tweaked if necessary | (ns metabase.util.i18n.plural
"Resources for parsing the Plural-Forms header from a translation file and determining which of multiple
pluralities to use for a translated string."
(:require [clojure.core.memoize :as memoize]
[instaparse.core :as insta]))
(def ^:private plural-form-parser
"This is a... |
a1949e27018d6228203bea785a6ddd79a2ea1c27f979c6e07897d91dd6ccdbab | akiomik/dtx2midi | Main.hs | module Main where
import Codec.Text.Detect (detectEncodingName)
import DTX2MIDI (dtxToMIDI, fromDTXFile, toMIDIFile)
import qualified Data.ByteString.Lazy as B
import Data.Semigroup ((<>))
import Data.Version (showVersion)
import Options.Applicative
import qualified Paths_dtx2midi
data Opts = Opts
{ input :: FilePa... | null | https://raw.githubusercontent.com/akiomik/dtx2midi/12eb9a38eea45850b1d03e6fbbcd99f953d8e6ed/app/Main.hs | haskell | module Main where
import Codec.Text.Detect (detectEncodingName)
import DTX2MIDI (dtxToMIDI, fromDTXFile, toMIDIFile)
import qualified Data.ByteString.Lazy as B
import Data.Semigroup ((<>))
import Data.Version (showVersion)
import Options.Applicative
import qualified Paths_dtx2midi
data Opts = Opts
{ input :: FilePa... | |
b3306aac4b87a1baf51f41396fb776abf346c9aadf512d04e9c8294d3e8a5632 | mmontone/cl-sparql | test.lisp | (defpackage :cl-sparql-test
(:use :cl :sparql :fiveam)
(:export #:run-tests))
(in-package :cl-sparql-test)
#.(sparql:enable-uri-syntax)
(defun run-tests ()
(run! 'cl-sparql-test))
(def-suite cl-sparql-test)
(in-suite cl-sparql-test)
(test parse-literal-test
(is (equalp (parse-literal "2") 2))
(is (equal... | null | https://raw.githubusercontent.com/mmontone/cl-sparql/1f52ef71330d8f4da665a254b419070ae2dc38fa/test.lisp | lisp | Basic tests
Literals
Select options
Subqueries
Variable capture
SPARQL evaluation | (defpackage :cl-sparql-test
(:use :cl :sparql :fiveam)
(:export #:run-tests))
(in-package :cl-sparql-test)
#.(sparql:enable-uri-syntax)
(defun run-tests ()
(run! 'cl-sparql-test))
(def-suite cl-sparql-test)
(in-suite cl-sparql-test)
(test parse-literal-test
(is (equalp (parse-literal "2") 2))
(is (equal... |
1988a1fb15e6a49aa5daa595ead881b8d89b06109eb7a4f6fd7758c34e5a842f | krohrer/caml-aesq | lazyList.mli | , Tue Mar 23 06:47:43 CET 2010
(** Lazy lists *)
exception Empty
type 'a cell =
| Nil
| Cons of 'a * 'a t
and 'a t = 'a cell Lazy.t
val cell : 'a -> 'a t -> 'a cell
val nil : 'a t
val cons : 'a -> 'a t -> 'a t
val sing : 'a -> 'a t
val generate : (unit -> 'a) -> 'a t
val forever : 'a -> 'a t
val from : (u... | null | https://raw.githubusercontent.com/krohrer/caml-aesq/4cdbd23c010ad3e8eb67ca6a86cdb6a9efafc9c6/lazyList.mli | ocaml | * Lazy lists | , Tue Mar 23 06:47:43 CET 2010
exception Empty
type 'a cell =
| Nil
| Cons of 'a * 'a t
and 'a t = 'a cell Lazy.t
val cell : 'a -> 'a t -> 'a cell
val nil : 'a t
val cons : 'a -> 'a t -> 'a t
val sing : 'a -> 'a t
val generate : (unit -> 'a) -> 'a t
val forever : 'a -> 'a t
val from : (unit -> 'a option) ... |
25fa9f388f8c4ba7b0c1b052d264d315bf2edb3577c06b1a77c012f777c564b3 | tweag/asterius | Internals.hs | {-# LANGUAGE RankNTypes #-}
module Asterius.Internals
( encodeStorable,
showBS,
c8BS,
)
where
import qualified Data.ByteString.Internal as BS
import qualified Data.ByteString.Char8 as CBS
import Foreign
import GHC.Exts
{-# INLINE encodeStorable #-}
encodeStorable :: Storable a => a -> BS.ByteString
encod... | null | https://raw.githubusercontent.com/tweag/asterius/e4791671dcfe3baae97a3f5f6bc582e0f9d7d292/asterius/src/Asterius/Internals.hs | haskell | # LANGUAGE RankNTypes #
# INLINE encodeStorable # |
module Asterius.Internals
( encodeStorable,
showBS,
c8BS,
)
where
import qualified Data.ByteString.Internal as BS
import qualified Data.ByteString.Char8 as CBS
import Foreign
import GHC.Exts
encodeStorable :: Storable a => a -> BS.ByteString
encodeStorable a = BS.unsafeCreate len $ \p -> poke (castPtr p)... |
70067534ab76b03b6b1a49dd699bcf3651f1943a766aba8c5e0b04e18e49ab32 | xumingming/house | core_test.clj | (ns loan.core-test
(:use clojure.test
loan.core))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/xumingming/house/e4813880b11e0fadf9c00b9a6b9deabc1f7de525/test/loan/core_test.clj | clojure | (ns loan.core-test
(:use clojure.test
loan.core))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
8fee16d9fbf32e52d01356febfe46fe4c1cc1244907a22314589f9b243f025d6 | eeng/shevek | csv.cljs | (ns shevek.domain.exporters.csv
(:require [testdouble.cljs.csv :refer [write-csv]]
[cuerdas.core :as str]
[shevek.domain.pivot-table :as pivot-table :refer [SplitsCell MeasureCell DimensionValueCell MeasureValueCell EmptyCell]]
[shevek.lib.collections :refer [wrap-coll]]))
(defn- ... | null | https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/src/cljs/shevek/domain/exporters/csv.cljs | clojure | (ns shevek.domain.exporters.csv
(:require [testdouble.cljs.csv :refer [write-csv]]
[cuerdas.core :as str]
[shevek.domain.pivot-table :as pivot-table :refer [SplitsCell MeasureCell DimensionValueCell MeasureValueCell EmptyCell]]
[shevek.lib.collections :refer [wrap-coll]]))
(defn- ... | |
a6694dc0cbbedeecc735adf10f4111edbf49ae446db78e7ec2962186d5bec63d | davidlazar/ocaml-semantics | constr02.ml | Some None
| null | https://raw.githubusercontent.com/davidlazar/ocaml-semantics/6f302c6b9cced0407d501d70ad25c2d2aefbb77d/tests/unit/constr02.ml | ocaml | Some None
| |
cb8a6e94b2d345afc03841c367456f33d08007c069aa4a7576a75b1a8eb102bf | Apress/beg-haskell | Containers.hs | module Chapter4.Containers where
import qualified Data.Map as M
import qualified Data.Set as S
import Data.Tree
import qualified Data.Foldable hiding (concat)
import Data.Graph
set1 :: S.Set String
set1 = S.insert "welcome" $ S.singleton "hello"
set2 :: S.Set String
set2 = S.fromList ["hello","bye"]
setOps :: (S.Se... | null | https://raw.githubusercontent.com/Apress/beg-haskell/aaacbf047d553e6177c38807e662cc465409dffd/chapter4/src/Chapter4/Containers.hs | haskell | module Chapter4.Containers where
import qualified Data.Map as M
import qualified Data.Set as S
import Data.Tree
import qualified Data.Foldable hiding (concat)
import Data.Graph
set1 :: S.Set String
set1 = S.insert "welcome" $ S.singleton "hello"
set2 :: S.Set String
set2 = S.fromList ["hello","bye"]
setOps :: (S.Se... | |
62b28d076054d51e65374dfbb139e193ee1b971884847c305aca941eb5718f49 | manuel-serrano/bigloo | pem.scm | (module __crypto-pem
(import __crypto-rsa
__crypto-dsa
__crypto-DER
__crypto-util)
(export (read-pem-key in)
(read-pem-key-string str::bstring)
(read-pem-key-port p::input-port)
(read-pem-key-file f::bstring)
(write-pem-key key out #!optional public-key-only?)
(write-pem-key-port k... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/api/crypto/src/Llib/pem.scm | scheme | ===================== READING =============================================
needs to be a private key.
private key information
needs to be a private key.
private information
don't need unused bits.
needs to be public key.
don't need unused bits.
needs to be public key.
===================== WRITING ========... | (module __crypto-pem
(import __crypto-rsa
__crypto-dsa
__crypto-DER
__crypto-util)
(export (read-pem-key in)
(read-pem-key-string str::bstring)
(read-pem-key-port p::input-port)
(read-pem-key-file f::bstring)
(write-pem-key key out #!optional public-key-only?)
(write-pem-key-port k... |
924d429d625e43bd864da5dfa8d4e44e17ac12adc182b62d3db40b98d1fe2d3f | quek/paiprolog | krep.lisp | ;;; -*- Mode: Lisp; Syntax: Common-Lisp; -*-
;;; Code from Paradigms of Artificial Intelligence Programming
Copyright ( c ) 1991
;;; krep.lisp: Knowledge representation code; final version.
;;; Adds support for worlds and attached functions.
(requires "krep2") ; Need some functions from previous version
(defpar... | null | https://raw.githubusercontent.com/quek/paiprolog/012d6bb255d8af7f1c8b1d061dcd8a474fb3b57a/krep.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; -*-
Code from Paradigms of Artificial Intelligence Programming
krep.lisp: Knowledge representation code; final version.
Adds support for worlds and attached functions.
Need some functions from previous version
==============================
==============================
==... | Copyright ( c ) 1991
(defparameter *primitives* '(and sub ind rel val))
(defun add-fact (fact)
"Add the fact to the data base."
(cond ((eq (predicate fact) 'and)
(mapc #'add-fact (args fact)))
((or (not (every #'atom (args fact)))
(some #'variable-p (args fact))
(n... |
871a5cfb636f7a638292a604f78c8f18e72ff3a7a87c5ccf46fc69590da0d190 | pmundkur/flowcaml | avl_draw.mli | (**************************************************************************)
(* *)
(* Averell *)
(* *)
... | null | https://raw.githubusercontent.com/pmundkur/flowcaml/ddfa8a37e1cb60f42650bed8030036ac313e048a/src-averell/avl_draw.mli | ocaml | ************************************************************************
Averell
... | , Projet Cristal , INRIA Rocquencourt
Copyright 2002 , 2003 Institut National de Recherche en Informatique
under the terms of the GNU Library General Public License , with the
$ I d : , v 1.4 2003/06/26 13:32:45 simonet Exp $
* Drawing graphs .
This module allows drawing ... |
be6014d39018c45e960a8a946ade7c5edb4ac5fd7a12980b44e3058cf854551e | mirage/mirage-skeleton | config.ml | open Mirage
let filename =
let doc = Key.Arg.info ~doc:"The filename to print out." [ "filename" ] in
Key.(create "filename" Arg.(required string doc))
let unikernel =
foreign "Unikernel.Make" ~keys:[ Key.v filename ] (console @-> kv_ro @-> job)
let console = default_console
let remote = ""
let () =
registe... | null | https://raw.githubusercontent.com/mirage/mirage-skeleton/e1b4ed755c226b743bd624a76154972455d281f5/applications/docteur/config.ml | ocaml | open Mirage
let filename =
let doc = Key.Arg.info ~doc:"The filename to print out." [ "filename" ] in
Key.(create "filename" Arg.(required string doc))
let unikernel =
foreign "Unikernel.Make" ~keys:[ Key.v filename ] (console @-> kv_ro @-> job)
let console = default_console
let remote = ""
let () =
registe... | |
9adf25fc1d327403a7edc487223e43ed08f8441e20536dc831cdb5c3f6b574dc | ecraven/r7rs-benchmarks | Loko-prelude.scm | (import (only (loko) loko-version))
| null | https://raw.githubusercontent.com/ecraven/r7rs-benchmarks/cd6ea87a6fa7d20424449b5d08dcd5bf990f26e4/src/Loko-prelude.scm | scheme | (import (only (loko) loko-version))
| |
b6847cf49458829d5e655d0e12299689ae51d85e50227e664ec749566d093c4f | cedlemo/OCaml-GObject-Introspection | Test_repository.ml |
* Copyright 2017 - 2019 ,
* This file is part of OCaml - GObject - Introspection .
*
* OCaml - GObject - Introspection is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 o... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GObject-Introspection/261c76d9e5d90f706edff1121a63bf5eb611399b/tests/Test_repository.ml | ocaml |
* Copyright 2017 - 2019 ,
* This file is part of OCaml - GObject - Introspection .
*
* OCaml - GObject - Introspection is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 o... | |
e0f1848dd9ff5c145c8e31409ab55ac4ec9e73e3531a4dbfda106d88136d7317 | naveensundarg/prover | resolve-code-tables.lisp | ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*-
;;; File: resolve-code-tables.lisp
The contents of this file are subject to the Mozilla Public License
;;; Version 1.1 (the "License"); you may not use this file except in
;;; compliance with the License. You may obtain a copy of the License at
;;; /
;;;
S... | null | https://raw.githubusercontent.com/naveensundarg/prover/812baf098d8bf77e4d634cef4d12de94dcd1e113/snark-20120808r02/src/resolve-code-tables.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*-
File: resolve-code-tables.lisp
Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
/
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the s... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is SNARK .
The Initial Developer of the Original Code is SRI International .
Portions created by the Initial Developer are Copyright ( C ) 1981 - 2006 .
... |
2adbd4c7e680b17ab241517499da4db8fa320319be5deeaa043bc80d9831a9a2 | Decentralized-Pictures/T4L3NT | seed_repr.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_012_Psithaca/lib_protocol/seed_repr.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETH... |
c1f5a219f85314fbea1107bcd5a021a42f888d170d8c9b31cbc397139768ef39 | camllight/camllight | test_equal.ml | #open "test";;
#open "int_misc";;
#open "big_int";;
#open "ratio";;
#open "num";;
#open "num_equal";;
testing_function "generic equality";;
let notequal x y = not(equal x y);;
test 1
equal (add_num (Int 1) (Int 3), Int 4);;
test 2
equal (add_num (Int 1) (Big_int (big_int_of_int 3)), Int 4);;
test 3
equal (add_num (I... | null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/libnum/test/test_equal.ml | ocaml | #open "test";;
#open "int_misc";;
#open "big_int";;
#open "ratio";;
#open "num";;
#open "num_equal";;
testing_function "generic equality";;
let notequal x y = not(equal x y);;
test 1
equal (add_num (Int 1) (Int 3), Int 4);;
test 2
equal (add_num (Int 1) (Big_int (big_int_of_int 3)), Int 4);;
test 3
equal (add_num (I... | |
3fa2d9769133603d433bb84e269633da2c07f902e3a85593f716b9a98c2c40fe | sicmutils/sicmutils | expression_test.cljc | #_"SPDX-License-Identifier: GPL-3.0"
(ns sicmutils.expression-test
(:require [clojure.test :refer [is deftest testing]]
[clojure.test.check.generators :as gen]
[com.gfredericks.test.chuck.clojure-test :refer [checking]]
[sicmutils.abstract.number :as an]
[sicmutils.exp... | null | https://raw.githubusercontent.com/sicmutils/sicmutils/f181f153f1432e9648206f903282e7cb4cdd9644/test/sicmutils/expression_test.cljc | clojure | #_"SPDX-License-Identifier: GPL-3.0"
(ns sicmutils.expression-test
(:require [clojure.test :refer [is deftest testing]]
[clojure.test.check.generators :as gen]
[com.gfredericks.test.chuck.clojure-test :refer [checking]]
[sicmutils.abstract.number :as an]
[sicmutils.exp... | |
6d4bd62196f3f12da55cbafcac34791ce2847fb97d875a37dc5e0b9f14cfbcf8 | Oblosys/proxima | Derived.hs | module UU.Parsing.Derived where
import UU.Parsing.Interface
infixl 2 <?>
infixl 4 <**>, <??>, <+>
infixl 2 `opt`
infixl 5 <..>
-- =======================================================================================
-- ===== CHECKING ========================================================================
-- ===... | null | https://raw.githubusercontent.com/Oblosys/proxima/f154dff2ccb8afe00eeb325d9d06f5e2a5ee7589/uuagc/src/UU/Parsing/Derived.hs | haskell | =======================================================================================
===== CHECKING ========================================================================
=======================================================================================
++
ESeq [] -> "There are no other alternatives... | module UU.Parsing.Derived where
import UU.Parsing.Interface
infixl 2 <?>
infixl 4 <**>, <??>, <+>
infixl 2 `opt`
infixl 5 <..>
| Checks if the parser accepts epsilon .
acceptsepsilon :: (IsParser p s) => p v -> Bool
acceptsepsilon p = case getzerop p of {Nothing -> False; _ -> True}
mnz :: (IsParser p s) ... |
fe01c94897c76e9f0dc12fa217424c4536a62fcd6bc36000d65b3b215f3354eb | project-oak/hafnium-verification | Driver.mli |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/integration/Driver.mli | ocaml | * entry points for top-level functionalities such as capture under various build systems,
analysis, and reporting
* based on the build_system and options passed to infer, we run in different driver modes
* driver mode computed from the command-line arguments and settings in Config
* prepare the environment for r... |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
26a03b41a05f9ab41e447a2539534f2d23352c5025ecdbb7d7b462f747aabf2c | Oblosys/proxima | Heliumfile.hs | h = [(1,False),(2,True),(3,False)];
increase = \x -> x + 1;
s = \f -> \g -> \x -> f x (g x);
test = f True;
x = let local = 1+2+3+4; h = 1; in if True then local + h else 0;
f = \x -> x^2+2*x+(3+x)*(2+x)*1%(x+1)^2; | null | https://raw.githubusercontent.com/Oblosys/proxima/f154dff2ccb8afe00eeb325d9d06f5e2a5ee7589/helium-editor/Heliumfile.hs | haskell | h = [(1,False),(2,True),(3,False)];
increase = \x -> x + 1;
s = \f -> \g -> \x -> f x (g x);
test = f True;
x = let local = 1+2+3+4; h = 1; in if True then local + h else 0;
f = \x -> x^2+2*x+(3+x)*(2+x)*1%(x+1)^2; | |
ac546390cceacb4afb52c14fd6ad4aa82234ac9047c1b3d148af55a58418b04e | archimag/cl-mssql | execute.lisp | execute.lisp
;;;;
;;;; This file is part of the cl-mssql library, released under Lisp-LGPL.
;;;; See file COPYING for details.
;;;;
Author : < >
(in-package :mssql)
(defun execute (query &key (connection *database*))
(let ((%dbproc (slot-value connection 'dbproc))
(cffi:*default-foreign-encoding* (sl... | null | https://raw.githubusercontent.com/archimag/cl-mssql/045602a19a32254108f2b75871049293f49731eb/src/execute.lisp | lisp |
This file is part of the cl-mssql library, released under Lisp-LGPL.
See file COPYING for details.
Transaction support | execute.lisp
Author : < >
(in-package :mssql)
(defun execute (query &key (connection *database*))
(let ((%dbproc (slot-value connection 'dbproc))
(cffi:*default-foreign-encoding* (slot-value connection 'external-format)))
(with-foreign-string (%query query)
(%dbcmd %dbproc %query))
(%db... |
6e2a96d614529a44ab99dc238f3fdc0e4c5b68e29d43750b54bf63e7eec1c0e1 | mejgun/haskell-tdlib | CanTransferOwnershipResult.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Data.CanTransferOwnershipResult where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
-- | Represents result of checking whether the current session can be used to transfer a chat ownership to another user
data CanT... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/ddcb47043c7a339b4e5995355e5d5a228e21ccb0/src/TD/Data/CanTransferOwnershipResult.hs | haskell | # LANGUAGE OverloadedStrings #
|
| Represents result of checking whether the current session can be used to transfer a chat ownership to another user
| The session can be used
|
| |
module TD.Data.CanTransferOwnershipResult where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
data CanTransferOwnershipResult
CanTransferOwnershipResultOk
| The 2 - step verification needs to be enabled first
CanTransferOwnershipResultPasswordNeeded
|... |
6cb035380e196ec72fff66ce6affe10f94dceae20a82af858c46714beb9e263f | thosmos/mysql-to-datomic | migrations.clj | (ns mysql-to-datomic.migrations
(:require
[clojure.tools.logging :as log :refer [debug info warn error]]
[datomic.api :as d]
[clojure.java.jdbc :as j]))
(defn find-attr-max [db attr]
(d/q '[:find (max ?v) .
:in $ ?attr
:where [_ ?attr ?v]]
db attr))
(defn get-pk-maxes [db tables... | null | https://raw.githubusercontent.com/thosmos/mysql-to-datomic/0740a34cedfb7e3b42b4be64c95761430231cc67/src/mysql_to_datomic/migrations.clj | clojure | query mysql and add namespaces to all field names
get primary key values for subsequent migration of select tables
double check
do it for real | (ns mysql-to-datomic.migrations
(:require
[clojure.tools.logging :as log :refer [debug info warn error]]
[datomic.api :as d]
[clojure.java.jdbc :as j]))
(defn find-attr-max [db attr]
(d/q '[:find (max ?v) .
:in $ ?attr
:where [_ ?attr ?v]]
db attr))
(defn get-pk-maxes [db tables... |
01be5f83d46c14f6386d9a0bd83f3024fec1fe7db9c0bceff20277c73450d5d0 | reflex-frp/reflex-native | TextStyle.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE RankNTypes #-}
-- |Style of displayed text.
module Reflex.Native.TextStyle
( TextStyle(..), defaultInitialTextStyle, defaultModifyTextStyle
) where
import Data.Functor.Identity (Identity(..))
import Data.Monoid ((<>))
import GHC.Generics (Generic)
import qualified Rank2
impo... | null | https://raw.githubusercontent.com/reflex-frp/reflex-native/5fb6a07845e4f7c51f97e9c8ce1a48009f341246/reflex-native/src/Reflex/Native/TextStyle.hs | haskell | # LANGUAGE RankNTypes #
|Style of displayed text.
@f ~ Identity@ is used for initial text style where all parameters must be given, while @f ~ Event t@ is used for dynamic modification of text styles after
initial creation.
^The color to display the text with.
^The font to display the text with. | # LANGUAGE DeriveGeneric #
module Reflex.Native.TextStyle
( TextStyle(..), defaultInitialTextStyle, defaultModifyTextStyle
) where
import Data.Functor.Identity (Identity(..))
import Data.Monoid ((<>))
import GHC.Generics (Generic)
import qualified Rank2
import Rank2 (apply)
import Reflex.Class (Event, Reflex, neve... |
783bbbe3ea8f60c160373bcb5e5157c446f3e3c8ec5336cf7b7029ca341bd3de | pilosus/dienstplan | endpoints_test.clj | Copyright ( c ) 2021 - 2022 and contributors . All rights reserved .
;;
;; This program and the accompanying materials are made available under the
terms of the Eclipse Public License 2.0 which is available at
;; -2.0.
;;
This Source Code may also be made available under the following Secondary
Licenses when ... | null | https://raw.githubusercontent.com/pilosus/dienstplan/f301b7a69e6a4fb668d131a50f3a412c85ee75d5/test/dienstplan/endpoints_test.clj | clojure |
This program and the accompanying materials are made available under the
-2.0.
Public License, v. 2.0 are satisfied: GNU General Public License as published by
| Copyright ( c ) 2021 - 2022 and contributors . All rights reserved .
terms of the Eclipse Public License 2.0 which is available at
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the Eclipse
the Free Software Foundatio... |
46592e81208e7b7036222c7c9b615cc94507d3879743566be35f960337d78658 | testcontainers/testcontainers-hs | Network.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module TestContainers.Docker.Network
( -- * Network
NetworkId,
Network,
networkId,
-- * Creating networks
createNetwork,
NetworkRequest,
networkRequest,
withDrive... | null | https://raw.githubusercontent.com/testcontainers/testcontainers-hs/e4d575516a8b95c708de57f5f0b77bd5e509c818/src/TestContainers/Docker/Network.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
* Network
* Creating networks
| Returns the id of the network.
Creating the network with the reaper labels ensures cleanup
at the end of the session
N.B. Force to not leak STDOUT String | # LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
module TestContainers.Docker.Network
NetworkId,
Network,
networkId,
createNetwork,
NetworkRequest,
networkRequest,
withDriver,
withIpv6,
)
where
import Control.Monad (replicateM)
import Control.Monad.Reader (ask)
import Data.T... |
af1a74bf6d72b42fd965fd1efc5b6890ba57408c78433de14584b54de17a9c7d | tezos/tezos-mirror | sc_rollup_services.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs , < >
Copyright ( c ) 2023... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/adb9ff09cb5f0a9cae8c8d8924efee6c4764399a/src/proto_016_PtMumbai/lib_sc_rollup_layer2/sc_rollup_services.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs , < >
Copyright ( c ) 2023 TriliTech < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHO... |
36b1f8302b6f0cebe9eb4fdac81ac4757484ba0a17fc082195f260051776f0ab | samply/blaze | spec.clj | (ns blaze.thread-pool-executor-collector.spec
(:require
[clojure.spec.alpha :as s])
(:import
[java.util.concurrent ThreadPoolExecutor]))
(defn thread-pool-executor? [x]
(instance? ThreadPoolExecutor x))
(s/def :blaze.thread-pool-executor-collector/executors
(s/map-of keyword? thread-pool-executor?))... | null | https://raw.githubusercontent.com/samply/blaze/dc0d7793bd1b8a6a9025798c99524ffa5dad9cab/modules/thread-pool-executor-collector/src/blaze/thread_pool_executor_collector/spec.clj | clojure | (ns blaze.thread-pool-executor-collector.spec
(:require
[clojure.spec.alpha :as s])
(:import
[java.util.concurrent ThreadPoolExecutor]))
(defn thread-pool-executor? [x]
(instance? ThreadPoolExecutor x))
(s/def :blaze.thread-pool-executor-collector/executors
(s/map-of keyword? thread-pool-executor?))... | |
90839bbc80039b8c9dc766af5affd9ee4c1115d3e7f37fe52ad47c7fce2b2d8b | kloimhardt/bb-web | parinfer_codemirror.clj | ;; this file is a modified copy of
;; -web-app-example
;; src/server/core.clj
(ns parinfer-codemirror)
(require
'[org.httpkit.server :as http]
'[reitit.ring :as ring]
'[ring.middleware.defaults
:refer [wrap-defaults api-defaults]]
'[ring.util.request :as request]
'[ring.util.response :as response]
'[cl... | null | https://raw.githubusercontent.com/kloimhardt/bb-web/820bd42d8fe5624bbd3d84e3a40be4368b125961/examples/parinfer_codemirror.clj | clojure | this file is a modified copy of
-web-app-example
src/server/core.clj |
(ns parinfer-codemirror)
(require
'[org.httpkit.server :as http]
'[reitit.ring :as ring]
'[ring.middleware.defaults
:refer [wrap-defaults api-defaults]]
'[ring.util.request :as request]
'[ring.util.response :as response]
'[clojure.java.io :as io]
'[clojure.java.browse :as browse])
(def file-to-edit ... |
3e15aaacb86cd3dbe0cc3340797295447f03107e1d4715d24b5c9c4b82af9b2b | benoitc/econfig | econfig_watcher_sup.erl | %%% -*- erlang -*-
%%%
This file is part of econfig released under the Apache 2 license .
%%% See the NOTICE for more information.
%% @hidden
-module(econfig_watcher_sup).
-behaviour(supervisor).
-export([start_watcher/2, start_watcher/3]).
-export([start_link/0, stop/1]).
-export([init/1]).
start_watcher(Confi... | null | https://raw.githubusercontent.com/benoitc/econfig/84d7cec15f321c4ac5f5c6e08e5a9a8adea01986/src/econfig_watcher_sup.erl | erlang | -*- erlang -*-
See the NOTICE for more information.
@hidden | This file is part of econfig released under the Apache 2 license .
-module(econfig_watcher_sup).
-behaviour(supervisor).
-export([start_watcher/2, start_watcher/3]).
-export([start_link/0, stop/1]).
-export([init/1]).
start_watcher(ConfigName, Path) ->
supervisor:start_child(?MODULE, [ConfigName, Path]).
st... |
fd84adaa07f65fdc62eeaf6c75d2992b775d2cf17f621d358f95e46b2676ffc2 | wwezhuimeng/kazoo | gm_soak_test.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License at
%% /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/wwezhuimeng/kazoo/06a15811dbf123ae1601dc7a4ced956a7e04f58a/deps/rabbitmq_server-3.3.5/src/gm_soak_test.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
/
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
---------------... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved .
-module... |
89ab1fea17642046c006751f53e0ae343982f288920a81773bab1f58f670e044 | robrix/starlight | Label.hs | # LANGUAGE DataKinds #
# LANGUAGE DisambiguateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE NamedFieldPuns #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
module UI.Label
( Label
, label
, labelSize
, setLabel
, drawLabel
) where
import Control.Carrier.Reader
import Control.Eff... | null | https://raw.githubusercontent.com/robrix/starlight/ad80ab74dc2eedbb52a75ac8ce507661d32f488e/src/UI/Label.hs | haskell | | Set the label’s text.
add
FIXME: use :*: to combine the interleaved vertex buffer with the non-interleaved offset in the vertices
FIXME: make a single draw call | # LANGUAGE DataKinds #
# LANGUAGE DisambiguateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE NamedFieldPuns #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
module UI.Label
( Label
, label
, labelSize
, setLabel
, drawLabel
) where
import Control.Carrier.Reader
import Control.Eff... |
cd9579409e8579ac6cd5da67c9b137a1305fc36a3f060e23e8183fcfc3fb3f66 | thi-ng/demos | nav.cljs | (ns ex04.nav
(:require
[ex04.state :as state]
[ex04.router :as router]))
(defn nav-bar
[routes]
[:nav
(->> routes
(filter :nav?)
(map-indexed
(fn [i {:keys [label] :as route}]
[:a {:key (str "nav" i)
:href (router/format-route route {})
... | null | https://raw.githubusercontent.com/thi-ng/demos/048cd131099a7db29be56b965c053908acad4166/ws-ldn-9/day3/ex04/src/ex04/nav.cljs | clojure | (ns ex04.nav
(:require
[ex04.state :as state]
[ex04.router :as router]))
(defn nav-bar
[routes]
[:nav
(->> routes
(filter :nav?)
(map-indexed
(fn [i {:keys [label] :as route}]
[:a {:key (str "nav" i)
:href (router/format-route route {})
... | |
e66b0bf2a4a18e9b5f477cdfa591468c2ae48ac0f2c6f02c3824606f7c132660 | cyga/real-world-haskell | toupper-lazy3.hs | -- file: ch07/toupper-lazy3.hs
import Data.Char(toUpper)
main = do
inpStr <- readFile "input.txt"
writeFile "output.txt" (map toUpper inpStr)
| null | https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch07/toupper-lazy3.hs | haskell | file: ch07/toupper-lazy3.hs | import Data.Char(toUpper)
main = do
inpStr <- readFile "input.txt"
writeFile "output.txt" (map toUpper inpStr)
|
d30ba497d0daa0f0858d836842d81d763dc135a70a4112d0a9f6e1a292de4bf9 | may-liu/qtalk | http_getonlineuser.erl | %% Feel free to use, reuse and abuse the code in this file.
-module(http_getonlineuser).
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
-include("logger.hrl").
-include("http_req.hrl").
-include("ejb_http_server.hrl").
init(_Transport, Req, []) ->
{ok, Req, undefined}.
handle(Req, State) ->
{Met... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/scripts/ejb_http_server/src/http_getonlineuser.erl | erlang | Feel free to use, reuse and abuse the code in this file. |
-module(http_getonlineuser).
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
-include("logger.hrl").
-include("http_req.hrl").
-include("ejb_http_server.hrl").
init(_Transport, Req, []) ->
{ok, Req, undefined}.
handle(Req, State) ->
{Method, Req} = cowboy_req:method(Req),
catch ejb_monitor:mo... |
c0cf9f46974b2f198c6807c33c726562e752821fee056b798533d77f98550bf5 | DomainDrivenArchitecture/dda-pallet | node.clj | Licensed to the Apache Software Foundation ( ASF ) under one
; or more contributor license agreements. See the NOTICE file
; distributed with this work for additional information
; regarding copyright ownership. The ASF licenses this file
to you under the Apache License , Version 2.0 ( the
... | null | https://raw.githubusercontent.com/DomainDrivenArchitecture/dda-pallet/aa251ac1c678a46ef9183d9fb2d447c4f77a99d3/main/src/dda/pallet/dda_config_crate/infra/node.clj | clojure | or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
"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 b... | Licensed to the Apache Software Foundation ( ASF ) under one
to you under the Apache License , Version 2.0 ( the
distributed under the License is distributed on an " AS IS " BASIS ,
(ns dda.pallet.dda-config-crate.infra.node
(:require
[pallet.api :as api])
(:gen-class :main true))
(defrecord Node
[hos... |
dac7e3cb11c59bebeeb77b4a68c00e1cbd9f2f64c41e6c393ac1062f70781eba | janestreet/merlin-jst | tast_iterator.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/janestreet/merlin-jst/980b574405617fa0dfb0b79a84a66536b46cd71b/upstream/ocaml_flambda/typing/tast_iterator.ml | ocaml | ************************************************************************
OCaml
... | Isaac " " Avram
Copyright 2019 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Asttypes
open Typedtree
type iterator =
{
binding_op: iterator -> binding_op -> unit;
... |
096906d8763b5d1e1cbfde7d120d4acdc92140b7180b9f8efbb70ee6929b2c24 | EFanZh/EOPL-Exercises | exercise-5.x-exceptions-lang.rkt | #lang eopl
;; Grammar.
(define the-lexical-spec
'([whitespace (whitespace) skip]
[comment ("%" (arbno (not #\newline))) skip]
[identifier (letter (arbno (or letter digit "_" "-" "?"))) symbol]
[number (digit (arbno digit)) number]
[number ("-" digit (arbno digit)) number]))
(define the-grammar
'(... | null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/solutions/exercise-5.x-exceptions-lang.rkt | racket | Grammar.
Data structures.
Interpreter. | #lang eopl
(define the-lexical-spec
'([whitespace (whitespace) skip]
[comment ("%" (arbno (not #\newline))) skip]
[identifier (letter (arbno (or letter digit "_" "-" "?"))) symbol]
[number (digit (arbno digit)) number]
[number ("-" digit (arbno digit)) number]))
(define the-grammar
'([program (ex... |
783a518e95e0ba202ae5fdd84bc5b8e304e33d81d8dea0c68159c3f9ff962639 | nationalarchives/miiify | header.ml | let gen_uuid () =
Uuidm.v4_gen (Random.State.make_self_init ()) () |> Uuidm.to_string
let get_id message =
match Dream.header message "Slug" with
| None -> gen_uuid ()
| Some slug -> slug
let get_if_none_match message = Dream.header message "If-None-Match"
let get_if_match message = Dream.header message "If-M... | null | https://raw.githubusercontent.com/nationalarchives/miiify/099ceb026fe2a92eecb2079b003850cf893b956a/lib/header.ml | ocaml | let gen_uuid () =
Uuidm.v4_gen (Random.State.make_self_init ()) () |> Uuidm.to_string
let get_id message =
match Dream.header message "Slug" with
| None -> gen_uuid ()
| Some slug -> slug
let get_if_none_match message = Dream.header message "If-None-Match"
let get_if_match message = Dream.header message "If-M... | |
b17d9232d619b43b0db7a55bc84f5525f080aacd7753c10acdec90a155b4dd5c | aws-beam/aws-erlang | aws_waf_regional.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
%% @doc This is AWS WAF Classic Regional documentation.
%%
%% For more information, see AWS WAF Classic in the developer guide.
%%
%% For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS
%% WAF Developer Guide.... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_waf_regional.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
@doc This is AWS WAF Classic Regional documentation.
For more information, see AWS WAF Classic in the developer guide.
For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS
WAF Developer Guide. With the latest version, AWS WAF has a single set of
end... | See -beam/aws-codegen for more details .
Classic with the AWS resources , Elastic Load Balancing ( ELB ) Application
types listed in the reference are available for protecting Elastic Load
For detailed information about AWS WAF Classic features and an overview of
-module(aws_waf_regional).
-export([associate_... |
c2614044c0ff63789d1ca55242532c877ca547403940d408301bc13a34ddac00 | janegca/htdp2e | 0405-SP-Itemization-RocketLaunch-v2.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-beginner-reader.ss" "lang")((modname 0405-SP-Itemization-RocketLaunch-v2) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpac... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/01-FixedSizeData/0405-SP-Itemization-RocketLaunch-v2.rkt | racket | about the language level of this file in a form that our tools can easily process.
NOTE: this version includes the revised 'show' function from Ex 51
and the development of the 'fly' function
Design a program that launches a rocket when the user presses the space bar.
displays the scenery of a rising rock... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 0405-SP-Itemization-RocketLaunch-v2) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor... |
a8425ef681c454788578f805f25a7f30e5e6f519e83b549874ac5936b6efbeb5 | ocaml-community/obus | uDisks_expander.mli |
* uDisks_expander.mli
* -------------------
* Copyright : ( c ) 2010 , < >
* Licence : BSD3
*
* This file is a part of obus , an ocaml implementation of D - Bus .
* uDisks_expander.mli
* -------------------
* Copyright : (c) 2010, Jeremie Dimino <>
* Licence : BSD3
*
* This file is a ... | null | https://raw.githubusercontent.com/ocaml-community/obus/8d38ee6750587ae6519644630b75d53a0a011acd/bindings/udisks/uDisks_expander.mli | ocaml | * UDisks expander interface |
* uDisks_expander.mli
* -------------------
* Copyright : ( c ) 2010 , < >
* Licence : BSD3
*
* This file is a part of obus , an ocaml implementation of D - Bus .
* uDisks_expander.mli
* -------------------
* Copyright : (c) 2010, Jeremie Dimino <>
* Licence : BSD3
*
* This file is a ... |
770b307584afbfe6822dca73c8dfd38e8595d951a24079675fe1559b008caec3 | metaocaml/ber-metaocaml | t251-pushoffsetclosurem2.ml | TEST
include tool - ocaml - lib
flags = " -w a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
let rec f _ = 4
and g _ = f 2
in
if g 5 <> 4 then raise Not_fou... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/tool-ocaml/t251-pushoffsetclosurem2.ml | ocaml | TEST
include tool - ocaml - lib
flags = " -w a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
let rec f _ = 4
and g _ = f 2
in
if g 5 <> 4 then raise Not_fou... | |
ea9d07ff1363d6ff72456610e1dcee575339f7f3bd4e33de068e635e4558c100 | vouillon/osm | query.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/a42d1bcc82a4ad73c26c81ac7a75f9f1c7470344/database/query.ml | ocaml | 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... | |
fd3dd5d2d0ce85f14adb9c3d0d1164de7fd0e7297d1202cc48f8ca5dbf975a82 | ocaml-sf/learn-ocaml-corpus | tree_weird_size.ml | (* Basic constructor functions. *)
let empty : 'a enum =
fun _s ->
Seq.empty
let just (x : 'a) : 'a enum =
fun s ->
if s = 0 then Seq.singleton x else Seq.empty
let pay (enum : 'a enum) : 'a enum =
fun s ->
(* Treating [s = 0] as a special case is required, because we have asked
the student ... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/enumerating_trees/wrong/tree_weird_size.ml | ocaml | Basic constructor functions.
Treating [s = 0] as a special case is required, because we have asked
the student to guarantee that every size argument [s] ever passed to
an enumeration is nonnegative.
Derived constructor functions. |
let empty : 'a enum =
fun _s ->
Seq.empty
let just (x : 'a) : 'a enum =
fun s ->
if s = 0 then Seq.singleton x else Seq.empty
let pay (enum : 'a enum) : 'a enum =
fun s ->
if s = 0 then Seq.empty else enum (s-1)
let sum (enum1 : 'a enum) (enum2 : 'a enum) : 'a enum =
fun s ->
Seq.sum (enum1 ... |
49e68a429a904502c21055eecc0baf73339052e0ccce5456129380305f74df9b | chenyukang/eopl | environments.scm | ;;;;;;;;;;;;;;;; initial environment ;;;;;;;;;;;;;;;;
;; init-env : () -> environment
;; (init-env) builds an environment in which i is bound to the
expressed value 1 , v is bound to the expressed value 5 , and x is
bound to the expressed value 10 .
(define init-env
(lambda ()
(extend-env1
... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch9/base/classes/environments.scm | scheme | initial environment ;;;;;;;;;;;;;;;;
init-env : () -> environment
(init-env) builds an environment in which i is bound to the
environment constructors and observers ;;;;;;;;;;;;;;;;
location : Sym * Listof(Sym) -> Maybe(Int)
else (location sym syms) = #f
|
expressed value 1 , v is bound to the expressed value 5 , and x is
bound to the expressed value 10 .
(define init-env
(lambda ()
(extend-env1
'i (newref (num-val 1))
(extend-env1
'v (newref (num-val 5))
(extend-env1
'x (newref (num-val 10))
(empty-env)))))... |
6627af98c339c491e017b6a28ff9cfd5095aa2a27bf4fe0fa511c84689ba2eec | metosin/compojure-api | handler.clj | (ns example.handler
(:require [compojure.api.sweet :refer :all]
[ring.util.http-response :refer :all]
[ring.util.http-status :as http-status]
[schema.core :as s]))
;;
Schemas
;;
(s/defschema Pizza
{:id s/Int
:name s/Str
(s/optional-key :description) s/Str
:size (s/en... | null | https://raw.githubusercontent.com/metosin/compojure-api/5c88f32fe56cdb6fcdb3cc506bb956943fcd8c17/examples/resources/src/example/handler.clj | clojure |
Application
| (ns example.handler
(:require [compojure.api.sweet :refer :all]
[ring.util.http-response :refer :all]
[ring.util.http-status :as http-status]
[schema.core :as s]))
Schemas
(s/defschema Pizza
{:id s/Int
:name s/Str
(s/optional-key :description) s/Str
:size (s/enum :L ... |
b9f8609e50815d9c6a25e6c6968ebdcbbd0122558284b1e341413ce5ab715763 | kovisoft/slimv | ecl.lisp | ;;;; -*- indent-tabs-mode: nil -*-
;;;
swank-ecl.lisp --- SLIME backend for ECL .
;;;
;;; This code has been placed in the Public Domain. All warranties
;;; are disclaimed.
;;;
Administrivia
(defpackage swank/ecl
(:use cl swank/backend))
(in-package swank/ecl)
(eval-when (:compile-toplevel :load-toplevel :ex... | null | https://raw.githubusercontent.com/kovisoft/slimv/cf8334cb7d71bf9793cb5588497b4fe15e501626/slime/swank/ecl.lisp | lisp | -*- indent-tabs-mode: nil -*-
This code has been placed in the Public Domain. All warranties
are disclaimed.
Hard dependencies.
Soft dependencies.
UTF8
Convert the string STRING to a (simple-array (unsigned-byte 8)).
string-to-utf8 (string)
utf8-to-string (octets)
TCP Server
add-sigio-handler (s... | swank-ecl.lisp --- SLIME backend for ECL .
Administrivia
(defpackage swank/ecl
(:use cl swank/backend))
(in-package swank/ecl)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defun ecl-version ()
(let ((version (find-symbol "+ECL-VERSION-NUMBER+" :EXT)))
(if version
(symbol-value... |
49e10c5b41e1bf87f176fa02738b976918b76c78cd3261e418f5d8e782b6d32a | geophf/1HaskellADay | Solution.hs | module Y2018.M10.D09.Solution where
-
Yesterday we picked some ids from our ' database ' of ids for screening . Today ,
we are given a set of ids to add to our database or to update information . So ,
we need to determine from the below list , what are new ids and what are pre-
existing ones , given our databa... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M10/D09/Solution.hs | haskell | }
and a little Frege logic (with monoids!) to determine status
} | module Y2018.M10.D09.Solution where
-
Yesterday we picked some ids from our ' database ' of ids for screening . Today ,
we are given a set of ids to add to our database or to update information . So ,
we need to determine from the below list , what are new ids and what are pre-
existing ones , given our databa... |
d7660bf392af8695b73c49fe2da2b36a273ac844d6749eed4f99ca44705a3b11 | airbus-seclab/bincat | decodeutils.ml | open Data
open Asm
(************************************************************************)
(* Generic Helpers *)
(************************************************************************)
(** [const c sz] builds the asm constant of size _sz_ from int _c_ *)
let const c sz = Const (Word.of_int (Z.of_int c) sz)
(**... | null | https://raw.githubusercontent.com/airbus-seclab/bincat/7d4a0b90cf950c0f43e252602a348cf9e2f858ba/ocaml/src/disassembly/decodeutils.ml | ocaml | **********************************************************************
Generic Helpers
**********************************************************************
* [const c sz] builds the asm constant of size _sz_ from int _c_
* [zconst c sz] builds the asm constant of size _sz_ from Z.t _c_
* [sconst c isz sz] builds ... | open Data
open Asm
let const c sz = Const (Word.of_int (Z.of_int c) sz)
let zconst c sz = Const (Word.of_int c sz)
let sconst c isz sz = Const (Word.of_int (Z.signed_extract (Z.of_int c) 0 isz) sz)
let const_of_Z z sz = Const (Word.of_int z sz)
* [ one8 ] an asm Const of 8 bits with value 1
let one... |
b356af123da6dde4687b4faba79b4ca9648cca137f72e757e85a9822079e0882 | haskell-suite/haskell-names | ExportList2.hs | module ExportList2 (b, c) where
data A
= A { b :: A }
| B { b :: A, d :: A }
c = b
| null | https://raw.githubusercontent.com/haskell-suite/haskell-names/795d717541484dbe456342a510ac8e712e1f16e4/tests/exports/ExportList2.hs | haskell | module ExportList2 (b, c) where
data A
= A { b :: A }
| B { b :: A, d :: A }
c = b
| |
b7045cb89efafe506bda2449a204f79c22d4e62f1482e6fa49f33aaeeb0cf1db | webnf/webnf | colors.cljs | (ns webnf.mui.colors)
(def all-colors
{:red
{:p50 "#fde0dc"
:p100 "#f9bdbb"
:p200 "#f69988"
:p300 "#f36c60"
:p400 "#e84e40"
:p500 "#e51c23"
:p600 "#dd191d"
:p700 "#d01716"
:p800 "#c41411"
:p900 "#b0120a"
:a100 "#ff7997"
:a200 "#ff5177"
:a400 "#ff2d6f"
:a700 "#e... | null | https://raw.githubusercontent.com/webnf/webnf/6a2ccaa755e6e40528eb13a5c36bae16ba4947e7/cljs/src/webnf/mui/colors.cljs | clojure | (ns webnf.mui.colors)
(def all-colors
{:red
{:p50 "#fde0dc"
:p100 "#f9bdbb"
:p200 "#f69988"
:p300 "#f36c60"
:p400 "#e84e40"
:p500 "#e51c23"
:p600 "#dd191d"
:p700 "#d01716"
:p800 "#c41411"
:p900 "#b0120a"
:a100 "#ff7997"
:a200 "#ff5177"
:a400 "#ff2d6f"
:a700 "#e... | |
639c3b88f53e29acaa7d88a4f204326d4cd0d4ba576c72610c1f89f8c96f12ac | yitzchak/common-lisp-jupyter | comm.lisp | (in-package #:jupyter)
(defclass comm (source)
((comm-id
:initarg :comm-id
:initform (make-uuid)
:reader comm-id)
(target-name
:initarg :target-name
:reader comm-target-name)
(kernel
:initarg :kernel
:initform *kernel*
:reader comm-kernel)
(on-close
:initarg :on-... | null | https://raw.githubusercontent.com/yitzchak/common-lisp-jupyter/c69f3047c22492937702b953b39ff63143e1e1e0/src/comm.lisp | lisp | (in-package #:jupyter)
(defclass comm (source)
((comm-id
:initarg :comm-id
:initform (make-uuid)
:reader comm-id)
(target-name
:initarg :target-name
:reader comm-target-name)
(kernel
:initarg :kernel
:initform *kernel*
:reader comm-kernel)
(on-close
:initarg :on-... | |
3992d82c6e47cdf2fe8e9c5a7425e3305ba62eea64d107c9963934d0a2a50ded | ucsd-progsys/nate | exam0.ml | (*F*)
let f x y =
let w = y + 1 in
w :: y
| null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/easyocaml-additional/exams/exam0.ml | ocaml | F | let f x y =
let w = y + 1 in
w :: y
|
06aff6304cb7ee2b6eea39af31ec653a986da6454e745afeb79b8f700e41c7e2 | drewt/scmus | bindings-view.scm | ;;
Copyright 2014 - 2020
;;
;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
;; License, or (at your option) any later version.
;;
;; This program is distributed in ... | null | https://raw.githubusercontent.com/drewt/scmus/5041ec376cb17db463117b8fa212b16b23fe770d/src/bindings-view.scm | scheme |
This program is free software; you can redistribute it and/or
either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS... | Copyright 2014 - 2020
modify it under the terms of the GNU General Public License as
You should have received a copy of the GNU General Public License
(declare (hide))
(import (drewt ncurses)
(scmus base)
(scmus error)
(scmus event)
(scmus keys)
(scmus tui)
(scm... |
4db4d1c4cced09ccbebe73db0aa97b1518319cf95d5220832914d593636fcd83 | ocaml/oasis-db | ODBUpload.ml |
* Upload procedure , to upload a new package version
@author
@author Sylvain Le Gall
*)
open ODBTypes
open ODBCompletion
open ODBPkgVer
open ODBGettext
open Lwt
type 'a t =
{
tarball_content: string;
(* Content of the tarball *)
tarball_nm: filename;
(* File name of... | null | https://raw.githubusercontent.com/ocaml/oasis-db/f8b19d431102b5c5b7dced00a5242a5366ad263f/src/lib/ODBUpload.ml | ocaml | Content of the tarball
File name of the tarball
Public URL
Completion result
Date of upload
Method of upload
Where the package's version will be stored
Inject the newly created package version into the storage
Clean environment |
* Upload procedure , to upload a new package version
@author
@author Sylvain Le Gall
*)
open ODBTypes
open ODBCompletion
open ODBPkgVer
open ODBGettext
open Lwt
type 'a t =
{
tarball_content: string;
tarball_nm: filename;
publink: url option;
completion: ODBComple... |
3f5a3bd7759c2055b469356f579550b670e008b74da2e0a61367e2286161db5f | Toxaris/pts | Tests.hs | module PTS.Syntax.Substitution.Tests where
import Test.Framework (testGroup)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.Framework.Providers.HUnit
import Test.HUnit (assertBool)
import PTS.Syntax
import PTS.Instances
import qualified PTS.Syntax.Substitution.Properties as Prop
import Test.P... | null | https://raw.githubusercontent.com/Toxaris/pts/1700024f47bc9d28528b68fc815d2421f5d25b84/src-test/PTS/Syntax/Substitution/Tests.hs | haskell | module PTS.Syntax.Substitution.Tests where
import Test.Framework (testGroup)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.Framework.Providers.HUnit
import Test.HUnit (assertBool)
import PTS.Syntax
import PTS.Instances
import qualified PTS.Syntax.Substitution.Properties as Prop
import Test.P... | |
b10063f1708e41341a79635e77b94862df1b6be5e2b16a6ddd4f5917b2035a68 | quil-lang/sbcl-librarian | environment.lisp | ;;;; This file exposes some environment related functions to the Lisp
;;;; runtime, so that we can manage things like Lisp threads, signals,
;;;; and entry into the Lisp debugger for interaction with foreign
;;;; code.
(in-package #:sbcl-librarian)
(defun enable-debugger ()
(setq sb-ext:*invoke-debugger-hook*
... | null | https://raw.githubusercontent.com/quil-lang/sbcl-librarian/8744f78932feb8aad361afa9001e076c41154e30/src/environment.lisp | lisp | This file exposes some environment related functions to the Lisp
runtime, so that we can manage things like Lisp threads, signals,
and entry into the Lisp debugger for interaction with foreign
code.
This is a huge hack messing with the internals of the
foreign callback threads could ever want to hijack the
main ... |
(in-package #:sbcl-librarian)
(defun enable-debugger ()
(setq sb-ext:*invoke-debugger-hook*
(lambda (condition old-hook)
(let ((sb-ext:*invoke-debugger-hook* nil))
session thread state in SBCL . SBCL does n't know that
(push sb-thread::*current-thread*
(sb-thread::s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.