_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 |
|---|---|---|---|---|---|---|---|---|
f0e6ee901ce3ebb4bae52b04aa9c05be8ce7a03cba1df78dadd5f31436995367 | youscape/ebt | ebt_priority_selector.erl | %%%-------------------------------------------------------------------
@author zyuyou
( C ) 2015 ,
%%% @doc 优先级选择节点
%%%
%%% @end
%%%-------------------------------------------------------------------
-module(ebt_priority_selector).
-ebt_extend(ebt_node).
-include("ebt.hrl").
-include("ebt_transform.hrl").
%%... | null | https://raw.githubusercontent.com/youscape/ebt/546121bdfa24cb8cbd64ff4f842fd42ec7d50189/src/ebt_priority_selector.erl | erlang | -------------------------------------------------------------------
@doc 优先级选择节点
@end
-------------------------------------------------------------------
API | @author zyuyou
( C ) 2015 ,
-module(ebt_priority_selector).
-ebt_extend(ebt_node).
-include("ebt.hrl").
-include("ebt_transform.hrl").
-export([do_evaluate/1, tick/1]).
do_evaluate(#ebt_node{id = Id, childs = Childs}) ->
Data = ?EBT_NODE_DATA(Id),
LastActiveNode = maps:get(active_child, Data, undefi... |
c66f492073d7dc58e4c15fb768650b9b54ed91f7a62dfd67b3d59930fc0e438a | darrenldl/oali | useradd_helper_as_powerful_script_template.ml | let gen () =
{|#!/bin/bash
INVALID_ANS="Invalid answer"
NO_COMMAND="Command not found"
groups="users,wheel,rfkill"
ask_ans() {
if (( $# <= 1 )); then
echo "Too few parameters"
exit
elif (( $# >= 2 )); then
ret_var=$1
message=$2
fi
echo -ne "$message"": "
read ans
eval "$ret_var=$ans"... | null | https://raw.githubusercontent.com/darrenldl/oali/fa2a7e7171eb57c4bab5961a124ac165120e40cb/src/useradd_helper_as_powerful_script_template.ml | ocaml | let gen () =
{|#!/bin/bash
INVALID_ANS="Invalid answer"
NO_COMMAND="Command not found"
groups="users,wheel,rfkill"
ask_ans() {
if (( $# <= 1 )); then
echo "Too few parameters"
exit
elif (( $# >= 2 )); then
ret_var=$1
message=$2
fi
echo -ne "$message"": "
read ans
eval "$ret_var=$ans"... | |
127ab9d049850331cf326889794867ab3ba6decb9b871b57987e9dd3dbad5b49 | headwinds/reagent-reframe-material-ui | fx.cljc | (ns re-frame.fx
(:require
[re-frame.router :as router]
[re-frame.db :refer [app-db]]
[re-frame.interceptor :refer [->interceptor]]
[re-frame.interop :refer [set-timeout!]]
[re-frame.events :as events]
[re-frame.registrar :refer [get-handler clear-handlers register-hand... | null | https://raw.githubusercontent.com/headwinds/reagent-reframe-material-ui/8a6fba82a026cfedca38491becac85751be9a9d4/resources/public/js/out/re_frame/fx.cljc | clojure | -- Registration ------------------------------------------------------------
-- Interceptor -------------------------------------------------------------
:dispatch-later
usage:
; in 200ms do this : ( dispatch [: event - id " param " ] )
:dispatch
usage:
{:dispatch [:event-id "param"] }
:dispatch-n
... | (ns re-frame.fx
(:require
[re-frame.router :as router]
[re-frame.db :refer [app-db]]
[re-frame.interceptor :refer [->interceptor]]
[re-frame.interop :refer [set-timeout!]]
[re-frame.events :as events]
[re-frame.registrar :refer [get-handler clear-handlers register-hand... |
b877017778f79d19e38b8002c81aca44328c184ec56493f130d74f3dc8117b1c | NalaGinrut/artanis | sxml.scm | -*- indent - tabs - mode : nil ; coding : utf-8 -*-
;; Copyright (C) 2014,2015
" Mu Lei " known as " NalaGinrut " < >
Artanis is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License and GNU
Lesser General Public License published by the Free S... | null | https://raw.githubusercontent.com/NalaGinrut/artanis/3412d6eb5b46fde71b0965598ba085bacc2a6c12/artanis/tpl/sxml.scm | scheme | coding : utf-8 -*-
Copyright (C) 2014,2015
any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License and GNU Lesser General Public License
for more details.
and GNU Lesser General Public Licen... | " Mu Lei " known as " NalaGinrut " < >
Artanis is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License and GNU
Lesser General Public License published by the Free Software
Foundation , either version 3 of the License , or ( at your option )
A... |
2afe6eb674829637de372c99eedd5be2b390b8083a22dc9621f06b22194a48fe | audreyt/openafp | NOP.hs | module OpenAFP.Records.PTX.NOP where
import OpenAFP.Types
import OpenAFP.Internals
data PTX_NOP = PTX_NOP {
ptx_nop_Type :: !N1
,ptx_nop :: !NStr
} deriving (Show, Typeable)
| null | https://raw.githubusercontent.com/audreyt/openafp/178e0dd427479ac7b8b461e05c263e52dd614b73/src/OpenAFP/Records/PTX/NOP.hs | haskell | module OpenAFP.Records.PTX.NOP where
import OpenAFP.Types
import OpenAFP.Internals
data PTX_NOP = PTX_NOP {
ptx_nop_Type :: !N1
,ptx_nop :: !NStr
} deriving (Show, Typeable)
| |
53659be3e98d8b661f4617f0f703b64e14b2eeb7cc23762a6b13f9cea1faac72 | Carnap/Carnap | Syntax.hs | # LANGUAGE UndecidableInstances , FlexibleInstances , MultiParamTypeClasses , GADTs , TypeOperators , PatternSynonyms , FlexibleContexts #
module Carnap.Languages.DefiniteDescription.Syntax where
import Carnap.Core.Util
import Carnap.Core.Data.Util
import Carnap.Core.Data.Types
import Carnap.Core.Data.Optics
import ... | null | https://raw.githubusercontent.com/Carnap/Carnap/99546e377008247c5a1e8de1e294aac8e22584d7/Carnap/src/Carnap/Languages/DefiniteDescription/Syntax.hs | haskell | ---------------------------------------------
---------------------------------------------
"fregean" because every term has a denotation.
---------------------------------------
--------------------------------------- | # LANGUAGE UndecidableInstances , FlexibleInstances , MultiParamTypeClasses , GADTs , TypeOperators , PatternSynonyms , FlexibleContexts #
module Carnap.Languages.DefiniteDescription.Syntax where
import Carnap.Core.Util
import Carnap.Core.Data.Util
import Carnap.Core.Data.Types
import Carnap.Core.Data.Optics
import ... |
e4bc2f1430563fd547960f7258bff016cc4e62c25cb11c02dac534b5997415c2 | rlhk/logseq-url-plus | api.cljs | CAUTION : ONLY allows pure fns to facilitate Node.js based TDD setup
(ns api
(:require
[cuerdas.core :as str]))
TODO
(def settings-schema
[{:key "TwitterAccessToken"
:type "string"
:title "Twitter Access Token"
:description "See: -2-0/bearer-tokens"
:default ""}])
(defn md-link->label-and-u... | null | https://raw.githubusercontent.com/rlhk/logseq-url-plus/a636623f79204fb396ffb2f776287c37879f1ef4/src/main/api.cljs | clojure | warning (if (map? m)
"Can't determine a map-like record.") | CAUTION : ONLY allows pure fns to facilitate Node.js based TDD setup
(ns api
(:require
[cuerdas.core :as str]))
TODO
(def settings-schema
[{:key "TwitterAccessToken"
:type "string"
:title "Twitter Access Token"
:description "See: -2-0/bearer-tokens"
:default ""}])
(defn md-link->label-and-u... |
05d943849a4b998ff22c9d6c233119c6c78a7e485218fd2805005ff52b21d671 | spechub/Hets | Parser.hs | # LANGUAGE ScopedTypeVariables #
module Parser where
import Text.ParserCombinators.Parsec
import Text.ParserCombinators.Parsec.Expr
import Logic
import Grothendieck
import Structured
import Data.Dynamic
import Data.Maybe
hetParse :: LogicGraph -> String -> SPEC
hetParse (logics@((_, defaultLogic) : _), translations... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/mini/Parser.hs | haskell | # LANGUAGE ScopedTypeVariables #
module Parser where
import Text.ParserCombinators.Parsec
import Text.ParserCombinators.Parsec.Expr
import Logic
import Grothendieck
import Structured
import Data.Dynamic
import Data.Maybe
hetParse :: LogicGraph -> String -> SPEC
hetParse (logics@((_, defaultLogic) : _), translations... | |
4ab90d1fcd163c3d16a8ceae3e70c25e4ceff97a07307d616678064ff4e9331f | ocamllabs/opam-doc | printdoctree.ml | open Format
open Doctree
open Info
let line i f s (*...*) =
fprintf f "%s" (String.make (2*i) ' ');
fprintf f s (*...*)
let list i f ppf l =
match l with
| [] -> line i ppf "[]\n"
| _ :: _ ->
line i ppf "[\n";
List.iter (f (i+1) ppf) l;
line i ppf "]\n"
let option i f ppf x =
match x with... | null | https://raw.githubusercontent.com/ocamllabs/opam-doc/4f5a332750177e3016b82d5923a681510335af4c/src/bin-doc/printdoctree.ml | ocaml | ...
...
Type expressions for the module language | open Format
open Doctree
open Info
fprintf f "%s" (String.make (2*i) ' ');
let list i f ppf l =
match l with
| [] -> line i ppf "[]\n"
| _ :: _ ->
line i ppf "[\n";
List.iter (f (i+1) ppf) l;
line i ppf "]\n"
let option i f ppf x =
match x with
| None -> line i ppf "None\n";
| Some x ->... |
093372e247b901c5e9bce446e2cefcea844e60791f8d9f5c4672be36235220a1 | jdhorwitz/shadow-reframe-antizer | subs.cljs | (ns app.subs
(:require [re-frame.core :as rf]))
(rf/reg-sub
:active-page
(fn [db _]
(:active-page db)))
(rf/reg-sub
:counter
(fn [db _]
(:counter db)))
(rf/reg-sub
:topic-id
(fn [db _]
(:topic-id db)))
| null | https://raw.githubusercontent.com/jdhorwitz/shadow-reframe-antizer/e73029576406b1fe153398b689515ad88d2045b0/src/app/subs.cljs | clojure | (ns app.subs
(:require [re-frame.core :as rf]))
(rf/reg-sub
:active-page
(fn [db _]
(:active-page db)))
(rf/reg-sub
:counter
(fn [db _]
(:counter db)))
(rf/reg-sub
:topic-id
(fn [db _]
(:topic-id db)))
| |
eb41c73c2c34fd7209677751cd95971c8b25b32da21a4161bc6b42f294a2f13d | astrada/google-drive-ocamlfuse | cacheData.mli | type t = {
cache_dir : string;
db_path : string;
busy_timeout : int;
in_memory : bool;
autosaving_interval : int;
}
module Resource : sig
module State : sig
type t =
| Synchronized
| ToDownload
| Downloading
| ToUpload
| Uploading
| NotFound
val to_string : t ->... | null | https://raw.githubusercontent.com/astrada/google-drive-ocamlfuse/9027602dbbaf7473cfacc8bd44865d2bef7c41c7/src/cacheData.mli | ocaml | type t = {
cache_dir : string;
db_path : string;
busy_timeout : int;
in_memory : bool;
autosaving_interval : int;
}
module Resource : sig
module State : sig
type t =
| Synchronized
| ToDownload
| Downloading
| ToUpload
| Uploading
| NotFound
val to_string : t ->... | |
309b4e905d8c85ee1abd61c541e11b790f18e624d26ec7a6a720c46e2ed052e3 | typelead/eta | UTF32.hs | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude
, BangPatterns
, NondecreasingIndentation
, MagicHash
#
, BangPatterns
, NondecreasingIndentation
, MagicHash
#-}
# OPTIONS_GHC -funbox - strict - fields #
-----------------------------... | null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/libraries/base/GHC/IO/Encoding/UTF32.hs | haskell | ---------------------------------------------------------------------------
|
Module : GHC.IO.Encoding.UTF32
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
Portability : non-portable
---------------------------------------------------------------------------
--------... | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude
, BangPatterns
, NondecreasingIndentation
, MagicHash
#
, BangPatterns
, NondecreasingIndentation
, MagicHash
#-}
# OPTIONS_GHC -funbox - strict - fields #
Copyright : ( c ) The ... |
41ef2dc0fd8e1f5d4d320016d8efa0bb4b2143580f386912ce04121f8d3cdcf5 | tomgstevensphd/Common-Lisp-Utilities-in-Lispworks | U-symbol-info.lisp | ;;******************************* U-symbol-info.lisp *********************
;;
;;Functions for writing code etc to find functions, function args, etc. to speed writing code
;;
;;SOME FUNCTIONS THAT MIGHT HELP
#|
do-symbols, do-external-symbols, and do-all-symbols iterate over the symbols of packages. For each symb... | null | https://raw.githubusercontent.com/tomgstevensphd/Common-Lisp-Utilities-in-Lispworks/a937e4f5f0ecc2430ac50560b14e87ec3b56ea37/U-symbol-info.lisp | lisp | ******************************* U-symbol-info.lisp *********************
Functions for writing code etc to find functions, function args, etc. to speed writing code
SOME FUNCTIONS THAT MIGHT HELP
do-symbols, do-external-symbols, and do-all-symbols iterate over the symbols of packages. For each symbol in the se... |
ALSO SEE U-sexp.lisp
2019
ddd
(defun makunbound-nested-vars (nested-varlists &key (unbind-level 99)
(convert-strings-p T)
(level 0))
"U-symbol-info, RETURNS: (values unbound-vars not-unbound-vars) UN... |
ac7c97323bc0a359372766df3f0291171ed1642524e937ad286eeb340255f542 | jrh13/hol-light | readable.ml | (* ========================================================================= *)
Miz3 interface for readable HOL Light tactics formal proofs
(* *)
( c ) Copyright , 2013
Dis... | null | https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/RichterHilbertAxiomGeometry/readable.ml | ocaml | =========================================================================
The primary meaning of readability is explained in the HOL Light tutorial
"We would like ... | Miz3 interface for readable HOL Light tactics formal proofs
( c ) Copyright , 2013
Distributed under the same license as HOL Light
on page 81 after the proof of NSQRT_2 ( ported below ) ,
running it in H... |
550f2edcb96434b232e7d3e8aaaf02d8ae8dfc73775b399ce3f8e04a4a4b63f7 | HuwCampbell/grenade | feedforward.hs | # LANGUAGE BangPatterns #
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
import Control.Monad
import Control.... | null | https://raw.githubusercontent.com/HuwCampbell/grenade/5206c95c423d9755e620f41576470a281ba59c89/examples/main/feedforward.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
The defininition for our simple feed forward network.
The type level lists represents the layers and the shapes passed through the layers.
One can see that for this demonstratio... | # LANGUAGE BangPatterns #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
import Control.Monad
import Control.Monad.Random
import Data.List ( foldl' )
import qualified Data.ByteString as B
import Data.Serialize
#if ! MIN_VERSION_base(4,13,0)
imp... |
328387b8a1cb6a6935ecf4b482246b125fa3b2df02697179665ac1fbfe7c9da6 | rubenbarroso/EOPL | 4_14.scm | It might seem that the problem with the following expression
letrec
? even(? odd, ? x) =
if zero?(x) then 1 else (odd sub1(x))
in letrec
? odd(bool x) =
if zero?(x) then 0 else (even odd sub1(x))
in (odd 13)
is that, in the body of even, we use x as an int in zero?(x), but then we pass i... | null | https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/chapter4/4_14.scm | scheme | It might seem that the problem with the following expression
letrec
? even(? odd, ? x) =
if zero?(x) then 1 else (odd sub1(x))
in letrec
? odd(bool x) =
if zero?(x) then 0 else (even odd sub1(x))
in (odd 13)
is that, in the body of even, we use x as an int in zero?(x), but then we pass i... | |
47dfda9053bb08f7b4df4ca3cb2d294795959c4fb938e464310c5444b03171fd | kupl/FixML | sub6.ml | let rec max l=
match l with
[] ->0
|h::t->if(h>(max t)) then h else (max t);; | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/maxmin/maxmin/submissions/sub6.ml | ocaml | let rec max l=
match l with
[] ->0
|h::t->if(h>(max t)) then h else (max t);; | |
2bb60bac37e3b90c24fc5c7f2105b0cf7fbab40042289f0a60833c0cbfbe810d | awslabs/s2n-bignum | bignum_optneg.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/x86/proofs/bignum_optneg.ml | ocaml | =========================================================================
Optional negation of bignums.
=========================================================================
*** print_literal_from_elf "x86/generic/bignum_optneg.o";;
***
XOR (% rax) (% rax)
TEST ... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
let bignum_optneg_mc =
define_assert_from_elf "bignum_optneg_mc"... |
39322045631afd51fe7ea2564e3550c0bd7678379af730a4f977b71edfb59315 | juspay/atlas | Sms.hs | |
Copyright 2022 Juspay Technologies Pvt 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
Unless required by applicable law or agreed to in writing , software
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/mock-sms/src/Types/API/Sms.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt 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
Unless required by applicable law or agreed to in writing , software
dis... | |
528b117f5d7e37bc2fb689bed85c11c929ec2e8c45d197d93d1abdd936214a35 | metosin/packaging-clojure-examples | main.clj | (ns my-project.main
(:require [reitit.ring :as ring]
[ring.adapter.jetty :as jetty]))
(def app
(ring/ring-handler
(ring/router
["/api"
["/ping" {:get {:handler (fn [_]
{:status 200
:body "pong"})}}]])
(ring/routes
(ring... | null | https://raw.githubusercontent.com/metosin/packaging-clojure-examples/9ce8df699b48fa9856d97d0b56334642ccc84dcf/lein/src/clj/my_project/main.clj | clojure | serve index.html and built js | (ns my-project.main
(:require [reitit.ring :as ring]
[ring.adapter.jetty :as jetty]))
(def app
(ring/ring-handler
(ring/router
["/api"
["/ping" {:get {:handler (fn [_]
{:status 200
:body "pong"})}}]])
(ring/routes
(ring... |
93021161079573343ce9dd500a60a4a8540762e606dcecb341c172630956eafc | fakedata-haskell/fakedata | TwinPeaks.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Faker.Provider.TwinPeaks where
import Config
import Control.Monad.Catch
import Control.Monad.IO.Class
import Data.Map.Strict (Map)
import Data.Monoid ((<>))
import Data.Text (Text)
import Data.Vector (Vector)
import Data.Yaml
import Faker
import F... | null | https://raw.githubusercontent.com/fakedata-haskell/fakedata/7b0875067386e9bb844c8b985c901c91a58842ff/src/Faker/Provider/TwinPeaks.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
module Faker.Provider.TwinPeaks where
import Config
import Control.Monad.Catch
import Control.Monad.IO.Class
import Data.Map.Strict (Map)
import Data.Monoid ((<>))
import Data.Text (Text)
import Data.Vector (Vector)
import Data.Yaml
import Faker
import Faker.Internal
import Faker.Provider... |
21445760c5191a50ef1cb9369a28f8e7f2993e0de46c266e43477240fb800e19 | gedge-platform/gedge-platform | prometheus_collector.erl | %% @doc
%% A collector for a set of metrics.
%%
%% Normal users should use {@link prometheus_gauge},
%% {@link prometheus_counter}, {@link prometheus_summary}
%% and {@link prometheus_histogram}.
%%
%% Implementing `:prometheus_collector' behaviour is for advanced uses
%% such as proxying metrics from another monitorin... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/prometheus/src/prometheus_collector.erl | erlang | @doc
A collector for a set of metrics.
Normal users should use {@link prometheus_gauge},
{@link prometheus_counter}, {@link prometheus_summary}
and {@link prometheus_histogram}.
Implementing `:prometheus_collector' behaviour is for advanced uses
such as proxying metrics from another monitoring system.
It is i... | - ` collect_metrics(Name , Data ) ' - called by ` ' constructor .
Should return Metric list for each identified by ` Name ' .
` Data ' is a term associated with by collect_mf .
Callback(create_gauge(erlang_vm_bytes_total ,
{ [ { kind , system } ] , proplists : , Memory ) } ,
create_gauge(Name ... |
2e8f3db28bf95374f090533d7218b19ff5494c1c8049031b5211afedbc35f679 | andrewMacmurray/haskell-book-solutions | Practice.hs | module Ch24.Practice where
import Text.Trifecta
one :: Parser Char
one = char '1'
oneTwo :: Parser Char
oneTwo = one >> char '2'
oneTwoStop :: Parser ()
oneTwoStop = oneTwo >> eof
allThree :: Parser String
allThree = do
n <- (show <$> integer)
_ <- eof
return n
string' :: String -> Parser String
string' st... | null | https://raw.githubusercontent.com/andrewMacmurray/haskell-book-solutions/f4fd386187c03828d1736d9a43642ab4f0ec6462/src/ch24/Practice.hs | haskell | module Ch24.Practice where
import Text.Trifecta
one :: Parser Char
one = char '1'
oneTwo :: Parser Char
oneTwo = one >> char '2'
oneTwoStop :: Parser ()
oneTwoStop = oneTwo >> eof
allThree :: Parser String
allThree = do
n <- (show <$> integer)
_ <- eof
return n
string' :: String -> Parser String
string' st... | |
7e7d9d479a66fb8cf8b026abc947284e265f92edf6dca1da21c8e011a037b527 | puppetlabs/puppetserver | certificate_authority_disabled_test.clj | (ns puppetlabs.services.ca.certificate-authority-disabled-test
(:require [clojure.test :refer :all]
[me.raynes.fs :as fs]
[puppetlabs.services.ca.certificate-authority-disabled-service :as disabled]
[puppetlabs.services.jruby.jruby-puppet-testutils :as jruby-testutils]
... | null | https://raw.githubusercontent.com/puppetlabs/puppetserver/2d6ca01b4b72716ca543b606f752261b969e401b/test/unit/puppetlabs/services/ca/certificate_authority_disabled_test.clj | clojure | (ns puppetlabs.services.ca.certificate-authority-disabled-test
(:require [clojure.test :refer :all]
[me.raynes.fs :as fs]
[puppetlabs.services.ca.certificate-authority-disabled-service :as disabled]
[puppetlabs.services.jruby.jruby-puppet-testutils :as jruby-testutils]
... | |
f52a06569247c3326d6134994d4d6e7d8d1621122130720560e1925eb428ca57 | ucsd-progsys/liquidhaskell | DupFunSigs.hs | {-@ LIQUID "--expect-error-containing=Multiple specifications for `DupFunSigs.fromWeekDayNum`" @-}
-- See -progsys/liquidhaskell/issues/1137
module DupFunSigs where
import Data.List
@ type WeekDayNum = { i : Int | 0 < i & & i < = 7 } @
Mon = = 1 , ... , Sun = = 7
data WeekDay = Mon | Tue | Wed | Thu | Fri | Sat |... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/errors/DupFunSigs.hs | haskell | @ LIQUID "--expect-error-containing=Multiple specifications for `DupFunSigs.fromWeekDayNum`" @
See -progsys/liquidhaskell/issues/1137
@ fromWeekDayNum :: WeekDayNum -> WeekDay @ |
module DupFunSigs where
import Data.List
@ type WeekDayNum = { i : Int | 0 < i & & i < = 7 } @
Mon = = 1 , ... , Sun = = 7
data WeekDay = Mon | Tue | Wed | Thu | Fri | Sat | Sun
deriving (Read, Show, Eq, Bounded)
@ weekdays : : { wd:[WeekDay ] | len wd = = 7 } @
weekdays :: [WeekDay]
weekdays = [Mon, Tue, Wed,... |
20a22a34f4c95a0a3e5e96c974da9ca9c436a5130ae4ed7ac999844417e7709e | erlang/otp | extra_return.erl | -module(extra_return).
-export([t1/0, t2/0]).
% Should warn about having `undefined` as return value when it is not returned by the function
-spec t1() -> true | false | 'other'.
t1() ->
case rand:uniform(2) of
1 -> true;
2 -> false
end.
% Should not warn about extra return
-dialyzer({no_ext... | null | https://raw.githubusercontent.com/erlang/otp/c9728daf140e03840a49488a607bdd622d82aa1f/lib/dialyzer/test/extra_return_SUITE_data/src/extra_return.erl | erlang | Should warn about having `undefined` as return value when it is not returned by the function
Should not warn about extra return | -module(extra_return).
-export([t1/0, t2/0]).
-spec t1() -> true | false | 'other'.
t1() ->
case rand:uniform(2) of
1 -> true;
2 -> false
end.
-dialyzer({no_extra_return, t2/0}).
-spec t2() -> true | false | 'other'.
t2() ->
case rand:uniform(2) of
1 -> true;
2 -> false
... |
f22fe93d95ed14d8ac303a2f5c5b1a109d69598a532f205eba0c87c9d701f0f4 | greglook/merkle-db | validate.clj | (ns merkle-db.tools.validate
"Validation framework for testing database MerkleDAG structures."
(:refer-clojure :exclude [run!])
(:require
[clojure.set :as set]
[clojure.spec.alpha :as s]
[clojure.test :as test]
[merkle-db.index :as index]
[merkle-db.key :as key]
[merkle-db.partition :as pa... | null | https://raw.githubusercontent.com/greglook/merkle-db/449f58005cac0390a40ea15f9bf5403443f3be7d/lib/tools/src/merkle_db/tools/validate.clj | clojure | Path from the validation root to the node being checked.
Type of validation check performed.
Validation state.
Validation message describing the check in a human-readable way.
Map representing a specific check on a node in the tree.
Equality test.
Predicate test.
Node not found, add error result.
Run check fun... | (ns merkle-db.tools.validate
"Validation framework for testing database MerkleDAG structures."
(:refer-clojure :exclude [run!])
(:require
[clojure.set :as set]
[clojure.spec.alpha :as s]
[clojure.test :as test]
[merkle-db.index :as index]
[merkle-db.key :as key]
[merkle-db.partition :as pa... |
5ccbadaffc90d5dbea991cc2eee80a43295798c6421b90445e4db1565608fe7d | auser/alice | mochiweb_skel.erl | -module(mochiweb_skel).
-export([skelcopy/2]).
-include_lib("kernel/include/file.hrl").
%% External API
skelcopy(DestDir, Name) ->
ok = ensuredir(DestDir),
LDst = case length(filename:dirname(DestDir)) of
handle case when returns " / "
0;
N ->
N + 1
... | null | https://raw.githubusercontent.com/auser/alice/e0f867071ede99f451d09053608bd6719c72d1c9/deps/mochiweb/src/mochiweb_skel.erl | erlang | External API
Internal API | -module(mochiweb_skel).
-export([skelcopy/2]).
-include_lib("kernel/include/file.hrl").
skelcopy(DestDir, Name) ->
ok = ensuredir(DestDir),
LDst = case length(filename:dirname(DestDir)) of
handle case when returns " / "
0;
N ->
N + 1
end,
... |
4c395c0c1b7c48158860ff0d976d7d766f4c48b5a7d810d17f25151f417daf27 | korya/efuns | xbuffer.mli | (***********************************************************************)
(* *)
xlib for
(* *)
Fabrice Le Fessant , projet Para / SOR , INRIA Rocq... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/inliner/tests/xbuffer.mli | ocaml | *********************************************************************
... | xlib for
Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
val int_of_enum : 'a -> int
val enum_of_int : int -> 'a
val ... |
aa5a0313fbf1823e821ecdd2025bfe8947c868ca72c79093987810e6bb47631c | larcenists/larceny | 114.constructors.scm | SRFI 114 : Comparators
Copyright ( C ) 2013 . All Rights Reserved .
;;
;; Permission is hereby granted, free of charge, to any person
;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without restriction ,
;; including without limitation the r... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/lib/SRFI/srfi/114.constructors.scm | scheme |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
including without limitation the rights to use, copy, modify, merge,
subject to the following conditions:
The above copyright notice and this permission notice shall be
EXPRESS OR IMPLIED,... | SRFI 114 : Comparators
Copyright ( C ) 2013 . All Rights Reserved .
files ( the " Software " ) , to deal in the Software without restriction ,
publish , distribute , sublicense , and/or sell copies of the Software ,
and to permit persons to whom the Software is furnished to do so ,
included in all copies ... |
2f74e07d556144eed3d8fa94320abaeb141b7384346b6e07ba2078751c6bb800 | zk/clojuredocs | static.clj | (ns clojuredocs.search.static)
(def clojure-namespaces
'[clojure.core
clojure.core.async
clojure.core.logic
clojure.core.logic.fd
clojure.core.logic.pldb
clojure.core.protocols
clojure.core.reducers
clojure.core.server
clojure.data
clojure.datafy
clojure.edn
clojure.inspec... | null | https://raw.githubusercontent.com/zk/clojuredocs/28f5ee500f4349039ee81c70d7ac40acbb19e5d8/src/clj/clojuredocs/search/static.clj | clojure | (ns clojuredocs.search.static)
(def clojure-namespaces
'[clojure.core
clojure.core.async
clojure.core.logic
clojure.core.logic.fd
clojure.core.logic.pldb
clojure.core.protocols
clojure.core.reducers
clojure.core.server
clojure.data
clojure.datafy
clojure.edn
clojure.inspec... | |
1bb00a78d30da5052aa0c9cae211ee12ae227b7c1b48a81aa78254f962553a77 | weavejester/ring-reload-modified | nsdeps.clj | (ns ring.util.nsdeps
"Parsing namespace declarations for dependency information."
(:use [clojure.set :only (union)]))
(defn- deps-from-libspec [prefix form]
(cond (list? form) (apply union (map (fn [f] (deps-from-libspec
(symbol (str (when prefix (str prefix "."))
(first form)))
f))
... | null | https://raw.githubusercontent.com/weavejester/ring-reload-modified/efe0b26287226baedb99446e064519971e292bfe/src/ring/util/nsdeps.clj | clojure | (ns ring.util.nsdeps
"Parsing namespace declarations for dependency information."
(:use [clojure.set :only (union)]))
(defn- deps-from-libspec [prefix form]
(cond (list? form) (apply union (map (fn [f] (deps-from-libspec
(symbol (str (when prefix (str prefix "."))
(first form)))
f))
... | |
9496062dd03e14be99b9288c6dae3132099c25893a21551afceafe709998da95 | ocsigen/macaque | type_field.ml | let _ = << t.foo | t in $Base.recette$ >>
| null | https://raw.githubusercontent.com/ocsigen/macaque/a92e91c7ed443086551d909c3cfad22c71144f54/src/error_tests/type_field.ml | ocaml | let _ = << t.foo | t in $Base.recette$ >>
| |
cda99eae61eb07bc19527919d4664bc321053fb9f5bd52e0a1f2715c932d9351 | swannodette/mori | macros.clj | (ns mori.macros
(:require [cljs.compiler :as comp]
[cljs.analyzer :as ana]
[cljs.util :as util]
[cljs.analyzer.api :as ana-api]))
(alias 'core 'clojure.core)
(defn make-inspectable-1 [x]
`(aset (.-prototype ~x) "inspect"
(fn []
(~'this-as coll#
(.toString c... | null | https://raw.githubusercontent.com/swannodette/mori/46c9194b3c4bc93fc4b402925b9417add3b0a3ba/src/mori/macros.clj | clojure | setup
analyze core
check fn
verify macro
:dispatch pp/code-dispatch
:dispatch pp/code-dispatch | (ns mori.macros
(:require [cljs.compiler :as comp]
[cljs.analyzer :as ana]
[cljs.util :as util]
[cljs.analyzer.api :as ana-api]))
(alias 'core 'clojure.core)
(defn make-inspectable-1 [x]
`(aset (.-prototype ~x) "inspect"
(fn []
(~'this-as coll#
(.toString c... |
d42d14d6cd26bc46d72c1087a394f9076911cc5bb1ddaaf7a2e91ac7f8eee284 | 3b/3bil | lambda-list.lisp | (in-package :avm2-compiler)
;;; misc util functions for dealing with lambda lists
(defun parse-lambda-list (lambda-list &key (normalize t)
(normalize-optional normalize)
(normalize-keyword normalize)
(normalize-a... | null | https://raw.githubusercontent.com/3b/3bil/c852181848bedf476373e901869ca29471f926ee/compile/lambda-list.lisp | lisp | misc util functions for dealing with lambda lists
fixme: places this is still used probably shouldn't be seeing full
lambda lists anymore, so check them and remove this if so
opt = ((name default supplied-p)*)
key = (((:key name) default supplied-p)*)
aux = ((name default)*)?
normal var or keyword, replace with ... | (in-package :avm2-compiler)
(defun parse-lambda-list (lambda-list &key (normalize t)
(normalize-optional normalize)
(normalize-keyword normalize)
(normalize-auxilary normalize))
"modified from alexandria::parse... |
6f14689891d4728286b647848690d7b496bbfe96190c05dd69795a29b1d52834 | racket/racket7 | tcp-connect.rkt | #lang racket/base
(require "../common/check.rkt"
"../common/resource.rkt"
"../host/thread.rkt"
"../host/rktio.rkt"
"../host/error.rkt"
"../security/main.rkt"
"../format/main.rkt"
"tcp-port.rkt"
"port-number.rkt"
"address.rkt"
"evt... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/io/network/tcp-connect.rkt | racket | in atomic mode (but exits atomic mode to raise an exception)
in atomic mode
in atomic mode
in atomic mode
in atomic mode
other errors imply that `conn` is destroyed | #lang racket/base
(require "../common/check.rkt"
"../common/resource.rkt"
"../host/thread.rkt"
"../host/rktio.rkt"
"../host/error.rkt"
"../security/main.rkt"
"../format/main.rkt"
"tcp-port.rkt"
"port-number.rkt"
"address.rkt"
"evt... |
548a8855cdc98121e15d665d34b2424dca0b7cc0b11660545fa1883eb5ff6874 | billstclair/trubanc-lisp | packages.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; package.lisp --- Package definition for Babel
;;;
Copyright ( C ) 2007 ,
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Sof... | null | https://raw.githubusercontent.com/billstclair/trubanc-lisp/5436d2eca5b1ed10bc47eec7080f6cb90f98ca65/systems/babel_0.3.1/src/packages.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
package.lisp --- Package definition for Babel
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribut... | Copyright ( C ) 2007 ,
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
(in-package #:cl-user)... |
6b7097d805096d3b2a1b6e609b5ed8bb8fffcb11efebd57de9cd54d37f33311e | gvolpe/haskell-book-exercises | exercises.hs | import Data.Char
filterUppercase :: String -> String
filterUppercase xs = filter isUpper xs
capitalize :: String -> String
capitalize [] = []
capitalize (x:xs) = toUpper x : xs
toUppercase :: String -> String
toUppercase [] = []
toUppercase (x:xs) = toUpper x : toUppercase xs
capitalizeHead :: String -> Ma... | null | https://raw.githubusercontent.com/gvolpe/haskell-book-exercises/5c1b9d8dc729ee5a90c8709b9c889cbacb30a2cb/chapter9/exercises.hs | haskell | more | import Data.Char
filterUppercase :: String -> String
filterUppercase xs = filter isUpper xs
capitalize :: String -> String
capitalize [] = []
capitalize (x:xs) = toUpper x : xs
toUppercase :: String -> String
toUppercase [] = []
toUppercase (x:xs) = toUpper x : toUppercase xs
capitalizeHead :: String -> Ma... |
c39b01d0b70eed6ffc89876bb08796713044cd1d5a9be41e21d53d28e7e4a14c | binsec/binsec | binpatcher.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/binpatcher/binpatcher.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
bcae2a8bac442089498602189f343e5abc35cf92e8259d4ea5c4749684077aeb | jepsen-io/jepsen | append.clj | (ns jepsen.stolon.append
"Test for transactional list append."
(:require [clojure.tools.logging :refer [info warn]]
[clojure [pprint :refer [pprint]]
[string :as str]]
[dom-top.core :refer [with-retry]]
[elle.core :as elle]
[jepsen [checker :as ch... | null | https://raw.githubusercontent.com/jepsen-io/jepsen/d4006a43e92e061b16105375cd3d36fb96cd0bc6/stolon/src/jepsen/stolon/append.clj | clojure | Use ON CONFLICT
Try an update, and if that fails, back off to an insert.
No dice, fall back to an insert
OK if THAT failed then we probably raced with another
insert; let's try updating again.
And if THAT failed, all bets are off. This happens even
under SERIALIZABLE, but I don't think it technically
up initial... | (ns jepsen.stolon.append
"Test for transactional list append."
(:require [clojure.tools.logging :refer [info warn]]
[clojure [pprint :refer [pprint]]
[string :as str]]
[dom-top.core :refer [with-retry]]
[elle.core :as elle]
[jepsen [checker :as ch... |
af32ceb8c7537c1e4e6b6364632c9b8b11ef8ef6d6e712d224278e3d1c3699e9 | magehash/magehash | index.clj | (ns asset.index
(:require [coast :refer [first! q pull]]
[clojure.string :as string]
[coast.time :as time]
[components :refer [card content title table th tr td tbody]]))
(defn view [{member-id :member/id :as req}]
(let [props (q '[:pull [{:property/site [site/url
... | null | https://raw.githubusercontent.com/magehash/magehash/9545d65a10a570536f8c6d9ebbafc4982e07cedc/src/asset/index.clj | clojure | (ns asset.index
(:require [coast :refer [first! q pull]]
[clojure.string :as string]
[coast.time :as time]
[components :refer [card content title table th tr td tbody]]))
(defn view [{member-id :member/id :as req}]
(let [props (q '[:pull [{:property/site [site/url
... | |
0d0f3c4859bbed3d2b59296ed133b3b7b76946c92e852ceb1381af605c91fe89 | linkfluence/inventory | deploy.clj | (ns com.linkfluence.inventory.api.deploy
(:require [compojure.core :refer :all]
[compojure.route :as route]
[clojure.tools.logging :as log]
;;import inventory handler
[com.linkfluence.inventory.deploy :as deploy]
[com.linkfluence.utils :as u]))
;;deploy act... | null | https://raw.githubusercontent.com/linkfluence/inventory/6e5e829fd08159b33c0d3e502b10ed6002643f49/src/clj/com/linkfluence/inventory/api/deploy.clj | clojure | import inventory handler
deploy action definition
update : update both base and app
app : deploy/update only app
base : deploy/update base environment
deploy specific routes | (ns com.linkfluence.inventory.api.deploy
(:require [compojure.core :refer :all]
[compojure.route :as route]
[clojure.tools.logging :as log]
[com.linkfluence.inventory.deploy :as deploy]
[com.linkfluence.utils :as u]))
(defroutes DEPLOY
(GET "/resource/:id" [id] (do... |
5a68f520e8803a2b46ad73507606bbd3c7b96589bd5aa7283676b3b6ae39147e | ideas-edu/ideas | Prefix.hs | # LANGUAGE TypeFamilies #
-----------------------------------------------------------------------------
Copyright 2019 , Ideas project team . This file is distributed under the
terms of the Apache License 2.0 . For more information , see the files
" LICENSE.txt " and " NOTICE.txt " , which are included in th... | null | https://raw.githubusercontent.com/ideas-edu/ideas/f84907f92a8c407b7313f99e65a08d2646dc1565/src/Ideas/Common/Strategy/Prefix.hs | haskell | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
|
Maintainer :
Stability : provisional
Basic machinery for fully executing a strategy expression, or only
partially. Partial execution results in a p... | # LANGUAGE TypeFamilies #
Copyright 2019 , Ideas project team . This file is distributed under the
terms of the Apache License 2.0 . For more information , see the files
" LICENSE.txt " and " NOTICE.txt " , which are included in the distribution .
Portability : portable ( depends on ghc )
performed ... |
acc0e6a31e7fddd763e23b39ea6fa07977333ee391a73113836840010c99953f | MyDataFlow/ttalk-server | mustache_ctx.erl | %% The MIT License
%%
Copyright ( c ) 2009 < >
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
in the Software without restriction , including without limitation the rights
%% to use, copy, modif... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/mustache/src/mustache_ctx.erl | erlang | The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
The above... | Copyright ( c ) 2009 < >
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR... |
89f4569786edf7898822d54eca6a7dc2060f3a49e85f9fdb7541bdb7e28c8cff | screenshotbot/screenshotbot-oss | java_adapter.lisp | ;;;
;;;
Copyright ( c ) 2009 ,
;;; All rights reserved by the author.
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
;;; restriction, including without limitation ... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/fb88dc205c052caf98d6833d03594323390800d3/third-party/cl%2Bj-0.4/java_adapter.lisp | lisp |
All rights reserved by the author.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
furnished to do so,... | Copyright ( c ) 2009 ,
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
(in-package :cl+j)
( ... |
759b5caf85737f8fc472bf6173891e122f5d00d5e63c1d3389ed96a27d2e174c | draperlaboratory/cbat_tools | cbat_clp.ml | (***************************************************************************)
(* *)
Copyright ( C ) 2018/2019 The Charles Stark Draper Laboratory , Inc.
(* *)
(* This... | null | https://raw.githubusercontent.com/draperlaboratory/cbat_tools/334523cb4415f187e33f190a691e34b73733ef24/vsa/value_set/lib/src/cbat_clp.ml | ocaml | *************************************************************************
This file is provided under the license found in the LICENSE file in
the top-level director... | Copyright ( C ) 2018/2019 The Charles Stark Draper Laboratory , Inc.
This work is funded in part by ONR / NAWC Contract N6833518C0107 . Its
content does not necessarily reflect the position or policy of the US
open Bap.Std
include Cbat_vsa_utils
module W = Word
module Option = Core_kernel.Option... |
e6f3fcad66a8062257da9d4ef144a06a44c001dce3a4b39b26e86c3dc9a39af3 | frenchy64/Logic-Starter | core.clj | (ns logic-introduction.test.core
(:use [logic-introduction.core])
(:use [clojure.test]))
(deftest replace-me ;; FIXME: write
(is false "No tests have been written."))
| null | https://raw.githubusercontent.com/frenchy64/Logic-Starter/cc3999836759965e7dcc1a7d1c9731216681dcf8/test/logic_introduction/test/core.clj | clojure | FIXME: write | (ns logic-introduction.test.core
(:use [logic-introduction.core])
(:use [clojure.test]))
(is false "No tests have been written."))
|
d325ec1ebf54ecca84e36ec28c871ccfc12598798b1648d645cec6d8ff2985d2 | archaelus/erlmail | imapd_app.erl | %%%---------------------------------------------------------------------------------------
@author < > [ ]
2006 - 2007 Simple Enigma , Inc. All Rights Reserved .
%%% @doc IMAP Server OTP applicaiton file
@reference See < a href=" / modules / erlmail " target="_top">Erlang Software Framework</... | null | https://raw.githubusercontent.com/archaelus/erlmail/fe69b0e936f1512b4f349666e56c31c0af7b672c/src/imapd_app.erl | erlang | ---------------------------------------------------------------------------------------
@doc IMAP Server OTP applicaiton file
@reference See <a href="" target="_top">ErlMail Google Code Repository</a> for more information
@version 0.0.6
@end
Permission is hereby granted, free of charge, to any... | @author < > [ ]
2006 - 2007 Simple Enigma , Inc. All Rights Reserved .
@reference See < a href=" / modules / erlmail " target="_top">Erlang Software Framework</a > for more information
@since 0.0.6
The MIT License
Copyright ( c ) 2007 , Simple Enigma , Inc. All Righs Reserved
i... |
3ec58bd6afedf6f3aedc3ded194d47ca0e703d32ef6365358c3f51112999b171 | dalaing/little-languages | Infer.hs | module Test.Term.Infer (
inferTests
) where
import Test.Tasty
import Test.Tasty.QuickCheck
import Data.Maybe (mapMaybe)
import Control.Monad.Except (runExcept)
import Term.Gen
import Term.Infer
import Type.Error
inferTests :: TestTree
inferTests = testGroup "infer" [
testProperty "wellTypedInfer" propWell... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/multityped/nb-srcloc/tests/Test/Term/Infer.hs | haskell | module Test.Term.Infer (
inferTests
) where
import Test.Tasty
import Test.Tasty.QuickCheck
import Data.Maybe (mapMaybe)
import Control.Monad.Except (runExcept)
import Term.Gen
import Term.Infer
import Type.Error
inferTests :: TestTree
inferTests = testGroup "infer" [
testProperty "wellTypedInfer" propWell... | |
a8a6c1e672730239efa70b28f6dff2ada6be678b969bfde6e357147a09416149 | smucclaw/dsl | WordNet.hs | # LANGUAGE TransformListComp #
module LS.NLP.WordNet where
import Data.List (isPrefixOf, sortOn, isSuffixOf, nub)
import Data.List.Split
import Text.EditDistance
import qualified Data.Text as Text
import Data.Text (Text)
import WordNet.DB
import WordNet.Structured
wnNounDerivations :: Text -> IO ... | null | https://raw.githubusercontent.com/smucclaw/dsl/6af9d74b76cae8561796992ef47f4ebeec5fad44/lib/haskell/natural4/src/LS/NLP/WordNet.hs | haskell | synons-- > [ react , respond ] -- synonyms of responds over /all synsets/
derivs-- > [ reaction , responder , … ] -- derivations of all those synonyms
synDer-- > [ reaction , response , responder , answerer , … ] -- synonyms of the derivations , TODO : only from l... | # LANGUAGE TransformListComp #
module LS.NLP.WordNet where
import Data.List (isPrefixOf, sortOn, isSuffixOf, nub)
import Data.List.Split
import Text.EditDistance
import qualified Data.Text as Text
import Data.Text (Text)
import WordNet.DB
import WordNet.Structured
wnNounDerivations :: Text -> IO ... |
9240684d77ae6ed94d29cf7088bba0796711cab4108e94459190a4f1bf036efe | Decentralized-Pictures/T4L3NT | proxy.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2020 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/tezt/tests/proxy.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2020 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 AN... |
022878ae40e7762621003882f7db7d5552f74faf274ff1ad4bf64cf6787362ee | tezos/tezos-mirror | translator_benchmarks.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 - 2022 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/cdc7a4382ef6dfcd6c73f86d9a29b829b33d18d4/src/proto_015_PtLimaPt/lib_benchmarks_proto/translator_benchmarks.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 - 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... |
6839ed3167ef95fe3177324cc1905f097204055efa8a683b04da58db0e3df226 | Metaxal/text-table | main.rkt | #lang racket/base
(require racket/format
racket/list
racket/dict
racket/string
racket/match
racket/contract
"utils.rkt")
(provide
string-length=/c
(rename-out [border-styles named-border-styles])
border-style/c
border-style1/c
border-style2/c
border-style-fra... | null | https://raw.githubusercontent.com/Metaxal/text-table/b20f34b068aedbe6c1756628dc4c9df9b1cba2e1/main.rkt | racket | ==============;
=== Frames ===;
==============;
"Window" style frames.
Easier to specify, and more flexible since col seps may be different for top, middle and bottom.
See
-drawing_character
-chartable.de/unicode-utf8-table.pl?start=9472&unicodeinhtml=dec
old border styles
; equivalent to
default pad-char is " ... | #lang racket/base
(require racket/format
racket/list
racket/dict
racket/string
racket/match
racket/contract
"utils.rkt")
(provide
string-length=/c
(rename-out [border-styles named-border-styles])
border-style/c
border-style1/c
border-style2/c
border-style-fra... |
db3228c9df037f8a6e4b258397171f77053cef050d13c822edcec07996e3963a | nasa/Common-Metadata-Repository | collection_keyword_validation_test.clj | (ns cmr.system-int-test.ingest.collection-keyword-validation-test
"CMR Ingest keyword validation integration tests"
(:require
[clojure.test :refer :all]
[cmr.common.util :refer [are2 are3]]
[cmr.ingest.services.messages :as msg]
[cmr.system-int-test.data2.core :as d]
[cmr.system-int-test.data2.u... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/7a217ca3758f9f7b2d894f31d0e23c42819cc3e0/system-int-test/test/cmr/system_int_test/ingest/collection_keyword_validation_test.clj | clojure | For a list of the valid keywords during testing see dev-system/resources/kms_examples
Test that correct but missmatched enums are not allowed
wrong enum in this context
wrong enum in this context
wrong enum in this context | (ns cmr.system-int-test.ingest.collection-keyword-validation-test
"CMR Ingest keyword validation integration tests"
(:require
[clojure.test :refer :all]
[cmr.common.util :refer [are2 are3]]
[cmr.ingest.services.messages :as msg]
[cmr.system-int-test.data2.core :as d]
[cmr.system-int-test.data2.u... |
353399b38a3de3594ae81bfa3b479aaa1f543c2ee5afc7444a03f9d3fd0a2183 | mbenelli/klio | simple-sort.scm | ;; simple-sort.scm - A simple implementation of merge sort.
;;
Copyright ( c ) 2011 by < >
All Rights Reserved .
;;
Based on Sort - r1 from Gambit 's Dumping Ground . Original copyright :
;;
;;;============================================================================
File : " Sort.scm " , Time - stamp :... | null | https://raw.githubusercontent.com/mbenelli/klio/33c11700d6080de44a22a27a5147f97899583f6e/klio/simple-sort.scm | scheme | simple-sort.scm - A simple implementation of merge sort.
============================================================================
============================================================================
(sort sequence less?) sorts a sequence (a list or vector) in a
non-destructive way ordered using the co... | Copyright ( c ) 2011 by < >
All Rights Reserved .
Based on Sort - r1 from Gambit 's Dumping Ground . Original copyright :
File : " Sort.scm " , Time - stamp : < 2008 - 03 - 18 15:21:35 feeley >
Copyright ( c ) 2006 - 2008 by , All Rights Reserved .
( sort ( vector 3 1 4 1 5 ) > ) = > # ( 5 4 3 1 ... |
b763698cb8aedb8524f017431188700f9c7a1b00ff9897d6cdc8989b7b76d59e | footprintanalytics/footprint-web | impl.clj | (ns metabase.util.i18n.impl
"Lower-level implementation functions for `metabase.util.i18n`. Most of this is not meant to be used directly; use the
functions and macros in `metabase.util.i18n` instead."
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.logging :as l... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/util/i18n/impl.clj | clojure | use the
-> \"en_US\"
list being sorted.
-> #locale\"en\"
-> #locale\"pt_BR\"
-> #locale\"pt_BR\""
-> {:headers { ... }
Only a singular form defined; ignore `n`
Fall-back to singular if no header is present
these live in
that had the typo, we'd just recur endlessly without logging an error.
We can't fetch the... | (ns metabase.util.i18n.impl
functions and macros in `metabase.util.i18n` instead."
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.logging :as log]
[clojure.tools.reader.edn :as edn]
[metabase.plugins.classloader :as classloader]
... |
054a6dd877d80858d28c7fbc8c65b00fbddd8f4c45396f0518d6750862a35997 | michiakig/sicp | ex-1.32.scm | ;;;; Structure and Interpretation of Computer Programs
Chapter 1 Section 3 Formulating Abstractions with Higher - Order Procedures
Exercise 1.32
;; Recursive accumulate function
(define accumulate
(lambda (combiner null-value term a next b)
(if (> a b)
null-value
(combiner (term a)
... | null | https://raw.githubusercontent.com/michiakig/sicp/1aa445f00b7895dbfaa29cf6984b825b4e5af492/ch1/ex-1.32.scm | scheme | Structure and Interpretation of Computer Programs
Recursive accumulate function
... and iterative one:
null-value goes here at the start | Chapter 1 Section 3 Formulating Abstractions with Higher - Order Procedures
Exercise 1.32
(define accumulate
(lambda (combiner null-value term a next b)
(if (> a b)
null-value
(combiner (term a)
(accumulate combiner null-value term (next a) next b)))))
(define accumulate
... |
699f468b8175822eedd76a3cc9ba8a1b9c00710008a9b6473d45d7d417113d2c | DanielG/ghc-mod | Subdir.hs | module Check.Test.Subdir (subdir) where
subdir :: String
subdir = "subdir"
| null | https://raw.githubusercontent.com/DanielG/ghc-mod/391e187a5dfef4421aab2508fa6ff7875cc8259d/test/data/check-test-subdir/src/Check/Test/Subdir.hs | haskell | module Check.Test.Subdir (subdir) where
subdir :: String
subdir = "subdir"
| |
f58825da236f8a0f075c5b44abd2b211fa1be8c89df0294921021db7a6eff1e3 | tolitius/envoy | core.clj | (ns envoy.core
(:require [cheshire.core :as json]
[clojure.data :refer [diff]]
[clojure.core.async :refer [go-loop go <! >! >!! alt! chan]]
[org.httpkit.client :as http]
[envoy.tools :as tools]
[clojure.string :as string])
(:import [java.util Base64]))
(d... | null | https://raw.githubusercontent.com/tolitius/envoy/cd319e47f6e87ab56103069ed300a35d535ae3e7/src/envoy/core.clj | clojure | (println "@(http/put" path (merge {:body v} (with-ops ops)))
to update correctly seq we need to pre-serialize map
add
remove | (ns envoy.core
(:require [cheshire.core :as json]
[clojure.data :refer [diff]]
[clojure.core.async :refer [go-loop go <! >! >!! alt! chan]]
[org.httpkit.client :as http]
[envoy.tools :as tools]
[clojure.string :as string])
(:import [java.util Base64]))
(d... |
d3bd6a30cbf172f38e6ca77516f174c07f86d7cc7b7063eb9dd1c8f53ff33e8f | Helium4Haskell/helium | PatternMatchBug4.hs | module PatternMatchBug4 where
main = f ["a", "a"]
f ["a", x] = x
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/correct/PatternMatchBug4.hs | haskell | module PatternMatchBug4 where
main = f ["a", "a"]
f ["a", x] = x
| |
0ec077eb8649bc8522d4ecae75a8657228195ebf105a60800831da13f6d6150c | spawngrid/htoad | htoad.erl | -module(htoad).
-export([start/0, add_rules/1, assert/1, assert/2, retract/1, retract/2]).
-include_lib("htoad/include/htoad.hrl").
start() ->
start(htoad).
start(App) ->
case application:start(App) of
{error, {not_started, Dep}} ->
start(Dep),
start(App);
Other ->
... | null | https://raw.githubusercontent.com/spawngrid/htoad/f0c7dfbd911b29fb0c406b7c26606f553af11194/apps/htoad/src/htoad.erl | erlang | -module(htoad).
-export([start/0, add_rules/1, assert/1, assert/2, retract/1, retract/2]).
-include_lib("htoad/include/htoad.hrl").
start() ->
start(htoad).
start(App) ->
case application:start(App) of
{error, {not_started, Dep}} ->
start(Dep),
start(App);
Other ->
... | |
c0c79924da8146a1dec2171c40a2dcb544f15e07d6a47c953d1c7b60cbb3132c | open-company/open-company-web | section.cljs | (ns oc.web.stores.section
(:require [taoensso.timbre :as timbre]
[oc.web.dispatcher :as dispatcher]
[oc.web.lib.utils :as utils]
[oc.web.utils.org :as ou]
[oc.web.utils.board :as bu]
[oc.web.utils.activity :as au]))
(defmethod dispatcher/action :section
[... | null | https://raw.githubusercontent.com/open-company/open-company-web/246cccb2818cc3bb9f05adeea4364ffa7171a586/src/main/oc/web/stores/section.cljs | clojure | [db changes]
(let [posts-data (dispatcher/posts-data db)
org-slug (:org (:router-path db))]
(reduce
db
(vals posts-data))))
Replace the old section data
w/o overriding the posts and links to avoid breaking pagination
An error occurred while kicking the user out, no-op to let the use... | (ns oc.web.stores.section
(:require [taoensso.timbre :as timbre]
[oc.web.dispatcher :as dispatcher]
[oc.web.lib.utils :as utils]
[oc.web.utils.org :as ou]
[oc.web.utils.board :as bu]
[oc.web.utils.activity :as au]))
(defmethod dispatcher/action :section
[... |
e0eaa3c170bbdca4cf059806d77dbf1a581418cf0d6d1075c872cd9dcb166d06 | oakes/play-cljc | project.clj | (defproject play-cljc/lein-template "0.9.6.3"
:description "A template for making play-cljc projects"
:url "-cljc"
:license {:name "Public Domain"
:url ""}
:repositories [["clojars" {:url ""
:sign-releases false}]])
| null | https://raw.githubusercontent.com/oakes/play-cljc/7278dd4997298b55c5e6771cad22b99d76706f5f/template/project.clj | clojure | (defproject play-cljc/lein-template "0.9.6.3"
:description "A template for making play-cljc projects"
:url "-cljc"
:license {:name "Public Domain"
:url ""}
:repositories [["clojars" {:url ""
:sign-releases false}]])
| |
8502eae2076676f2dda05a6c396576df765a00b7fc833baa9e473580df4bbf42 | damballa/inet.data | ip.clj | (ns inet.data.ip
"Functions for interacting with IP addresses and networks."
(:require [clojure.string :as str])
(:use [inet.data.util :only [ignore-errors case-expr ubyte sbyte longest-run
bytes-hash-code doto-let]]
[hier-set.core :only [hier-set-by]])
(:import [clojure.l... | null | https://raw.githubusercontent.com/damballa/inet.data/259eb578546bc0b8deb941df9642c0bf81b81dd0/src/clojure/inet/data/ip.clj | clojure | byte-array size, so we need to prepend a pseudo-magic prefix to retain the
address length.
when `stable` is false, 0 will | (ns inet.data.ip
"Functions for interacting with IP addresses and networks."
(:require [clojure.string :as str])
(:use [inet.data.util :only [ignore-errors case-expr ubyte sbyte longest-run
bytes-hash-code doto-let]]
[hier-set.core :only [hier-set-by]])
(:import [clojure.l... |
faf0ed7542ba760eacb0de9b75f39193242a23ed70e1a8c2043e446d5904a246 | profmaad/bitcaml | main.ml | open! Core.Std
open Bitcoin.Protocol
let local_version () =
let services_set = Service.Set.singleton Bitcoin.Protocol.Service.NetworkNodeService in
let localhost_address_string = (String.make 10 '\x00') ^ "\xff\xff" ^ "\127\000\000\001" in
let receiver_address = {
Bitcoin.Protocol.services = services_set;
... | null | https://raw.githubusercontent.com/profmaad/bitcaml/18cfbca46c989f43dfb1bcfd50ee2ff500f9ab8d/src/main.ml | ocaml | main
let tx_new = {
transaction_inputs = [
{
previous_transaction_output = {
referenced_transaction_hash = Utils.hex_decode_rev "0437cd7f8525ceed2324359c2d0ba26006d92d856a9c20fa0241106ee5a597c9";
};
}
];
transaction_outputs = [
{
};
{
output_script = Utils.hex_... | open! Core.Std
open Bitcoin.Protocol
let local_version () =
let services_set = Service.Set.singleton Bitcoin.Protocol.Service.NetworkNodeService in
let localhost_address_string = (String.make 10 '\x00') ^ "\xff\xff" ^ "\127\000\000\001" in
let receiver_address = {
Bitcoin.Protocol.services = services_set;
... |
1dcb38e7cfd42708cfcd51b50f719dfe0807372824b93b0467fe78cb77ebccbe | winny-/aoc | day12.rkt | #lang racket
Advent of code day 12 :
(require json)
(define/contract (summate-jsexpr je)
(jsexpr? . -> . number?)
(match je
[(? number? n) n]
[(? list? ls) (foldl + 0 (map summate-jsexpr ls))]
[(? hash? h) (foldl + 0 (map summate-jsexpr (hash-values h)))]
[_ 0]))
(define/contract (summate-jsexp... | null | https://raw.githubusercontent.com/winny-/aoc/d508caae19899dcab57ac665ef5d1a05b0a90c0c/2015/day12/day12.rkt | racket | #lang racket
Advent of code day 12 :
(require json)
(define/contract (summate-jsexpr je)
(jsexpr? . -> . number?)
(match je
[(? number? n) n]
[(? list? ls) (foldl + 0 (map summate-jsexpr ls))]
[(? hash? h) (foldl + 0 (map summate-jsexpr (hash-values h)))]
[_ 0]))
(define/contract (summate-jsexp... | |
a0b6420ab853c9a9ccb6d2ad480b554208acff576f0d0a7b7054f375019555f5 | typedclojure/typedclojure | try.clj | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/a5766b1ecb4ab956d739c54ae3fb474c4d1fc24b/typed/clj.checker/src/typed/cljc/checker/check/try.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns typed.cljc.checker.check.try
(:require [typed.cljc.checker.utils :as u]
[clojure.core.typed.util-vars :as vs]
[typed.cljc.checker.type-rep :as r]
[typed.cljc.checker.check-below :as below]
[typed.cljc.checker.filter-ops :... |
1b7ca3e36cb84b7fd2e3af1d46fe1d08fea2f059e5b1c9090fa46142bde9c797 | clojars/clojars-web | login.clj | (ns clojars.web.login
(:require
[clojars.web.common :refer [html-doc flash]]
[clojars.web.helpers :as helpers]
[clojars.web.safe-hiccup :refer [form-to]]
[clojure.string :as str]
[hiccup.element :refer [link-to]]
[hiccup.form :refer [label text-field
password-field submit-but... | null | https://raw.githubusercontent.com/clojars/clojars-web/22f831c9e8749ac7933af48655764ad5f5bdc3e8/src/clojars/web/login.clj | clojure | (ns clojars.web.login
(:require
[clojars.web.common :refer [html-doc flash]]
[clojars.web.helpers :as helpers]
[clojars.web.safe-hiccup :refer [form-to]]
[clojure.string :as str]
[hiccup.element :refer [link-to]]
[hiccup.form :refer [label text-field
password-field submit-but... | |
e58fbebe024a90ea0f3b6a885f823f9b2769cf553670b6a1927c73a90ee93e00 | Copilot-Language/copilot | Constant.hs | Copyright © 2011 National Institute of Aerospace / Galois , Inc.
{-# LANGUAGE Safe #-}
-- | Primitives to build constant streams.
module Copilot.Language.Operators.Constant
( constant
, constB
, constW8
, constW16
, constW32
, constW64
, constI8
, constI16
, constI32
, constI64
, constF
, co... | null | https://raw.githubusercontent.com/Copilot-Language/copilot/17a9b45eea4e95a465d6e773c6fbcf9bf810b6cc/copilot-language/src/Copilot/Language/Operators/Constant.hs | haskell | # LANGUAGE Safe #
| Primitives to build constant streams.
| Create a constant stream that is equal to the given argument, at any
point in time.
the given argument, at any point in time.
| Create a constant stream carrying values of type 'Word8' that is equal to
the given argument, at any point in time.
the given... | Copyright © 2011 National Institute of Aerospace / Galois , Inc.
module Copilot.Language.Operators.Constant
( constant
, constB
, constW8
, constW16
, constW32
, constW64
, constI8
, constI16
, constI32
, constI64
, constF
, constD
) where
import Copilot.Core (Typed)
import Copilot.Langua... |
6850584cd8578191d5d782f0ef5e0fceb29a2e3aa69a1cf67429ebcd0d461426 | tarides/dune-release | test_github.ml | let test_ssh_uri_from_http =
let check inp expected =
let test_name = "Parse.ssh_uri_from_http " ^ inp in
let result = Dune_release.Github.Parse.ssh_uri_from_http inp in
let test_fun () = Alcotest.(check (option string)) inp expected result in
(test_name, `Quick, test_fun)
in
[
(* Use cases *)... | null | https://raw.githubusercontent.com/tarides/dune-release/f170ad510978ff0b8adf03965fc7a5df172d39ff/tests/lib/test_github.ml | ocaml | Use cases
This function only works for github https urls, returns its input
otherwise | let test_ssh_uri_from_http =
let check inp expected =
let test_name = "Parse.ssh_uri_from_http " ^ inp in
let result = Dune_release.Github.Parse.ssh_uri_from_http inp in
let test_fun () = Alcotest.(check (option string)) inp expected result in
(test_name, `Quick, test_fun)
in
[
check "-release... |
83fb03e2f6f04fdc5f8acd410914759ab6996ae10a3932964b1626bd8508f5a0 | brownplt/LambdaS5 | topological.mli | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
(* ... | null | https://raw.githubusercontent.com/brownplt/LambdaS5/f0bf5c7baf1daa4ead4e398ba7d430bedb7de9cf/src/ocamlgraph-1.8.1/src/topological.mli | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
module t... |
60415a14c11b3ac4150f8621c0f79f8e9df55eea1477a7521c2d663cb4496ec5 | uwplse/oddity | macros.cljc | (ns oddity.macros)
(defmacro write-and-read-result [to-chan val from-chan]
`(do
(cljs.core.async/>! ~to-chan ~val)
(cljs.core.async/<! ~from-chan)))
| null | https://raw.githubusercontent.com/uwplse/oddity/81c1a6af203a0d8e71138a27655e3c4003357127/oddity/src/cljc/oddity/macros.cljc | clojure | (ns oddity.macros)
(defmacro write-and-read-result [to-chan val from-chan]
`(do
(cljs.core.async/>! ~to-chan ~val)
(cljs.core.async/<! ~from-chan)))
| |
701a6ff26df614aeefcd99bcbe2d7d812e696677676c21aefc3f6d22101bfc5c | tadeuzagallo/verve-lang | Constraint.hs | module Typing.Constraint
( inferTyArgs
, inferTyAbs
) where
import Typing.Env
import Typing.Substitution
import Typing.Subtyping
import Typing.TypeError
import Typing.Types
import Typing.Variance
import Util.Error
import Control.Monad (zipWithM)
import Data.List (groupBy, intersect, sortBy, union)
import Data.... | null | https://raw.githubusercontent.com/tadeuzagallo/verve-lang/c7db1f5d4bb399b6c2623dd2444a981b5aba1aa4/src/Typing/Constraint.hs | haskell | Inference of type arguments for generic functions
Constraint Solving | module Typing.Constraint
( inferTyArgs
, inferTyAbs
) where
import Typing.Env
import Typing.Substitution
import Typing.Subtyping
import Typing.TypeError
import Typing.Types
import Typing.Variance
import Util.Error
import Control.Monad (zipWithM)
import Data.List (groupBy, intersect, sortBy, union)
import Data.... |
fb899ec79602b11cda4e7c4d75e6c903b97f46ea550574cafeb91e7ed796de09 | donut/OCamURL-server | api_server.ml |
open Lwt.Infix
module Conf = Lib.Config
module DB = Lib.DB
module Gql = Graphql_lwt
module Schema = Lib.Schema
let make_schema db_handle (conf:Conf.API.t) =
let reserved = conf.reserved in
Gql.Schema.(Schema.(schema
[
Aliases_qry.field db_handle;
Url_qry.field db_handle;
]
~mutations:[
... | null | https://raw.githubusercontent.com/donut/OCamURL-server/87738c1a0bbfc2c848f9f4e2052cacc81a176489/bin/api_server.ml | ocaml |
open Lwt.Infix
module Conf = Lib.Config
module DB = Lib.DB
module Gql = Graphql_lwt
module Schema = Lib.Schema
let make_schema db_handle (conf:Conf.API.t) =
let reserved = conf.reserved in
Gql.Schema.(Schema.(schema
[
Aliases_qry.field db_handle;
Url_qry.field db_handle;
]
~mutations:[
... | |
e37c09ee53e7c431501c56a2fd30001cc1bd4e529aaabc7ea888c4fb58d4ef84 | chuan6/tiger-compiler | lisp2forth.clj | (ns forth)
Usage example : ( to - forth ' ( * ( + 1 2 ) 3 4 ) )
e.g. , from ( * ( + 1 2 ) 3 4 ) to ( 4 ( 3 ( 2 1 + ) * ) * )
(defn norm [s]
(if (or (number? s) (= (class s) clojure.lang.Symbol))
s
(if (seq? s)
(if (<= (count s) 3)
(reverse (map norm s))
(let [[op a b & more] s]
... | null | https://raw.githubusercontent.com/chuan6/tiger-compiler/3fc54f0f04aba2d87bc263d6edc6a8ea446739d5/src/other_exercises/lisp2forth.clj | clojure | Take the current stack, and reduce it with the next symbol.
Return result of a forth calculation expression. | (ns forth)
Usage example : ( to - forth ' ( * ( + 1 2 ) 3 4 ) )
e.g. , from ( * ( + 1 2 ) 3 4 ) to ( 4 ( 3 ( 2 1 + ) * ) * )
(defn norm [s]
(if (or (number? s) (= (class s) clojure.lang.Symbol))
s
(if (seq? s)
(if (<= (count s) 3)
(reverse (map norm s))
(let [[op a b & more] s]
... |
59774a48c6200550d40e8b7cc5e9dc5bb09987a90c7b270c90465c6b3ae6c616 | ocamllabs/ocaml-modular-implicits | t060-raise.ml | open Lib;;
raise End_of_file;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 End_of_file
11 MAKEBLOCK1 0
13 RAISE
14 SETGLOBAL T060 - raise
16 STOP
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-ocaml/t060-raise.ml | ocaml | open Lib;;
raise End_of_file;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 End_of_file
11 MAKEBLOCK1 0
13 RAISE
14 SETGLOBAL T060 - raise
16 STOP
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5... | |
50cc8a720b4b1ba85987f840e4771a4123063cc11355948911b81a136703ff34 | rtoy/ansi-cl-tests | dpb.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Thu Sep 11 20:43:54 2003
Contains : Tests of
(in-package :cl-test)
;;; Error tests
(deftest dpb.error.1
(signals-error (dpb) program-error)
t)
(deftest dpb.error.2
(signals-error (dpb 1) program-error)
t)
(deftest dpb.error.3
(signals-error (dpb 1 ... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/dpb.lsp | lisp | -*- Mode: Lisp -*-
Error tests
Non-error tests | Author :
Created : Thu Sep 11 20:43:54 2003
Contains : Tests of
(in-package :cl-test)
(deftest dpb.error.1
(signals-error (dpb) program-error)
t)
(deftest dpb.error.2
(signals-error (dpb 1) program-error)
t)
(deftest dpb.error.3
(signals-error (dpb 1 (byte 1 0)) program-error)
t)
(deftes... |
5bc98a040c11851bb071f6af3c47df9c6e6c2335767c66cd508add48f06259ae | vydd/sketch | controllers.lisp | ;;;; controllers.lisp
(in-package #:sketch)
;;; ____ ___ _ _ _____ ____ ___ _ _ _____ ____ ____
/ _ _ _ / _ \| \ | | _ _ | _ \ / _ \| | | | | _ _ _ _ | _ \/ _ _ _ |
;;; | | | | | | \| | | | | |_) | | | | | | | | _| | |_) \___ \
| |__| |_| | |\ | | | | _ < | |_| | |___| |_... | null | https://raw.githubusercontent.com/vydd/sketch/1a2e4bba865d5083889c68f8755ef6c0e2a7d5a2/src/controllers.lisp | lisp | controllers.lisp
____ ___ _ _ _____ ____ ___ _ _ _____ ____ ____
| | | | | | \| | | | | |_) | | | | | | | | _| | |_) \___ \
Mouse
Keyboard |
(in-package #:sketch)
/ _ _ _ / _ \| \ | | _ _ | _ \ / _ \| | | | | _ _ _ _ | _ \/ _ _ _ |
| |__| |_| | |\ | | | | _ < | |_| | |___| |___| |___| _ < _ _ _ ) |
\____\___/|_| \_| |_| |_| \_\\___/|_____|_____|_____|_| \_\____/
(defmethod kit.sdl2:mousemotion-event :after ((instance sketch)
... |
3939e019905a5107f3caecf2abe779e20e80a0a695c7846e291fbbae211fe4f2 | haroldcarr/learn-haskell-coq-ml-etc | E5RepeatLineIntoFile.hs | #!/usr/bin/env stack
-- stack --resolver lts-8.12 script
{-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - missing - signatures #
# OPTIONS_GHC -fno - warn - type - defaults #
module E5RepeatLineIntoFile where
import Control.Monad (replicateM_)
import qualified Data.ByteString ... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/course/2017-05-snoyman-applied-haskell-at-lambdaconf/E5RepeatLineIntoFile.hs | haskell | stack --resolver lts-8.12 script
# LANGUAGE OverloadedStrings # | #!/usr/bin/env stack
# OPTIONS_GHC -fno - warn - missing - signatures #
# OPTIONS_GHC -fno - warn - type - defaults #
module E5RepeatLineIntoFile where
import Control.Monad (replicateM_)
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as BSC8
import ... |
8bb1e91f8725e04507b55da2fa8c6287b2850534545a07a630231b7860039c1f | coq/coq | context.ml | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/ee0095d7be7b32f349e295e28964660efb78f491/kernel/context.ml | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
f81eb96f647a9bfbb8061b5f21f0d8b7a7c75c4fa266b85e7419aa611bbf2615 | solbloch/stumpwm-configs | keymap.lisp | (in-package :stumpwm)
this is the best thing VIMIFY :-)
(define-key *input-map* (kbd "C-w") 'input-backward-kill-word)
;; top map stuff
(define-key *top-map* (kbd "s-v") "hsplit")
(define-key *top-map* (kbd "s-s") "vsplit")
(define-key *top-map* (kbd "s-r") "remove")
(define-key *top-map* (kbd "s-q") "d... | null | https://raw.githubusercontent.com/solbloch/stumpwm-configs/f47d212fd8e4af3bb5997c796b228ab43853dd6d/keymap.lisp | lisp | top map stuff
Applications ;;
;
Frame Configuration
Helpful Things
Redshift Configs
VPN
solb
Terminal bindings
Volume // Brightness Config
| (in-package :stumpwm)
this is the best thing VIMIFY :-)
(define-key *input-map* (kbd "C-w") 'input-backward-kill-word)
(define-key *top-map* (kbd "s-v") "hsplit")
(define-key *top-map* (kbd "s-s") "vsplit")
(define-key *top-map* (kbd "s-r") "remove")
(define-key *top-map* (kbd "s-q") "delete")
(define-k... |
e6de418610283805fea1b22a342df3b68abbaa73d3e5499fbc0be3c6ad7970ab | 8c6794b6/haskell-sc-scratch | LocalInEx.hs | ------------------------------------------------------------------------------
| Example for LocalIn and LocalOut UGens .
--
module Scratch.LocalInEx where
import Sound.OpenSoundControl
import Sound.SC3
import Reusable
import Instances
test1 :: (UId m) => m UGen
test1 = do
n <- whiteNoise ar
let a0 = decay (i... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/UGenTweak/LocalInEx.hs | haskell | ----------------------------------------------------------------------------
| | Example for LocalIn and LocalOut UGens .
module Scratch.LocalInEx where
import Sound.OpenSoundControl
import Sound.SC3
import Reusable
import Instances
test1 :: (UId m) => m UGen
test1 = do
n <- whiteNoise ar
let a0 = decay (impulse ar 0.3 0) 0.1 * n * 0.2
a1 = localIn 2 ar + mce [a0,0]
a2 = del... |
97037f90a0bc29f9c425a0d6dc2c79a6ce286c7f14ea21548cee63cc95afaa4d | esl/erlang-web | e_component.erl | #!/usr/bin/env escript
The contents of this file are subject to the Erlang Web Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
Erlang Web Public License along with this software . If not , it can be
%%... | null | https://raw.githubusercontent.com/esl/erlang-web/2e5c2c9725465fc5b522250c305a9d553b3b8243/bin/e_component.erl | erlang | compliance with the License. You should have received a copy of the
retrieved via the world wide web at -consulting.com/.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
---------------------------------... | #!/usr/bin/env escript
The contents of this file are subject to the Erlang Web Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
Erlang Web Public License along with this software . If not , it can be
Software distributed under the License is distributed on an " AS IS "
... |
bc017ca3c244c18bd02335436ae524243cf88965bb48c71f565592a388ccc7f7 | clojure-quant/infra-guix | rock-installer.scm | (define-module (awb99 machine rock-installer)
#:use-module (gnu system)
#:use-module (gnu system install)
#:use-module (gnu packages version-control) ;git
;#:use-module (gnu packages vim)
;#:use-module (gnu packages linux)
;#:use-module (gnu packages mtools)
#:use-module (gnu packages package-management)
... | null | https://raw.githubusercontent.com/clojure-quant/infra-guix/f17021df33f65ad92c9f08eae896790fd7a849b2/modules/awb99/machine/rock-installer.scm | scheme | git
#:use-module (gnu packages vim)
#:use-module (gnu packages linux)
#:use-module (gnu packages mtools)
arm kernel
(firmware (list linux-firmware))
linux firmware brings this error: kernel module not found "ahci"
Add some extra packages useful for the installation process | (define-module (awb99 machine rock-installer)
#:use-module (gnu system)
#:use-module (gnu system install)
#:use-module (gnu packages package-management)
#:export (installation-os-rock64))
(define installation-os-rock64
(operating-system
(inherit installation-os)
(kernel linux-arm64-generic)
(firm... |
0fbfefa33476f8e6b8b39e541c7c292e94fdd6143eeae64c13e2dade6d613f38 | racket/plot | bitmap.rkt | #lang typed/racket/base
(require "../bitmap.rkt")
(provide (all-from-out "../bitmap.rkt"))
| null | https://raw.githubusercontent.com/racket/plot/c4126001f2c609e36c3aa12f300e9c673ab1a806/plot-lib/plot/typed/bitmap.rkt | racket | #lang typed/racket/base
(require "../bitmap.rkt")
(provide (all-from-out "../bitmap.rkt"))
| |
10e811852646efa3f00898a6f7734cd15b7f5cbe0e97cd22f2d5c1f577287e26 | marcelgoh/opythn | bytecode.ml | Bytecode representation and compilation
open Printf
module D = DynArray
module H = Hashtbl
exception Bytecode_error of string
alias for a DynArray of Instr.t
type code = Instr.t DynArray.t
(* representation for how deeply nested a variable can be *)
type depth =
Local of int
| Global
| Referred
(* table of n... | null | https://raw.githubusercontent.com/marcelgoh/opythn/923e71635c6850a115bb4bf14fa6eb75b8ac852a/src/bytecode.ml | ocaml | representation for how deeply nested a variable can be
table of names and depths for a given scope
print a string and its depth
usage: H.iter print_entry (table : sym_table)
print bytecode
recursively compile statements
where nonlocals are stored before they're actually used
for variables directly in cla... | Bytecode representation and compilation
open Printf
module D = DynArray
module H = Hashtbl
exception Bytecode_error of string
alias for a DynArray of Instr.t
type code = Instr.t DynArray.t
type depth =
Local of int
| Global
| Referred
type sym_table = (string, depth) H.t
let print_entry str depth =
let ds... |
39e5e5ba4245404dda172adc47926038a57aee4806ddf792cce0d4b03ac14870 | janestreet/memtrace_viewer_with_deps | tuple_pool.ml | open! Core_kernel
open! Import
open Tuple_pool_intf
module Tuple_type = Tuple_type
let failwiths = Error.failwiths
let phys_equal = Caml.( == )
let arch_sixtyfour = Sys.word_size = 64
module Int = struct
let num_bits = Int.num_bits
let max_value = Caml.max_int
let to_string = string_of_int
end
let sprintf = Pr... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/core_kernel/tuple_pool/src/tuple_pool.ml | ocaml | We guarantee that tuple ids are nonnegative so that they can be encoded in
headers.
[Pointer.t] is an encoding as an [int] of the following sum type:
{[
| Null
| Normal of { header_index : int; masked_tuple_id : int }
]}
The encoding is chosen to optimize the most comm... | open! Core_kernel
open! Import
open Tuple_pool_intf
module Tuple_type = Tuple_type
let failwiths = Error.failwiths
let phys_equal = Caml.( == )
let arch_sixtyfour = Sys.word_size = 64
module Int = struct
let num_bits = Int.num_bits
let max_value = Caml.max_int
let to_string = string_of_int
end
let sprintf = Pr... |
cbc98b67a4c3d64a669bfad0f905a6519c28beebe1b9c3a6ec3d5b9261247894 | na4zagin3/satyrographos | repository.ml | open Core
type library_name = string
exception RegisteredAlready of library_name
module StringSet = Set.Make(String)
type t = {
cache: Store.store;
metadata: Metadata.store;
}
(* Basic operations *)
let list reg = Metadata.list reg.metadata
TODO get data from metadata
let directory reg name = Store.directory ... | null | https://raw.githubusercontent.com/na4zagin3/satyrographos/d2943bac9659d20746720ab36ebe11ae59203d32/src/repository.ml | ocaml | Basic operations
TODO Implement lock
Tests | open Core
type library_name = string
exception RegisteredAlready of library_name
module StringSet = Set.Make(String)
type t = {
cache: Store.store;
metadata: Metadata.store;
}
let list reg = Metadata.list reg.metadata
TODO get data from metadata
let directory reg name = Store.directory reg.cache name
let mem ... |
252c4e0fc55cd3b95a464889c64268d879279cb9331c32fe7d55e1fcb82ba87a | clojure-interop/java-jdk | MenuItemUI.clj | (ns javax.swing.plaf.MenuItemUI
"Pluggable look and feel interface for JMenuItem."
(:refer-clojure :only [require comment defn ->])
(:import [javax.swing.plaf MenuItemUI]))
(defn ->menu-item-ui
"Constructor."
(^MenuItemUI []
(new MenuItemUI )))
| null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/plaf/MenuItemUI.clj | clojure | (ns javax.swing.plaf.MenuItemUI
"Pluggable look and feel interface for JMenuItem."
(:refer-clojure :only [require comment defn ->])
(:import [javax.swing.plaf MenuItemUI]))
(defn ->menu-item-ui
"Constructor."
(^MenuItemUI []
(new MenuItemUI )))
| |
9610b8fd4ea165dd58166246485eef1eb188ddfd21626779ee85770e1a34689b | hjcapple/reading-sicp | exercise_2_86.scm | #lang racket
P137 - [ 练习 2.86 ]
(require "ch2support.scm")
(require (submod "complex_number_data_directed.scm" complex-op))
;;;;;;;;;;;;;;;;;;;;;;;;
(define (add x y) (apply-generic 'add x y))
(define (sub x y) (apply-generic 'sub x y))
(define (mul x y) (apply-generic 'mul x y))
(define (div x y) (apply-generic '... | null | https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_2/exercise_2_86.scm | scheme |
过滤 #t、#f 等没有 type-tag 的参数
| #lang racket
P137 - [ 练习 2.86 ]
(require "ch2support.scm")
(require (submod "complex_number_data_directed.scm" complex-op))
(define (add x y) (apply-generic 'add x y))
(define (sub x y) (apply-generic 'sub x y))
(define (mul x y) (apply-generic 'mul x y))
(define (div x y) (apply-generic 'div x y))
(define (equ? x... |
ac0b8e81b996dff0d8ffbbea342a620adebd1e67555386463bad843d60cc21bf | shirok/Gauche-lisp15 | trace.scm | (use srfi-42)
(use gauche.parameter)
(define-class <traced> ()
((orig-proc :init-keyword :orig-proc)
(name :init-keyword :name)))
(define nesting (make-parameter 0))
(define (indent) (make-string (* (nesting) 2)))
(define-method object-apply ((t <traced>) . args)
(print #"~(indent)Calling ~(~ t'name) with ar... | null | https://raw.githubusercontent.com/shirok/Gauche-lisp15/d40163e6aa473608dd38a23f9cb67f13af676722/tools/trace.scm | scheme | (use srfi-42)
(use gauche.parameter)
(define-class <traced> ()
((orig-proc :init-keyword :orig-proc)
(name :init-keyword :name)))
(define nesting (make-parameter 0))
(define (indent) (make-string (* (nesting) 2)))
(define-method object-apply ((t <traced>) . args)
(print #"~(indent)Calling ~(~ t'name) with ar... | |
d5ed918d743dcfe6787e33d18ac50660d27b982122e6d63bd8b14a2067252c3a | kxcteam/kxclib-ocaml | json.ml | open Kxclib.Json
let rec pp_jv ppf : jv -> unit = function
| `null -> fprintf ppf "`null"
| `bool b -> fprintf ppf "`bool %B" b
| `num f -> fprintf ppf "`num %F" f
| `str s -> fprintf ppf "`str %S" s
| `arr xs -> fprintf ppf "`arr %a" (List.pp pp_jv) xs
| `obj xs -> fprintf ppf "`obj %a" (List.pp (fun ppf ... | null | https://raw.githubusercontent.com/kxcteam/kxclib-ocaml/9c58f97bd56c7944c0a95ce17c130e2f258ef07f/unit_test/lib/json.ml | ocaml | open Kxclib.Json
let rec pp_jv ppf : jv -> unit = function
| `null -> fprintf ppf "`null"
| `bool b -> fprintf ppf "`bool %B" b
| `num f -> fprintf ppf "`num %F" f
| `str s -> fprintf ppf "`str %S" s
| `arr xs -> fprintf ppf "`arr %a" (List.pp pp_jv) xs
| `obj xs -> fprintf ppf "`obj %a" (List.pp (fun ppf ... | |
59e74281f98c8910c139d175c6e4e8c4e99dde7c6ca515312176ef42f7dd1444 | easyuc/EasyUC | ucTypedSpec.ml | (* UcTypedSpec module *)
(* Typed Specifications *)
open EcLocation
open EcSymbols
open EcTypes
open UcSpecTypedSpecCommon
(* maps and sets *)
module IdMap = Map.Make(String) (* domain: string = symbol *)
module IdSet = Set.Make(String)
(* we sometimes use "id" to stand for a symbol, and sometimes for a
locate... | null | https://raw.githubusercontent.com/easyuc/EasyUC/0ee14ef8b024a8e7acde1035d06afecbdcaec990/uc-dsl/ucdsl-proj/src/ucTypedSpec.ml | ocaml | UcTypedSpec module
Typed Specifications
maps and sets
domain: string = symbol
we sometimes use "id" to stand for a symbol, and sometimes for a
located symbol (in which case we may use "uid" to stand for the
unlocated version)
domain: string list = symbol list
domain: string * string = symb_pair
we ... |
open EcLocation
open EcSymbols
open EcTypes
open UcSpecTypedSpecCommon
module IdSet = Set.Make(String)
let exists_id (id_map : 'a IdMap.t) (id : symbol) : bool =
IdMap.exists (fun key _ -> key = id) id_map
let id_map_domain (map : 'a IdMap.t) : IdSet.t =
IdSet.of_list (List.map fst (IdMap.bindings map))
... |
d128bbe3567f8e1a2ce452fd6173731f54a1a11637a77bc426a2f8fd96bd8242 | originrose/cortex | project.clj | (defproject thinktopic/cortex "0.9.23-SNAPSHOT"
:description "A neural network toolkit for Clojure."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0-alpha17"]
[thinktopic/think.datatype "0.3.17"]
[com.git... | null | https://raw.githubusercontent.com/originrose/cortex/94b1430538e6187f3dfd1697c36ff2c62b475901/project.clj | clojure | Change the following dep to depend on different versions of CUDA
[org.bytedeco.javacpp-presets/cuda "7.5-1.2"] | (defproject thinktopic/cortex "0.9.23-SNAPSHOT"
:description "A neural network toolkit for Clojure."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0-alpha17"]
[thinktopic/think.datatype "0.3.17"]
[com.git... |
c78a47a86cf3ba20ab7b98e75d956e3aea80ffe1c6049fa3bd34dd1913c41ec3 | Elzair/nazghul | kern-init.scm | (kern-cfg-set
;; This is the image file for the UI border. The pieces need to be arranged in
;; a specific order in this image.
"frame-image-filename" "frame.png"
;; These are the letters used by the console, etc, in the UI. The character
;; sprites need to be arranged in a specific order in this image.
"asci... | null | https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.002/kern-init.scm | scheme | This is the image file for the UI border. The pieces need to be arranged in
a specific order in this image.
These are the letters used by the console, etc, in the UI. The character
sprites need to be arranged in a specific order in this image.
This is the cursor prompt used by the command window in the UI. It shou... | (kern-cfg-set
"frame-image-filename" "frame.png"
"ascii-image-filename" "charset.png"
have four animation frames .
"cursor-image-filename" "cursor.png"
This is the script file run when the user selects the " Start New Game "
"new-game-filename" "start-new-game.scm"
This is the script file run when... |
5ac96005bfcd31ebfa4d99f4dc5f884470c69509678fa6d578b4641f70599b79 | valis/hoq | Patterns.hs | # LANGUAGE ExistentialQuantification #
module TypeChecking.Expressions.Patterns
( typeCheckPatterns, typeCheckPattern
, TermsInCtx(..), TermInCtx(..)
) where
import Data.Void
import Control.Monad
import Semantics
import Semantics.Value as V
import Semantics.Pattern as P
import Syntax as S
import Syntax.E... | null | https://raw.githubusercontent.com/valis/hoq/9d2d2f5dee367ca5a609199856ca5964499bf33a/src/TypeChecking/Expressions/Patterns.hs | haskell | # LANGUAGE ExistentialQuantification #
module TypeChecking.Expressions.Patterns
( typeCheckPatterns, typeCheckPattern
, TermsInCtx(..), TermInCtx(..)
) where
import Data.Void
import Control.Monad
import Semantics
import Semantics.Value as V
import Semantics.Pattern as P
import Syntax as S
import Syntax.E... | |
cc9fee88f3588fd118106ababc7086786e1efaf8ddb8e85ee2d3a3ad29881256 | Heasummn/Crab-ML | convTypes.ml | open CrabEnv
open CrabParseTree
open Error
(* Ew globals. TODO: Remove this. *)
let glob_context = ref base_ctx
let conv_type ctx tp =
match Table.lookup (Symbol.symbol tp) ctx.types with
| Some tp -> tp
| None -> raise(TypeError("Unknown type " ^ tp))
let conv_lit lit =
let data = match lit.data with
| I... | null | https://raw.githubusercontent.com/Heasummn/Crab-ML/45a79373a620878b9c24464a7e009ecf3ea7f908/src/CrabPasses/convTypes.ml | ocaml | Ew globals. TODO: Remove this.
Convert all the options to a value | open CrabEnv
open CrabParseTree
open Error
let glob_context = ref base_ctx
let conv_type ctx tp =
match Table.lookup (Symbol.symbol tp) ctx.types with
| Some tp -> tp
| None -> raise(TypeError("Unknown type " ^ tp))
let conv_lit lit =
let data = match lit.data with
| Integer(x) -> CrabAst.Integer(x)
| ... |
4b46a7218e64a0181abe292a2dac146bee48b1d41e125451d5419b0ad5ca93f1 | joyofclojure/book-source | chess_test.clj | (ns joy.chess-test
(:use joy.chess
clojure.test))
(deftest test-lookup
(is (= (lookup (initial-board) "a8") \r)))
| null | https://raw.githubusercontent.com/joyofclojure/book-source/b76ef15248dac88c7b1c77c2d461f3aa522a1461/test/joy/chess_test.clj | clojure | (ns joy.chess-test
(:use joy.chess
clojure.test))
(deftest test-lookup
(is (= (lookup (initial-board) "a8") \r)))
| |
c74ce5d5c2dfb886126be58c91143e49ae25214d35130a94402ea298460a4fe5 | haskell-jp/makeMistakesToLearnHaskell | Error.hs | {-# OPTIONS_GHC -Wno-unused-imports #-}
module Education.MakeMistakesToLearnHaskell.Error where
#include <imports/external.hs>
import Education.MakeMistakesToLearnHaskell.Env (appName)
dieWhenNothing :: String -> Maybe a -> IO a
dieWhenNothing _ (Just x) = return x
dieWhenNothing msg _ = die msg
die... | null | https://raw.githubusercontent.com/haskell-jp/makeMistakesToLearnHaskell/1174d5c6bb82e57622be8033607a4d049e30ae7e/src/Education/MakeMistakesToLearnHaskell/Error.hs | haskell | # OPTIONS_GHC -Wno-unused-imports # |
module Education.MakeMistakesToLearnHaskell.Error where
#include <imports/external.hs>
import Education.MakeMistakesToLearnHaskell.Env (appName)
dieWhenNothing :: String -> Maybe a -> IO a
dieWhenNothing _ (Just x) = return x
dieWhenNothing msg _ = die msg
die :: String -> IO a
die msg = Exit.die $ ... |
abda68858653b68af60dbc0166f9672ab3322755943fb217d241aec617c8d237 | rbkmoney/genlib | genlib_opts_tests.erl | %%
-module(genlib_opts_tests).
-include_lib("eunit/include/eunit.hrl").
-spec test() -> _.
-type testcase() :: {_, fun()}.
-spec take_test_() -> [testcase()].
take_test_() ->
Opts = [{hey, "oh"}, {listen, "what"}, {i, "say oh"}, {come, "back and..."}],
[
?_assertEqual(
{"oh", [{listen, ... | null | https://raw.githubusercontent.com/rbkmoney/genlib/4565a8d73f34a0b78cca32c9cd2b97d298bdadf8/test/genlib_opts_tests.erl | erlang |
-module(genlib_opts_tests).
-include_lib("eunit/include/eunit.hrl").
-spec test() -> _.
-type testcase() :: {_, fun()}.
-spec take_test_() -> [testcase()].
take_test_() ->
Opts = [{hey, "oh"}, {listen, "what"}, {i, "say oh"}, {come, "back and..."}],
[
?_assertEqual(
{"oh", [{listen, "wh... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.