_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 |
|---|---|---|---|---|---|---|---|---|
1fa22bedccf063744d003480fad7e83aa12b6c011d016e996c17682710f0e932 | mukul-rathi/bolt | bad_function_expr.ml | open Core
open Print_parsed_ast
let%expect_test "Function argument not annotated with type" =
print_parsed_ast "
function int f (x){ x}
void main(){
f(4)
}
" ;
[%expect {| Line:2 Position:23: syntax error |}]
let%expect_test "Function not annotated with return type" =
print_parsed_ast "
... | null | https://raw.githubusercontent.com/mukul-rathi/bolt/1faf19d698852fdb6af2ee005a5f036ee1c76503/tests/frontend/expect/parsing/bad_function_expr.ml | ocaml | open Core
open Print_parsed_ast
let%expect_test "Function argument not annotated with type" =
print_parsed_ast "
function int f (x){ x}
void main(){
f(4)
}
" ;
[%expect {| Line:2 Position:23: syntax error |}]
let%expect_test "Function not annotated with return type" =
print_parsed_ast "
... | |
0b9dbcabc4307785ff95a26845427d385a43af1b663135c31e8e0a8176a35104 | ocamllabs/ocaml-effects | opttoploop.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-effects/36008b741adc201bf9b547545344507da603ae31/toplevel/opttoploop.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Path
open Format
open Config
open... |
5649178c7e7b2a3535726e4cf0b02ebbc309d1e76879f618bcac6052756f1a80 | jeromesimeon/Galax | resolve_stream_context.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/streaming/resolve_stream_context.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : resolve_stream_context.ml , v 1.11 2007/08/30 22:39:53 simeon Exp $
open Error
module HashedEnv =
struct
type t = Namespace_context.nsenv * Namespace_names.uqname
let equal (e1,k1) (e2,k2) =
(e1 = e2) && (k1 = k2)
... |
dc1ffae67e2c86bd9fc0e06fbdc0c85c5e50a3442888a3eafa1470d29ea6687e | basho/riak_search | riak_search_op_scope.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
%%
%% -------------------------------------------------------------------
@doc The scope operation tells Search to switch to a new index
%%% and/or field for all f... | null | https://raw.githubusercontent.com/basho/riak_search/79c034350f37706a1db42ffca8f6449d4cce99e1/src/riak_search_op_scope.erl | erlang | -------------------------------------------------------------------
-------------------------------------------------------------------
and/or field for all future operations.
Update state and switch control to the group operator...
Get the new index...
Get the new field... | Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
@doc The scope operation tells Search to switch to a new index
-module(riak_search_op_scope).
-export([
extract_scoring_props/1,
preplan/2,
chain_op/4
]).
-include("riak_search.hrl").
-include_lib("lu... |
b3c40d1afbc4b87be89d8bc844bb1290f870446fefcdd928da5ee52adab9629c | vyzo/gerbil | gx-init-exe.scm | -*- -*-
( C ) vyzo at hackzen.org
executable module stub
(##namespace (""))
(declare
(block)
(standard-bindings)
(extended-bindings))
(define __gx#default-gerbil-home #f)
(define __gx#libdir #f)
(define __gx#load-module #f)
(define __gx#expander-loaded #f)
(define __gx#rtlibs
'("gx-gambc0"
"gx-gamb... | null | https://raw.githubusercontent.com/vyzo/gerbil/17fbcb95a8302c0de3f88380be1a3eb6fe891b95/src/gerbil/boot/gx-init-exe.scm | scheme | -*- -*-
( C ) vyzo at hackzen.org
executable module stub
(##namespace (""))
(declare
(block)
(standard-bindings)
(extended-bindings))
(define __gx#default-gerbil-home #f)
(define __gx#libdir #f)
(define __gx#load-module #f)
(define __gx#expander-loaded #f)
(define __gx#rtlibs
'("gx-gambc0"
"gx-gamb... | |
01de0b9cb84aee0f911f42bcb793faccb62a177509d07d146c722404dfacd95d | tisnik/clojure-examples | project.clj | (defproject carmineG "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:dependencies [[org.clojure/clojure "1.10.1"]
[com.taoensso/carmine "3.1.0"]]
:main ^:skip-aot carmineG.co... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/303b7784f9238309af9b9853b426a88accf042e4/carmineG/project.clj | clojure | (defproject carmineG "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:dependencies [[org.clojure/clojure "1.10.1"]
[com.taoensso/carmine "3.1.0"]]
:main ^:skip-aot carmineG.co... | |
6be91a738f83c5d6ef91d723d75e92c08cc67a68c79a1787c354afded134a976 | objmagic/LR | direct.ml | module StacklessM455_direct = struct
(*
S -> C C
C -> c C | d
*)
type token = C | D | EOF
type 'a parser = token list -> 'a
type s = S1 of c * c
and c = C1 of c | C2
let rec s_to_string (S1 (c1, c2)) =
let cs1 = c_to_string c1 and cs2 = c_to_string c2 in
Printf.sprintf "(%s %s)" cs1 ... | null | https://raw.githubusercontent.com/objmagic/LR/4bfc2ea57a4092f75c627ad6b58067e9822a43f0/direct.ml | ocaml |
S -> C C
C -> c C | d
| module StacklessM455_direct = struct
type token = C | D | EOF
type 'a parser = token list -> 'a
type s = S1 of c * c
and c = C1 of c | C2
let rec s_to_string (S1 (c1, c2)) =
let cs1 = c_to_string c1 and cs2 = c_to_string c2 in
Printf.sprintf "(%s %s)" cs1 cs2
and c_to_string = function
| C1 ... |
8963e3873930931852f31a006a5106e720164ae8781d186785a7ff4a3d3f9c95 | Workiva/eva | tx_inst_test.clj | Copyright 2015 - 2019 Workiva Inc.
;;
;; Licensed under the Eclipse Public License 1.0 (the "License");
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -1.0.php
;;
;; Unless required by applicable law or agreed to in writing, software
dist... | null | https://raw.githubusercontent.com/Workiva/eva/b7b8a6a5215cccb507a92aa67e0168dc777ffeac/core/test/eva/transaction_pipeline/tx_inst_test.clj | clojure |
Licensed under the Eclipse Public License 1.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-1.0.php
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre... | Copyright 2015 - 2019 Workiva Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns eva.transaction-pipeline.lookup-refs-test
(:require [eva.api :as eva]
[eva.v2.transaction-pipeline.validation :as val]
[eva.error :as err]
[eva.config :refer [with-overr... |
2dc7fa7b5fe49bdb58f4f38833ad9515ebcb5d9e2367858f506a74346eb312bc | maurer/symfuzz | state.mli | (* SymFuzz *)
* analyzer state
@author < sangkil.cha\@gmail.com >
@since 2014 - 03 - 19
@author Sang Kil Cha <sangkil.cha\@gmail.com>
@since 2014-03-19
*)
Copyright ( c ) 2014 ,
All rights reserved .
Redistribution and use in source and binary forms , with or without
modi... | null | https://raw.githubusercontent.com/maurer/symfuzz/ea6298746a23b6d266d28d27c6ff952a7bd14885/src/analyzer/state.mli | ocaml | SymFuzz |
* analyzer state
@author < sangkil.cha\@gmail.com >
@since 2014 - 03 - 19
@author Sang Kil Cha <sangkil.cha\@gmail.com>
@since 2014-03-19
*)
Copyright ( c ) 2014 ,
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are... |
766aedeed0862f331718da1f31457240556478cb2e87761711ef061606758e58 | jacekschae/conduit | router.cljs | (ns conduit.router
(:require [bidi.bidi :as bidi]
[pushy.core :as pushy]
[re-frame.core :refer [dispatch]]))
The routes setup is inspired by
source : -hashes-bidirectional-routing-in-re-frame-with-bidi-and-pushy/
;; -- Routes -----------------------------------------------------------... | null | https://raw.githubusercontent.com/jacekschae/conduit/9a481fbd21f567db9148c52f1e964fb3e29cc81b/src/conduit/router.cljs | clojure | -- Routes ------------------------------------------------------------------
Define routes so that when we enter specific path the router knows what to
show us. A route is simply a data structure--a vector--with a pattern and
a result.
-- History -----------------------------------------------------------------
... | (ns conduit.router
(:require [bidi.bidi :as bidi]
[pushy.core :as pushy]
[re-frame.core :refer [dispatch]]))
The routes setup is inspired by
source : -hashes-bidirectional-routing-in-re-frame-with-bidi-and-pushy/
(def routes
["/" {"" :home
"login" :login
"... |
455a42000f03825643aed8383f51738e442c769f3c590fac27d2633312e8c495 | alvatar/spheres | genport.scm | ;;;============================================================================
;;; File: "genport.scm"
Copyright ( c ) 2006 - 2012 by , All Rights Reserved .
;;;============================================================================
;;; Provides a procedural representation of I/O ports.
(declare
(standa... | null | https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/spheres/io/genport.scm | scheme | ============================================================================
File: "genport.scm"
============================================================================
Provides a procedural representation of I/O ports.
============================================================================
================... |
Copyright ( c ) 2006 - 2012 by , All Rights Reserved .
(declare
(standard-bindings)
(extended-bindings)
(block)
(fixnum)
(not safe))
(define-type genport
id: genport-94bfbdf4-4132-40e4-9d0a-35b34c28819a
implementer: implement-type-genport
end
read
write)
(implement-type-genport)
(define (gen... |
e0c3b44ca4f0b98695adfb3570de9610f2789278f5394de76204e93ef07cb8e2 | jrm-code-project/LISP-Machine | wholin.lisp | -*- Mode : LISP ; Package : TV ; Base:8 ; : ZL -*-
* * ( c ) Copyright 1981 Massachusetts Institute of Technology * *
;;; Hairier who-line system
(DEFFLAVOR WHO-LINE-SCREEN () (SCREEN))
(DEFMETHOD (WHO-LINE-SCREEN :USER-VISIBLE) () NIL)
(DEFFLAVOR WHO-LINE-MIXIN ((WHO-LINE-ITEM-STATE NIL)) ()
... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/window/wholin.lisp | lisp | Package : TV ; Base:8 ; : ZL -*-
Hairier who-line system
WHO-LINE-ITEM-STATE is NIL if the contents of the window
is unknown and needs to be redrawn. If non-NIL it
represents the current contents, to avoid extra redisplay.
Should this actually do the updates here??
not *DEFAULT-FONT*
Force this to be calcu... | * * ( c ) Copyright 1981 Massachusetts Institute of Technology * *
(DEFFLAVOR WHO-LINE-SCREEN () (SCREEN))
(DEFMETHOD (WHO-LINE-SCREEN :USER-VISIBLE) () NIL)
(DEFFLAVOR WHO-LINE-MIXIN ((WHO-LINE-ITEM-STATE NIL)) ()
(:INCLUDED-FLAVORS MINIMUM-WINDOW)
(:DEFAULT-INIT-PLIST :MORE-P NIL :BLINKER-P NI... |
9dc6bbc6c014007e60dbe4f2188d606a18c2fa2d70c4897798144f31b505ec23 | ninjudd/jiraph | stm_test.clj | (ns flatland.jiraph.layer.stm-test
(:use clojure.test flatland.jiraph.graph flatland.jiraph.layer.stm
[flatland.retro.core :as retro :only [at-revision current-revision]]
[flatland.useful.map :only [keyed]])
(:require [flatland.jiraph.layer :as layer]))
STMLayer ca n't optimize anything , so add ... | null | https://raw.githubusercontent.com/ninjudd/jiraph/e2897cf4770ead40e574261cd294d2c6701703e8/test/flatland/jiraph/layer/stm_test.clj | clojure | (ns flatland.jiraph.layer.stm-test
(:use clojure.test flatland.jiraph.graph flatland.jiraph.layer.stm
[flatland.retro.core :as retro :only [at-revision current-revision]]
[flatland.useful.map :only [keyed]])
(:require [flatland.jiraph.layer :as layer]))
STMLayer ca n't optimize anything , so add ... | |
bb8d7bd6a999b1b4c76c7fbf34c94ff770f0f8bfdfad910af22d2265ead89259 | bartavelle/language-puppet | Helpers.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedLists #
module Helpers ( module Exports
, checkExprsSuccess
, checkExprsError
, pureCatalog
, getResource
, getAttribute
, renderToString
, withStdlibF... | null | https://raw.githubusercontent.com/bartavelle/language-puppet/6af7458e094440816c8b9b7b387050612e87a70f/tests/Helpers.hs | haskell | | Given a raw text input to be parsed, compute the manifest in a pure setting.
The 'InterpreterWriter' might be useful for debugging purpose. | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedLists #
module Helpers ( module Exports
, checkExprsSuccess
, checkExprsError
, pureCatalog
, getResource
, getAttribute
, renderToString
, withStdlibF... |
0aa9b446669e19bcc6a43f09f0e2431502eede964ee0d26a34aca287f29732f7 | kumarshantanu/lein-sub | core_test.clj | (ns subtest.core-test
(:use clojure.test
subtest.core))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1)))) | null | https://raw.githubusercontent.com/kumarshantanu/lein-sub/4ddbb83359b2f9b6435ffd5b9c012b81e28de1ac/subtest/test/subtest/core_test.clj | clojure | (ns subtest.core-test
(:use clojure.test
subtest.core))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1)))) | |
3ebe0716c9798cf281950a961b0a4a6472a5e7bff57b089ffe6ad3014984ae61 | gedge-platform/gedge-platform | rabbit_password_hashing_md5.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
%% Legacy hashing implementation, only used as a ... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbit/src/rabbit_password_hashing_md5.erl | erlang |
Legacy hashing implementation, only used as a last resort when
#internal_user.hashing_algorithm is md5 or undefined (the case in | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
pre-3.6.0 user records ) .
-module(rabbit_password_h... |
1c4304c805eb92e3acc9e3666762047bc10ae432b31752fcc3296db6a228f65f | OCamlPro/alt-ergo | options_interface.mli | (******************************************************************************)
(* *)
Alt - Ergo : The SMT Solver For Software Verification
Copyright ( C ) 2018 - 2020
(* ... | null | https://raw.githubusercontent.com/OCamlPro/alt-ergo/291523151417f4cd112744d740b58ab1e8a630b4/src/bin/js/options_interface.mli | ocaml | ****************************************************************************
This file is distributed under the terms of the license indicated
in the ... | Alt - Ergo : The SMT Solver For Software Verification
Copyright ( C ) 2018 - 2020
* { 1 Options interface module }
* This module aims to set options of the Alt - Ergo 's lib that are set in
the worker_interface options type
the worker_interf... |
51f0a2c2f83e432d23b4c17d4f7ef8325a9f1a3ef9f7d5bed5328ffc778f4c7d | manavpatnaik/haskell | 5.hs | printOddNums [] = ""
printOddNums (x : xs)
| odd x = show x ++ " " ++ printOddNums xs
| otherwise = printOddNums xs
main = do
print(printOddNums [1,2,3,4,5,6,7,8,9]) | null | https://raw.githubusercontent.com/manavpatnaik/haskell/bb4d09c75a2894469d870408be5b0051a225366c/practice-set-3-miscellaneous/5_lists/5.hs | haskell | printOddNums [] = ""
printOddNums (x : xs)
| odd x = show x ++ " " ++ printOddNums xs
| otherwise = printOddNums xs
main = do
print(printOddNums [1,2,3,4,5,6,7,8,9]) | |
795cd1ff884b932bc12a7e7e5851a7c9bc475c8a6263ba6a2b1f94016395d57b | Piervit/gufo | gufoStart.mli |
This file is part of .
is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later version .
is distributed in the hop... | null | https://raw.githubusercontent.com/Piervit/gufo/cb9b4f88d6e887ccfe50ea3bc7214486f2df3078/src/gufoStart.mli | ocaml | This is the base function to transform a parsed program into a fullprogram. |
This file is part of .
is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later version .
is distributed in the hop... |
8984e32188af376fe4527509ad127d1cad12fe0080ad6fe352594f0d5b264609 | RefactoringTools/wrangler | refac_specialise_a_function.erl | Copyright ( c ) 2013 , ,
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions are met:
%% %% Redistributions of source code must retain the above copyright
%% notice, this list of conditions... | null | https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/src/gen_refacs/refac_specialise_a_function.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
%% Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
%% Redi... | Copyright ( c ) 2013 , ,
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
use the Wrangler API .
and Wrangler will prompt you to input the refactoring
@private
-module(refac_specialise_a_function).
-b... |
92b7f01f801daf5bb3c6995ee53f8b99e87e1ccbdb22fe8b5338ad2d3683db60 | erlang/otp | incremental_SUITE.erl | This suite tests the incremental mode which for now as follows :
You can specify which files you want in your plt , incremental mode will
do the analysis needed to get the PLT into a good state and report the
%% warnings from the modules which it re-analyzed.
-module(incremental_SUITE).
-include_lib("common_te... | null | https://raw.githubusercontent.com/erlang/otp/f0a17925822ee88dc2df5db39031705d143c7848/lib/dialyzer/test/incremental_SUITE.erl | erlang | warnings from the modules which it re-analyzed.
We ignore empty Mods, since no warning modules modules is
interpreted as a request to show all warning modules (for
convenience). However, if all module warnings are shown and
'unknown' warnings are enabled, we get a load of 'unknown'
case here
All pairs takes ~ 10... | This suite tests the incremental mode which for now as follows :
You can specify which files you want in your plt , incremental mode will
do the analysis needed to get the PLT into a good state and report the
-module(incremental_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("stdlib/include/a... |
270ef0a6edd79e81784d79d66e89c641de7e1c62fcd086774da5f3d00cad14e1 | NorfairKing/the-notes | Terms.hs | module Logic.HoareLogic.Terms where
import Notes
makeDefs [
"state"
, "evaluation"
, "instruction"
, "assertion"
, "satisfies"
, "Hoare logic"
, "Hoare triple"
, "precondition"
, "postcondition"
, "partial correctness"
, "total correctness"
, "consequence"... | null | https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/Logic/HoareLogic/Terms.hs | haskell | module Logic.HoareLogic.Terms where
import Notes
makeDefs [
"state"
, "evaluation"
, "instruction"
, "assertion"
, "satisfies"
, "Hoare logic"
, "Hoare triple"
, "precondition"
, "postcondition"
, "partial correctness"
, "total correctness"
, "consequence"... | |
2ef4d76fe322dfd0d6fb21dee03bc53b420de0dd2ce65d569880eb3be7d3f2ef | esl/MongooseIM | component_SUITE.erl | %%==============================================================================
Copyright 2014 Erlang Solutions Ltd.
%%
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
%%
... | null | https://raw.githubusercontent.com/esl/MongooseIM/997ce8cc01dacf8bf1f1f4e3a984ee10f0ce5dd6/big_tests/tests/component_SUITE.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 ex... | Copyright 2014 Erlang Solutions Ltd.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(component_SUITE).
-compile([export_all, nowarn_export_all]).
-include_lib("escalus/include/escalus.hrl").
-include_lib("common_t... |
1a45e2d0d6f6bda55fd086f077a1a0337b055b2268efd1ff7dad71dc65001f6a | adamdoupe/find_ear_rails | cfg_printer.mli |
open Cfg
* The signature for a CFG pretty printer . Where appropraite , type
declaration present in the Cfg module have a corresponding format
function here . The naming scheme is meant to exactly match that
of the type signatures . Thus if there is a type foo_bar , then the
correspondin... | null | https://raw.githubusercontent.com/adamdoupe/find_ear_rails/38f892f9962ad415a583973caf24fbab1a011be1/diamondback-ruby-0.20090726/src/cfg/cfg_printer.mli | ocaml | internal helpers, but may be of general use
* This module formats CFGs so that they are valid Ruby code.
* A descriptor that simply includes the string argument as is.
Thus, (sprintf s) is the identity function over strings.
* Emitting functions
* Unparse the descriptor into a string, returning it after i... |
open Cfg
* The signature for a CFG pretty printer . Where appropraite , type
declaration present in the Cfg module have a corresponding format
function here . The naming scheme is meant to exactly match that
of the type signatures . Thus if there is a type foo_bar , then the
correspondin... |
ddf7d2391185897eb3c3a7accec98f6f6f5bdac148c96ebffbff6859f3f14581 | reanimate/reanimate | tut_glue_animate.hs | #!/usr/bin/env stack
-- stack runghc --package reanimate
{-# LANGUAGE OverloadedStrings #-}
module Main(main) where
import Reanimate
import Reanimate.Transition
import Codec.Picture.Types
import Data.Text (Text)
bgColor :: PixelRGBA8
bgColor = PixelRGBA8 252 252 252 ... | null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/examples/tut_glue_animate.hs | haskell | stack runghc --package reanimate
# LANGUAGE OverloadedStrings # | #!/usr/bin/env stack
module Main(main) where
import Reanimate
import Reanimate.Transition
import Codec.Picture.Types
import Data.Text (Text)
bgColor :: PixelRGBA8
bgColor = PixelRGBA8 252 252 252 0xFF
segmentDuration :: Double
segmentDuration = 3
transitionTime :: ... |
b077940e02a0206baa13f5e6c880ee1d2db8f2b4dae62b2861328fc2e003b0ba | OCamlPro/operf-micro | detect_config.mli | open Utils
open Command
type error =
| Parse_error of Loc.t
| Missing_config_field of file * string
| Duplicate_config_field of file * string
| No_config_file
| Not_ocaml_compiler_dir
| No_compiler
| No_timestamp
| Missing_directory of directory
exception Error of error
type config =
{ name : strin... | null | https://raw.githubusercontent.com/OCamlPro/operf-micro/d5d2bf2068204b889321b0c5a7bc0d079c0fca80/tools/operf-micro/detect_config.mli | ocaml | open Utils
open Command
type error =
| Parse_error of Loc.t
| Missing_config_field of file * string
| Duplicate_config_field of file * string
| No_config_file
| Not_ocaml_compiler_dir
| No_compiler
| No_timestamp
| Missing_directory of directory
exception Error of error
type config =
{ name : strin... | |
e3805fb989c76952fdd5e0c4dcfefa1420b0f1ff16250384a779af3cbe99fd34 | lispgames/cl-sdl2 | timer.lisp | (in-package #:sdl2)
(defmacro delay (ms)
"This function waits a specified number of milliseconds before returning. It waits at least the
specified time, but possibly longer due to OS scheduling"
`(sdl-delay ,ms))
(defmacro get-ticks ()
"Returns an unsigned 32-bit value representing the number of milliseconds si... | null | https://raw.githubusercontent.com/lispgames/cl-sdl2/80410b514570ca06894675d4a2a5fc93287ea7b6/src/timer.lisp | lisp | (in-package #:sdl2)
(defmacro delay (ms)
"This function waits a specified number of milliseconds before returning. It waits at least the
specified time, but possibly longer due to OS scheduling"
`(sdl-delay ,ms))
(defmacro get-ticks ()
"Returns an unsigned 32-bit value representing the number of milliseconds si... | |
dd1bebb111e766d6cb7e08bc3eeac44f3108275c49dbbfae732b026e0f552946 | hasktorch/hasktorch | Distribution.hs | module Torch.Distributions.Distribution
( Scale,
Distribution (..),
stddev,
perplexity,
logitsToProbs,
clampProbs,
probsToLogits,
extendedShape,
)
where
import Torch.Distributions.Constraints
import qualified Torch.Functional as F
import qualified Torch.Tensor as D
import Torch.TensorFa... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/c34996b0a401a5b1b98b5774e892fde88adaa079/hasktorch/src/Torch/Distributions/Distribution.hs | haskell | (expand=True)
'D.Float
| Converts a tensor of logits into probabilities. Note that for the
| binary case, each value denotes log odds, whereas for the
| multi-dimensional case, the values along the last dimension denote
| the log probabilities (possibly unnormalized) of the events.
isBinary=False
torch.finfo(pr... | module Torch.Distributions.Distribution
( Scale,
Distribution (..),
stddev,
perplexity,
logitsToProbs,
clampProbs,
probsToLogits,
extendedShape,
)
where
import Torch.Distributions.Constraints
import qualified Torch.Functional as F
import qualified Torch.Tensor as D
import Torch.TensorFa... |
741a0a28940aba6cf81ed93f603da17093b70a1ef6195d6479968da2f09017bc | mdedwards/slippery-chicken | acl.lisp | ;;; **********************************************************************
Copyright ( C ) 2002 ( )
;;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or... | null | https://raw.githubusercontent.com/mdedwards/slippery-chicken/c1c11fadcdb40cd869d5b29091ba5e53c5270e04/src/cm-2.6.0/src/acl.lisp | lisp | **********************************************************************
This program is free software; you can redistribute it and/or
either version 2
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PART... | Copyright ( C ) 2002 ( )
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
$ Revision : 1.5 $
$ Date : 2003/12/18 13:16:42 $
(in-package :cm)
CLOS twiddling
(import '(clos:slot-definition-initargs
clos:slot-definition-initform
... |
6562d1043d384490ac4bbd0fd48e36f7e0d6118f6544115c0f719a0259e4a50c | granule-project/granule | TypesSpec.hs | module Language.Granule.Checker.TypesSpec where
import Language.Granule.Syntax.Identifiers
import Test.Hspec
import Language.Granule.Context
spec :: Spec
spec = do
describe "context handling" $
it "Replacing replaces only one occurence" $
replace [(mkId "x", 1), (mkId "y", 2), (mkId "x", 3)] (mkId "x") 0
... | null | https://raw.githubusercontent.com/granule-project/granule/e6d8314b0e444eafe33a689e041a15590dcc69dd/frontend/tests/hspec/Language/Granule/Checker/TypesSpec.hs | haskell | module Language.Granule.Checker.TypesSpec where
import Language.Granule.Syntax.Identifiers
import Test.Hspec
import Language.Granule.Context
spec :: Spec
spec = do
describe "context handling" $
it "Replacing replaces only one occurence" $
replace [(mkId "x", 1), (mkId "y", 2), (mkId "x", 3)] (mkId "x") 0
... | |
66e144a7d7a486ddfa889816a85172a60ac8bb565da91113c1ce75b0b7ccdb4f | dalaing/little-languages | Parse.hs | |
Copyright : ( c ) , 2016
License : :
Stability : experimental
Portability : non - portable
Parsers for terms of the B language .
Copyright : (c) Dave Laing, 2016
License : BSD3
Maintainer :
Stability : experimental
Portability : non-portable
Parsers for terms of the B langua... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/b/src/Term/Parse.hs | haskell | from 'base'
from 'unordered-containers'
from 'parsers'
local
$setup
>>> import Text.Trifecta.Result
>>> import Text.Trifecta.Delta
| The tokenizer style for identifiers in the B language.
B doesn't have identifiers, but we're going to be iterating towards a language that has them and
we know what they're goi... | |
Copyright : ( c ) , 2016
License : :
Stability : experimental
Portability : non - portable
Parsers for terms of the B language .
Copyright : (c) Dave Laing, 2016
License : BSD3
Maintainer :
Stability : experimental
Portability : non-portable
Parsers for terms of the B langua... |
e0f2aebd9aecb265cab3bf790c156933b59542af7a35b38cce4dd2f732b5f842 | tweag/lagoon | ColumnType.hs | Copyright 2020 Pfizer Inc.
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 in writing, software
distributed under th... | null | https://raw.githubusercontent.com/tweag/lagoon/2ef0440db810f4f45dbed160b369daf41d92bfa4/src/interface/src/Lagoon/Interface/ColumnType.hs | haskell | 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 governing permiss... | Copyright 2020 Pfizer Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
module Lagoon.Interface.ColumnType (
ColumnType(..)
, IntWidth(..)
, CustomType(..)
) where
import Control.Applicative ((<|>))
import ... |
cad2c8a955d9ec4215311a47d6f3fdb51ae9db599aece2e084286b6ec3811412 | osa1/sc-plugin | Imp.hs | IMP language from Software
-- Foundations(/~bcpierce/sf/current/Imp.html).
--
AST should be eliminated from the compiled program .
--
module Main where
data AExp
= ANum Int
| APlus AExp AExp
| AMinus AExp AExp
| AMult AExp AExp
data BExp
= BTrue
| BFalse
| BEq AExp AExp
| BLe AExp AExp
| BNot BE... | null | https://raw.githubusercontent.com/osa1/sc-plugin/1969ad81f16ca8ed8110ca8dadfccf6f3d463635/examples/Imp.hs | haskell | Foundations(/~bcpierce/sf/current/Imp.html).
doesn't terminate
generates offending program
example1_ret :: Int -> Bool
ln <- readLn
print $ example1_ret (read ln) | IMP language from Software
AST should be eliminated from the compiled program .
module Main where
data AExp
= ANum Int
| APlus AExp AExp
| AMinus AExp AExp
| AMult AExp AExp
data BExp
= BTrue
| BFalse
| BEq AExp AExp
| BLe AExp AExp
| BNot BExp
| BAnd BExp BExp
aeval :: AExp -> Int
aeval (ANu... |
b5ee2145438ef78b4dc6dde48b1b4c6885a7b11945b8ec43f9b854644d9ca3d3 | 2600hz/kazoo | cb_multi_factor.erl | %%%-----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz
%%% @doc Multi factor authentication configuration API endpoint
%%%
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... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/applications/crossbar/src/modules/cb_multi_factor.erl | erlang | -----------------------------------------------------------------------------
@doc Multi factor authentication configuration API endpoint
@end
-----------------------------------------------------------------------------
=============================================================================
API
============... | ( C ) 2010 - 2020 , 2600Hz
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(cb_multi_factor).
-export([init/0
,authorize/1, authorize/2, authorize/3
,allowed_methods... |
7ff3efc0f45223d576d1b7d15fb35aa5d348bcc3a070156350980ef8786feca6 | tochicool/bitcoin-dca | CLI.hs | module BitcoinDCA.CLI where
import Options.Applicative (Parser, ParserInfo, fullDesc, header, help, helper, info, long, metavar, progDesc, short, strOption, value, (<**>), ParserPrefs, disambiguate, prefs, showHelpOnError, showDefault)
newtype CLI = CLI
{ configFile :: FilePath
}
parserInfo :: ParserInfo CLI
par... | null | https://raw.githubusercontent.com/tochicool/bitcoin-dca/130798ada8a57ec988ccd1b1de34e93cca5522b9/src/BitcoinDCA/CLI.hs | haskell | module BitcoinDCA.CLI where
import Options.Applicative (Parser, ParserInfo, fullDesc, header, help, helper, info, long, metavar, progDesc, short, strOption, value, (<**>), ParserPrefs, disambiguate, prefs, showHelpOnError, showDefault)
newtype CLI = CLI
{ configFile :: FilePath
}
parserInfo :: ParserInfo CLI
par... | |
582546aac9e90a8cdc7e28333f311117fbcb7045f7a7df9e89c28b3450711502 | racket/rhombus-prototype | class-top-level.rkt | #lang racket/base
(require (for-syntax racket/base
syntax/parse/pre)
(only-in (submod "annotation.rkt" for-class)
define-annotation-syntax
define-annotation-constructor)
(only-in "binding.rkt"
define-binding-syntax)
(o... | null | https://raw.githubusercontent.com/racket/rhombus-prototype/dcf7fb9b002c0957fc0adbf9bd3475c26a8b2c01/rhombus/private/class-top-level.rkt | racket | avoid duplicate definitions here; they'll get reported by later checking | #lang racket/base
(require (for-syntax racket/base
syntax/parse/pre)
(only-in (submod "annotation.rkt" for-class)
define-annotation-syntax
define-annotation-constructor)
(only-in "binding.rkt"
define-binding-syntax)
(o... |
d36db9d41e1895c961abd868277e42a23e02651cb148ce1c88b4631fb0fb3e9f | alphaHeavy/protobuf | Main.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad.Identity
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as Bl
import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as HashMap
import Data.Int
im... | null | https://raw.githubusercontent.com/alphaHeavy/protobuf/46cda829cf1e7b6bba2ff450e267fb1a9ace4fb3/plugin/Main.hs | haskell | # LANGUAGE OverloadedStrings #
disable strict field?
message ExtensionRange {
}
All top-level definitions in this file.
This field contains optional information about the original source code.
You may safely remove this entire field whithout harming runtime
functionality of the descriptors -- the information is ... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
module Main where
import Control.Monad.Identity
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as Bl
import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as HashMap
import Data.Int
import Data.Monoid
import Data.Protoc... |
6696609921a42d37d7b9c4e472e362ea6e3cd1edb015aa733fb35c82123b8e50 | bellissimogiorno/nominal | NameSet.hs | |
Module : NameSet
Description : Theory of support , apartness , and restriction
Copyright : ( c ) , 2020
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
Typeclasses and operations having to do with sets of names / atoms , namely :
* ' Support ' ,
*... | null | https://raw.githubusercontent.com/bellissimogiorno/nominal/ab3306ee349dc481d2e2e6d103d90ffdd14ccaa9/src/Language/Nominal/NameSet.hs | haskell | * Support and apartness
* Identifying list elements by name or atom
* Restriction
* Tests
$tests
* Support
| A typeclass for elements for which a supporting set of atoms can be computed in an efficient, structural, type-directed manner.
See instances for full details.
No good : causes Ambiguity warnings... | |
Module : NameSet
Description : Theory of support , apartness , and restriction
Copyright : ( c ) , 2020
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
Typeclasses and operations having to do with sets of names / atoms , namely :
* ' Support ' ,
*... |
806fa384a58c4073940a7bf1d635f7d6181003c1857242ef999c044bb22d6c52 | ocaml-multicore/tezos | main_sc_rollup_client_alpha.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2022 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/bin_sc_rollup_client/main_sc_rollup_client_alpha.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2022 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
6fe3d098d31fb7829846467fb02017d06cc9b8c9735a56fefca24a3a537d909a | theodormoroianu/SecondYearCourses | HaskellChurchMonad_20210415122734.hs | module HaskellChurchMonad where
A boolean is any way to choose between two alternatives
newtype CBool t = CBool {cIf :: t -> t -> t}
An instance to show as regular Booleans
instance Show CBool where
show b = show $ cIf b True False
The boolean constant true always chooses the first alternative
cTrue :: CBoo... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurchMonad_20210415122734.hs | haskell | The boolean negation switches the alternatives
The boolean conjunction can be built as a conditional
The boolean disjunction can be built as a conditional
a pair is a way to compute something based on the values
contained within the pair.
a function to be applied on the values, it will apply it on them.
A natural nu... | module HaskellChurchMonad where
A boolean is any way to choose between two alternatives
newtype CBool t = CBool {cIf :: t -> t -> t}
An instance to show as regular Booleans
instance Show CBool where
show b = show $ cIf b True False
The boolean constant true always chooses the first alternative
cTrue :: CBoo... |
b938f9427029708957b134503553aaf0c115a24c25aef0247144f69831e9fea4 | dmitryvk/sbcl-win32-threads | cross-type.lisp | cross - compiler - only versions of TYPEP , TYPE - OF , and related functions
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/code/cross-type.lisp | lisp | more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
Is X a fixnum in the target Lisp?
(This was a useful warning when trying to get bootstrapping
to work, but it's mostly irrelevant noise now t... | cross - compiler - only versions of TYPEP , TYPE - OF , and related functions
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!KERNEL")
(defun fixnump (x)
... |
a6d6fad0eaac8a5907a2dca3352deb33ec3492d42edadd5cdff09ed2545e65e2 | adamdoupe/find_ear_rails | parse_control.ml |
open Ast
open Test_helper
open OUnit
(*
| E_Ternary of expr * expr * expr
| E_While of expr * expr list
| E_For of string * expr * expr list
| E_Return of expr option
| E_If of expr * expr list
| E_Unless of expr * expr list
*)
let tests = [
("for",
[E_For([Formal_id (ast_id "i");Formal_rest],
... | null | https://raw.githubusercontent.com/adamdoupe/find_ear_rails/38f892f9962ad415a583973caf24fbab1a011be1/diamondback-ruby-0.20090726/tests/parser/parse_control.ml | ocaml |
| E_Ternary of expr * expr * expr
| E_While of expr * expr list
| E_For of string * expr * expr list
| E_Return of expr option
| E_If of expr * expr list
| E_Unless of expr * expr list
|
open Ast
open Test_helper
open OUnit
let tests = [
("for",
[E_For([Formal_id (ast_id "i");Formal_rest],
E_Binop(ast_num 1, Op_DOT2, ast_num 2,dp),
[ast_id "i"],dp)],
"for i, in 1..2 do i end");
("for",
[E_For([Formal_id (ast_id "i");Formal_rest],
E_Binop(ast_num 1, Op_DOT3, as... |
54c160be0ae8f1f6d05e8860298ac747477eb2979d921725e8d0c63ece7ee036 | ucsd-progsys/liquidhaskell | Statement.hs |
-----------------------------------------------------------------------------
-- |
-- Module : Language.Stitch.LH.Statement
Copyright : ( C ) 2015
-- License : BSD-style (see LICENSE)
Maintainer : ( )
-- Stability : experimental
--
-- Defines the Stitch Statement type, which can either ... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f3902663a7e32f44d35db78abbe23ec11dbb629f/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Statement.hs | haskell | ---------------------------------------------------------------------------
|
Module : Language.Stitch.LH.Statement
License : BSD-style (see LICENSE)
Stability : experimental
Defines the Stitch Statement type, which can either be a bare
expression or a global variable assignment.
-----------------... |
Copyright : ( C ) 2015
Maintainer : ( )
module Language.Stitch.LH.Statement ( Statement(..) ) where
XXX : Import Op so LH does n't fail with : Unknown type constructor ` ArithOp `
import Language.Stitch.LH.Op
import Language.Stitch.LH.Unchecked
import Text.PrettyPrint.ANSI.Leijen
@
data State... |
bc9748a778077b7dda3814d684958816449ed39e7b1488efdc03e225ffadc64d | dselsam/arc | List.hs | Copyright ( c ) 2020 Microsoft Corporation . All rights reserved .
Released under Apache 2.0 license as described in the file LICENSE .
Authors : , , .
module Util.List where
import Util.Imports
import Util.Pre
import qualified Util.Int as Int
import Data.List hiding (partition)
import qualified Data.Set ... | null | https://raw.githubusercontent.com/dselsam/arc/7e68a7ed9508bf26926b0f68336db05505f4e765/src/Util/List.hs | haskell | TODO: arg ord convention
TODO: perf | Copyright ( c ) 2020 Microsoft Corporation . All rights reserved .
Released under Apache 2.0 license as described in the file LICENSE .
Authors : , , .
module Util.List where
import Util.Imports
import Util.Pre
import qualified Util.Int as Int
import Data.List hiding (partition)
import qualified Data.Set ... |
aa67ab853fa9d832d5b4e2e270240642fb13da93fa0d3894c0835a17edf02418 | pedestal/pedestal | project.clj | Copyright 2013 Relevance , Inc.
Copyright 2014 - 2022 Cognitect , Inc.
; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( )
; which can be found in the file epl-v10.html at the root of this distribution.
;
; By using this software in any fashion, you are agreeing ... | null | https://raw.githubusercontent.com/pedestal/pedestal/53bfe70143a22cdfd2f0d183023334a199c9e9a2/aws/project.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software.
[c... | Copyright 2013 Relevance , Inc.
Copyright 2014 - 2022 Cognitect , Inc.
Eclipse Public License 1.0 ( )
(defproject io.pedestal/pedestal.aws "0.5.11-SNAPSHOT"
:description "AWS utilities for running Pedestal services on AWS"
:url ""
:scm ""
:license {:name "Eclipse Public License"
:url "-v10.... |
dcb1c05951012097dc887624a34bca47ba3c681fe83d07700f449cb404be7489 | Shirakumo/kandria | assets.lisp | (in-package #:org.shirakumo.fraf.kandria)
(defmacro define-bg (name &body args)
(let ((wrapping (getf args :wrapping ''(:repeat :clamp-to-edge :clamp-to-edge)))
(args (remf* args :wrapping))
(texture (intern (format NIL "~a-BG" (string name)))))
`(progn
(define-asset (kandria ,texture) ima... | null | https://raw.githubusercontent.com/Shirakumo/kandria/20c1220723a9b336cab060289feab01d29ec6af1/assets.lisp | lisp | (in-package #:org.shirakumo.fraf.kandria)
(defmacro define-bg (name &body args)
(let ((wrapping (getf args :wrapping ''(:repeat :clamp-to-edge :clamp-to-edge)))
(args (remf* args :wrapping))
(texture (intern (format NIL "~a-BG" (string name)))))
`(progn
(define-asset (kandria ,texture) ima... | |
a65fd63bd3474c31558817d95c237f1f08273b0e6835e4165aa478c49b3dd414 | zenspider/schemers | exercise.5.31.scm | #!/usr/bin/env csi -s
(require rackunit)
Exercise 5.31
;; In evaluating a procedure application, the
;; explicit-control evaluator always saves and restores the `env'
;; register around the evaluation of the operator, saves and restores
;; `env' around the evaluation of each operand (except the final
;; one), save... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_5/exercise.5.31.scm | scheme | In evaluating a procedure application, the
explicit-control evaluator always saves and restores the `env'
register around the evaluation of the operator, saves and restores
`env' around the evaluation of each operand (except the final
one), saves and restores `argl' around the evaluation of each
operand, and save... | #!/usr/bin/env csi -s
(require rackunit)
Exercise 5.31
A : I believe the answer is 1 & 2 since the lookup of f in both
cases does n't require writing to env . In the case of 3 & 4 , the
second argument is evaluated in applicative order and need to
create their own env layer for 's argument . That env sho... |
b455aac15301b58a5be4e9aeca4e3e4497c7fab43589d42edbae705417789a9e | simonmichael/hledger | DocFiles.hs | # LANGUAGE TemplateHaskell , OverloadedStrings , PackageImports #
{-|
Embedded documentation files in various formats, and helpers for viewing them.
|-}
module Hledger.Cli.DocFiles (
Topic
-- ,toolDocs
-- ,toolDocNames
-- ,toolDocMan
-- ,toolDocTxt
-- ,toolDocInfo
,printHelpForTopic
,runManForTopic... | null | https://raw.githubusercontent.com/simonmichael/hledger/1bc04685b78f07681966f62b95794a3dcc5ae4cc/hledger/Hledger/Cli/DocFiles.hs | haskell | |
Embedded documentation files in various formats, and helpers for viewing them.
|
,toolDocs
,toolDocNames
,toolDocMan
,toolDocTxt
,toolDocInfo
Only files under the current package directory can be embedded,
so some of these are symlinked from the other package directories.
toolNames :: [Tool]
toolNames = ma... | # LANGUAGE TemplateHaskell , OverloadedStrings , PackageImports #
module Hledger.Cli.DocFiles (
Topic
,printHelpForTopic
,runManForTopic
,runInfoForTopic
,runPagerForTopic
) where
import Data.ByteString (ByteString)
import qualified Data.ByteString.Char8 as BC
import Data.Maybe (fromMaybe, isNothing)
i... |
c2374d4cb7e5d43c89ff4b11a7f2e74073d30042bf1a5fbf18fce28296aac382 | mzp/min-caml | virtual.ml | (* translation into PowerPC assembly (infinite number of virtual registers) *)
open Asm
let data = ref [] (* 浮動小数点数の定数テーブル *)
let classify xts ini addf addi =
List.fold_left
(fun acc (x, t) -> match t with
| Type.Unit -> acc
| Type.Float -> addf acc x
| _ -> addi acc x t) ini xts
let sepa... | null | https://raw.githubusercontent.com/mzp/min-caml/cf1180792a2a0bc895ba17a0052e3b6f4a74e444/arch/PowerPC/virtual.ml | ocaml | translation into PowerPC assembly (infinite number of virtual registers)
浮動小数点数の定数テーブル
式の仮想マシンコード生成
組の生成
配列の読み出し
関数の仮想マシンコード生成 |
open Asm
let classify xts ini addf addi =
List.fold_left
(fun acc (x, t) -> match t with
| Type.Unit -> acc
| Type.Float -> addf acc x
| _ -> addi acc x t) ini xts
let separate xts =
classify
xts
([], [])
(fun (int, float) x -> (int, float @ [x]))
(fun (int, float) x... |
6bf791aa6c5cfc071cd62c0acd67dd62f1fcd59c9d92139b2e51b518eb752ce0 | purescript/purescript | Prim.hs | module Language.PureScript.Ide.Prim (idePrimDeclarations) where
import Protolude
import qualified Data.Text as T
import qualified Data.Map as Map
import qualified Language.PureScript as P
import qualified Language.PureScript.Constants.Prim as C
import qualified Language.PureScript.Environment as PEnv
import... | null | https://raw.githubusercontent.com/purescript/purescript/5f6a6659391563cdec3c41ac6a4b2ff5263d0f68/src/Language/PureScript/Ide/Prim.hs | haskell | We need to remove the ClassName$Dict synonyms, because we
don't want them to show up in completions
Dummy kind and instances here, but we primarily care about the name completion
type declaration for every class, but we filter the types out when we | module Language.PureScript.Ide.Prim (idePrimDeclarations) where
import Protolude
import qualified Data.Text as T
import qualified Data.Map as Map
import qualified Language.PureScript as P
import qualified Language.PureScript.Constants.Prim as C
import qualified Language.PureScript.Environment as PEnv
import... |
0a579dfca2aefd63c7b4c171cb9b147a9a33ac5f8169fd80618e9ac5bb6f3e13 | ocharles/hs-quake-3 | UI.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE NamedFieldPuns #
module UI
( UI.initialize
, uploadLightMaps
, uploadBSP
) where
import Data.Foldable (for_)
import Data.Traversable (for)
import qualified Data.Vector as BoxedV
import qualified Data.Vector.Generic as V
import qualifie... | null | https://raw.githubusercontent.com/ocharles/hs-quake-3/655f6ce2b04c69f5e05c01cf57356132aa711589/UI.hs | haskell | # LANGUAGE OverloadedStrings #
| This will install a synchronous debugging hook to allow OpenGL to notify us
if we're doing anything deprecated, non-portable, undefined, etc. | # LANGUAGE RecordWildCards #
# LANGUAGE NamedFieldPuns #
module UI
( UI.initialize
, uploadLightMaps
, uploadBSP
) where
import Data.Foldable (for_)
import Data.Traversable (for)
import qualified Data.Vector as BoxedV
import qualified Data.Vector.Generic as V
import qualified Data.Vector.Storable as V (unsafe... |
b48985e7e11c561c627ba03e729ff55f0795763bb0679dba84b1dce40b0e2a5c | ekmett/charset | Unicode.hs | -----------------------------------------------------------------------------
-- |
Module : Data . CharSet . . Unicode
Copyright : ( c ) 2010
-- License : BSD3
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
-------------------------------------------------------... | null | https://raw.githubusercontent.com/ekmett/charset/dd478804680986d31d3a3eff6204a48d778e9053/src/Data/CharSet/Posix/Unicode.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD3
Maintainer :
Stability : experimental
Portability : portable
-----------------------------------------------------------------------------
* POSIX ASCII \"classes\"
:digit:, etc. | Module : Data . CharSet . . Unicode
Copyright : ( c ) 2010
module Data.CharSet.Posix.Unicode
( posixUnicode
, lookupPosixUnicodeCharSet
, alnum, alpha, ascii, blank, cntrl, digit, graph, print, word, punct, space, upper, lower, xdigit
) where
import Prelude hiding (print)
import Da... |
fb52b57569a1c5bc7b6549e0550e276b73011338a9bc5ac3fc725dd0a8229045 | florabtw/soundoftext-haskell | Application.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE FlexibleInstances #
------------------------------------------------------------------------------
-- | This module defines our application's state type and an alias for its
-- handler monad.
module Application where
-------------------------------------------------------------... | null | https://raw.githubusercontent.com/florabtw/soundoftext-haskell/46c1a5ab378809ac2e1c5e005057d495a08d2887/src/Application.hs | haskell | ----------------------------------------------------------------------------
| This module defines our application's state type and an alias for its
handler monad.
----------------------------------------------------------------------------
---------------------------------------------------------------------------- | # LANGUAGE TemplateHaskell #
# LANGUAGE FlexibleInstances #
module Application where
import Control.Lens
import Snap
import Snap.Snaplet.Heist
import Snap.Snaplet.SqliteSimple
data App = App
{ _heist :: Snaplet (Heist App)
, _db :: Snaplet Sqlite
}
makeLenses ''App
instance HasHeist App where
he... |
001ab058c306e89d26675fe8e6b2d710aa4f7f1c0c71c4b015eb64f936231708 | spartango/CS153 | mlish_ast.ml | type var = string (* program variables *)
type tvar = string (* type variables *)
type pos = int
type tipe =
Tvar_t of tvar
| Int_t
| Bool_t
| Unit_t
| Fn_t of tipe * tipe
| Pair_t of tipe * tipe
| List_t of tipe
| Guess_t of tipe option ref
type tipe_scheme = Forall of (tvar list) * tipe
type prim =
Int of... | null | https://raw.githubusercontent.com/spartango/CS153/16faf133889f1b287cb95c1ea1245d76c1d8db49/ps5/mlish_ast.ml | ocaml | program variables
type variables
unit value -- ()
the empty list
determine whether a list is Nil
fetch the head of a list
fetch the tail of a list | type pos = int
type tipe =
Tvar_t of tvar
| Int_t
| Bool_t
| Unit_t
| Fn_t of tipe * tipe
| Pair_t of tipe * tipe
| List_t of tipe
| Guess_t of tipe option ref
type tipe_scheme = Forall of (tvar list) * tipe
type prim =
Int of int
| Bool of bool
add two ints
subtract two ints
multiply two ints
divide t... |
578716789dc0a560e0fc229938606d60cf0ca336d3509299d850a0d5577947f7 | UU-ComputerScience/uulib | GenToken.hs | module UU.Scanner.GenToken where
import UU.Scanner.Position(Pos)
data GenToken key tp val = Reserved !key !Pos
| ValToken !tp val !Pos
position :: GenToken k t v -> Pos
position tok = case tok of
Reserved _ p -> p
ValToken _ _ p ... | null | https://raw.githubusercontent.com/UU-ComputerScience/uulib/68a5e661547908979545b493da3a55418ca5a6aa/src/UU/Scanner/GenToken.hs | haskell | module UU.Scanner.GenToken where
import UU.Scanner.Position(Pos)
data GenToken key tp val = Reserved !key !Pos
| ValToken !tp val !Pos
position :: GenToken k t v -> Pos
position tok = case tok of
Reserved _ p -> p
ValToken _ _ p ... | |
bf7d0f0e9901e4cdc1348ba4ba1235ca740df3a827d702b76cd6bffbcb8ce0a9 | clojusc/meson | common.clj | (ns meson.protocols.common
"Collects Mesos HTTP API common to both masters and agents, collecting them
into appropriate groupings.
See: /"
(:refer-clojure :exclude [read]))
(defprotocol IConfig
""
(get-version [this]
"Provides Mesos version information.
See: /")
(get-flags [this] [this id]
... | null | https://raw.githubusercontent.com/clojusc/meson/a690135bf64c967a70fd45e88bdfed1e7b847317/src/meson/protocols/common.clj | clojure | (ns meson.protocols.common
"Collects Mesos HTTP API common to both masters and agents, collecting them
into appropriate groupings.
See: /"
(:refer-clojure :exclude [read]))
(defprotocol IConfig
""
(get-version [this]
"Provides Mesos version information.
See: /")
(get-flags [this] [this id]
... | |
ee61c9a8caca2795a389a62bdda3c46b9c1a30e6ca25b30e8520a1eab1322899 | khibino/haskell-relational-record | SQLServerTestDataSource.hs | module SQLServerTestDataSource (
connect,
defineTable
) where
import Database.HDBC.ODBC (Connection, connectODBC)
import Database.HDBC.Query.TH (defineTableFromDB)
import Database.HDBC.Schema.Driver (typeMap)
import Database.HDBC.Schema.SQLServer (driverSQLServer)
import Language.Haskell.TH (Q, Dec, TypeQ)... | null | https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/test/HDBC/SQLServer/SQLServerTestDataSource.hs | haskell | module SQLServerTestDataSource (
connect,
defineTable
) where
import Database.HDBC.ODBC (Connection, connectODBC)
import Database.HDBC.Query.TH (defineTableFromDB)
import Database.HDBC.Schema.Driver (typeMap)
import Database.HDBC.Schema.SQLServer (driverSQLServer)
import Language.Haskell.TH (Q, Dec, TypeQ)... | |
38233648332c25ec0cc7339051d8992de12ab42a7eeea48bbbe256e9cfcf426e | phadej/vec | Wrd.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE CPP #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE GADTs #
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE Safe #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE StandaloneDeriving #... | null | https://raw.githubusercontent.com/phadej/vec/a895ab79e054987938295d5a149758eb79d85683/bin/src/Data/Wrd.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE DataKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE KindSignatures #
# LANGUAGE Safe #
# LANGUAGE StandaloneDeriving #
| Fixed-'Wrd'th (unsigned) integers.
* Showing
* Conversions
* Universe
* Bits
| We have implementation of some 'Bi... | # LANGUAGE CPP #
# LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
module Data.Wrd (
Wrd (..),
explicitShow,
explicitShowsPrec,
toNatural,
universe,
xor,
(.&.),
(.|.),
complement,
complement2,
shiftR,
shiftL,
rotateL,
rotateR,
... |
5839a3202fd7beecd23ca840b226b5d706af436c478a8600bf12443f7efa82cf | haskell/hackage-server | Backup.hs | # LANGUAGE PatternGuards #
# LANGUAGE RecordWildCards #
module Distribution.Server.Features.Core.Backup (
packagesBackup,
indexToAllVersions,
infoToAllEntries,
pkgPath,
PartialIndex(..),
PartialPkg,
partialToFullPkg,
parsePackageId,
doPackageImport
) where
import Distribution.S... | null | https://raw.githubusercontent.com/haskell/hackage-server/c2dd35c9c33ef50ecd213f3a6ffd3d9beddcc88f/src/Distribution/Server/Features/Core/Backup.hs | haskell | Unrecognized file. Ignore
If the blob ID of the restored file matches the one in the metadata,
we can assume the length and SHA256 are also okay. If not we have to
recompute it.
If the blob ID of the compressed tarball matches the reported one,
and the blob ID of the uncompressed tarball exists in the store,
we ... | # LANGUAGE PatternGuards #
# LANGUAGE RecordWildCards #
module Distribution.Server.Features.Core.Backup (
packagesBackup,
indexToAllVersions,
infoToAllEntries,
pkgPath,
PartialIndex(..),
PartialPkg,
partialToFullPkg,
parsePackageId,
doPackageImport
) where
import Distribution.S... |
394bead8f3dd79d89b22fbf7f59b5e03d56c39ac6cbeae328276f656eb095bc4 | agda/agda | Problem.hs | # LANGUAGE TemplateHaskell #
module Internal.TypeChecking.Rules.LHS.Problem ( tests ) where
import Agda.TypeChecking.Rules.LHS.Problem
import Internal.Helpers
------------------------------------------------------------------------
-- Instances
instance Arbitrary FlexChoice where
arbitrary = elements [ ChooseLef... | null | https://raw.githubusercontent.com/agda/agda/f50c14d3a4e92ed695783e26dbe11ad1ad7b73f7/test/Internal/TypeChecking/Rules/LHS/Problem.hs | haskell | ----------------------------------------------------------------------
Instances
----------------------------------------------------------------------------
Properties
----------------------------------------------------------------------
* All tests
-----------------------------------------------------------------... | # LANGUAGE TemplateHaskell #
module Internal.TypeChecking.Rules.LHS.Problem ( tests ) where
import Agda.TypeChecking.Rules.LHS.Problem
import Internal.Helpers
instance Arbitrary FlexChoice where
arbitrary = elements [ ChooseLeft, ChooseRight, ChooseEither, ExpandBoth ]
| ' FlexChoice ' is a monoid .
prop_mon... |
d4259fd0944af64e78b7eeb19569d616d8fce1e4708f0d328fd5599b300cde1a | 1Computer1/advent | CLI.hs | module Advent.Runner.CLI
( Options(..)
, getOptions
) where
import Advent.Runner.Types
import Options.Applicative
import qualified Text.Parsec as P
data Options = Options
{ year :: Year
, problems :: [(Day, Part)]
}
type Parsec = P.Parsec String ()
getOptions :: IO Op... | null | https://raw.githubusercontent.com/1Computer1/advent/1f3286b84bc4dd9e52502ef5077f65651a3012e4/runner/Advent/Runner/CLI.hs | haskell | module Advent.Runner.CLI
( Options(..)
, getOptions
) where
import Advent.Runner.Types
import Options.Applicative
import qualified Text.Parsec as P
data Options = Options
{ year :: Year
, problems :: [(Day, Part)]
}
type Parsec = P.Parsec String ()
getOptions :: IO Op... | |
07d23554c635a9e4f8104d321b64dd9e11bf6c5cb30688d2a6ead3d888583dbb | dizzyd/retest | copy_rt.erl | -module(copy_rt).
-include_lib("eunit/include/eunit.hrl").
files() ->
[{copy, "file1"},
{copy, "file1", "file2"}].
run(Dir) ->
?assertMatch({ok, [{contents, "12345ABCDEF"}]},
file:consult(Dir ++ "/file1")),
?assertMatch({ok, [{contents, "12345ABCDEF"}]},
file:consul... | null | https://raw.githubusercontent.com/dizzyd/retest/6b33038bd4df4aab1dc15bb59076512ba8fbb113/test/retest_SUITE_data/copy/copy_rt.erl | erlang | -module(copy_rt).
-include_lib("eunit/include/eunit.hrl").
files() ->
[{copy, "file1"},
{copy, "file1", "file2"}].
run(Dir) ->
?assertMatch({ok, [{contents, "12345ABCDEF"}]},
file:consult(Dir ++ "/file1")),
?assertMatch({ok, [{contents, "12345ABCDEF"}]},
file:consul... | |
df8e62fcf890d3c11314f6ef99b090e20a402efb7d3de90d1fd60787690e2075 | laser/cis-194-spring-2017 | Week09Spec.hs | module Homework.Week09Spec (
main,
spec
) where
import Test.Hspec
import Homework.Week09.AParser
import Homework.Week09.Assignment
import Data.Char (isUpper)
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
let upper = satisfy isUpper
describe "zeroOrMore" $ do
it "runs the parser zero or more t... | null | https://raw.githubusercontent.com/laser/cis-194-spring-2017/c6023cd611532c9bbd77eb97c14db360bfd5111c/test/Homework/Week09Spec.hs | haskell | module Homework.Week09Spec (
main,
spec
) where
import Test.Hspec
import Homework.Week09.AParser
import Homework.Week09.Assignment
import Data.Char (isUpper)
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
let upper = satisfy isUpper
describe "zeroOrMore" $ do
it "runs the parser zero or more t... | |
cd81ad041c6c895cf6ca8a61dd17fd79aa0c869dee09ecbfc7d12c3d9d509a84 | jrh13/hol-light | recursion.ml | (* ========================================================================= *)
(* Definition by primitive recursion and other tools for inductive types. *)
(* *)
, University of Cambridge Computer Laboratory
(* ... | null | https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/recursion.ml | ocaml | =========================================================================
Definition by primitive recursion and other tools for inductive types.
===============... | , University of Cambridge Computer Laboratory
( c ) Copyright , University of Cambridge 1998
( c ) Copyright , 1998 - 2007
needs "nums.ml";;
PR argument to come first in the arg list ; the outer one is more general .
let p... |
3dc812a56a602004ae85060f8107b9bcf251789ffe67394c5468b3dfcafe9bc6 | RoccoMathijn/programming-in-haskell | chapter06.hs | module Chapter6 where
import Prelude hiding (take, sum, last, (!!), (^), and, elem, concat, merge, replicate)
1 .
fac 0 = 1
fac n | n > 0 = n * fac (n-1)
2 .
sumdown :: Int -> Int
sumdown 0 = 0
sumdown n = n + sumdown (n-1)
3 .
(^) :: Int -> Int -> Int
x ^ 0 = 1
x ^ n = x * (x ^ (n-1))
4 .
euclid :: Int -... | null | https://raw.githubusercontent.com/RoccoMathijn/programming-in-haskell/ef2e3a5fa8c8a82154fdd5cd067d83b1fef1f220/chapter06.hs | haskell | a.
b.
c. | module Chapter6 where
import Prelude hiding (take, sum, last, (!!), (^), and, elem, concat, merge, replicate)
1 .
fac 0 = 1
fac n | n > 0 = n * fac (n-1)
2 .
sumdown :: Int -> Int
sumdown 0 = 0
sumdown n = n + sumdown (n-1)
3 .
(^) :: Int -> Int -> Int
x ^ 0 = 1
x ^ n = x * (x ^ (n-1))
4 .
euclid :: Int -... |
9b6f0c67d6e8c7c4df1f76d8eab3f4f8f397cf04ca81912d5e5768195403bf66 | stereoknife/cowbot-hs | Secrets.hs | module Secrets ( discordToken
, youtubeKey
, translateKey
) where
import Control.Applicative ((<|>))
import qualified Data.Text as T
import qualified Data.Text.IO as TIO
import System.Environment (getEnv)
discordToken :: IO T.Text
disc... | null | https://raw.githubusercontent.com/stereoknife/cowbot-hs/9e0aef3c7c8a58df092b30eb7ff1d2b42f519f9c/app/Secrets.hs | haskell | module Secrets ( discordToken
, youtubeKey
, translateKey
) where
import Control.Applicative ((<|>))
import qualified Data.Text as T
import qualified Data.Text.IO as TIO
import System.Environment (getEnv)
discordToken :: IO T.Text
disc... | |
ea2d3f6ba9f12340e21e8a706d6814f1777fe1a9edb3bfd7cfc060b0e6a18981 | dannywillems/RML | wellFormed.ml | Return [ true ] if [ nominal_typ ] is well formed .
let rec typ ?(use_subtyping = false) context nominal_typ =
match nominal_typ with
| Grammar.TypeTop | Grammar.TypeBottom -> true
| Grammar.TypeDeclaration (_, s, t) ->
(if use_subtyping then Subtype.is_subtype ~context s t else true)
&& typ ~use_su... | null | https://raw.githubusercontent.com/dannywillems/RML/6f34748a4ea0b44037519d67200850acf6067481/src/utils/wellFormed.ml | ocaml | We can suppose x is well formed because it's checked in the case of a
dependent function.
let typ_of_x_is_well_formed =
typ context typ_of_x
in
typ_of_x_is_well_formed &&
| Return [ true ] if [ nominal_typ ] is well formed .
let rec typ ?(use_subtyping = false) context nominal_typ =
match nominal_typ with
| Grammar.TypeTop | Grammar.TypeBottom -> true
| Grammar.TypeDeclaration (_, s, t) ->
(if use_subtyping then Subtype.is_subtype ~context s t else true)
&& typ ~use_su... |
166e07310c91e18fc11262605c94d935ffa82dbd4e3e7eb0b8b04459d7416da4 | koji-kojiro/lem-pygments-colorthemes | abap.lisp | (in-package :lem-user)
(define-color-theme "abap" ()
(foreground "#000000")
(background "#ffffff")
(cursor :foreground "#ffffff" :background "#000000")
(syntax-warning-attribute :foreground "#ff0000" :background "#ffffff")
(syntax-string-attribute :foreground "#5faf00" :background "#ffffff")
(syntax-commen... | null | https://raw.githubusercontent.com/koji-kojiro/lem-pygments-colorthemes/f7de93ca7a68be7fb99ec48cc571e132292a6712/themes/abap.lisp | lisp | (in-package :lem-user)
(define-color-theme "abap" ()
(foreground "#000000")
(background "#ffffff")
(cursor :foreground "#ffffff" :background "#000000")
(syntax-warning-attribute :foreground "#ff0000" :background "#ffffff")
(syntax-string-attribute :foreground "#5faf00" :background "#ffffff")
(syntax-commen... | |
7b5baa399357cbd24a154a9b53461b1b8f7b7c52bc13f0c9c8212ab5782c5b16 | google/rysim | simulation_controller.erl | %%%-------------------------------------------------------------------
Copyright 2014 The RySim 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
%... | null | https://raw.githubusercontent.com/google/rysim/afe19cea6415eb9d17e97f2f67280cf0b92eaa6e/erlang/rysim_des_actor/src/simulation_controller.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 im... | Copyright 2014 The RySim Authors . All rights reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(simulation_controller).
-include("rysim.hrl").
-export([create/2, run_experiment/0, advanced_state/1]).
... |
9e4a182a1476953e246acbd6f8d95c360742607902dcc5f7aaabb65768016b5d | Commonfare-net/macao-social-wallet | email_confirmation.clj | Freecoin - digital social currency toolkit
part of Decentralized Citizen Engagement Technologies ( D - CENT )
R&D funded by the European Commission ( FP7 / CAPS 610349 )
Copyright ( C ) 2015 Dyne.org foundation
Copyright ( C ) 2015 Thoughtworks , Inc.
designed , written and maintained by
< >
;; Th... | null | https://raw.githubusercontent.com/Commonfare-net/macao-social-wallet/d3724d6c706cdaa669c59da439fe48b0373e17b7/src/freecoin/views/email_confirmation.clj | clojure | This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General P... | Freecoin - digital social currency toolkit
part of Decentralized Citizen Engagement Technologies ( D - CENT )
R&D funded by the European Commission ( FP7 / CAPS 610349 )
Copyright ( C ) 2015 Dyne.org foundation
Copyright ( C ) 2015 Thoughtworks , Inc.
designed , written and maintained by
< >
it ... |
4f1a194f1541b117fef1999e76fb57bba649c672f1b9665573bce518ae70ae0d | atgreen/lisp-openshift | allegro.lisp | $ I d : 687 2012 - 02 - 27 14:49:55Z ctian $
;;;; $URL: svn-lisp.net/project/usocket/svn/usocket/tags/0.5.5/backend/allegro.lisp $
;;;; See LICENSE for licensing information.
(in-package :usocket)
(eval-when (:compile-toplevel :load-toplevel :execute)
(require :sock)
;; for wait-for-input:
(require :process... | null | https://raw.githubusercontent.com/atgreen/lisp-openshift/40235286bd3c6a61cab9f5af883d9ed9befba849/quicklisp/dists/quicklisp/software/usocket-0.5.5/backend/allegro.lisp | lisp | $URL: svn-lisp.net/project/usocket/svn/usocket/tags/0.5.5/backend/allegro.lisp $
See LICENSE for licensing information.
for wait-for-input:
note: the line below requires ACL 6.2+
note: the line below requires ACL 7.0+ to actually *work* on windows
nodelay == t is the ACL default
because socket-streams are also s... | $ I d : 687 2012 - 02 - 27 14:49:55Z ctian $
(in-package :usocket)
(eval-when (:compile-toplevel :load-toplevel :execute)
(require :sock)
(require :process)
(require :osi))
(defun get-host-name ()
(excl.osi:gethostname))
(defparameter +allegro-identifier-error-map+
'((:address-in-use . address-in-use-... |
78a3ef82d05ceb6b7bdd93684d20c1f93274b7a8377bf3748d97473d120628f2 | penpot/penpot | shapes.cljs | 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) KALEIDOS INC
(ns app.main.data.workspace.shapes
(:require
[app.common.data :as d]
[app.common.data.macros :as dm]
... | null | https://raw.githubusercontent.com/penpot/penpot/c8360b19949a34a9b0878a3a6f2dd08529c9c4cb/frontend/src/app/main/data/workspace/shapes.cljs | clojure |
Copyright (c) KALEIDOS INC
Calculate the frame over which we're drawing
When no shapes has been selected or we're over a different frame
we add it as the latest shape of that frame
Otherwise, we add it to next to the selected shape
Look for shapes that are inside a component copy, but are
not the root. In this ... | 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 /.
(ns app.main.data.workspace.shapes
(:require
[app.common.data :as d]
[app.common.data.macros :as dm]
[app.common.geom.proportions :a... |
29ccf2936cc720cad3634550972633c2740c2546c83c83eb0ffdeedbe1efd1c7 | TheClimateCorporation/S3DistVersions | jobdef.clj | The Climate Corporation licenses this file to you under 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
;;
;; See the NOTICE file distributed with this work for additional information
;... | null | https://raw.githubusercontent.com/TheClimateCorporation/S3DistVersions/10f0d4c6c0175b4498bd176ae5ebef1696263a5c/lemur/jobdef.clj | clojure | License, Version 2.0 (the "License"); you may not use this file except in
-2.0
See the NOTICE file distributed with this work for additional information
regarding copyright ownership. Unless required by applicable law or agreed
or implied. See the License for the specific language governing permissions
and ... | The Climate Corporation licenses this file to you under under the Apache
compliance with the License . You may obtain a copy of the License at
to in writing , software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express
(defclus... |
d9c422d2f90e1fc5b2fb80f298a0b25ee37440982159a8af1ae91e453b0fd322 | cabalism/hpack-dhall | Dhall.hs | # LANGUAGE TupleSections #
|
Module : Hpack . Dhall
Copyright :
© 2018 - 2021 Phil de Joux
© 2018 - 2021 Block Scope Limited
License : : < >
Stability : experimental
The functions in this module make it possible to configure an
< #readme hpack >
package description with
< -lang/dhall... | null | https://raw.githubusercontent.com/cabalism/hpack-dhall/b2126d05281ad9a2222a58292e2df113704ebd18/library/Hpack/Dhall.hs | haskell | SEE: -pretty-printing-json-haskell/
| Pretty prints JSON for the package description.
^ An ordering of JSON fields.
^ Path to a @.dhall@ file
| Pretty prints YAML for the package description.
^ An ordering of YAML fields.
^ Path to a @.dhall@ file
| Pretty prints the package description Dhall expression, resolv... | # LANGUAGE TupleSections #
|
Module : Hpack . Dhall
Copyright :
© 2018 - 2021 Phil de Joux
© 2018 - 2021 Block Scope Limited
License : : < >
Stability : experimental
The functions in this module make it possible to configure an
< #readme hpack >
package description with
< -lang/dhall... |
08b86b71aec55ba7115490ecf9e8540ef7904c2c02507031931fc09d18360a2a | NorfairKing/smos | Entry.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE RecordWildCards #
module Smos.Cursor.Entry
( EntryCursor (..),
makeEntryCursor,
emptyEntryCursor,
rebuildEntryCursor,
entryCursorHeaderCursorL,
entryCursorContentsCursorL,
entryCursorStateHistoryCursorL,
entryCursorTagsCursorL,
entryCursorProperti... | null | https://raw.githubusercontent.com/NorfairKing/smos/f72b26c2e66ab4f3ec879a1bedc6c0e8eeb18a01/smos-cursor/src/Smos/Cursor/Entry.hs | haskell | # LANGUAGE DeriveGeneric #
# LANGUAGE RecordWildCards #
module Smos.Cursor.Entry
( EntryCursor (..),
makeEntryCursor,
emptyEntryCursor,
rebuildEntryCursor,
entryCursorHeaderCursorL,
entryCursorContentsCursorL,
entryCursorStateHistoryCursorL,
entryCursorTagsCursorL,
entryCursorProperti... | |
014a21eac39d4ee62d698250a49d89e475760df6fde8c66c3e460b73d6f2b792 | haskell-opengl/OpenGLRaw | FramebufferFlipY.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.MESA.FramebufferFlipY
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
--------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/MESA/FramebufferFlipY.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.MESA.FramebufferFlipY
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enums
* Funct... | # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.MESA.FramebufferFlipY (
glGetMESAFramebufferFlipY,
gl_MESA_framebuffer_flip_y,
pattern GL_FRAMEBUFFER_FLIP_Y_MESA,
glFramebufferParameteriMESA,
glGetFramebufferParameterivMESA
) where
import Graphics.GL... |
6b64008f8c7dbb19ef6084f5193e427e93dff168390e30e7acfb0e9c00fbb11e | justinethier/nugget | unit-tests.scm | (define *num-passed* 0)
(define (assert:equal msg actual expected)
(if (not (equal? actual expected))
(error "Unit test failed [" msg "] actual [" actual "] expected [" expected "]")
(set! *num-passed* (+ *num-passed* 1))))
(define (assert:not-equal msg x y)
(assert:equal msg (not (equal? x y)) #t))
(... | null | https://raw.githubusercontent.com/justinethier/nugget/0c4e3e9944684ea83191671d58b5c8c342f64343/cyclone/tests/unit-tests.scm | scheme | Adder example
Apply section
Continuation section
Closure section
Factorial
If section
Set section
Scoping example
Square example
String section
Recursion example:
(display i)
TODO : improper list , this is an error : ( reverse ' ( 1 . 2 ) )
(assert:equal "" (string->number "343243243232") ;; Note no bignum ... | (define *num-passed* 0)
(define (assert:equal msg actual expected)
(if (not (equal? actual expected))
(error "Unit test failed [" msg "] actual [" actual "] expected [" expected "]")
(set! *num-passed* (+ *num-passed* 1))))
(define (assert:not-equal msg x y)
(assert:equal msg (not (equal? x y)) #t))
(... |
92e73c6718db5115325e8656078acd72dd8aeec317ebbf5d751f4433a1dffd78 | darrenldl/oali | task_config.ml | type t = {
disk_layout : Disk_layout.t option;
disk_layout_choice : Disk_layout.layout_choice option;
is_efi_mode : bool option;
add_hardened : bool option;
hardened_as_default : bool option;
use_lvm : bool option;
encrypt_boot : bool option;
encrypt_sys : Disk_layout.sys_part_enc_choice option;
boot_... | null | https://raw.githubusercontent.com/darrenldl/oali/d5fd4b2da61aa8bc21863af6bf352d1ac63de8f3/src/task_config.ml | ocaml | type t = {
disk_layout : Disk_layout.t option;
disk_layout_choice : Disk_layout.layout_choice option;
is_efi_mode : bool option;
add_hardened : bool option;
hardened_as_default : bool option;
use_lvm : bool option;
encrypt_boot : bool option;
encrypt_sys : Disk_layout.sys_part_enc_choice option;
boot_... | |
576d93e51fb17db814d5f2255c71c3d8498667fb44f9926068c3c1018a0f0d92 | racket/htdp | view-controller-typed.rkt | #lang typed/racket
;; this file contains the parts of the view-controller
;; that can easily be represented using typed racket.
(provide (struct-out Step)
application-step?
finished-stepping-step?
Step-Repository
new-step-repository
make-add-step!
make-num-steps
... | null | https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-lib/stepper/private/view-controller-typed.rkt | racket | this file contains the parts of the view-controller
that can easily be represented using typed racket.
the stored representation of a step
should be text%
is this an application step?
is this the finished-stepping step?
steps come in one at a time. Steps cannot be removed.
all calls are made in the same thread,... | #lang typed/racket
(provide (struct-out Step)
application-step?
finished-stepping-step?
Step-Repository
new-step-repository
make-add-step!
make-num-steps
make-step-ref
find-first-step
find-later-step
find-earlier-step
)... |
a32cb55c1dc790c067bfc15a226ac71e8fd5ef6b405c5384f3b9226d2632c34f | UnixJunkie/rankers | myList.ml | Copyright ( C ) 2019 ,
laboratory ,
Department of Bioscience and Bioinformatics ,
Faculty of Computer Science and Systems Engineering ,
Kyushu Institute of Technology ,
680 - 4 Kawazu , Iizuka , Fukuoka , 820 - 8502 , Japan .
Yamanishi laboratory,
Department of Bioscience and Bioin... | null | https://raw.githubusercontent.com/UnixJunkie/rankers/b6b891bd2b91fc862e277b34b9e7cf32b0d3a3b7/src/myList.ml | ocaml | count elements satisfying 'p'
split a list into n parts (the last part might have
a different number of elements)
create folds of cross validation; each fold consists in (train, test)
dump list to file
parallel work
List.max with a comparison function | Copyright ( C ) 2019 ,
laboratory ,
Department of Bioscience and Bioinformatics ,
Faculty of Computer Science and Systems Engineering ,
Kyushu Institute of Technology ,
680 - 4 Kawazu , Iizuka , Fukuoka , 820 - 8502 , Japan .
Yamanishi laboratory,
Department of Bioscience and Bioin... |
a8b6fd64e0249bf8987507ad3dcc9242e2c4436be0a4c12a6d4cd02c8f7cc28d | 6502/JSLisp | vectoredit.lisp | (import * from layout)
(import * from gui)
(import * from xy)
(setf #'warning #'error)
;; a graphic world
(defobject view ((editors (list))
(canvas null)
(ctx null)
(zero (xy 0 0))
(scale 1.0)))
(defobject editor ((objects (list))
... | null | https://raw.githubusercontent.com/6502/JSLisp/9a4aa1a9116f0cfc598ec9f3f30b59d99810a728/examples/vectoredit.lisp | lisp | a graphic world
drawing primitives
| (import * from layout)
(import * from gui)
(import * from xy)
(setf #'warning #'error)
(defobject view ((editors (list))
(canvas null)
(ctx null)
(zero (xy 0 0))
(scale 1.0)))
(defobject editor ((objects (list))
(mousedown-listen... |
7388a1bcded1db8ae983fb8b9b714dbccf83884977f6b526dfebc527bc65d8cf | KestrelInstitute/Specware | Tests.lisp | (test-directories ".")
(test
("Bug 0147 [Type Defs] : Morphisms should not be allowed to map defined types or ops into undefined ones"
:sw "BadMorphisms#MissingTypeDef"
:output '(
";;; Elaborating spec-morphism at $TESTDIR/BadMorphisms#MissingTypeDef"
";;; Elaborating spec at $TESTDIR/BadMorphisms#A"... | null | https://raw.githubusercontent.com/KestrelInstitute/Specware/2be6411c55f26432bf5c9e2f7778128898220c24/TestSuite/Bugs/Bug_0147/Tests.lisp | lisp | (test-directories ".")
(test
("Bug 0147 [Type Defs] : Morphisms should not be allowed to map defined types or ops into undefined ones"
:sw "BadMorphisms#MissingTypeDef"
:output '(
";;; Elaborating spec-morphism at $TESTDIR/BadMorphisms#MissingTypeDef"
";;; Elaborating spec at $TESTDIR/BadMorphisms#A"... | |
25634aaef584b8390c945f71cdab6a411d12a4294acba568fd333951550cc256 | xapi-project/xen-api | test_context.ml | let make_rq stunnel_proxy =
{
Http.Request.empty with
additional_headers= [("STUNNEL_PROXY", stunnel_proxy)]
}
let test_get_client_ip () =
let proxy_string = Printf.sprintf "TCP6 %s ::ffff:10.71.152.134 53772 443" in
[
("192.168.1.1", "192.168.1.1")
; ("::ffff:10.71.56.24", "10.71.56.24")
; ( "... | null | https://raw.githubusercontent.com/xapi-project/xen-api/550ff27340167239b33aa41b2f517c7771df9213/ocaml/tests/test_context.ml | ocaml | let make_rq stunnel_proxy =
{
Http.Request.empty with
additional_headers= [("STUNNEL_PROXY", stunnel_proxy)]
}
let test_get_client_ip () =
let proxy_string = Printf.sprintf "TCP6 %s ::ffff:10.71.152.134 53772 443" in
[
("192.168.1.1", "192.168.1.1")
; ("::ffff:10.71.56.24", "10.71.56.24")
; ( "... | |
090e4cb7b7abfe89d53d68a9157de95feb9acada65f7f0774e7b31fef0669f73 | noinia/hgeometry | Util.hs | # OPTIONS_GHC -fno - warn - orphans #
--------------------------------------------------------------------------------
-- |
-- Module : Data.Vector.Circular.Util
Copyright : ( C ) ,
-- License : see the LICENSE file
Maintainer :
-------------------------------------------------------------... | null | https://raw.githubusercontent.com/noinia/hgeometry/a6abecb1ce4a7fd96b25cc1a5c65cd4257ecde7a/hgeometry-combinatorial/src/Data/Vector/Circular/Util.hs | haskell | ------------------------------------------------------------------------------
|
Module : Data.Vector.Circular.Util
License : see the LICENSE file
------------------------------------------------------------------------------
FIXME: Upstream this to the non-empty vector library?
| All elements, starting... | # OPTIONS_GHC -fno - warn - orphans #
Copyright : ( C ) ,
Maintainer :
module Data.Vector.Circular.Util where
import Algorithms.StringSearch.KMP (isSubStringOf)
import Control.Lens
import Data.Ext
import Data.Maybe
import Data.Semigroup.Foldable
impo... |
53d2f5ccac3dea0428a7ffc97cca3ed91a7386623e3c0a5e0f00a82c78fb30d0 | unison-code/unison | Stalls.hs | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Algorithms and data types to analyze the resouce consumption and the latency
slack of assembly code .
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE... | null | https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison/src/Unison/Analysis/Stalls.hs | haskell | TODO: handle usages with offset less than 0 | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Algorithms and data types to analyze the resouce consumption and the latency
slack of assembly code .
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE... |
4f199e5e5b83fe9436f16cc3eae456ff5f3845df71453964d4467f68b4785a97 | tcsprojects/pgsolver | steadygame_aux.ml | Generators.run_command_line_generator "steadygame";; | null | https://raw.githubusercontent.com/tcsprojects/pgsolver/b0c31a8b367c405baed961385ad645d52f648325/src/generators/steadygame_aux.ml | ocaml | Generators.run_command_line_generator "steadygame";; | |
ee3d8a350b4c6027a755f246489b371d20b0308e84f4caaf96b3074f49ae8f5e | lateio/kurremkarmerruk | udp_sup.erl | %%%-------------------------------------------------------------------
%% @doc kurremkarmerruk top level supervisor.
%% @end
%%%-------------------------------------------------------------------
-module(udp_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
-d... | null | https://raw.githubusercontent.com/lateio/kurremkarmerruk/7743cb75e92ed6ffe0f147f96148299df47c9dcf/src/udp_sup.erl | erlang | -------------------------------------------------------------------
@doc kurremkarmerruk top level supervisor.
@end
-------------------------------------------------------------------
API
Supervisor callbacks
====================================================================
API functions
=======================... |
-module(udp_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
Child : : { Id , StartFunc , Restart , Shutdown , Type , Modules }
init([]) ->
{ok, { {one_for_one, 2, 2}, [
#{... |
febd2950836ff4142a88607d419d9cde1585ec64d8ac2326ff2b8cc30138806c | vlaaad/reveal | ext.clj | (ns vlaaad.reveal.ext
(:require [vlaaad.reveal.action :as action]
[vlaaad.reveal.stream :as stream]
[vlaaad.reveal.view :as view]
[vlaaad.reveal.ui :as ui]
[vlaaad.reveal.action-popup :as action-popup]))
;; region streaming
(defmacro ^{:deprecated "Use vlaaad.reveal n... | null | https://raw.githubusercontent.com/vlaaad/reveal/2c4e6ec40b4e8c9ebce1cc2cf1f4a35dc1ea5666/src/vlaaad/reveal/ext.clj | clojure | region streaming
endregion
region actions
endregion
region views
endregion
region commands
endregion
region deprecated
endregion | (ns vlaaad.reveal.ext
(:require [vlaaad.reveal.action :as action]
[vlaaad.reveal.stream :as stream]
[vlaaad.reveal.view :as view]
[vlaaad.reveal.ui :as ui]
[vlaaad.reveal.action-popup :as action-popup]))
(defmacro ^{:deprecated "Use vlaaad.reveal ns instead"} defstrea... |
49a6903d15d6fc1f34b8ae38495ecceeaeca6cd6b6d8f29ccf199d363a7123b3 | Decentralized-Pictures/T4L3NT | michelson_samplers_base.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_alpha/lib_benchmark/michelson_samplers_base.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
9afaa1ba1f873868a31108738814f28d0078d1584273d1267f38e019af57877f | tweag/asterius | TodoView.hs | module TodoView where
import Asterius.Types
foreign import javascript "document.querySelector(\".new-todo\")"
newTodo :: JSVal
foreign import javascript "document.querySelector(\".main\")" main' :: JSVal
foreign import javascript "document.querySelector(\".toggle-all\")"
toggleAll :: JSVal
foreign import javas... | null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/todomvc/TodoView.hs | haskell | module TodoView where
import Asterius.Types
foreign import javascript "document.querySelector(\".new-todo\")"
newTodo :: JSVal
foreign import javascript "document.querySelector(\".main\")" main' :: JSVal
foreign import javascript "document.querySelector(\".toggle-all\")"
toggleAll :: JSVal
foreign import javas... | |
4bed04fdc3e2f2037d0e8937ebcbf6c41bba37a3ddb3714e9a7c980881ec4bee | facebook/flow | error_suppressions.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/51c84b797c57d0807a5b6dbbb4a10733913e9ec3/src/typing/errors/error_suppressions.ml | ocaml | This is a data structure used to track what locations are being suppressed
* and which suppressions have yet to be used.
We don't want to overwrite the original location with one that falls inside it
We don't want to overwrite the original location with one that falls inside it
Using a univeral suppression to ... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
cbb29cb5a37fdefe62aec46f1a16b5ddcb1bdb2b0cd2487b8e5389ebec3baea9 | karlhof26/gimp-scheme | ev_iccii_photoeffects_246_02_part3.scm | ;***************************************************************************************
; The GIMP -- an image manipulation program
Copyright ( C ) 1995 and
;
Patchwork effect script for GIMP 1.2
Copyright ( C ) 2001 Iccii < >
;
; ------------------------------------------------------------... | null | https://raw.githubusercontent.com/karlhof26/gimp-scheme/fecb89875adf04e76f4b58e20d2206dc5cd26393/ev_iccii_photoeffects_246_02_part3.scm | scheme | ***************************************************************************************
The GIMP -- an image manipulation program
--------------------------------------------------------------------
- Initial relase
- Change to better algorithm
- Add the round option to create round tile
... | Copyright ( C ) 1995 and
Patchwork effect script for GIMP 1.2
Copyright ( C ) 2001 Iccii < >
version 0.1 by Iccii 2001/07/12
version 0.2 by Iccii 2001/07/14
version 0.3 by Iccii 2001/07/16
version 0.4 by Iccii 2001/07/19
version 0.5 by Iccii 2001/10/01 < >
- Chan... |
23fc1be6b09f1b033b68831868f35ecf6bf3482d279f232b3f17ffbc94b15514 | ml4tp/tcoq | impargs.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/library/impargs.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
s Flags governing the computation of... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open CErrors
open Util
open N... |
c3c7ecadc119a3c9536b28b0c1674bc9f146d203ad55b370ed9247226b8e7395 | dyoo/whalesong | info.rkt | #lang setup/infotab
(define name "Whalesong")
(define blurb '("A Racket to JavaScript compiler"))
(define release-notes '((p "Bug fixes.")))
(define version "1.21")
(define primary-file "make-launcher.rkt")
(define categories '(devtools))
(define repositories '("4.x"))
(define required-core-version "5.1.1")
;; I am d... | null | https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/info.rkt | racket | I am disabling the automatic launchers: it's causing issues with
file permissions. The program "make-launcher.rkt" will build a
instead.
(define racket-launcher-libraries '("whalesong.rkt"))
(define racket-launcher-names '("whalesong"))
| #lang setup/infotab
(define name "Whalesong")
(define blurb '("A Racket to JavaScript compiler"))
(define release-notes '((p "Bug fixes.")))
(define version "1.21")
(define primary-file "make-launcher.rkt")
(define categories '(devtools))
(define repositories '("4.x"))
(define required-core-version "5.1.1")
whaleso... |
bba2bbce519ebc259ba31ee6d107025994704d14685f3036a0831b76d68f8b4e | ephemient/aoc2018 | Day11Spec.hs | module Day11Spec (spec) where
import Day11 (day11a, day11b)
import Test.Hspec (Spec, describe, it, shouldBe)
spec :: Spec
spec = do
describe "part 1" $
it "examples" $ do
day11a "18" `shouldBe` "33,45"
day11a "42" `shouldBe` "21,61"
describe "part 2" $
it "examples" $ d... | null | https://raw.githubusercontent.com/ephemient/aoc2018/eb0d04193ccb6ad98ed8ad2253faeb3d503a5938/test/Day11Spec.hs | haskell | module Day11Spec (spec) where
import Day11 (day11a, day11b)
import Test.Hspec (Spec, describe, it, shouldBe)
spec :: Spec
spec = do
describe "part 1" $
it "examples" $ do
day11a "18" `shouldBe` "33,45"
day11a "42" `shouldBe` "21,61"
describe "part 2" $
it "examples" $ d... | |
0700d6ff1b6443b27f71851d14be83cf8325c3c505ea661adb617fae1bf826a1 | clojurewerkz/support | hashing.clj | (ns clojurewerkz.support.hashing
(:require [clojurewerkz.support.internal :as i])
(:import [com.google.common.hash Hashing HashFunction HashCode Hasher]))
;;
;; API
;;
(def ^HashFunction sha1-fn (Hashing/sha1))
(def ^HashFunction md5-fn (Hashing/md5))
(def ^HashFunction murmur-fn (Hashing/murmur3_128))
(def... | null | https://raw.githubusercontent.com/clojurewerkz/support/33d28084829f6ccb6aed870a357fa6b53c57d2cc/src/clojure/clojurewerkz/support/hashing.clj | clojure |
API
| (ns clojurewerkz.support.hashing
(:require [clojurewerkz.support.internal :as i])
(:import [com.google.common.hash Hashing HashFunction HashCode Hasher]))
(def ^HashFunction sha1-fn (Hashing/sha1))
(def ^HashFunction md5-fn (Hashing/md5))
(def ^HashFunction murmur-fn (Hashing/murmur3_128))
(defprotocol Hash... |
bbd32c350dd140586f57a2dd86a180fd0fc4a0f8d8d1ea799efa2969a0a7f027 | input-output-hk/plutus | Common.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
modul... | null | https://raw.githubusercontent.com/input-output-hk/plutus/bb9b5a18c26476fbf6b2f446ab267706426fec3a/plutus-core/executables/src/PlutusCore/Executable/Common.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE DataKinds #
# LANGUAGE OverloadedStrings #
--------- ProgramLike type class -----------
| PIR program type.
| PLC program type.
| Check a program for unique names.
Throws a @UniqueError@ when not all names are unique.
| Read and deserialise a Flat-encoded AST... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
module PlutusCore.Executable.Common where
import PlutusPrelude
import PlutusCore qualified as PLC
import PlutusCor... |
85f55533bcead15753720e8a234eb6470937070b08c78dc5ccef7c6151248173 | masatoi/cl-random-forest | a9a.lisp | -*- coding : utf-8 ; mode : lisp -*-
(in-package :clrf)
;;; a9a ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defparameter a9a-dim 123)
(defparameter a9a-n-class 2)
;; Read training data
(multiple-value-bind (datamat target)
(read-data "/home/wiz/datasets/a9a" a9a-dim)
(defp... | null | https://raw.githubusercontent.com/masatoi/cl-random-forest/6d004b23af496fdb76dca06b808c19715a387437/example/classification/a9a.lisp | lisp | mode : lisp -*-
a9a ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Read training data
Read test data
dtree
random-forest |
(in-package :clrf)
(defparameter a9a-dim 123)
(defparameter a9a-n-class 2)
(multiple-value-bind (datamat target)
(read-data "/home/wiz/datasets/a9a" a9a-dim)
(defparameter a9a-datamatrix datamat)
(defparameter a9a-target target))
Change from binary data to 2 - class data
(loop for i from 0 below (length ... |
fbb19d2eb009d941ce0e6829a4f3c45067d5df59158abefcf641c01b655ec4e0 | csabahruska/jhc-components | Generics.hs | module Jhc.Prim.Generics where
--------------------------------------------------------------------------------
-- Representation types
--------------------------------------------------------------------------------
-- | Void: used for datatypes without constructors
data V1 p
-- | Unit: used for constructors withou... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/lib/jhc-prim/Jhc/Prim/Generics.hs | haskell | ------------------------------------------------------------------------------
Representation types
------------------------------------------------------------------------------
| Void: used for datatypes without constructors
| Unit: used for constructors without arguments
| Used for marking occurrences of the par... | module Jhc.Prim.Generics where
data V1 p
data U1 p = U1
newtype Par1 p = Par1 { unPar1 :: p }
newtype Rec1 f p = Rec1 { unRec1 :: f p }
newtype K1 i c p = K1 { unK1 :: c }
newtype M1 i c f p = M1 { unM1 :: f p }
infixr 5 :+:
data (:+:) f g p = L1 (f p) | R1 (g p)
infixr 6 :*:
data (:*:) f g p = f p :*: g p
in... |
3d0313a99a5dd65cdb164b7869b7e270e83acd0a9bcbb6c934f765e32ede55a5 | xtdb/xtdb | submit_client_test.clj | (ns xtdb.submit-client-test
(:require [xtdb.fixtures :as fix]
[xtdb.api :as xt]
[xtdb.rocksdb :as rocks]
[clojure.java.io :as io]
[clojure.test :as t]
[xtdb.db :as db]
[xtdb.codec :as c]))
(t/deftest test-submit-client
(fix/with-tmp-dir "db" [... | null | https://raw.githubusercontent.com/xtdb/xtdb/32361297e9a15fc569ac694c8bd7951b4f52aa0a/test/test/xtdb/submit_client_test.clj | clojure | (ns xtdb.submit-client-test
(:require [xtdb.fixtures :as fix]
[xtdb.api :as xt]
[xtdb.rocksdb :as rocks]
[clojure.java.io :as io]
[clojure.test :as t]
[xtdb.db :as db]
[xtdb.codec :as c]))
(t/deftest test-submit-client
(fix/with-tmp-dir "db" [... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.