_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 |
|---|---|---|---|---|---|---|---|---|
cb76a445479d53a5f7b5a2ba951ef9746315593c73c484cfb3bb23844925618f | fulcrologic/semantic-ui-wrapper | ui_form_dropdown.cljc | (ns com.fulcrologic.semantic-ui.collections.form.ui-form-dropdown
(:require
[com.fulcrologic.semantic-ui.factory-helpers :as h]
#?(:cljs ["semantic-ui-react$FormDropdown" :as FormDropdown])))
(def ui-form-dropdown
"Sugar for <Form.Field control={Dropdown} />.
Props:
- as (elementType): An element ... | null | https://raw.githubusercontent.com/fulcrologic/semantic-ui-wrapper/7bd53f445bc4ca7e052c69596dc089282671df6c/src/main/com/fulcrologic/semantic_ui/collections/form/ui_form_dropdown.cljc | clojure | (ns com.fulcrologic.semantic-ui.collections.form.ui-form-dropdown
(:require
[com.fulcrologic.semantic-ui.factory-helpers :as h]
#?(:cljs ["semantic-ui-react$FormDropdown" :as FormDropdown])))
(def ui-form-dropdown
"Sugar for <Form.Field control={Dropdown} />.
Props:
- as (elementType): An element ... | |
f6a3c2bed3fd775059319ea1a7c8dff89f193717b3f0d73bde1fcd5fa9c80f7a | helium/blockchain-node | bn_peer.erl | -module(bn_peer).
-include("bn_jsonrpc.hrl").
-behavior(bn_jsonrpc_handler).
-export([handle_rpc/2]).
%%
%% jsonrpc_handler
%%
handle_rpc(<<"peer_book_self">>, []) ->
peer_book_response(self);
handle_rpc(_, _) ->
?jsonrpc_error(method_not_found).
%%
Internal
%%
peer_book_response(self) ->
TID = blockc... | null | https://raw.githubusercontent.com/helium/blockchain-node/f565512f2815a5fbb7f149742de419d441f40859/src/bn_peer.erl | erlang |
jsonrpc_handler
| -module(bn_peer).
-include("bn_jsonrpc.hrl").
-behavior(bn_jsonrpc_handler).
-export([handle_rpc/2]).
handle_rpc(<<"peer_book_self">>, []) ->
peer_book_response(self);
handle_rpc(_, _) ->
?jsonrpc_error(method_not_found).
Internal
peer_book_response(self) ->
TID = blockchain_swarm:tid(),
Peerbook ... |
cb83c894a5d5c42199593bacae8a9b139622b51b837dab9fd368032e4df22fff | rescript-lang/rescript-compiler | super_env.ml | let fprintf = Format.fprintf
(* taken from -lang/ocaml/blob/d4144647d1bf9bc7dc3aadc24c25a7efa3a67915/typing/env.ml#L1842 *)
(* modified branches are commented *)
let report_error ppf = function
| Env.Illegal_renaming(name, modname, _filename) ->
(* modified *)
fprintf ppf
"@[You referred to the module ... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/fdec0e723ac41577206fd161a6aeab0f3731d554/jscomp/super_errors/super_env.ml | ocaml | taken from -lang/ocaml/blob/d4144647d1bf9bc7dc3aadc24c25a7efa3a67915/typing/env.ml#L1842
modified branches are commented
modified
modified
This will be called in super_main. This is how you'd override the default error printer from the compiler & register new error_of_exn handlers | let fprintf = Format.fprintf
let report_error ppf = function
| Env.Illegal_renaming(name, modname, _filename) ->
fprintf ppf
"@[You referred to the module %s, but we've found one called %s instead.@ \
Is the name's casing right?@]"
name modname
| Inconsistent_import(name, source1, source2) -... |
d398b2ba4b3c8127300d68192e0bd1fd7dc49cdf6151c19148c5f2082b3413c1 | BranchTaken/Hemlock | test_source_directive.ml | open! Basis.Rudiments
open! Basis
open! Hmc
open! ScanTest
let test () =
scan_str {|[:"Foo.hm":42:0+13]|};
scan_str {|[:"Foo.hm":42:8+13]|};
scan_str {|[:"Foo.hm":42]|};
scan_str {|[:"Foo.hm"]|};
scan_str {|[:42:0+13]|};
scan_str {|[:42]|};
scan_str {|[:]|};
scan_str {|[:1:0]|};
scan_str {|[:1012345... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/32a1c18af4a55b82b4f6a4db78a756e67ef5acae/bootstrap/test/hmc/scan/test_source_directive.ml | ocaml | Errors. | open! Basis.Rudiments
open! Basis
open! Hmc
open! ScanTest
let test () =
scan_str {|[:"Foo.hm":42:0+13]|};
scan_str {|[:"Foo.hm":42:8+13]|};
scan_str {|[:"Foo.hm":42]|};
scan_str {|[:"Foo.hm"]|};
scan_str {|[:42:0+13]|};
scan_str {|[:42]|};
scan_str {|[:]|};
scan_str {|[:1:0]|};
scan_str {|[:1012345... |
6fdc0820b621d6c216cc2f07d1850c1fb1890ff5831066fb80c48815f0d212da | elaforge/karya | Gamakam2.hs | Copyright 2014
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
| Calls for .
module Derive.C.India.Gamakam2 where
import qualified Control.Monad.State.Strict as Monad.State
import qualified Data.List.NonEmpty as NonEmpty
import qualified Data.Tex... | null | https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Derive/C/India/Gamakam2.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
| Calls in these modules are meant to be used via the sequence call, so they
are only in scope under the relevant phase.
Pitch
| I don't want to take up short names for the whole track scope, but within
a s... | Copyright 2014
| Calls for .
module Derive.C.India.Gamakam2 where
import qualified Control.Monad.State.Strict as Monad.State
import qualified Data.List.NonEmpty as NonEmpty
import qualified Data.Text as Text
import qualified Util.Doc as Doc
import qualified Util.Pretty as Pretty
import qualified Util.Seq as S... |
81ea4f12a930eb8388539fe7f322ba48acbb3b0d91f56c239b5ad89dd19b3c99 | biocaml/biocaml | biocaml_app_bed_operations.ml | open Core.Std
open Flow
open Biocaml_app_common
let load ~on_output ?(max_read_bytes = Int.max_value) filename =
let tags =
match Biocaml_tags.guess_from_filename filename with
| Ok o -> o
| Error e -> `bed
in
let parsing_transform =
match tags with
| `bed ->
Biocaml_transform.on_output... | null | https://raw.githubusercontent.com/biocaml/biocaml/ac619539fed348747d686b8f628e80c1bb8bfc59/src/tmp/biocaml_app_bed_operations.ml | ocaml | open Core.Std
open Flow
open Biocaml_app_common
let load ~on_output ?(max_read_bytes = Int.max_value) filename =
let tags =
match Biocaml_tags.guess_from_filename filename with
| Ok o -> o
| Error e -> `bed
in
let parsing_transform =
match tags with
| `bed ->
Biocaml_transform.on_output... | |
0a729d022e5fd93371b02d3c63dbadb3c143d357155cf09fab7f128e4d8dee5b | typelead/etlas | AnnotatedId.hs | module Distribution.Types.AnnotatedId (
AnnotatedId(..)
) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Package
import Distribution.Types.ComponentName
| An ' AnnotatedId ' is a ' ComponentId ' , ' UnitId ' , etc .
-- which is annotated with some other useful information
-- tha... | null | https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas-cabal/Distribution/Types/AnnotatedId.hs | haskell | which is annotated with some other useful information
that is useful for printing to users, etc. | module Distribution.Types.AnnotatedId (
AnnotatedId(..)
) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Package
import Distribution.Types.ComponentName
| An ' AnnotatedId ' is a ' ComponentId ' , ' UnitId ' , etc .
data AnnotatedId id = AnnotatedId {
ann_pid :: Packag... |
a567280a0cebcdca7992f91978de0e49cac90f88d68d2d08597316c3bd66a70d | vaclavsvejcar/headroom | ConfigSpec.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NoImplicitPrelude #
module Headroom.ConfigSpec
( spec
)
where
import Headroom.Config
import Headroom.Embedded (defaultConfig)
import RIO
import Test.Hspec
spec :: Spec
spec = do
describe "parseAppConfig" $ do
it "should parse default bundled configura... | null | https://raw.githubusercontent.com/vaclavsvejcar/headroom/3b20a89568248259d59f83f274f60f6e13d16f93/test/Headroom/ConfigSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
module Headroom.ConfigSpec
( spec
)
where
import Headroom.Config
import Headroom.Embedded (defaultConfig)
import RIO
import Test.Hspec
spec :: Spec
spec = do
describe "parseAppConfig" $ do
it "should parse default bundled configuration" $ do
parseAppConf... |
d431fb623d7aa9d3e00dc05f75d381d9f71be40345d04801ac662d19c631ac63 | facebook/duckling | TA.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE GADTs #-}
module Duckling.Rules.TA
( defaultRules
, langRules
, localeRules
) where
imp... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Rules/TA.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE GADTs # | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Rules.TA
( defaultRules
, langRules
, localeRules
) where
import Duckling.Dimensions.Types
import Duckling.Locale
import Duckling.Types
import qualified Duckling.Numeral.TA.Rules as Numeral
import qualified Duckling.Ordinal.TA.Rules as Ordinal... |
e40e6e5d80187a9e4af1b19a27873503fbf0864d7765314456995aa1e2689ead | jspahrsummers/objective-clojure | test.clj | (ns objclj.test
(:use clojure.test))
(defmacro is=
"Asserts that the given arguments compare equal."
[a b & msg]
`(is (= ~a ~b) ~@msg))
(defmacro is-not
"Asserts the opposite of the given predicate."
[pred & msg]
`(is (not ~pred) ~@msg))
(defmacro is-not=
"Asserts that the given arguments do not comp... | null | https://raw.githubusercontent.com/jspahrsummers/objective-clojure/3ef64a88b3a82cdc6ebb899bd409e387bfe79ca4/src/objclj/test.clj | clojure | (ns objclj.test
(:use clojure.test))
(defmacro is=
"Asserts that the given arguments compare equal."
[a b & msg]
`(is (= ~a ~b) ~@msg))
(defmacro is-not
"Asserts the opposite of the given predicate."
[pred & msg]
`(is (not ~pred) ~@msg))
(defmacro is-not=
"Asserts that the given arguments do not comp... | |
57f4bfc731bf729b670d574de6882042e4024a61a7b1611f0119458161a7d1a5 | wireless-net/erlang-nommu | eprof.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2013 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Publi... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/tools/src/eprof.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitatio... | Copyright Ericsson AB 1996 - 2013 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(eprof).
-behaviour(gen_server).
-... |
9737127d1e2d50cc6a908b17e1cc771fa9e459bde9fc02aaf6b5aba844874f68 | Haskell-Things/ImplicitCAD | FastIntUtil.hs | {- ORMOLU_DISABLE -}
Implicit CAD . Copyright ( C ) 2011 , ( )
Copyright 2014 - 2019 , ( )
-- Released under the GNU AGPLV3+, see LICENSE
-- Use existing instances for the wrapped types rather than manually manking them
# LANGUAGE GeneralizedNewtypeDeriving #
module Graphics.Implicit.FastIntUtil (Fastℕ(Fast... | null | https://raw.githubusercontent.com/Haskell-Things/ImplicitCAD/87f2aee4b3c958d11e988022f512d065b812f6b0/Graphics/Implicit/FastIntUtil.hs | haskell | ORMOLU_DISABLE
Released under the GNU AGPLV3+, see LICENSE
Use existing instances for the wrapped types rather than manually manking them | Implicit CAD . Copyright ( C ) 2011 , ( )
Copyright 2014 - 2019 , ( )
# LANGUAGE GeneralizedNewtypeDeriving #
module Graphics.Implicit.FastIntUtil (Fastℕ(Fastℕ), toFastℕ, fromFastℕ) where
import Prelude (Integral, Num, Eq, Ord, Enum, Real, Show, Read, Int, id)
class FastN n where
fromFastℕ :: Fastℕ -> n... |
715be8791ed771f79662060ada4bac0e42cf7b50d6192bbbc619685ec08054e6 | MinaProtocol/mina | prod.ml | (* prod.ml *)
open Core_kernel
open Async
open Mina_base
open Mina_state
open Blockchain_snark
type invalid = Common.invalid [@@deriving bin_io_unversioned, to_yojson]
let invalid_to_error = Common.invalid_to_error
type ledger_proof = Ledger_proof.Prod.t
module Worker_state = struct
module type S = sig
val v... | null | https://raw.githubusercontent.com/MinaProtocol/mina/3cece748c078b9d63020e7eed5114f87dd167f68/src/lib/verifier/prod.ml | ocaml | prod.ml
Always report termination as expected, and use the restart logic here
instead.
Wait 5s before retrying. |
open Core_kernel
open Async
open Mina_base
open Mina_state
open Blockchain_snark
type invalid = Common.invalid [@@deriving bin_io_unversioned, to_yojson]
let invalid_to_error = Common.invalid_to_error
type ledger_proof = Ledger_proof.Prod.t
module Worker_state = struct
module type S = sig
val verify_blockcha... |
928ae84e98072f3c29851a3f50126f1c7b93b28734d6da3188b34e860282e099 | metaocaml/ber-metaocaml | pr6534.ml | (* TEST
include testing
*)
(* these are not valid under -strict-formats, but we test them here
for backward-compatibility *)
open Printf
let () =
printf "1 [%.5s]\n" "foo";
printf "2 [%.*s]\n" 5 "foo";
printf "3 [%.-5s]\n" "foo";
printf "4 [%-.5s]\n" "foo";
printf "5 [%-.*s]\n" 5 "foo";
printf "6 [%... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/lib-printf/pr6534.ml | ocaml | TEST
include testing
these are not valid under -strict-formats, but we test them here
for backward-compatibility |
open Printf
let () =
printf "1 [%.5s]\n" "foo";
printf "2 [%.*s]\n" 5 "foo";
printf "3 [%.-5s]\n" "foo";
printf "4 [%-.5s]\n" "foo";
printf "5 [%-.*s]\n" 5 "foo";
printf "6 [%.*s]\n" (-5) "foo";
printf "1 [%.7S]\n" "foo";
printf "2 [%.*S]\n" 7 "foo";
printf "3 [%.-7S]\n" "foo";
printf "4 [%-.7S]\... |
6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b | scheme-live/live | output.scm | 1 | null | https://raw.githubusercontent.com/scheme-live/live/4c7c9d80f2fcf80692614e10935fa66be69e3708/live/json/data/n-structure-close-unopened-array/output.scm | scheme | 1 | |
29e5cd2865e8b3793cbb5f737c5d28b2bffd7f93358a00568dd0acac1066d7ba | hazel-el/hazel | Parser.hs | # LANGUAGE CPP , OverloadedStrings #
|
Module : . Parser
Copyright : ( c ) 2014
License : GPL-3
Maintainer : < >
Stability : experimental
Portability : unknown
Front - end module for the OWL2 Functional - Style parser
Module : Hazel.Parser
Copyright : (c... | null | https://raw.githubusercontent.com/hazel-el/hazel/0f5d7e0c03d5eebd16f103df8cc05c5408c152f1/Hazel/Parser.hs | haskell | # LANGUAGE CPP , OverloadedStrings #
|
Module : . Parser
Copyright : ( c ) 2014
License : GPL-3
Maintainer : < >
Stability : experimental
Portability : unknown
Front - end module for the OWL2 Functional - Style parser
Module : Hazel.Parser
Copyright : (c... | |
f3e9914e080b7d8d84fa038785b323995a49c57533c8d814c9a1d1376fd0886c | oscoin/oscoin | Executable.hs | module Integration.Test.Executable
( tests
) where
import Oscoin.Prelude
import Oscoin.Crypto (Crypto)
import Oscoin.Crypto.Blockchain.Block (Beneficiary)
import Oscoin.Crypto.PubKey.RealWorld ()
import Oscoin.Test.Crypto.Blockchain.Block.Generators
... | null | https://raw.githubusercontent.com/oscoin/oscoin/2eb5652c9999dd0f30c70b3ba6b638156c74cdb1/test/Integration/Test/Executable.hs | haskell | Generates a temporary directory where to store some ephemeral keys, which
are needed for the test to pass on CI.
Then, run the test.
API root is actually a CBOR encoded 'Nothing :: Maybe ()'. lol | module Integration.Test.Executable
( tests
) where
import Oscoin.Prelude
import Oscoin.Crypto (Crypto)
import Oscoin.Crypto.Blockchain.Block (Beneficiary)
import Oscoin.Crypto.PubKey.RealWorld ()
import Oscoin.Test.Crypto.Blockchain.Block.Generators
... |
6eb686bde5695f5c499885bff54b983b89a7afe19f946a39bf21a97db5e8b72a | may-liu/qtalk | http_get_recent_contacts.erl | %% Feel free to use, reuse and abuse the code in this file.
-module(http_get_recent_contacts).
-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) -... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/scripts/ejb_http_server/src/http_get_recent_contacts.erl | erlang | Feel free to use, reuse and abuse the code in this file. |
-module(http_get_recent_contacts).
-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, _} = cowboy_req:method(Req),
catch ejb_monit... |
ed5552a5b6b90825db7b4d8cf671c2c4e8598ede77386b5f247809aabc1d8d2d | lspitzner/exference | Bits.hs | module Data.Bits where
class Data.Eq.Eq a => Bits a where
class Bits b => FiniteBits b where
| null | https://raw.githubusercontent.com/lspitzner/exference/d8a336f8b9df905e54173339f78ba892daa3f688/environment/Bits.hs | haskell | module Data.Bits where
class Data.Eq.Eq a => Bits a where
class Bits b => FiniteBits b where
| |
900585a0dd0f5784a9abd82ad45f01e1604532e27247e298d6230ef0ca3df151 | lehins/massiv-io | Base.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
-- |
Module : Data ... | null | https://raw.githubusercontent.com/lehins/massiv-io/20e92513cdaf92e0b2aee2410447871b836a932a/massiv-io/src/Data/Massiv/Array/IO/Image/JuicyPixels/Base.hs | haskell | # LANGUAGE BangPatterns #
|
License : BSD3
Stability : experimental
Portability : non-portable
* Conversion to sRGB
------------------------------------------------------------------------------
Common JuciyPixels encoding/decoding functions ------------------------------
----------------------------------... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
Module : Data . Massiv . Array . IO.Image . Juicy... |
d1c674b52d7571e7fd75486b3519eb11865e20eded6e4d62c7419858aa5d8df5 | INRIA/zelus | misc.ml | let start = Unix.gettimeofday ()
let get_time () = Unix.gettimeofday () -. start
let print (d1, d2) =
Printf.sprintf
"Time = %.12e\t Diff = %.12e\t" d1 d2
| null | https://raw.githubusercontent.com/INRIA/zelus/685428574b0f9100ad5a41bbaa416cd7a2506d5e/examples/timing_test/misc.ml | ocaml | let start = Unix.gettimeofday ()
let get_time () = Unix.gettimeofday () -. start
let print (d1, d2) =
Printf.sprintf
"Time = %.12e\t Diff = %.12e\t" d1 d2
| |
7fce575ede1cf3a04c65d3f75b4cd76f0061335661dcb106f2b00588e570dc86 | xapi-project/xen-api | test_vm_placement.ml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api/589012ae400ecbe987fe4a186f92df79e2da607b/ocaml/tests/test_vm_placement.ml | ocaml | * Tests the drop function with valid arguments.
* Tests the drop function with invalid arguments.
* Tests the take function with valid arguments.
* Tests the take function with invalid arguments.
* Tests the take_nth function with valid arguments.
* Tests the take_nth function with invalid arguments.
* Tests the ... |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... |
806cf59672ad859a9873cde2c71b3ff0e4a4d8c9f174f0692122e3b7169a0796 | embecosm/cgen | attr.scm | ; Attributes.
Copyright ( C ) 2000 , 2003 , 2005 , 2009 Red Hat , Inc.
This file is part of CGEN .
; See file COPYING.CGEN for details.
There are 5 kinds of attributes : boolean , integer , enum , bitset , and string .
Boolean attributes are really enum attributes with two possible values ,
; but they occur fr... | null | https://raw.githubusercontent.com/embecosm/cgen/3fa8809c015376cd0e80018a655d372df3678bc6/cgen/attr.scm | scheme | Attributes.
See file COPYING.CGEN for details.
but they occur frequently enough that they are special cased.
String attributes are intentionally not documented in the manual as
being supported - they're still a bit of work-in-progress.
- 'get-atlist - returns the object's attr-list
- 'set-atlist! - set the obje... | Copyright ( C ) 2000 , 2003 , 2005 , 2009 Red Hat , Inc.
This file is part of CGEN .
There are 5 kinds of attributes : boolean , integer , enum , bitset , and string .
Boolean attributes are really enum attributes with two possible values ,
All objects that use attributes must have two methods :
integer / ... |
98daeceaae6e34b231716d9411dc9ae832fae6120242a2562dfc2570bafc37c0 | lambdaisland/kaocha-cucumber | dsl.clj | (ns lambdaisland.cucumber.dsl
(:require [lambdaisland.cucumber.jvm :as jvm])
(:import [cucumber.api PendingException]
[cucumber.runtime HookDefinition StepDefinition]
[cucumber.runtime.filter TagPredicate]
[io.cucumber.stepexpression ExpressionArgumentMatcher StepExpressionFactory]
... | null | https://raw.githubusercontent.com/lambdaisland/kaocha-cucumber/b4d36f5e5b65cae123503909cbab22d5dc6083a3/src/lambdaisland/cucumber/dsl.clj | clojure | (ns lambdaisland.cucumber.dsl
(:require [lambdaisland.cucumber.jvm :as jvm])
(:import [cucumber.api PendingException]
[cucumber.runtime HookDefinition StepDefinition]
[cucumber.runtime.filter TagPredicate]
[io.cucumber.stepexpression ExpressionArgumentMatcher StepExpressionFactory]
... | |
dc11548ffc1480e6df628bc84cd8eec78e9fd1d5b7d4e32eed32488021e93d19 | zcassini/htc1x-problem-bank | parameterization-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-intermediate-reader.ss" "lang")((modname parameterization-v2) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor rep... | null | https://raw.githubusercontent.com/zcassini/htc1x-problem-bank/0a2e85348df9ad629dd091df55b1ddfa2371ae35/Abstraction/Abstraction%20L1/parameterization-v2.rkt | racket | about the language level of this file in a form that our tools can easily process.
ListOfString -> Boolean
(define (contains-ubc? los) false) ;stub
ListOfString -> Boolean
(define (contains-mcgill? los) false) ;stub
====================
ListOfNumber -> ListOfNumber
(define (squares lon) empty) ;stub
ListOfNumber ... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-reader.ss" "lang")((modname parameterization-v2) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
produce true if los includes " UBC "
(check-exp... |
af95dcaac8ccc7ede938daae3393c792a6096119056bd2943e7fea0f06668032 | 8thlight/hyperion | project.clj | (defproject hyperion/hyperion-mongo "3.7.1"
:description "Mongo Datastore for Hyperion"
:dependencies [[org.clojure/clojure "1.5.1"]
[hyperion/hyperion-api "3.7.1"]
[org.mongodb/mongo-java-driver "2.8.0"]]
:profiles {:dev {:dependencies [[speclj "2.7.5"]]}}
:test-paths ["spec/... | null | https://raw.githubusercontent.com/8thlight/hyperion/b1b8f60a5ef013da854e98319220b97920727865/mongo/project.clj | clojure | (defproject hyperion/hyperion-mongo "3.7.1"
:description "Mongo Datastore for Hyperion"
:dependencies [[org.clojure/clojure "1.5.1"]
[hyperion/hyperion-api "3.7.1"]
[org.mongodb/mongo-java-driver "2.8.0"]]
:profiles {:dev {:dependencies [[speclj "2.7.5"]]}}
:test-paths ["spec/... | |
95b36006eac553fce726a780997a6a920ae0d9273d3df61f15605226340d8836 | knrafto/language-bash | Parse.hs | # LANGUAGE RecordWildCards #
-- | Bash script and input parsing.
module Language.Bash.Parse
( parse
) where
import Control.Applicative hiding (many)
import Control.Monad
import Data.Either
import Data.Functor.Identity
import Text.Parsec.Char ... | null | https://raw.githubusercontent.com/knrafto/language-bash/5c917565aa4c89ee5ed20923c644f4541906c1e0/src/Language/Bash/Parse.hs | haskell | | Bash script and input parsing.
| User state.
| Bash parser type.
| Parse a script or input line into a (possibly empty) list of commands.
-----------------------------------------------------------------------------
Basic parsers
-----------------------------------------------------------------------------
| Ba... | # LANGUAGE RecordWildCards #
module Language.Bash.Parse
( parse
) where
import Control.Applicative hiding (many)
import Control.Monad
import Data.Either
import Data.Functor.Identity
import Text.Parsec.Char hiding (newline)
import ... |
c308041dc0c327fa22156c9f13ec54dc38c70e30183c2d05325ad3cb9b1e19a9 | KoenvdBerg/csv-validator | packages.lisp | (defpackage :csv-validator
(:use :cl)
(:export
:main
:check-integer-string
:check-float-string
:check-scientific-number-string
:check-number-string
:check-number-in-range
:check-date-parsable
:check-tz-parsable
:check-null
:check-not-null
:check-date-before-today
:check-compar... | null | https://raw.githubusercontent.com/KoenvdBerg/csv-validator/a3f56d30ea9241dc4a8943c2073a199cf488bfcc/src/packages.lisp | lisp | (defpackage :csv-validator
(:use :cl)
(:export
:main
:check-integer-string
:check-float-string
:check-scientific-number-string
:check-number-string
:check-number-in-range
:check-date-parsable
:check-tz-parsable
:check-null
:check-not-null
:check-date-before-today
:check-compar... | |
e68b5416f2147653c268a4e7a9b75d6026820491270de787552f923e687fd641 | ndmitchell/catch | Paraffins_Safe.hs | -- #CATCH _
- I d Example Program
- Ensnaffled by SLPJ from MIT via
- RPaul < > 93/08/26 .
- Original author :
- Id Example Program
- Ensnaffled by SLPJ from MIT via
- RPaul <> 93/08/26.
- Original author: Steve Heller
-}
module Paraffins_Safe(main) where
-- CHANGE: Array -> Data.Array
import D... | null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/examples/Nofib/Paraffins_Safe.hs | haskell | #CATCH _
CHANGE: Array -> Data.Array
Generation of radicals
Generation of paraffins. |
- I d Example Program
- Ensnaffled by SLPJ from MIT via
- RPaul < > 93/08/26 .
- Original author :
- Id Example Program
- Ensnaffled by SLPJ from MIT via
- RPaul <> 93/08/26.
- Original author: Steve Heller
-}
module Paraffins_Safe(main) where
import Data.Array hiding ((!))
data Radical = H |... |
ce5ae2d4da8dd1d459d7a9327d29513451ab6a94f0cbad7b56a570da8d86b63f | TheLortex/mirage-monorepo | serialize.ml | ----------------------------------------------------------------------------
Copyright ( c ) 2017 Inhabited Type LLC .
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions
are met :
... | null | https://raw.githubusercontent.com/TheLortex/mirage-monorepo/754836818dc5c861bf3b0a78029315a065a543cc/duniverse/httpaf/lib/serialize.ml | ocaml | XXX(seliopou): escape these thigns
The buffer that the encoder uses for buffered writes. Managed by the
* control module for the encoder.
The encoder that handles encoding for writes. Uses the [buffer]
* referenced above internally.
The number of bytes that were not written due to the output stream... | ----------------------------------------------------------------------------
Copyright ( c ) 2017 Inhabited Type LLC .
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions
are met :
... |
666b37e9f214ce635acb84b2488d69766dcbf4541515d490361b23bebb38219a | deadtrickster/prometheus_rabbitmq_exporter | prometheus_rabbitmq_exchanges_collector.erl | -module(prometheus_rabbitmq_exchanges_collector).
-export([register/0,
register/1,
deregister_cleanup/1,
collect_mf/2,
collect_metrics/2]).
-import(prometheus_model_helpers, [create_mf/5,
label_pairs/1,
gauge_metr... | null | https://raw.githubusercontent.com/deadtrickster/prometheus_rabbitmq_exporter/bd8dbb1bef2d410d95dbadd47f03fc094dbe2cbf/src/collectors/prometheus_rabbitmq_exchanges_collector.erl | erlang | ====================================================================
Collector API
====================================================================
====================================================================
Private Parts
====================================================================
emit_counter_... | -module(prometheus_rabbitmq_exchanges_collector).
-export([register/0,
register/1,
deregister_cleanup/1,
collect_mf/2,
collect_metrics/2]).
-import(prometheus_model_helpers, [create_mf/5,
label_pairs/1,
gauge_metr... |
0ef9b3e79f5c29322a45264d3fdc2afef9568659106b891dc05d867767f6f82e | thierry-martinez/refl | desc.ml | type ('a, 'b) eq =
| Eq : ('a, 'a) eq
type ('a, 'b, 'c) builtin_desc =
| Bool : (bool, [`Bool], [> `Bool]) builtin_desc
| Bytes : (bytes, [`Bytes], [> `Bytes]) builtin_desc
| Char : (char, [`Char], [> `Char]) builtin_desc
| Float : (float, [`Float], [> `Float]) builtin_desc
| Int : (int, [`Int], [> `Int]) ... | null | https://raw.githubusercontent.com/thierry-martinez/refl/64e7c86f25c47c29aeeaa581a751ef37e138a42f/runtime/desc.ml | ocaml |
rec_group : ('new_rec_group, 'new_rec_group) rec_group;
| OInherit :
('a, 'structure, 'arity, 'rec_group, 'kinds, 'positive, 'negative,
'direct, 'gadt) desc ->
('a, [`Inherit of 'structure], 'arity, 'rec_group, 'kinds,
'positive, 'negative, 'direct, 'gadt) object_method
an... | type ('a, 'b) eq =
| Eq : ('a, 'a) eq
type ('a, 'b, 'c) builtin_desc =
| Bool : (bool, [`Bool], [> `Bool]) builtin_desc
| Bytes : (bytes, [`Bytes], [> `Bytes]) builtin_desc
| Char : (char, [`Char], [> `Char]) builtin_desc
| Float : (float, [`Float], [> `Float]) builtin_desc
| Int : (int, [`Int], [> `Int]) ... |
00cc55c6932d8f1ab6011d41664beae50cbd9a7f707bee3e9d43de5396b566bf | janestreet/bonsai | simplify.mli | open! Core
open! Import
(** [computation_to_function t ~key_id ~data_id] attempts to reduce [t] to a
plain (stateless) function with [key] and [data] inputs. Returns [None] if
it fails to find such a function. The only pattern that this function
attempts to optimize is [(return v)], where [v] is a [Value.... | null | https://raw.githubusercontent.com/janestreet/bonsai/4baeedc75bf73a0915e04dc02d8a49b78779e9b0/src/simplify.mli | ocaml | * [computation_to_function t ~key_id ~data_id] attempts to reduce [t] to a
plain (stateless) function with [key] and [data] inputs. Returns [None] if
it fails to find such a function. The only pattern that this function
attempts to optimize is [(return v)], where [v] is a [Value.t] built out of
only co... | open! Core
open! Import
val computation_to_function
: 'result Computation.t
-> key_compare:('key -> 'key -> int)
-> key_id:'key Type_equal.Id.t
-> data_id:'data Type_equal.Id.t
-> (Path.t -> 'key -> 'data -> 'result) option
|
c0330d91a776dc14dc6df59d4744b07779ad5578fab82cebb556ba3564ddc408 | vitorenesduarte/ldb | ldb_hao_client.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2018 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the ... | null | https://raw.githubusercontent.com/vitorenesduarte/ldb/b4cdf62ccd00577d3589fd39bde37fcb58c0eb5d/src/ldb_hao_client.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2018 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(ldb_hao_client).
-au... |
89a2c85937c535be49fc29764e99fcdb5f6121556bcb8940d84fbddd6a0a337f | jeapostrophe/opencl | transpose.rkt | #lang racket
(require opencl/racket
ffi/cvector
ffi/unsafe
racket/runtime-path)
(define PADDING 32)
(define GROUP_DIMX 32)
(define LOG_GROUP_DIMX 5)
(define GROUP_DIMY 2)
(define WIDTH 256)
(define HEIGHT 4096)
(define iterations 100)
(define width WIDTH)
(define height HEIGHT)
(printf "In... | null | https://raw.githubusercontent.com/jeapostrophe/opencl/f984050b0c02beb6df186d1d531c4a92a98df1a1/tests/opencl/examples/matrix-transpose/transpose.rkt | racket | XXX Weird breakage
(command-queue-finish! queue) | #lang racket
(require opencl/racket
ffi/cvector
ffi/unsafe
racket/runtime-path)
(define PADDING 32)
(define GROUP_DIMX 32)
(define LOG_GROUP_DIMX 5)
(define GROUP_DIMY 2)
(define WIDTH 256)
(define HEIGHT 4096)
(define iterations 100)
(define width WIDTH)
(define height HEIGHT)
(printf "In... |
d262d0d6a92e55e497e7ffef4029841abb12387ab8b6ff2d9f70c019f3e0570a | iambrj/imin | interp-Cvar.rkt | #lang racket
(require racket/fixnum)
(require racket/dict)
(require "utilities.rkt")
(require "interp-Rvar.rkt")
(provide interp-Cvar interp-Cvar-mixin)
(define (interp-Cvar-mixin super-class)
(class super-class
(super-new)
(inherit interp-exp)
(define/public (interp-stmt env)
(lambda (s)
... | null | https://raw.githubusercontent.com/iambrj/imin/baf9e829c2aa85b69a2e86bfba320969ddf05f95/interp-Cvar.rkt | racket | #lang racket
(require racket/fixnum)
(require racket/dict)
(require "utilities.rkt")
(require "interp-Rvar.rkt")
(provide interp-Cvar interp-Cvar-mixin)
(define (interp-Cvar-mixin super-class)
(class super-class
(super-new)
(inherit interp-exp)
(define/public (interp-stmt env)
(lambda (s)
... | |
eb9e6e3baf815968b91f11dbd83ef08ae0380429c013ce577d5d2528c0520e05 | haskell-foundation/foundation | Storable.hs | -- |
-- Module : Foundation.Class.Storable
-- License : BSD-style
Maintainer : Haskell Foundation
-- Stability : experimental
-- Portability : portable
--
-- <-foundation/issues/111>
--
--
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE CPP #
module Foundation.Class.Storable
... | null | https://raw.githubusercontent.com/haskell-foundation/foundation/39985b94b4de4d02e8decb5e378b53ad3f72c0cc/foundation/Foundation/Class/Storable.hs | haskell | |
Module : Foundation.Class.Storable
License : BSD-style
Stability : experimental
Portability : portable
<-foundation/issues/111>
* Ptr
* offset based helper
* Collection
| Storable type of self determined size.
| Extending the Storable type class to the types that can be sequenced
in a struc... | Maintainer : Haskell Foundation
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE CPP #
module Foundation.Class.Storable
( Storable(..)
, StorableFixed(..)
, Ptr, plusPtr, castPtr
, peekOff, pokeOff
, peekArray
, peekArrayEndedBy
, pokeArray
, pokeArrayEndedB... |
dff73cf997ac41be12b48128e9f8b49786ab6b82e2d45829d7452427a72b04f4 | azimut/shiny | 20180810.lisp | (in-package :shiny)
;;; Code from "undo" video, along with compositions/ray.lisp
(defvar *growth* 0f0)
(defun-g circle-sdf ((st :vec2))
(* 4.0 (length (- st .5))))
(pixel-spirit-deck:poly-sdf)
(defun-g poly-sdf ((st :vec2) (V :float))
(let* ((st (- (* 2.0 st) 1.0))
(a (+ 3.1415 (atan (x st) (y st))))... | null | https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/examples/20180810.lisp | lisp | Code from "undo" video, along with compositions/ray.lisp
--------------------------------------------------
-------------------------------------------------- | (in-package :shiny)
(defvar *growth* 0f0)
(defun-g circle-sdf ((st :vec2))
(* 4.0 (length (- st .5))))
(pixel-spirit-deck:poly-sdf)
(defun-g poly-sdf ((st :vec2) (V :float))
(let* ((st (- (* 2.0 st) 1.0))
(a (+ 3.1415 (atan (x st) (y st))))
(r (length st))
(v (/ 6.283185 (float V)... |
6b76a9c867bc43e24ab1c8f74ac59139588b59c355f0248e8cc40393dc5836a1 | heroku/sdiff | sdiff_serv_middleman.erl | -module(sdiff_serv_middleman).
-behaviour(gen_fsm).
-export([start/4, start_link/4, write/3, delete/2]).
-export([sync_request/3, sync_done/2]).
-export([diff_req/2]).
-export([init/1,
init/2, init/3, relay/2, relay/3, diff/2, diff/3,
handle_event/3, handle_sync_event/4, handle_info/3,
code_c... | null | https://raw.githubusercontent.com/heroku/sdiff/15e3fb2974919b7349387288a89881c2850f3073/src/sdiff_serv_middleman.erl | erlang |
Server API %%%
% %
ACCESS API %%%
GEN_FSM CALLBACKS %%%
async exchange
TODO: move under a supervisor? | -module(sdiff_serv_middleman).
-behaviour(gen_fsm).
-export([start/4, start_link/4, write/3, delete/2]).
-export([sync_request/3, sync_done/2]).
-export([diff_req/2]).
-export([init/1,
init/2, init/3, relay/2, relay/3, diff/2, diff/3,
handle_event/3, handle_sync_event/4, handle_info/3,
code_c... |
77d2ffc50c4a8ab301e8dfb411221c8899fb2b8fd32c4c69aba214996ea284f7 | elastic/eui-cljs | notification_event_messages.cljs | (ns eui.notification-event-messages
(:require ["@elastic/eui/lib/components/notification/notification_event_messages.js" :as eui]))
(def EuiNotificationEventMessages eui/EuiNotificationEventMessages)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/notification_event_messages.cljs | clojure | (ns eui.notification-event-messages
(:require ["@elastic/eui/lib/components/notification/notification_event_messages.js" :as eui]))
(def EuiNotificationEventMessages eui/EuiNotificationEventMessages)
| |
9e7640224ed9ba50a73d5ffad7c03f1daddecc652ab2229ed4cce28267925d48 | eeng/shevek | send_to_dashboard.cljs | (ns shevek.pages.designer.actions.send-to-dashboard
(:require [reagent.core :as r]
[shevek.i18n :refer [t]]
[shevek.reflow.db :as db]
[shevek.reflow.core :refer [dispatch]]
[shevek.components.popup :refer [tooltip]]
[shevek.components.modal :refer [show-moda... | null | https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/src/cljs/shevek/pages/designer/actions/send_to_dashboard.cljs | clojure | (ns shevek.pages.designer.actions.send-to-dashboard
(:require [reagent.core :as r]
[shevek.i18n :refer [t]]
[shevek.reflow.db :as db]
[shevek.reflow.core :refer [dispatch]]
[shevek.components.popup :refer [tooltip]]
[shevek.components.modal :refer [show-moda... | |
1b9c5d9e4c4c668cd1d841c81630fad182dd9e91ca7b7b183d7b4258b88a9869 | returntocorp/semgrep | dependencies_matrix_code.ml |
*
* Copyright ( C ) 2012 Facebook
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file licens... | null | https://raw.githubusercontent.com/returntocorp/semgrep/fec5eeb43168060f73a2134c9bc49e15f166f9c2/libs/graph_code/dependencies_matrix_code.ml | ocaml | ***************************************************************************
Prelude
***************************************************************************
* See
***************************************************************************
Types
***************************************************************... |
*
* Copyright ( C ) 2012 Facebook
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file licens... |
7791bb7138f729f058c676778136f569a8e41d287d58789a2f94be717d2f5b2c | clojurians-org/haskell-example | Backend.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE EmptyCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeFamilies #
# LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
module Backend where
import Fn
import Prelude
import Common.Route
import Obelisk.Backend
import Com... | null | https://raw.githubusercontent.com/clojurians-org/haskell-example/c96b021bdef52a121e04ea203c8c3e458770a25a/conduit-ui/backend/src/Backend.hs | haskell | # LANGUAGE RankNTypes # | # LANGUAGE NoImplicitPrelude #
# LANGUAGE EmptyCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE TypeFamilies #
# LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
module Backend where
import Fn
import Prelude
import Common.Route
import Obelisk.Backend
import Common.Types
import Common.Exam... |
0be689a45ac09a11b9f22d4c8e410572587d77574b1889ea422917f2bd756a93 | tachukao/ocaml-mujoco | ant_v3.ml | open Mujoco
module E = struct
type env =
{ model : Model.t
; data : Data.t
; qpos0 : Owl.Arr.arr
; qvel0 : Owl.Arr.arr
}
type observation = Owl.Arr.arr
type action = Owl.Arr.arr
type reward = float
let frame_skip = 5
let dt (model : Model.t) = Model.(timestep model) *. Int.(to_float f... | null | https://raw.githubusercontent.com/tachukao/ocaml-mujoco/06cd1ed084b7fbde8dfe273888be97a4790f0480/src/mujoco-env/ant_v3.ml | ocaml | open Mujoco
module E = struct
type env =
{ model : Model.t
; data : Data.t
; qpos0 : Owl.Arr.arr
; qvel0 : Owl.Arr.arr
}
type observation = Owl.Arr.arr
type action = Owl.Arr.arr
type reward = float
let frame_skip = 5
let dt (model : Model.t) = Model.(timestep model) *. Int.(to_float f... | |
5491ff44c3ec23889d88e514c1b98d1484bd8759752239f0fba74105e5c01dd8 | binsec/haunted | path_predicate.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/dynamic/dse/path_predicate.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
892089d6c18617ecf8f4921258439a6a2b75885b7a1c7f0f9175cdafea17da90 | qiao/sicp-solutions | 4.12.scm | (define (enclosing-environment env) (cdr env))
(define (first-frame env) (car env))
(define (the-empty-environment '()))
(define (make-frame vars vals) (zip vars vals))
(define (add-binding-to-frame! var val frame)
(set-car! frame (cons (cons var val) frame)))
(define (extend-environment vars vals base-env)
(if (... | null | https://raw.githubusercontent.com/qiao/sicp-solutions/a2fe069ba6909710a0867bdb705b2e58b2a281af/chapter4/4.12.scm | scheme | (define (enclosing-environment env) (cdr env))
(define (first-frame env) (car env))
(define (the-empty-environment '()))
(define (make-frame vars vals) (zip vars vals))
(define (add-binding-to-frame! var val frame)
(set-car! frame (cons (cons var val) frame)))
(define (extend-environment vars vals base-env)
(if (... | |
f24c3831757d8e3b85ec592243e8e5b3ec2b269bfa99ee973853a48d50c3a9dd | montelibero-org/veche | Issue.hs | # LANGUAGE ApplicativeDo #
# LANGUAGE BlockArguments #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE ImportQualifiedPost #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
module Templates.Issue
... | null | https://raw.githubusercontent.com/montelibero-org/veche/ec82c9ebee053248945d9d7d9795ec6e6386df02/veche-web/src/Templates/Issue.hs | haskell | # LANGUAGE OverloadedStrings #
global
component | # LANGUAGE ApplicativeDo #
# LANGUAGE BlockArguments #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE ImportQualifiedPost #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
module Templates.Issue
( closeReopenButton
, editIs... |
e5aac961327a0ba703290e3c8510afbae9457bcd7d52bdc627ad70fd2e8b1e4f | acl2/acl2 | integer-conversions.lisp | C Library
;
Copyright ( C ) 2023 Kestrel Institute ( )
Copyright ( C ) 2023 Kestrel Technology LLC ( )
;
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
;
Author : ( )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package "C")
(i... | null | https://raw.githubusercontent.com/acl2/acl2/44f76f208004466a9e6cdf3a07dac98b3799817d/books/kestrel/c/atc/symbolic-execution-rules/integer-conversions.lisp | lisp |
unsigned int as final type:
signed long as final type:
unsigned long as final type:
signed long long as final type:
unsigned long long as final type: | C Library
Copyright ( C ) 2023 Kestrel Institute ( )
Copyright ( C ) 2023 Kestrel Technology LLC ( )
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
Author : ( )
(in-package "C")
(include-book "../../representation/integer-conversions")
(local (xdoc::set-default-pare... |
e616ac258a1ce1472f72b0227b4a974a8fdd7c2d9e33674d5322ebffcf2a3046 | cartazio/language-c | TypeCheck.hs | module Main where
import Data.List
import Language.C
import Language.C.Analysis.AstAnalysis
import Language.C.Analysis.TravMonad
import Language.C.System.GCC
import System.Console.GetOpt
import System.Environment
import System.Exit
import System.IO
processFile :: CLanguage -> [String] -> FilePath -> IO ()
processFile... | null | https://raw.githubusercontent.com/cartazio/language-c/d003206a45baec4e2a2a85026d88bd225162d951/examples/TypeCheck.hs | haskell | module Main where
import Data.List
import Language.C
import Language.C.Analysis.AstAnalysis
import Language.C.Analysis.TravMonad
import Language.C.System.GCC
import System.Console.GetOpt
import System.Environment
import System.Exit
import System.IO
processFile :: CLanguage -> [String] -> FilePath -> IO ()
processFile... | |
373d7ede49b2dbcc41fd076667025eb3cd64a25f0a12691d48ef2d41009c21bc | finnishtransportagency/harja | kanavien_muutos_ja_lisatyot_test.clj | (ns harja.palvelin.raportointi.kanavien-muutos-ja-lisatyot-test
(:require [clojure.test :refer :all]
[harja.palvelin.komponentit.tietokanta :as tietokanta]
[harja.palvelin.palvelut.toimenpidekoodit :refer :all]
[harja.palvelin.palvelut.urakat :refer :all]
[harja.testi :... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/c57d742beaff2bef7b30318819f07d4a13423404/test/clj/harja/palvelin/raportointi/kanavien_muutos_ja_lisatyot_test.clj | clojure | (ns harja.palvelin.raportointi.kanavien-muutos-ja-lisatyot-test
(:require [clojure.test :refer :all]
[harja.palvelin.komponentit.tietokanta :as tietokanta]
[harja.palvelin.palvelut.toimenpidekoodit :refer :all]
[harja.palvelin.palvelut.urakat :refer :all]
[harja.testi :... | |
b368dfc12a460188342af9f0e9de01ee1350936f33cfac806270819a64407032 | mbutterick/fontland | cff-struct.rkt | #lang racket/base
(provide (all-defined-out))
(struct Ptr (val [forceLarge #:auto]) #:transparent #:mutable #:auto-value #true) | null | https://raw.githubusercontent.com/mbutterick/fontland/e50e4c82f58e2014d64e87a14c1d29b546fb393b/fontland/table/cff/cff-struct.rkt | racket | #lang racket/base
(provide (all-defined-out))
(struct Ptr (val [forceLarge #:auto]) #:transparent #:mutable #:auto-value #true) | |
101208d456e18eb5e9cce68b933e008d57295b83fca866528ebf7270d0b086b9 | scheme/edwin48 | load.scm | ;;; -*- Mode: Scheme; scheme48-package: (exec) -*-
;;;
Copyright © 2007 < >
;;;
;;; This code is placed in the Public Domain. All warranties are
;;; disclaimed.
;;;
;;; This script loads the code for cosmacs and its dependencies. To run it, execute the following on
;;; the scsh repl from this directory:
;;;
;;; >... | null | https://raw.githubusercontent.com/scheme/edwin48/fbe3c7ca14f1418eafddebd35f78ad12e42ea851/cosmacs/load.scm | scheme | -*- Mode: Scheme; scheme48-package: (exec) -*-
This code is placed in the Public Domain. All warranties are
disclaimed.
This script loads the code for cosmacs and its dependencies. To run it, execute the following on
the scsh repl from this directory:
> ,exec ,load load.scm | Copyright © 2007 < >
(user)
(translate "=base" "..")
(config '(load "=base/config-macros.scm"))
(config '(load "=base/edwin48/srfi-packages.scm"
"=base/edwin48/scsh/packages.scm"))
(config '(load "=base/terminfo/interfaces.scm"
"=base/terminfo/scsh-packages.scm"))
(config '(load... |
e4b72d14aac20a8e23e3069c6b63e27fff802dcb87d28e76335b172ed42c002b | 8c6794b6/haskell-sc-scratch | Scratch01.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
|
Module : $ Header$
License : :
Stability : unstable
Portability : non - portable
Scratch written while reading :
/Practical type inference for arbitrary - rank types/.
Module : $Header$
License : BSD3
Maintainer ... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/LangExt/RankNTypes/PTIART/Scratch01.hs | haskell | # LANGUAGE RankNTypes #
----------------------------------------------------------------------------
Invariants
| Example of Rank-3 Types.
Is (f1 k) well typed?
ghci> :t f1 k
f1 k :: Int
Yes, it is.
How about (f2 k)?
ghci> :t f1 k
f1 k :: Int
Yes, it is also.
Ill typed:
ghci> :t g k1
<interactive>:1:... | # LANGUAGE ScopedTypeVariables #
|
Module : $ Header$
License : :
Stability : unstable
Portability : non - portable
Scratch written while reading :
/Practical type inference for arbitrary - rank types/.
Module : $Header$
License : BSD3
Maintainer :
Stability : unstable
Po... |
931edf10f6d30b5efabbdcb75998eaadf5f472d386d1210c7c819559578f8eba | hlprmnky/serverless-ish | db.cljs | (ns mobile-client.db
(:require [clojure.spec.alpha :as s]))
;; spec of app-db
(s/def ::greeting string?)
(s/def ::app-db
(s/keys :req-un [::greeting]))
;; initial state of app-db
(def app-db {:greeting "Hello Clojure in iOS and Android!"})
| null | https://raw.githubusercontent.com/hlprmnky/serverless-ish/bb5b89d68f7209311c16c454dfbe3c548efff0c0/mobile-client/src/mobile_client/db.cljs | clojure | spec of app-db
initial state of app-db | (ns mobile-client.db
(:require [clojure.spec.alpha :as s]))
(s/def ::greeting string?)
(s/def ::app-db
(s/keys :req-un [::greeting]))
(def app-db {:greeting "Hello Clojure in iOS and Android!"})
|
1e722ad167d2137164959a96b93c316d719a69742c7ab95eab7e7c92cea76338 | ppedrot/ocaml-melt | clist.mli | (**************************************************************************)
Copyright ( c ) 2010 ,
(* All rights reserved. *)
(* *)
(* Redistribution and us... | null | https://raw.githubusercontent.com/ppedrot/ocaml-melt/0e58bb97e2afe2b7cadbaac906481f28cea1932e/prelude/clist.mli | ocaml | ************************************************************************
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted... | Copyright ( c ) 2010 ,
" AS IS " AND ANY EXPRESS OR , INCLUDING , BUT NOT
LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
OWNER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( IN... |
82e6e7958817569d810438e8561ddcfb2b8272bb094df9156a37a328711845a2 | metametadata/clj-fakes | were_called_in_order.cljc | (ns unit.were-called-in-order
(:require
[clojure.test :refer [is testing]]
[unit.utils :as u]
[clj-fakes.core :as f]))
(u/deftest+
"passes when function was called twice"
(f/with-fakes
(let [foo (f/recorded-fake)]
(foo)
(foo)
(is (f/were-called-in-order foo []))
(is (f/we... | null | https://raw.githubusercontent.com/metametadata/clj-fakes/d928ddfd11b150b1cd2df5621265c447bf42395a/test/unit/were_called_in_order.cljc | clojure | (ns unit.were-called-in-order
(:require
[clojure.test :refer [is testing]]
[unit.utils :as u]
[clj-fakes.core :as f]))
(u/deftest+
"passes when function was called twice"
(f/with-fakes
(let [foo (f/recorded-fake)]
(foo)
(foo)
(is (f/were-called-in-order foo []))
(is (f/we... | |
e11842c17c5eaec8c7dd883563bdb13e695831064b1e154dc6729e346ee4cc82 | byorgey/AoC | 07.hs | import Control.Arrow
import Data.List
import Data.List.Split
import Data.Map (Map, (!))
import qualified Data.Map as M
import qualified Data.Set as S
import Text.Printf
import Debug.Trace
main = interact $
readInput >>> applyAll [solve... | null | https://raw.githubusercontent.com/byorgey/AoC/30eb51eb41af9ca86b05de598a3a96d25bd428e3/2020/07/07.hs | haskell | Lazy maps for the win!
Just for fun | import Control.Arrow
import Data.List
import Data.List.Split
import Data.Map (Map, (!))
import qualified Data.Map as M
import qualified Data.Set as S
import Text.Printf
import Debug.Trace
main = interact $
readInput >>> applyAll [solve... |
80c69d6e8ed92a8246d5338acb7261eaf30b2e2ebf0329fc65d43733bf793336 | lispgames/glop | package.lisp | (defpackage #:glop-bridge
(:use #:cl #:cffi)
(:export #:*ns-app*
#:cf-bundle-get-bundle-with-identifier
#:cf-bundle-get-function-pointer-for-name
#:copy-all-display-modes
#:copy-display-mode
#:glop-app-next-event
#:glop-app-run
#:glop-app-... | null | https://raw.githubusercontent.com/lispgames/glop/45e722ab4a0cd2944d550bf790206b3326041e38/src/osx/package.lisp | lisp | (defpackage #:glop-bridge
(:use #:cl #:cffi)
(:export #:*ns-app*
#:cf-bundle-get-bundle-with-identifier
#:cf-bundle-get-function-pointer-for-name
#:copy-all-display-modes
#:copy-display-mode
#:glop-app-next-event
#:glop-app-run
#:glop-app-... | |
84ef41a21cec459b353c3a4f8e4f5edd436365637666b8844399b879838a4b3c | tmfg/mmtis-national-access-point | project.clj | (defproject ote "0.1-SNAPSHOT"
Clojure - Eclipse Public License 1.0
[org.clojure/clojure "1.10.1"]
;; ClojureScript (clojure to js) - Eclipse Public License 1.0
[org.clojure/clojurescript "1.10.597"]
;; CSV parser for backend
[org.cl... | null | https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/dbcb300fcb9323b02bbfedfdc798a4f0e27faf8c/ote/project.clj | clojure | ClojureScript (clojure to js) - Eclipse Public License 1.0
CSV parser for backend
CSV parser for frontend - Eclipse Public License 1.0
http-kit HTTP server (and client) - Apache License Version 2.0.
Fixes server loop error
[http-kit "2.3.0"]
Support for multipart file upload - Apache 2.0
Routing library for publ... | (defproject ote "0.1-SNAPSHOT"
Clojure - Eclipse Public License 1.0
[org.clojure/clojure "1.10.1"]
[org.clojure/clojurescript "1.10.597"]
[org.clojure/data.csv "0.1.4"]
[testdouble/clojurescript.csv "0.3.0"]
Components - MIT
[com.... |
96a1187af9970de6d7e9dadea5dd8282e1983b28df6a8ba6d4a2338ec9334201 | uxbox/uxbox-backend | projects.clj | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
Copyright ( c ) 2016 < >
(ns uxbox.frontend.projects
(:require [clojure.spec :as s]
[promesa.core :as p]
[cat... | null | https://raw.githubusercontent.com/uxbox/uxbox-backend/036c42db8424be3ac34c38be80577ee279141681/src/uxbox/frontend/projects.clj | clojure |
--- List Projects
--- Create Projects
--- Update Project
--- Delete Project
--- Retrieve project | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2016 < >
(ns uxbox.frontend.projects
(:require [clojure.spec :as s]
[promesa.core :as p]
[catacu... |
3d24a569c0bb72285f3922805e0eef2391f68a0bd2500937590bb5b126fca79c | tlaitinen/yesod-dsl | Json.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
{-# LANGUAGE OverloadedStrings #-}
module YesodDsl.Generator.Json (moduleToJson) where
import YesodDsl.AST
import Data.Aeson.Encode.Pretty
import qualified Data.Text as T
import Data.Aeson
import Data.Maybe
import qualified Data.Vector as V
import qualified Da... | null | https://raw.githubusercontent.com/tlaitinen/yesod-dsl/e248471bc708542dd050d96ac9fde627e9e349ae/YesodDsl/Generator/Json.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
module YesodDsl.Generator.Json (moduleToJson) where
import YesodDsl.AST
import Data.Aeson.Encode.Pretty
import qualified Data.Text as T
import Data.Aeson
import Data.Maybe
import qualified Data.Vector as V
import qualified Data.Text.Lazy.Encoding as LTE
import... |
1b8fab6ed48ca1fa3133af70510358c1d7897438b718b97ca475832dc22a2b08 | jacekschae/learn-re-frame-course-files | inboxes.cljs | (ns app.inbox.views.inboxes
(:require [re-frame.core :as rf]
[app.components.page-nav :refer [page-nav]]
["@smooth-ui/core-sc" :refer [Box]]))
(defn inboxes
[]
(let [user-inboxes @(rf/subscribe [:user-inboxes])]
[:> Box
[page-nav {:center "Inbox"}]
[:> Box {:class "cards"}
... | null | https://raw.githubusercontent.com/jacekschae/learn-re-frame-course-files/a86e6f14b89c595b4389b03459539a9544af4e1d/increments/45-inbox-card/src/app/inbox/views/inboxes.cljs | clojure | (ns app.inbox.views.inboxes
(:require [re-frame.core :as rf]
[app.components.page-nav :refer [page-nav]]
["@smooth-ui/core-sc" :refer [Box]]))
(defn inboxes
[]
(let [user-inboxes @(rf/subscribe [:user-inboxes])]
[:> Box
[page-nav {:center "Inbox"}]
[:> Box {:class "cards"}
... | |
a13a4cd8c687237d43217cfc95cce145446ea3f37fe8d89303eaec3c54a20c81 | taktoa/hsdm | X11.hs | # LANGUAGE BangPatterns #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE TemplateHaskell #-}
module System.HSDM.X11 where
import qualified Codec.Picture.Png as JP
import qualified Codec.P... | null | https://raw.githubusercontent.com/taktoa/hsdm/e088ddbd20da76ac40450ae4cca9b1f87d042c58/haskell/src/System/HSDM/X11.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE PatternSynonyms #
# LANGUAGE TemplateHaskell #
FIXME: should cover whole screen
FIXME: these use partial accessors rather than pattern matching
find a good (concise) way to pattern match these
perhaps using -XPatternSynonyms? | # LANGUAGE BangPatterns #
# LANGUAGE GeneralizedNewtypeDeriving #
module System.HSDM.X11 where
import qualified Codec.Picture.Png as JP
import qualified Codec.Picture.Types as JP
import Control.Concurrent
import Control.Concurrent.Async
import Control.Ex... |
035eb55220bd18596f18714016aaa373360db0495c2b0b8024f9947fbecf81ab | takahisa/finale | pretty.mli |
* Copyright ( c ) 2017 - 2018 < > All rights reserved .
*
* Permission is hereby granted , free of charge , to any person obtaining a copy
* of this software and associated documentation files ( the " Software " ) , to deal
* in the Software without restriction , including without limitation the right... | null | https://raw.githubusercontent.com/takahisa/finale/8571cc152cc3d88be1d0be1c62112b4b960a9410/lib/pretty.mli | ocaml |
* Copyright ( c ) 2017 - 2018 < > All rights reserved .
*
* Permission is hereby granted , free of charge , to any person obtaining a copy
* of this software and associated documentation files ( the " Software " ) , to deal
* in the Software without restriction , including without limitation the right... | |
6feb2e8c85c28da48546cd2d8284469bb50f2f2205ea1b506829f20e1b62cc69 | grwlf/htvm | TVMRuntime.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE LambdaCase #
# LANGUAGE TypeApplications #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE ExistentialQuantification #
# LANGUAGE GeneralizedNewtypeDeriving #
module HTVM.TVMRuntime (
mo... | null | https://raw.githubusercontent.com/grwlf/htvm/90cff0ebde0bdff3e8048a82a5b1b0d46fc7d66e/src/HTVM/TVMRuntime.hs | haskell | # LANGUAGE RankNTypes #
| Build TVM module @modname@ from EDSL definition.
environment should contain all the settings required for including TVM
headers and linking with TVM library.
In particular, consider reviewing the following variables:
- @PATH@ to contain paths to @g++@ and @clang-format@ binaries
... | # LANGUAGE LambdaCase #
# LANGUAGE TypeApplications #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE ExistentialQuantification #
# LANGUAGE GeneralizedNewtypeDeriving #
module HTVM.TVMRuntime (
module HTVM.TVMRuntime.FFI
,... |
91799adcab7d77b89cb85c62b541ff40fc35fd62223d3d8f4530894bd5360d4a | zack-bitcoin/amoveo | contract_winnings_tx.erl | -module(contract_winnings_tx).
-export([go/4, make_dict/5, make_dict/6]).
-include("../../records.hrl").
make_dict(From, SubAcc, CID, Fee, PayoutVector) ->
make_dict(From, SubAcc, CID, Fee, 0, PayoutVector).
make_dict(From, SubAcc, CID, Fee, Row, Proof) ->
A = trees:get(accounts, From),
Nonce = A#acc.nonce... | null | https://raw.githubusercontent.com/zack-bitcoin/amoveo/2d5755abd80f0852ab2faf3f1fda83c76de07f93/apps/amoveo_core/src/consensus/txs/contract_winnings_tx.erl | erlang | true -> none
end,
this prevents anyone from moving money into another resolved contract. So they are forced to do the matrix multiplication simplification when possible.
it is a vector
payout to veo
payout to subcurrency
if you receive 0, then don't change anything.
if the acccount doesn't exist, create it. | -module(contract_winnings_tx).
-export([go/4, make_dict/5, make_dict/6]).
-include("../../records.hrl").
make_dict(From, SubAcc, CID, Fee, PayoutVector) ->
make_dict(From, SubAcc, CID, Fee, 0, PayoutVector).
make_dict(From, SubAcc, CID, Fee, Row, Proof) ->
A = trees:get(accounts, From),
Nonce = A#acc.nonce... |
95a26c678091e5cf7949234fdab2a3f8d58a8234a2531a4a41e9d780fb37aeef | JuneKelly/hicdown | hicdown.clj | (ns wtf.halt.hicdown
(:require [instaparse.core :as insta]
[wtf.halt.hicdown.html :as html]
[clojure.java.io :as io]))
(def parser
(insta/parser (io/resource "hicdown.bnf")))
(defn parse-string [text]
(parser text))
(defn render-string [text]
(-> text
(parse-string)
(html/... | null | https://raw.githubusercontent.com/JuneKelly/hicdown/20479d48074059c396cdf7fc5b357a620a852d8f/src/wtf/halt/hicdown.clj | clojure | (ns wtf.halt.hicdown
(:require [instaparse.core :as insta]
[wtf.halt.hicdown.html :as html]
[clojure.java.io :as io]))
(def parser
(insta/parser (io/resource "hicdown.bnf")))
(defn parse-string [text]
(parser text))
(defn render-string [text]
(-> text
(parse-string)
(html/... | |
9192d529206dac519055083552994910c0d8aa6fbd2fea51f775057bae855c42 | Ashe/HSRogue | Blit.hs | module Blit
( draw
, blankSurface
) where
import Apecs
import SDL hiding (get, Vector)
import SDL.Font
import Foreign.C
import Data.HashMap as HM
import Data.Text(Text, pack)
import Control.Monad(unless, when, void)
import Control.Monad.IO.Class(MonadIO)
import Control.Arrow((***))
import Data.Vector (ifoldl)
impor... | null | https://raw.githubusercontent.com/Ashe/HSRogue/ced7b7631a3dd4f0e6919ae98bda1c4316c8be38/src/Blit.hs | haskell | Type synonym for fonts
Handle surface drawing
displayFps s r fps uiFont
Easy way to create a blank surface, MUST be destroyed
Display FPS
Render a given surface by turning it into a texture
Render solid text | module Blit
( draw
, blankSurface
) where
import Apecs
import SDL hiding (get, Vector)
import SDL.Font
import Foreign.C
import Data.HashMap as HM
import Data.Text(Text, pack)
import Control.Monad(unless, when, void)
import Control.Monad.IO.Class(MonadIO)
import Control.Arrow((***))
import Data.Vector (ifoldl)
impor... |
fc39f770072824407ab44c8de7c5dbedeb9e1d8c93b0c2d4323181d475dab933 | hakaru-dev/hakaru | AST.hs | # LANGUAGE CPP
, GADTs
, , PolyKinds
, ExistentialQuantification
, StandaloneDeriving
, TypeFamilies
, TypeOperators
, OverloadedStrings
, DeriveDataTypeable
, ScopedTypeVariables
, RankNT... | null | https://raw.githubusercontent.com/hakaru-dev/hakaru/94157c89ea136c3b654a85cce51f19351245a490/haskell/Language/Hakaru/Parser/AST.hs | haskell | # OPTIONS_GHC -Wall -fwarn-tabs #
# UNPACK #
# UNPACK #
--------------------------------------------------------------
--------------------------------------------------------------
match
For backwards compatibility
--------------------------------------------------------------
---------------------------------------... | # LANGUAGE CPP
, GADTs
, , PolyKinds
, ExistentialQuantification
, StandaloneDeriving
, TypeFamilies
, TypeOperators
, OverloadedStrings
, DeriveDataTypeable
, ScopedTypeVariables
, RankNT... |
8b1bad2cf3f3c57e6bd090aed29ab9a60a5d0b0954a9805a352d8accf30688f1 | arunisaac/ccwl | configure.scm | ;;; ccwl --- Concise Common Workflow Language
Copyright © 2022 Arun Isaac < >
;;;
This file is part of ccwl .
;;;
;;; ccwl is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License ... | null | https://raw.githubusercontent.com/arunisaac/ccwl/b2e3a9fd8b3c0c2a76684a78aaff80a759641120/configure.scm | scheme | ccwl --- Concise Common Workflow Language
ccwl is free software: you can redistribute it and/or modify it
(at your option) any later version.
ccwl 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 © 2022 Arun Isaac < >
This file is part of ccwl .
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
along with ccwl . If not , see < / > .
(use-... |
216558dfcf13236c78e92cc713cede7d4959d11b388f1271c54a82cef18eb610 | wesen/ruinwesen | packages.lisp | (in-package :cl-user)
(defpackage :ruinwesen.config
(:use :cl :cl-user)
(:export #:*website-url*
#:*website-directory*
#:*webserver-port*
#:*store-directory*
#:*thirdparty-directory*
#:*xml-catalog-directory*
))
(defpackage :ruinwesen
(:use :cl
:cl-user
:cl-interpol
:cl-ppcre
:cl-gd
... | null | https://raw.githubusercontent.com/wesen/ruinwesen/9f3ccea85425cf46b57e76144b3114ca342bad0f/ruinwesen/src/packages.lisp | lisp | (:export ) | (in-package :cl-user)
(defpackage :ruinwesen.config
(:use :cl :cl-user)
(:export #:*website-url*
#:*website-directory*
#:*webserver-port*
#:*store-directory*
#:*thirdparty-directory*
#:*xml-catalog-directory*
))
(defpackage :ruinwesen
(:use :cl
:cl-user
:cl-interpol
:cl-ppcre
:cl-gd
... |
26c564f3e9840481bcd7d4c1e72f76c10a712da38ee8800e7bbd83887f69d2c4 | haskell-works/oops | VariantSpec.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Data.VariantSpec (spec) where
import HaskellWorks.Hspec.Hedgehog (require)
import Hedgehog ((===), forAll, property)
import Test.Hspec (describe, it, Spec)
import qualif... | null | https://raw.githubusercontent.com/haskell-works/oops/77a086fd430da93a9c7331c087c46d54a9e61cad/test/Data/VariantSpec.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE OverloadedStrings # | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Data.VariantSpec (spec) where
import HaskellWorks.Hspec.Hedgehog (require)
import Hedgehog ((===), forAll, property)
import Test.Hspec (describe, it, Spec)
import qualified Data.Variant as DV
import qualified Hedgehog.Gen.QuickCheck as G
HL... |
1496ae87b07489bb7b77a4e3b59ca3606548e6e7c43b2943c56d92e049b867b6 | takikawa/racket-ppa | top-interaction.rkt | #lang racket/base
(require (for-syntax racket/base racket/lazy-require))
(begin-for-syntax
(lazy-require [(submod "." implementation)
(:type-impl :kind-impl :print-type-impl :query-type/args-impl :query-type/result-impl)]))
(provide
(for-syntax
interactive-command?
interactive-command-pr... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/share/pkgs/typed-racket-lib/typed-racket/base-env/top-interaction.rkt | racket | this one isn't defined with a macro as below
This makes sure unions are totally flat for the
is ever used, more may need to be done.
given a function and input types, display the result type
create a dummy function with the right argument types
given a function and a desired return type, fill in the blanks | #lang racket/base
(require (for-syntax racket/base racket/lazy-require))
(begin-for-syntax
(lazy-require [(submod "." implementation)
(:type-impl :kind-impl :print-type-impl :query-type/args-impl :query-type/result-impl)]))
(provide
(for-syntax
interactive-command?
interactive-command-pr... |
1dc5be1453266f0d43ed8adbbb5129c6546252a252f80aa52807e349c60c23a9 | pirapira/coq2rust | coqOps.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/ide/coqOps.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
proofs being processed by the slave... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Util
open Coq
open Ideut... |
80354519cac10bd6334be67004e87e206df9e39e0cc1e9995d0ea139e3fca8be | aryx/lfs | conj.ml | (** Conjunctions of formulas from the sub-logic. *)
module type PARAM =
sig
* Set to [ true ] if this functor is embedded in another ' ' occurence .
val sep : Token.t option (** Token to be used as the conjunction connector (optional). *)
val lgg : bool (** Set to [true] if "lggs" is the required impleme... | null | https://raw.githubusercontent.com/aryx/lfs/b931530c7132b77dfaf3c99d452dc044fce37589/logfun/src/conj.ml | ocaml | * Conjunctions of formulas from the sub-logic.
* Token to be used as the conjunction connector (optional).
* Set to [true] if "lggs" is the required implementation of [gen].
public functions
to be completed
conjunctions of upper bounds
smallest conjunctions of smallest upper bounds |
module type PARAM =
sig
* Set to [ true ] if this functor is embedded in another ' ' occurence .
end
module Make (Param : PARAM) (E : Logic.T) =
struct
include Logic.Default
type t = E.t list
let insert_elt : E.t -> t -> t =
fun e d ->
if List.exists (fun e' -> E.entails e' e) d
... |
f329023ad5e9716adc434ade8a21a65a824b490eec3dad77f0a08fc7de50a81f | openmusic-project/openmusic | grouping.lisp | ;=========================================================================
OpenMusic : Visual Programming Language for Music Composition
;
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
;
This file is part of the OpenMusic environment sources
;
OpenMusic is free software : you ... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/0bd8613a844a382e5db7185be1b5a5d026d66b20/OPENMUSIC/code/projects/musicproject/container/rythme/grouping.lisp | lisp | =========================================================================
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
======... | OpenMusic : Visual Programming Language for Music Composition
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
This file is part of the OpenMusic environment sources
OpenMusic is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public ... |
f2973c3e54793d59ad175d6d2ffe70df993c7e9bdb6baa84239674d593a15e10 | RickMoynihan/redef-methods | project.clj | (defproject tube-alloys/redef-methods "1.0.0-SNAPSHOT"
:description "Stub clojure multi-method bodies."
:url "-methods"
:license {:name "EPL-2.0"
:url "-2.0/"}
:dependencies [[org.clojure/clojure "1.9.0"]]
)
| null | https://raw.githubusercontent.com/RickMoynihan/redef-methods/08fb1ef8e449f23265e088c2f641112ec64147a2/project.clj | clojure | (defproject tube-alloys/redef-methods "1.0.0-SNAPSHOT"
:description "Stub clojure multi-method bodies."
:url "-methods"
:license {:name "EPL-2.0"
:url "-2.0/"}
:dependencies [[org.clojure/clojure "1.9.0"]]
)
| |
731e42124838e0aced85b633882b23fb02fd04ce0571630e06f45d1b6cc05885 | GaloisInc/ivory | Coroutine.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module Coroutine where
import Ivory.Language
import Ivory.Compile.C.CmdlineFrontend
-- No-op "action" for the coroutine to trigger
emit :: Def ('[Sint32] ':-> ())
emit = proc "emit" $ \ _ -> body $ retVoid
sequenced :: Coroutine ('Stored Sint32)
sequenced = coroutin... | null | https://raw.githubusercontent.com/GaloisInc/ivory/53a0795b4fbeb0b7da0f6cdaccdde18849a78cd6/ivory-examples/examples/Coroutine.hs | haskell | No-op "action" for the coroutine to trigger | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module Coroutine where
import Ivory.Language
import Ivory.Compile.C.CmdlineFrontend
emit :: Def ('[Sint32] ':-> ())
emit = proc "emit" $ \ _ -> body $ retVoid
sequenced :: Coroutine ('Stored Sint32)
sequenced = coroutine "sequenced" $ CoroutineBody $ \ yield -> do
... |
f9ae46645577eaf7d72825c3ac5c2ad101fc471c23b24bffcd2cdd0b2c0c662e | Vonmo/eapa | eapa_app.erl | %%%-------------------------------------------------------------------
%% @doc erbloom public API
%% @end
%%%-------------------------------------------------------------------
-module(eapa_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%%========================================... | null | https://raw.githubusercontent.com/Vonmo/eapa/7c577851e3598c8c524999b89c89f9267e769e24/src/eapa_app.erl | erlang | -------------------------------------------------------------------
@doc erbloom public API
@end
-------------------------------------------------------------------
Application callbacks
====================================================================
API
========================================================... |
-module(eapa_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
eapa_sup:start_link().
stop(_State) ->
ok.
Internal functions
|
cc492921d4230b2354003b0b8bc453e223844c77a4a9d74db5f0a81996116f9c | spurious/sagittarius-scheme-mirror | queue.scm | -*- mode : scheme ; coding : utf-8 -*-
;;;
;;; queue.scm - Queue utilities
;;;
Copyright ( c ) 2010 - 2014 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistribu... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/util/queue.scm | scheme | coding : utf-8 -*-
queue.scm - Queue utilities
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions ... | Copyright ( c ) 2010 - 2014 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
API names are taken from Gauche and slib
(... |
dc68a0ff06a65fa2ad9a37048960cb5dc65d64cf88c785eccbea11f8e982c679 | sigscale/5g-ngap | ngap.erl | %%% ngap.erl
%%% vim: ts=3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2020 SigScale Global Inc.
%%% @end
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%% you may not use this file except in compliance with the License.
%%% You may obtain a copy of the Lic... | null | https://raw.githubusercontent.com/sigscale/5g-ngap/aee18be4cf3175fb692d20d759c1472447a72257/src/ngap.erl | erlang | ngap.erl
vim: ts=3
@end
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the speci... | 2020 SigScale Global Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
{ @link //ngap . } application .
-module(ngap).
-copyright('Copyright (c) 2020 SigScale Global Inc.').
export the ngap public API
-export([s... |
ae20e0636d2e45f3a6f29b825fe2d5fc52ee0620e7d036408e165a7e9d6f8a20 | mirage/irmin | test_fs_unix.ml |
* Copyright ( c ) 2022 Tarides < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND ... | null | https://raw.githubusercontent.com/mirage/irmin/51203d03a74a2aeca5d417b7324e8d9d18399116/test/irmin-fs/test_fs_unix.ml | ocaml |
* Copyright ( c ) 2022 Tarides < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND ... | |
282ef17863a07ab93a9d32874e68ec3fcb67c3195ac9a430b4132d3ef84c1ac0 | amnh/PCG | IATests.hs | {-#LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
module IATests (main, processFiles) where
import Data.Vector hiding ((++), length, foldr, null, zipWith, and, head, foldr, reverse, sequence, filter, tail, map)
import qualified Data.Vector as V ((++), zipWith, and, head, length, foldr, reverse, toList, filter, ... | null | https://raw.githubusercontent.com/amnh/PCG/3a1b6bdde273ed4dc09717623986e1144b006904/prototype/IATests.hs | haskell | #LANGUAGE TypeSynonymInstances, FlexibleInstances #
trace ("Actual number of ones " ++ show numOnes ++ " with n " ++ show n)
trace ("matches " ++ show matches ++ " with nodes " ++ show ia ++ show tree)
trace ("ioTree " ++ fmap show singleRead)
trace ("fitchTree " ++ fmap show ioTree)
| Get the cost at the root of the... |
module IATests (main, processFiles) where
import Data.Vector hiding ((++), length, foldr, null, zipWith, and, head, foldr, reverse, sequence, filter, tail, map)
import qualified Data.Vector as V ((++), zipWith, and, head, length, foldr, reverse, toList, filter, tail, map)
import qualified Component as PN
import Data.... |
6abf2947e55e61461c11571af1fe846f3c9edb55fa2cea9c7abcf1a0d3ff52a1 | dimitri/pgloader | mysql-csv.lisp | ;;;
;;; Tools to handle MySQL data fetching: old code, untested, kept for reference.
;;;
(in-package :pgloader.source.mysql)
;;;
;;; MySQL bulk export to file, in PostgreSQL COPY TEXT format
;;;
(defun export-database (dbname &key only-tables)
"Export MySQL tables into as many TEXT files, in the PostgreSQL COPY for... | null | https://raw.githubusercontent.com/dimitri/pgloader/3047c9afe141763e9e7ec05b7f2a6aa97cf06801/src/sources/mysql/mysql-csv.lisp | lisp |
Tools to handle MySQL data fetching: old code, untested, kept for reference.
MySQL bulk export to file, in PostgreSQL COPY TEXT format
load data
update and report stats
Copy data from a target database into files in the PostgreSQL COPY TEXT
format, then load those files. Useful mainly to compare timing with ... |
(in-package :pgloader.source.mysql)
(defun export-database (dbname &key only-tables)
"Export MySQL tables into as many TEXT files, in the PostgreSQL COPY format"
(let ((all-columns (list-all-columns :dbname dbname)))
(setf *state* (pgloader.utils:make-pgstate))
(report-header)
(loop
for (table... |
d113bb793a797ebb0457fc364d6a1025ce7c0a432de64d86a67a049945f33fc9 | google/codeworld | source.hs |
Copyright 2020 The CodeWorld Authors . All rights reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to ... | null | https://raw.githubusercontent.com/google/codeworld/77b0863075be12e3bc5f182a53fcc38b038c3e16/codeworld-compiler/test/testcases/missingBracket/source.hs | haskell |
Copyright 2020 The CodeWorld Authors . All rights reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to ... | |
da97356263915ecec1e2dc53d1d1d38c0bdc534e039bff6c416cea9dfb3c9686 | facebook/infer | annotations.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/facebook/infer/4ee1c2a8e783ee770b61547a38ff1715d6ed75fe/infer/src/absint/annotations.mli | ocaml | * Annotations.
* [annot_ends_with annot ann_name] returns true if the class name of [annot], without the package,
is equal to [ann_name]
* Check if there is an annotation in [ia] which ends with the given name
* Annotations for readonly injectors. The injector framework initializes the field but does not
wri... |
* 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
... |
0d7cde13349245f2c9d47acdfec2b885e60a289e8610ea1398b9ca6f44695a7d | fantasytree/fancy_game_server | sys_rand.erl | %%----------------------------------------------------
%% 随机数种子服务器
%%----------------------------------------------------
-module(sys_rand).
-behaviour(gen_server).
-export([
start_link/0
,get_seed/0
]
).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-in... | null | https://raw.githubusercontent.com/fantasytree/fancy_game_server/4ca93486fc0d5b6630170e79b48fb31e9c6e2358/src/sys/sys_rand.erl | erlang | ----------------------------------------------------
随机数种子服务器
----------------------------------------------------
----------------------------------------------------
对外接口
----------------------------------------------------
@doc 启动服务器
@doc 取得一个随机数种子
----------------------------------------------------
内部调用处理
... | -module(sys_rand).
-behaviour(gen_server).
-export([
start_link/0
,get_seed/0
]
).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-include("common.hrl").
-record(state, {seed}).
-spec start_link() -> {ok, pid()} | ignore | {error, term()}.
start_link() ... |
54b70589fcda34def7fd22d7282e351b13ff49049e30f7a98465261caf6190b3 | Tclv/HaskellBook | Arithmetic.hs | module Arithmetic where
import Data.Char (toUpper)
half :: Fractional a => a -> a
half x = x / 2
halfIdentity :: Fractional a => a -> a
halfIdentity = (*2) . half
listOrdered :: (Ord a) => [a] -> Bool
listOrdered xs = snd $ foldr go (Nothing, True) xs
where go _ status@(_, False) = status
go y (Nothing,... | null | https://raw.githubusercontent.com/Tclv/HaskellBook/78eaa5c67579526b0f00f85a10be3156bc304c14/ch14/ArithmeticTests/src/Arithmetic.hs | haskell | module Arithmetic where
import Data.Char (toUpper)
half :: Fractional a => a -> a
half x = x / 2
halfIdentity :: Fractional a => a -> a
halfIdentity = (*2) . half
listOrdered :: (Ord a) => [a] -> Bool
listOrdered xs = snd $ foldr go (Nothing, True) xs
where go _ status@(_, False) = status
go y (Nothing,... | |
f5805649690f65f4435a83c480851e99ff5bd652c36b87d57d5b96e1ea2ed630 | tek/chiasma | Tree.hs | module Chiasma.Lens.Tree where
import Control.Lens (
Fold,
Index,
IxValue,
Ixed (ix),
Plated (..),
cosmos,
makeClassy_,
preview,
transform,
)
import Data.Data (Data)
import Data.Foldable (foldrM)
import Prelude hiding (ix, transform)
import Chiasma.Data.Ident (Ident, Identifiable (..))
import Chia... | null | https://raw.githubusercontent.com/tek/chiasma/5ffd97739f34f5a9a2e6f62aff8c0082c690b61d/packages/chiasma/lib/Chiasma/Lens/Tree.hs | haskell | module Chiasma.Lens.Tree where
import Control.Lens (
Fold,
Index,
IxValue,
Ixed (ix),
Plated (..),
cosmos,
makeClassy_,
preview,
transform,
)
import Data.Data (Data)
import Data.Foldable (foldrM)
import Prelude hiding (ix, transform)
import Chiasma.Data.Ident (Ident, Identifiable (..))
import Chia... | |
de06e28ad38d741aac2a944111a9aabc742370e2dccd5fd567da1a912d20fe49 | dpiponi/Moodler | xmidi8.hs |
do
(x0, y0) <- mouse
let (x, y) = quantise2 quantum (x0, y0)
root <- currentPlane
keyboard8 <- new' "input"
alias "keyboard8" keyboard8
trigger8 <- new' "input"
alias "trigger8" trigger8
modulation8 <- new' "input"
alias "modulation8" modulation8
bend8 <- new' "input"
al... | null | https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/xmidi8.hs | haskell |
do
(x0, y0) <- mouse
let (x, y) = quantise2 quantum (x0, y0)
root <- currentPlane
keyboard8 <- new' "input"
alias "keyboard8" keyboard8
trigger8 <- new' "input"
alias "trigger8" trigger8
modulation8 <- new' "input"
alias "modulation8" modulation8
bend8 <- new' "input"
al... | |
b76de854d6e9878ac234a9cc176e1aa33cb77d05e1484561ee160e3babb0a655 | S8A/htdp-exercises | ex348.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex348) (read-case-sensitive #t) (teachpacks ((lib "abstraction.rkt" "teachpack" "2htdp") (... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex348.rkt | racket | about the language level of this file in a form that our tools can easily process.
.: Data definitions :.
An Addition is a structure:
interpretation (make-add a b) is the sum of a and b
A Multiplication is a structure:
interpretation (make-mul a b) is the product of a and b
A Conjunction (AND) is a structure:
... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex348) (read-case-sensitive #t) (teachpacks ((lib "abstraction.rkt" "teachpack" "2htdp") (lib "dir.rkt" "teachpack" "htdp"))) (htdp-settings #(#t constructor repeating-decimal ... |
84df055808f8ce8815517d2e7698c74b177e47d176bb4a7069c1f300bfd5d2dd | CorticalComputer/DXNN2 | tot_topological_mutations.erl | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
This source code and work is provided and developed by . COM
%
The original release of this source code and the DXNN MK2 system was introduced and explained in my book : Handbook of Neuroevolution Through Erlang . Springer 2012 , print I... | null | https://raw.githubusercontent.com/CorticalComputer/DXNN2/d57d43a91f125f3930e06611f5fce15a0462b32f/src/tot_topological_mutations.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language g... | This source code and work is provided and developed by . COM
The original release of this source code and the DXNN MK2 system was introduced and explained in my book : Handbook of Neuroevolution Through Erlang . Springer 2012 , print ISBN : 978 - 1 - 4614 - 4462 - 6 ebook ISBN : 978 - 1 - 4614 - 4463 - 6 .
Co... |
5a3533d16a475a377ba15f24c5ddb7b77b1b538f51729173167e7283bc8d508f | yesodweb/wai | File.hs | # LANGUAGE CPP #
module Network.Wai.Handler.Warp.HTTP2.File where
import Network.HTTP2.Server
import Network.Wai.Handler.Warp.Types
#ifdef WINDOWS
pReadMaker :: InternalInfo -> PositionReadMaker
pReadMaker _ = defaultPositionReadMaker
#else
import Network.Wai.Handler.Warp.FdCache
import Network.Wai.Handler.Warp.Sen... | null | https://raw.githubusercontent.com/yesodweb/wai/f59e577f865d017b4726826ac5586bb916cf315b/warp/Network/Wai/Handler/Warp/HTTP2/File.hs | haskell | | 'PositionReadMaker' based on file descriptor cache.
| # LANGUAGE CPP #
module Network.Wai.Handler.Warp.HTTP2.File where
import Network.HTTP2.Server
import Network.Wai.Handler.Warp.Types
#ifdef WINDOWS
pReadMaker :: InternalInfo -> PositionReadMaker
pReadMaker _ = defaultPositionReadMaker
#else
import Network.Wai.Handler.Warp.FdCache
import Network.Wai.Handler.Warp.Sen... |
cc4ca6c928548b290a9056b84815d301b2dacf13570c26f3bd95b1705e6e3e45 | bikallem/eehs | configure.ml | module C = Configurator.V1
let () =
let import c =
C.C_define.import c ~c_flags:[ "-D_GNU_SOURCE" ]
~includes:[ "sys/epoll.h"; "stddef.h"; "errno.h" ]
in
C.main ~name:"configure" (fun c ->
let defs =
import c
C.C_define.Type.
[
("EPOLL_CTL_ADD", Int);
... | null | https://raw.githubusercontent.com/bikallem/eehs/d49163d1f945f332b9520bca4b78602cb857d40b/lib/configure/configure.ml | ocaml | Events flags for epoll_wait(). -pages/man2/epoll_ctl.2.html | module C = Configurator.V1
let () =
let import c =
C.C_define.import c ~c_flags:[ "-D_GNU_SOURCE" ]
~includes:[ "sys/epoll.h"; "stddef.h"; "errno.h" ]
in
C.main ~name:"configure" (fun c ->
let defs =
import c
C.C_define.Type.
[
("EPOLL_CTL_ADD", Int);
... |
f6561663f7a26baa9e405abcd733762ef26168795f459b8c513e3ffc51c5edc1 | exercism/clojurescript | anagram.cljs | (ns anagram)
(defn anagrams-for [] ;; <--- arguments goes here...
;; your code goes here...
)
| null | https://raw.githubusercontent.com/exercism/clojurescript/7700a33e17a798f6320aad01fb59a637bd21e12b/exercises/practice/anagram/src/anagram.cljs | clojure | <--- arguments goes here...
your code goes here... | (ns anagram)
)
|
f39d893794b64948bce66cf832492fbb42a9ea7539d49814db59d85da9a74674 | tfausak/monadoc-5 | Size.hs | module Monadoc.Type.Size where
import qualified Database.SQLite.Simple.FromField as Sql
import qualified Database.SQLite.Simple.ToField as Sql
import Monadoc.Prelude
-- | The size of something in bytes. Although this is backed by an 'Int', by
-- convention it is never negative. It uses an 'Int' because most functions... | null | https://raw.githubusercontent.com/tfausak/monadoc-5/5361dd1870072cf2771857adbe92658118ddaa27/src/lib/Monadoc/Type/Size.hs | haskell | | The size of something in bytes. Although this is backed by an 'Int', by
convention it is never negative. It uses an 'Int' because most functions
that produce a size return 'Int's. Use 'fromInt' and 'toInt' to do
conversions. | module Monadoc.Type.Size where
import qualified Database.SQLite.Simple.FromField as Sql
import qualified Database.SQLite.Simple.ToField as Sql
import Monadoc.Prelude
newtype Size
= Size Int
deriving (Eq, Show)
instance Sql.FromField Size where
fromField = map fromInt <<< Sql.fromField
instance Sql.ToField Siz... |
2336c6b92f07d0a4f8220d82b485c26973d290d978bfde5bdeca08728b479795 | haskell-opengl/OpenGL | Matrix.hs | --------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GLU.Matrix
Copyright : ( c ) 2002 - 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
This module corresponds to cha... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGL/f7af8fe04b0f19c260a85c9ebcad612737cd7c8c/src/Graphics/Rendering/OpenGL/GLU/Matrix.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.Rendering.OpenGL.GLU.Matrix
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
---------------------------------... | Copyright : ( c ) 2002 - 2019
Maintainer : < >
This module corresponds to chapter 4 ( Matrix Manipulation ) of the GLU specs .
module Graphics.Rendering.OpenGL.GLU.Matrix (
ortho2D, perspective, lookAt, pickMatrix,
project, unProject, unProject4
) where
import Foreign.Marshal.Alloc
import Fo... |
36d45b113b6ad785d0984d3ddbbf23bbc3f36d7c1cd234cde18b27d96150e4fc | exercism/common-lisp | matrix.lisp | (defpackage :matrix
(:use :cl)
(:export :row
:column))
(in-package :matrix)
(defun row (input-matrix index))
(defun column (input-matrix index))
| null | https://raw.githubusercontent.com/exercism/common-lisp/252ce0339f4887e46a25669d568d0f1b615a8d40/exercises/practice/matrix/matrix.lisp | lisp | (defpackage :matrix
(:use :cl)
(:export :row
:column))
(in-package :matrix)
(defun row (input-matrix index))
(defun column (input-matrix index))
| |
6c735e47b57a29a3f548302dfd47b6b2d925d0bb8a288a7481589158bc008bd2 | finnishtransportagency/harja | mhu_kulut.cljs | (ns harja.tiedot.urakka.kulut.mhu-kulut
(:require
[clojure.string :as string]
[tuck.core :as tuck]
[harja.ui.viesti :as viesti]
[harja.tyokalut.tuck :as tuck-apurit]
[harja.tiedot.urakka.urakka :as tila]
[harja.domain.kulut :as kulut]
[reagent.core :as r]
[clojure.string :as str]
[... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/1c9ed494fe3e33b8bb919b59b4e2b336bad50cc0/src/cljs/harja/tiedot/urakka/kulut/mhu_kulut.cljs | clojure | FAIL
HAUT
FORMITOIMINNOT | (ns harja.tiedot.urakka.kulut.mhu-kulut
(:require
[clojure.string :as string]
[tuck.core :as tuck]
[harja.ui.viesti :as viesti]
[harja.tyokalut.tuck :as tuck-apurit]
[harja.tiedot.urakka.urakka :as tila]
[harja.domain.kulut :as kulut]
[reagent.core :as r]
[clojure.string :as str]
[... |
3d269ae27e17ae6243bd63ce38d536c5f50730ccefb6c5a694e2cddb10100bb5 | parapluu/Concuerror | registered_send_3.erl | -module(registered_send_3).
-export([registered_send_3/0]).
-export([scenarios/0]).
scenarios() -> [{?MODULE, inf, dpor}].
registered_send_3() ->
Pid =
spawn(fun() ->
receive
ok -> ok
end
end),
Pid ! ok,
register(child, Pid),... | null | https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests/suites/basic_tests/src/registered_send_3.erl | erlang | -module(registered_send_3).
-export([registered_send_3/0]).
-export([scenarios/0]).
scenarios() -> [{?MODULE, inf, dpor}].
registered_send_3() ->
Pid =
spawn(fun() ->
receive
ok -> ok
end
end),
Pid ! ok,
register(child, Pid),... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.