_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 |
|---|---|---|---|---|---|---|---|---|
2ac19f2d000d45a13766eced387b9bbfae553a142033dd5d013d4ba0b54a819c | wireless-net/erlang-nommu | instrument_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1998 - 2011 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Publi... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/tools/test/instrument_SUITE.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitatio... | Copyright Ericsson AB 1998 - 2011 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(instrument_SUITE).
-export([all/0,... |
6bb6f503b06b6bfef5cdb7193cb292c267e30b731c55ef9e2ba2e96c286b2902 | m4b/rdr | PEHeader.ml | open Binary
type dos_header =
{
5a4d
at offset 0x3c
}
let pp_dos_header ppf dos =
Format.fprintf ppf "@[DOS@ %x@ PE -> 0x%x@]"
dos.signature
dos.pe_pointer
let kDOS_MAGIC = 0x5a4d
let kDOS_CIGAM = 0x4d5a
let kPE_POINTER_OFFSET = 0x3c
(* COFF Header *)
type coff_header =
{
signature: i... | null | https://raw.githubusercontent.com/m4b/rdr/2bf1f73fc317cd74f8c7cacd542889df729bd003/lib/pe/PEHeader.ml | ocaml | COFF Header
0x50450000
bytes | open Binary
type dos_header =
{
5a4d
at offset 0x3c
}
let pp_dos_header ppf dos =
Format.fprintf ppf "@[DOS@ %x@ PE -> 0x%x@]"
dos.signature
dos.pe_pointer
let kDOS_MAGIC = 0x5a4d
let kDOS_CIGAM = 0x4d5a
let kPE_POINTER_OFFSET = 0x3c
type coff_header =
{
machine: int [@size 2];
nu... |
033322ae6100cc8f63c3e6867c8c9d9a6dd891cf2db87e513b6df86b6aed237f | broom-lang/broom | TypeEnv.mli | module T = Fc.Type
module FExpr = Fc.Term.Expr
type var = FExpr.var
module Tx = Transactional
type span = Util.span
type val_binding =
| White of {span : span; pat : Ast.Expr.t; expr : Ast.Expr.t}
| Grey of {span : span; pat : Ast.Expr.t; expr : Ast.Expr.t}
| Black of {span : span; pat : FExpr.pat; expr : ... | null | https://raw.githubusercontent.com/broom-lang/broom/8cc1b19c1a5a40846b362963a71be0003f477238/compiler/lib/Typechecker/TypeEnv.mli | ocaml | module T = Fc.Type
module FExpr = Fc.Term.Expr
type var = FExpr.var
module Tx = Transactional
type span = Util.span
type val_binding =
| White of {span : span; pat : Ast.Expr.t; expr : Ast.Expr.t}
| Grey of {span : span; pat : Ast.Expr.t; expr : Ast.Expr.t}
| Black of {span : span; pat : FExpr.pat; expr : ... | |
6796b2286a0dd85a8853f9c5c93eea5fa0e4cbb69548921f45a37d927cc514d8 | adomokos/haskell-katas | Ex28_TypesMoreDerivedInstancesSpec.hs | module Ex28_TypesMoreDerivedInstancesSpec
( spec
) where
import Test.Hspec
main :: IO ()
main = hspec spec
Day is an enumeration of each day in the week
spec :: Spec
spec = do
describe "Derived Instances" $ do
it "can compare two Bool fields" $ do
pending
-- Comparing True to False should be... | null | https://raw.githubusercontent.com/adomokos/haskell-katas/be06d23192e6aca4297814455247fc74814ccbf1/test/Ex28_TypesMoreDerivedInstancesSpec.hs | haskell | Comparing True to False should be greater
___ > False `shouldBe` True
___ < False `shouldBe` False
Enums have predecessors and successors | module Ex28_TypesMoreDerivedInstancesSpec
( spec
) where
import Test.Hspec
main :: IO ()
main = hspec spec
Day is an enumeration of each day in the week
spec :: Spec
spec = do
describe "Derived Instances" $ do
it "can compare two Bool fields" $ do
pending
_ _ _ _ _ _ False ` shouldBe ` GT
it... |
6cf055805e7e758677d4ff9a567a06f278c5339f57e3f88123b3f426bf947750 | cram-code/cram_core | rete.lisp | ;;;
Copyright ( c ) 2009 , < >
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this li... | null | https://raw.githubusercontent.com/cram-code/cram_core/984046abe2ec9e25b63e52007ed3b857c3d9a13c/cram_reasoning/tests/rete.lisp | lisp |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Re... | Copyright ( c ) 2009 , < >
* Neither the name of Willow Garage , Inc. nor the names of its
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR ... |
0bb73ef6660b9a6de1e7c850c846579af26c1c9c6fa0ff6759fe72bfda57ce1e | puffnfresh/sonic2 | Palette.hs | module Game.Sega.Sonic.Palette (
loadPalette
) where
import Control.Lens (over, _head)
import Data.Array.Bounded (BoundedArray, accumArrayBounded)
import Data.List.Split (chunksOf)
import Data.Vector.Storable (Vector, fromList)
import Data.Word... | null | https://raw.githubusercontent.com/puffnfresh/sonic2/0abc3e109a847582c2e16edb13e83e611419fc8a/src/Game/Sega/Sonic/Palette.hs | haskell | module Game.Sega.Sonic.Palette (
loadPalette
) where
import Control.Lens (over, _head)
import Data.Array.Bounded (BoundedArray, accumArrayBounded)
import Data.List.Split (chunksOf)
import Data.Vector.Storable (Vector, fromList)
import Data.Word... | |
d3dcbf4adda3b050c453fe4fe41bdd0304b97bf6a9c408be2695425d062f4940 | lsevero/clj-curl | easy_test.clj | (ns clj-curl.easy-test
(:refer-clojure :exclude [send])
(:require [clojure.test :refer :all]
[clj-curl.easy :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/lsevero/clj-curl/b4e209efd59c7095c610e42a639bfa3ac3356083/test/clj_curl/easy_test.clj | clojure | (ns clj-curl.easy-test
(:refer-clojure :exclude [send])
(:require [clojure.test :refer :all]
[clj-curl.easy :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
f281d45362821de7bd17dddef8343e1cfa61fff04a7bcee53ca457d28e67a83f | eponai/sulolive | utils.clj | (ns env.client.utils)
(defmacro dev-machine-ip
"Is replaced with the ip to this computer."
[]
(.getHostAddress (java.net.InetAddress/getLocalHost))) | null | https://raw.githubusercontent.com/eponai/sulolive/7a70701bbd3df6bbb92682679dcedb53f8822c18/env/client/dev/env/client/utils.clj | clojure | (ns env.client.utils)
(defmacro dev-machine-ip
"Is replaced with the ip to this computer."
[]
(.getHostAddress (java.net.InetAddress/getLocalHost))) | |
637dc3095d502f40c92af83109025a56183b669dec2ed7b6f5405e63e9b5b23b | kappelmann/engaging-large-scale-functional-programming | Types.hs | module Types where
type Seconds = Double
type Sample = Double
type Signal = Seconds -> Sample
type SampledSignal = [Sample]
type Hz = Double
type Semitone = Integer
type Note = (Semitone, Seconds, Seconds)
type Oscillator = Semitone -> Seconds -> Double -> Double
type ADSR = (Seconds, Seconds, Sample, Seconds)
type D... | null | https://raw.githubusercontent.com/kappelmann/engaging-large-scale-functional-programming/d098d6da71d4ef4d6d4c8a67bfb7f65c7c5abb0e/resources/synthesiser/solution/src/Types.hs | haskell | module Types where
type Seconds = Double
type Sample = Double
type Signal = Seconds -> Sample
type SampledSignal = [Sample]
type Hz = Double
type Semitone = Integer
type Note = (Semitone, Seconds, Seconds)
type Oscillator = Semitone -> Seconds -> Double -> Double
type ADSR = (Seconds, Seconds, Sample, Seconds)
type D... | |
a350dba139d6ca93757e69f02b7d4aa5eb7a1dbcfb048319800d061b9d0dcdce | tamarit/edd | sum_digits.erl | -module(sum_digits).
-compile(export_all).
-include_lib("proper/include/proper.hrl").
-include_lib("eunit/include/eunit.hrl").
sum_digits(N) ->
sum_digits(N,10).
sum_digits(N,B) ->
sum_digits(N,B,0).
sum_digits(0,_,Acc) ->
Acc;
sum_digits(N,B,Acc) when N < B ->
%Acc+N; %RIGHT
Acc; %WRONG
sum... | null | https://raw.githubusercontent.com/tamarit/edd/867f287efe951bec6a8213743a218b86e4f5bbf7/examples/Unified_Framework/sum_digits/tests/sum_digits.erl | erlang | Acc+N; %RIGHT
WRONG
Tests %% | -module(sum_digits).
-compile(export_all).
-include_lib("proper/include/proper.hrl").
-include_lib("eunit/include/eunit.hrl").
sum_digits(N) ->
sum_digits(N,10).
sum_digits(N,B) ->
sum_digits(N,B,0).
sum_digits(0,_,Acc) ->
Acc;
sum_digits(N,B,Acc) when N < B ->
sum_digits(N,B,Acc) ->
sum_digits(... |
27ef037917e1bbcaaeee164227ca537971945127dab57ed3aa35ada60ac41319 | drathier/elm-offline | UnionFind.hs | {-# OPTIONS_GHC -funbox-strict-fields #-}
{-# LANGUAGE BangPatterns #-}
module Type.UnionFind
( Point
, fresh
, union
, equivalent
, redundant
, get
, set
, modify
)
where
This is based on the following implementations :
- -find-0.2/docs/src/Data-UnionFind-IO.html
- -gianas.org/public/m... | null | https://raw.githubusercontent.com/drathier/elm-offline/f562198cac29f4cda15b69fde7e66edde89b34fa/compiler/src/Type/UnionFind.hs | haskell | # OPTIONS_GHC -funbox-strict-fields #
# LANGUAGE BangPatterns #
POINT
# UNPACK #
# UNPACK #
# UNPACK #
HELPERS | module Type.UnionFind
( Point
, fresh
, union
, equivalent
, redundant
, get
, set
, modify
)
where
This is based on the following implementations :
- -find-0.2/docs/src/Data-UnionFind-IO.html
- -gianas.org/public/mini/code_UnionFind.html
It seems like the OCaml one came first , but ... |
b11fda53ee6353438640b484fee4c3be4ca75ab701464827a4e77199b71ddc3e | helpshift/hydrox | home.clj | (ns documentation.example.home
(:use midje.sweet))
[[:chapter {:title "Beating the Averages"}]]
"In the summer of 1995, my friend Robert Morris and I started a startup called Viaweb.
Our plan was to write software that would let end users build online stores. What was
novel about this software, at the time, was tha... | null | https://raw.githubusercontent.com/helpshift/hydrox/2beb3c56fad43bbf16f07db7ee72c5862978350c/example/test/documentation/example/home.clj | clojure | that experience will make you a better programmer for the rest of your | (ns documentation.example.home
(:use midje.sweet))
[[:chapter {:title "Beating the Averages"}]]
"In the summer of 1995, my friend Robert Morris and I started a startup called Viaweb.
Our plan was to write software that would let end users build online stores. What was
novel about this software, at the time, was tha... |
211de50f7596fb72babfdd184dabce318c71c8e88fe24b91a091df8ec992f75b | jborden/leaderboard-api | handler_test.clj | (ns leaderboard-api.handler-test
(:require [clojure.test :refer :all]
[ring.mock.request :as mock]
[leaderboard-api.handler :refer :all]))
(deftest test-app
(testing "main route"
(let [response (app (mock/request :get "/"))]
(is (= (:status response) 200))
(is (= (:body resp... | null | https://raw.githubusercontent.com/jborden/leaderboard-api/f5861c8a59eba634b95222cac3a04668afdcf66a/test/leaderboard_api/handler_test.clj | clojure | (ns leaderboard-api.handler-test
(:require [clojure.test :refer :all]
[ring.mock.request :as mock]
[leaderboard-api.handler :refer :all]))
(deftest test-app
(testing "main route"
(let [response (app (mock/request :get "/"))]
(is (= (:status response) 200))
(is (= (:body resp... | |
eb24f71c34315c9de2bf053b5090e9431bb710c97f8d0141ebd1afa863d16670 | mhuebert/maria | page.cljc | (ns cljs-static.page
(:require [cljs-static.assets :as assets]
[hiccup.util :as hu]
[hiccup2.core :as hiccup]))
(defn map<> [f coll]
#?(:cljs
(into [:<>] (map f coll))
:clj
(doall (map f coll))))
;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; HTML generation
(defn update-some [m updaters]... | null | https://raw.githubusercontent.com/mhuebert/maria/9fc2e26ed7df16e82841e0127a56ae36fafa4e63/tools/src/cljs_static/page.cljc | clojure |
HTML generation | (ns cljs-static.page
(:require [cljs-static.assets :as assets]
[hiccup.util :as hu]
[hiccup2.core :as hiccup]))
(defn map<> [f coll]
#?(:cljs
(into [:<>] (map f coll))
:clj
(doall (map f coll))))
(defn update-some [m updaters]
(reduce-kv (fn [m k update-f]
... |
21ee6ea201cd7a101d754f17aa891aead37dd3fefce6f20b7c151c1b04d1b3a6 | joewilliams/erl_geo_dns | couchbeam_util.erl | Copyright 2009 .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%% you may not use this file except in compliance with the License.
%%% You may obtain a copy of the License at
%%%
%%% -2.0
%%%
%%% Unless required by applicable law or agreed to in writing, software
distributed under t... | null | https://raw.githubusercontent.com/joewilliams/erl_geo_dns/682c3925959db61ead99f13160ef8bd77486a871/apps/couchbeam/src/couchbeam_util.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permi... | Copyright 2009 .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Some code from michiweb project under BSD license
< >
copyright 2007 Mochi Media , Inc.
in the Software without restriction , including without l... |
1218f5c0af35578e52dbdd3ec4275147886f37a7a9509877b442b807dcbe1c3c | horie-t/iacc-riscv | compiler.scm | (import (rnrs hashtables))
(load "test_cases.scm")
;;;; ユーティリティ関数
;;; 書式と引数を取って表示し、改行を付け加えます。
例 : ( emit " addi t0 , t0 , ~s " 1 )
addi t0 , t0 , 1
;; が表示されます。
(define (emit . args)
(apply format #t args)
(newline))
;;; ユニーク・ラベル生成
;; 重複のない、ラベルを返します。
(define unique-label
(let ((count 0))
(lambda ()
... | null | https://raw.githubusercontent.com/horie-t/iacc-riscv/2aea0b27f712f4b9354ecf04a7a0cb08f5c2117e/04_BinaryPrimitives/compiler.scm | scheme | ユーティリティ関数
書式と引数を取って表示し、改行を付け加えます。
が表示されます。
ユニーク・ラベル生成
重複のない、ラベルを返します。
オブジェクト型情報定義: タグ付きポインタ表現を使う
整数: 下位2ビットが00、上位30ビットが符号付き整数となっている
整数判定ビットマスク(ANDを取って0なら整数オブジェクト)
boolean:
#fの数値表現
#t
boolean判定ビットマスク(ANDを取ってis_boolならbooleanオブジェクト)
booleanの判定用ビット位置
空リスト:
char判定ビットマスク(ANDを取って、chartagならchar)
charタグ
c... | (import (rnrs hashtables))
(load "test_cases.scm")
例 : ( emit " addi t0 , t0 , ~s " 1 )
addi t0 , t0 , 1
(define (emit . args)
(apply format #t args)
(newline))
(define unique-label
(let ((count 0))
(lambda ()
(let ((L (format "L_~s" count)))
(set! count (+ count 1))
L))))
整数変換シフト量
文字... |
3cb69cbed34556d1639481824d7cedae5cffd7afa8f2aafb25d438a3351cca86 | Psi-Prod/Mehari | stream.ml | let count clock n =
Seq.unfold
(function
| None -> None
| Some i when Int.equal i n -> Some ("End", None)
| Some i ->
Eio.Time.sleep clock 1.;
Some (Printf.sprintf "%i\n" i, Some (i + 1)))
(Some 0)
let router clock req =
match Mehari.query req with
| None -> Mehari.(... | null | https://raw.githubusercontent.com/Psi-Prod/Mehari/e57202510dd43fa1ce75695cf1ab8f8caa49f0f0/examples/stream.ml | ocaml | let count clock n =
Seq.unfold
(function
| None -> None
| Some i when Int.equal i n -> Some ("End", None)
| Some i ->
Eio.Time.sleep clock 1.;
Some (Printf.sprintf "%i\n" i, Some (i + 1)))
(Some 0)
let router clock req =
match Mehari.query req with
| None -> Mehari.(... | |
73d9b7bbe5a371037bc6b163c2ea8e94b30d478e69ae1424e5f30cc9e8fadf9e | phadej/minicsv | MiniCSV.hs | module MiniCSV (
-- * Encoding
csvEncodeTable,
csvEncodeRow,
csvEncodeField,
-- * Decoding
csvDecodeTable,
) where
-------------------------------------------------------------------------------
-- Encoding
-------------------------------------------------------------------------------
csvEnc... | null | https://raw.githubusercontent.com/phadej/minicsv/8badfff03166d7e87974e4c9a4407c2df17340f0/src/MiniCSV.hs | haskell | * Encoding
* Decoding
-----------------------------------------------------------------------------
Encoding
-----------------------------------------------------------------------------
opening quote
-----------------------------------------------------------------------------
Decoding
---------------------------... | module MiniCSV (
csvEncodeTable,
csvEncodeRow,
csvEncodeField,
csvDecodeTable,
) where
csvEncodeTable :: [[String]] -> String
csvEncodeTable = concatMap (\r -> csvEncodeRow r ++ "\r\n")
csvEncodeRow :: [String] -> String
csvEncodeRow [] = ""
csvEncodeRow [x] = csvEncodeField x
csvEncodeRow (x... |
a832ea9239f4f3c87b352aa578f47ddb614dca9f6284f167fbc852db5b05ed9f | tezos/tezos-mirror | baking_configuration.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/e5ca6c3e274939f1206426962aa4c02e1a1d5319/src/proto_016_PtMumbai/lib_delegate/baking_configuration.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN... |
3adee5cbb8d195ce1141fbe810afc2b07d002d796d41d6288bf453a0d55d7409 | aggieben/weblocks | test-template.lisp |
(in-package :weblocks-test)
;;; utilities for easier testing
(defun data-header-template (action body &key (data-class-name "employee") preslots
(postslots `((:div :class "submit"
,(link-action-template action "Modify"
:class "modify")))))
`(:div :class ,(format nil "view data ~A" data-... | null | https://raw.githubusercontent.com/aggieben/weblocks/8d86be6a4fff8dde0b94181ba60d0dca2cbd9e25/test/views/dataview/test-template.lisp | lisp | utilities for easier testing |
(in-package :weblocks-test)
(defun data-header-template (action body &key (data-class-name "employee") preslots
(postslots `((:div :class "submit"
,(link-action-template action "Modify"
:class "modify")))))
`(:div :class ,(format nil "view data ~A" data-class-name)
(:div :class "extra-... |
0e9bbffe4a880a13a096ac09f917e5b0e7ae4ea46a24475affe1ff8d6f10bd0d | herbelin/coq-hh | redexpr.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/proofs/redexpr.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* [true] if we should use the vm to ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Term
open Clo... |
5e7606cfeeb77ebedd4e3a213e21f93bb36ac50f4838da3f982758f0ce372fa0 | myuon/claire | Parser.hs | module Claire.Parser
( module Claire.Syntax
, pLaire
, pDecl
, pCommand
, pFormula
, pTerm
) where
import Claire.Syntax
import Claire.Parser.Lexer
import Claire.Parser.Parser
pLaire :: String -> Laire
pLaire = laireparser . alexScanTokens
pDecl :: String -> Decl
pDecl = declparser . alexScanTokens
pC... | null | https://raw.githubusercontent.com/myuon/claire/e14268ced1bbab2f099a93feb0f2a129cf8b6a8b/src/Claire/Parser.hs | haskell | module Claire.Parser
( module Claire.Syntax
, pLaire
, pDecl
, pCommand
, pFormula
, pTerm
) where
import Claire.Syntax
import Claire.Parser.Lexer
import Claire.Parser.Parser
pLaire :: String -> Laire
pLaire = laireparser . alexScanTokens
pDecl :: String -> Decl
pDecl = declparser . alexScanTokens
pC... | |
5a25a35c4a5772a5f5f2b462e82508a574e41b47fd2354cbe0b81e477c457020 | Happstack/happstack-server | Auth.hs | # LANGUAGE FlexibleContexts #
-- | Support for basic access authentication <>
module Happstack.Server.Auth where
import Data.Foldable (foldl')
import Data.Bits (xor, (.|.))
import Data.Maybe (fromMaybe)
import Control.Monad (MonadPlus(mzero, mplus))
import Data.ByteString.Base64 ... | null | https://raw.githubusercontent.com/Happstack/happstack-server/e5a5b12a8c0b0bd57f9501d6d5bf33baaa2740d6/src/Happstack/Server/Auth.hs | haskell | | Support for basic access authentication <>
| A simple HTTP basic authentication guard.
If authentication fails, this part will call 'mzero'.
example:
> main = simpleHTTP nullConf $
> , ok "You are not in the secret club."
> ]
^ the realm name
^ the username password map
^ the part to gua... | # LANGUAGE FlexibleContexts #
module Happstack.Server.Auth where
import Data.Foldable (foldl')
import Data.Bits (xor, (.|.))
import Data.Maybe (fromMaybe)
import Control.Monad (MonadPlus(mzero, mplus))
import Data.ByteString.Base64 as Base64
import qualified Data.ByteStri... |
7e079623a6d5321deacff1d65410049c891c5bd590ce7d6dc1acba0381c499e3 | issuu/ocaml-protoc-plugin | protocol_test.ml | open Protocol
let%test "Last value kept" =
let messages = List.init 8 (fun i -> i) in
let oneof_messages = [] in
let t = Protocol.Old.{ messages; oneof_i = "Oneof_test"; oneof_j = 13; oneof_messages } in
let expect = Protocol.New.{ message = Some 7; oneof = `Oneof_j 13 } in
let writer = Protocol.Old.to_prot... | null | https://raw.githubusercontent.com/issuu/ocaml-protoc-plugin/3d8b3eeb48e2a58dc80fbfdf9d749e69676625ab/test/protocol_test.ml | ocaml | open Protocol
let%test "Last value kept" =
let messages = List.init 8 (fun i -> i) in
let oneof_messages = [] in
let t = Protocol.Old.{ messages; oneof_i = "Oneof_test"; oneof_j = 13; oneof_messages } in
let expect = Protocol.New.{ message = Some 7; oneof = `Oneof_j 13 } in
let writer = Protocol.Old.to_prot... | |
22c11626655fc7f3edbbc46a8856640f2f909a4fbf0c03b75b48eacbdb1e7256 | dharrigan/startrek | dev.clj | (ns dev
{:author "David Harrigan"}
(:require
[clojure.tools.logging :as log]
[donut.system :as ds]
[donut.system.repl :as donut]
[donut.system.repl.state :as state]
[startrek.system]) ;; required in order to load in the defmulti's that define the donut `named-system`'s.
(:import
[clojure.lang Ex... | null | https://raw.githubusercontent.com/dharrigan/startrek/a91caa3f504ffea502b79cfd29d0499574aaced6/dev/src/dev.clj | clojure | required in order to load in the defmulti's that define the donut `named-system`'s. | (ns dev
{:author "David Harrigan"}
(:require
[clojure.tools.logging :as log]
[donut.system :as ds]
[donut.system.repl :as donut]
[donut.system.repl.state :as state]
(:import
[clojure.lang ExceptionInfo]))
(set! *warn-on-reflection* true)
(def ^:private environment (atom nil))
(defmethod ds/named... |
dde840022a0ba1928996724d76d91fd5fbda20543357f1e1950036fc530f03d3 | bobzhang/fan | ginsert.ml |
(* open Util *)
open Format
let higher (s1 : Gdefs.symbol) (s2 : Gdefs.symbol) =
match (s1, s2) with
| Token (({descr ={word = A _ ; _ }}):Tokenf.pattern) ,
Token ({descr = {word = Any ; _ }} : Tokenf.pattern) -> false
| Token _ , _ -> true
| _ -> false
let rec derive_eps (s:Gdefs.symbol... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/treeparser/ginsert.ml | ocaml | open Util
it would consume if succeed
For sure we cannot derive epsilon from these
Approximation
could be fixed
let rec check_gram (entry : Gdefs.entry) (x:Gdefs.symbol) =
match x with
| Nterm e ->
(\* if entry.gram != e.gram then *\)
(\* failwithf "Fgram.extend: entries %S and %S d... |
open Format
let higher (s1 : Gdefs.symbol) (s2 : Gdefs.symbol) =
match (s1, s2) with
| Token (({descr ={word = A _ ; _ }}):Tokenf.pattern) ,
Token ({descr = {word = Any ; _ }} : Tokenf.pattern) -> false
| Token _ , _ -> true
| _ -> false
let rec derive_eps (s:Gdefs.symbol) =
match s w... |
5cb106b0d0fb74ff8e97a89487f9805289ce95419c5f6b40c864b04683adb8bd | liyang/thyme | Calendar.hs | # LANGUAGE CPP #
# LANGUAGE RecordWildCards #
# LANGUAGE ViewPatterns #
# OPTIONS_GHC -fno - warn - orphans #
#include "thyme.h"
#if HLINT
#include "cabal_macros.h"
#endif
-- | Calendar calculations.
--
Note that ' UTCTime ' is not Y294K - compliant , and ' Bounded ' instances for
-- the various calendar types refl... | null | https://raw.githubusercontent.com/liyang/thyme/c0dcc251ff4f843672987c80b73ec4808bc009e4/src/Data/Thyme/Calendar.hs | haskell | | Calendar calculations.
the various calendar types reflect this fact. That said, the calendar
calculations by themselves work perfectly fine for a wider range of
dates, subject to the size of 'Int' for your platform.
* Day
* Calendar
* Gregorian calendar
$proleptic
"Data.Thyme.Calendar.Internal" cannot impor... | # LANGUAGE CPP #
# LANGUAGE RecordWildCards #
# LANGUAGE ViewPatterns #
# OPTIONS_GHC -fno - warn - orphans #
#include "thyme.h"
#if HLINT
#include "cabal_macros.h"
#endif
Note that ' UTCTime ' is not Y294K - compliant , and ' Bounded ' instances for
module Data.Thyme.Calendar
(
Day (..), modifiedJulianDa... |
def41b86149a97bca77f582a23406e4285de562168a0be599aab2082da314c94 | Kappa-Dev/KappaTools | counters_domain_static.mli | val compute_static:
Remanent_parameters_sig.parameters -> Exception.method_handler ->
Cckappa_sig.kappa_handler ->
Cckappa_sig.compil ->
Exception.method_handler * Counters_domain_type.static
val convert_view:
Remanent_parameters_sig.parameters -> Exception.method_handler ->
Cckappa_sig.kappa_handler ->
... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/KaSa_rep/reachability_analysis/counters_domain_static.mli | ocaml | val compute_static:
Remanent_parameters_sig.parameters -> Exception.method_handler ->
Cckappa_sig.kappa_handler ->
Cckappa_sig.compil ->
Exception.method_handler * Counters_domain_type.static
val convert_view:
Remanent_parameters_sig.parameters -> Exception.method_handler ->
Cckappa_sig.kappa_handler ->
... | |
cbb3ec208f6ee2e3b746bc881bc53c61a3e090f0df7cc4ca70602121a5ee07b4 | deadtrickster/cl-statsd | async.lisp | (in-package :cl-statsd)
(defconstant +async-client-reconnects-default+ 5)
(defparameter *throttle-threshold* 7000000)
(define-condition throttle-threshold-reached (error)
((threshold :initarg :threshold :reader throttle-threshold)))
(defclass async-client (statsd-client-with-transport)
((reconnects :initarg :re... | null | https://raw.githubusercontent.com/deadtrickster/cl-statsd/7790c95c097f690994256519d24106b53c3e5e37/src/clients/async.lisp | lisp | (in-package :cl-statsd)
(defconstant +async-client-reconnects-default+ 5)
(defparameter *throttle-threshold* 7000000)
(define-condition throttle-threshold-reached (error)
((threshold :initarg :threshold :reader throttle-threshold)))
(defclass async-client (statsd-client-with-transport)
((reconnects :initarg :re... | |
e4614fbb52b35ca20504353d807587335b4cc74ef0d9a4bfdc06adf93b6322b9 | ghollisjr/cl-ana | memoization.lisp | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
;;;;
This file is part of cl - ana .
;;;;
;;;; cl-ana is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the Li... | null | https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/memoization/memoization.lisp | lisp |
cl-ana is free software: you can redistribute it and/or modify it
(at your option) any later version.
cl-ana is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License... | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
This file is part of cl - ana .
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
... |
03d42e375c5d43ec089bbb4a4e083befa000e88e2f7cc2b274d0aa161f2eac65 | arenadotio/pgx | pgx_aux.mli | * Helper functions since we do n't want a dependency on Core or Batteries .
module String : sig
include module type of String
val implode : char list -> string
val fold_left : ('a -> char -> 'a) -> 'a -> string -> 'a
end
module List : sig
include module type of List
* Like the built - in [ List.map ] , but ... | null | https://raw.githubusercontent.com/arenadotio/pgx/8d5ca02213faa69e692c5d0dc3e81408db3774a1/pgx/src/pgx_aux.mli | ocaml | * Necessary for ppx_compare | * Helper functions since we do n't want a dependency on Core or Batteries .
module String : sig
include module type of String
val implode : char list -> string
val fold_left : ('a -> char -> 'a) -> 'a -> string -> 'a
end
module List : sig
include module type of List
* Like the built - in [ List.map ] , but ... |
a7fb8a003bfc86c02994123124a2ac4cc3f7bdf248fc9bc21befac1af20d2c75 | gcv/cupboard | je_marshal.clj | (ns cupboard.bdb.je-marshal
(:import [org.joda.time DateTime LocalDate LocalTime LocalDateTime DateTimeZone])
(:import [com.sleepycat.je DatabaseEntry OperationStatus]
[com.sleepycat.bind.tuple TupleBinding TupleInput TupleOutput]))
(def ^:dynamic *clj-types*
[nil
java.lang.Boolean
java.lang.Ch... | null | https://raw.githubusercontent.com/gcv/cupboard/bd264e3051bafacd8b12602e02819585b563c464/src/cupboard/bdb/je_marshal.clj | clojure | XXX: Symbols get interned in the package which unmarshals the symbol!!!
structure to put together sequences in the loop (as is, it creates quite a
bit of garbage). Alternatively, maybe use a for form if it is more efficient?
| (ns cupboard.bdb.je-marshal
(:import [org.joda.time DateTime LocalDate LocalTime LocalDateTime DateTimeZone])
(:import [com.sleepycat.je DatabaseEntry OperationStatus]
[com.sleepycat.bind.tuple TupleBinding TupleInput TupleOutput]))
(def ^:dynamic *clj-types*
[nil
java.lang.Boolean
java.lang.Ch... |
4406612abbe294e3419a97cb572b9fe76941b4b5c087cdccf113327eb3bf891a | LambdaHack/LambdaHack | SessionUI.hs | # LANGUAGE DeriveGeneric , GeneralizedNewtypeDeriving #
-- | The client UI session state.
module Game.LambdaHack.Client.UI.SessionUI
( SessionUI(..), ReqDelay(..), ItemDictUI, ItemRoles(..), AimMode(..)
, KeyMacro(..), KeyMacroFrame(..), RunParams(..), ChosenLore(..)
, emptySessionUI, emptyMacroFrame
, cycleMar... | null | https://raw.githubusercontent.com/LambdaHack/LambdaHack/100690c5d2eabaca985f44d220e6d660812e21d1/engine-src/Game/LambdaHack/Client/UI/SessionUI.hs | haskell | | The client UI session state.
| The information that is used across a human player playing session,
including many consecutive games in a single session,
including playing different teams. Some of it is saved, some is reset
when a new playing session starts. Nothing is tied to a faction/team,
but instead all to ... | # LANGUAGE DeriveGeneric , GeneralizedNewtypeDeriving #
module Game.LambdaHack.Client.UI.SessionUI
( SessionUI(..), ReqDelay(..), ItemDictUI, ItemRoles(..), AimMode(..)
, KeyMacro(..), KeyMacroFrame(..), RunParams(..), ChosenLore(..)
, emptySessionUI, emptyMacroFrame
, cycleMarkVision, toggleMarkSmell, cycleOve... |
4e008f7978e9f5c4cf44c172aebd673e6f16665227614ccf3d63b8499da128be | kpblc2000/KpblcLispLib | _kpblc-ent-create-layer.lsp | (defun _kpblc-ent-create-layer (name param-list / sub res tmp)
;|
* Ôóíêöèÿ ñîçäàíèÿ ñëîÿ ïî èìåíè è äîï.ïàðàìåòðàì
* Ïàðàìåòðû âûçîâà:
name ; Èìÿ ñîçäàâàåìîãî ñëîÿ
Ñïèñîê ñâîéñòâ ñîçäàâàåìîãî ñëîÿ
ICA . nil - > 7 . íàäî ïåðåäàâàòü ñïèñîê Red Green Blue
... | null | https://raw.githubusercontent.com/kpblc2000/KpblcLispLib/9d62aaa7d3888c71799f5ad3fd67bbdbd605fe23/lsp/ent/create/layer/_kpblc-ent-create-layer.lsp | lisp | |
Èìÿ ñîçäàâàåìîãî ñëîÿ
nil -> 9
nil -> "Continuous"
nil -> acadiso.lin
nil -> òåêóùèé äîêóìåíò
_ end of list
_ end of if
_ end of foreach
_ end of vl-catch-all-apply
_ end of type
_ end of /=
_ end of if
_ end of apply
_ end of if
_ end of _kpblc-linetype-load
_ end of vla-put-linetype
_ end of... | (defun _kpblc-ent-create-layer (name param-list / sub res tmp)
* Ôóíêöèÿ ñîçäàíèÿ ñëîÿ ïî èìåíè è äîï.ïàðàìåòðàì
* Ïàðàìåòðû âûçîâà:
Ñïèñîê ñâîéñòâ ñîçäàâàåìîãî ñëîÿ
ICA . nil - > 7 . íàäî ïåðåäàâàòü ñïèñîê Red Green Blue
nil - > íå ìåíÿåòñÿ äëÿ ñóùåñòâóþùåãî èëè " " äëÿ íîâîãî ñëîÿ
nil - > ... |
a19a3f692e83e9595069281a9faa19e2eda4bf830ae942d994d20120dbbaf3aa | toddaaro/advanced-dan | test1.scm |
(define run
(lambda ()
(let (;[gk 'hukarz]
[eng (make-engine (lambda ()
(+ 5
(call/cc (lambda (k)
(set! gk k)
(engine-return k 'hukarz)
... | null | https://raw.githubusercontent.com/toddaaro/advanced-dan/5d6c0762d998aa37774e0414a0f37404e804b536/amb/test1.scm | scheme | [gk 'hukarz] |
(define run
(lambda ()
[eng (make-engine (lambda ()
(+ 5
(call/cc (lambda (k)
(set! gk k)
(engine-return k 'hukarz)
... |
ee345c9b328d3efe84c6cfe69c0ad946c8866ccd86dec02d3b5307f59a7e7685 | pelzlpj/orpie | interface_draw.ml | Orpie -- a fullscreen RPN calculator for the console
* Copyright ( C ) 2003 - 2004 , 2005 , 2006 - 2007 , 2010 , 2018
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License , Version 3 ,
* as published by the Free Soft... | null | https://raw.githubusercontent.com/pelzlpj/orpie/8b3bb833cedad0125aa9e9cb01d253156993e20b/src/orpie/interface_draw.ml | ocaml | interface_draw.ml
* This file has all code concerned with rendering the stack, help panel,
* and data entry line.
display the stack, where the bottom line of the display
* corresponds to stack level 'stack_bottom_row'
if the line number is really huge, truncate to least
* significant digits
if there... | Orpie -- a fullscreen RPN calculator for the console
* Copyright ( C ) 2003 - 2004 , 2005 , 2006 - 2007 , 2010 , 2018
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License , Version 3 ,
* as published by the Free Soft... |
0da1f77a5c6353846d21f47aa76692a5ad795601666b8d386924330906d8b197 | rfindler/lindenmayer | seaweed.rkt | #lang lindenmayer racket
## axiom ##
abF
## rules ##
a → FFf
b → c
c → Fddde[+++++m][-----m]ddfc
d → e
e → g
g → h
h → i
i → j
j → k
k → FF
m → nofF
n → fFF
o → p
p → fF[------A][++++++H]Fq
q → ff[-----B][+++++I]Fr
r → fF[----C][++++J]Fs
s → fF[---D][+++K]Ft
t → fF[--E][++L]F
A → BF
B → Ff+C
C → Ff+D
D → Ff+E
E → Ff+G
... | null | https://raw.githubusercontent.com/rfindler/lindenmayer/2ef7b4535d8ae1eb7cc2e16e2b630c30a4b9a34d/examples/seaweed.rkt | racket |
From:
COMPUTER SIMULATION OF THE MORPHOLOGY AND
DEVELOPMENT OF SEVERAL SPECIES OF SEAWEED
USING LINDENMAYER SYSTEMS
| #lang lindenmayer racket
## axiom ##
abF
## rules ##
a → FFf
b → c
c → Fddde[+++++m][-----m]ddfc
d → e
e → g
g → h
h → i
i → j
j → k
k → FF
m → nofF
n → fFF
o → p
p → fF[------A][++++++H]Fq
q → ff[-----B][+++++I]Fr
r → fF[----C][++++J]Fs
s → fF[---D][+++K]Ft
t → fF[--E][++L]F
A → BF
B → Ff+C
C → Ff+D
D → Ff+E
E → Ff+G
... |
069f2b682207a63841e4ade0c80dc5ae8c01ae03205cbd65c8ac5b07fb1d0630 | Beluga-lang/Beluga | synint.ml | open Support.Equality
(* Internal Syntax *)
open Support
open Id
Internal LF Syntax
module LF = struct
include Syncom.LF
type kind =
| Typ
| PiKind of (typ_decl * Plicity.t) * kind
and typ_decl = (* LF Declarations *)
| TypDecl of Name.t * typ ... | null | https://raw.githubusercontent.com/Beluga-lang/Beluga/db2213de17924adffe8a1c2a25458db031eb0778/src/core/synint.ml | ocaml | Internal Syntax
LF Declarations
D := x:A
| x:_
Contextual Declarations
LF level
| TClo(A,s)
The plicity annotation is set to `implicit when reconstructing an
a hole (_) so that when printing... | open Support.Equality
open Support
open Id
Internal LF Syntax
module LF = struct
include Syncom.LF
type kind =
| Typ
| PiKind of (typ_decl * Plicity.t) * kind
and cltyp =
| MTyp of typ
| PTyp of typ
| STyp of svar_class * dctx
and ctyp =
| ClTyp of cltyp * dctx
| CTyp of cid_... |
ad3108d9a96c584702cb758ad99f71c37a1776c4363b63a6acc18142a2352d3c | serhiip/org2any | Logging.hs | |
Module : Data . . Sync . Logging
Description : Logging utilities
License : GPL-3
Maintainer : < >
Stability : experimental
Log meassages of various log levels either via main transfromer stack
or via just IO . Uses
< -yamamoto/logger kazu - yamamoto / logger >
Module : Dat... | null | https://raw.githubusercontent.com/serhiip/org2any/06dae386defe693ecc5ef169de3accc9a8267685/src/Data/OrgMode/Sync/Logging.hs | haskell | | Logging severity and destination (STDOUT / STDERR)
| Helper function to initialize stderr and stdout loggers
| Generic function to log messages. Logs messages of @Error@
severity to stderr. Will not emit any messages to stdout when
| Print informatic message to STDOUT. Will not emit anything if
| Print error to... | |
Module : Data . . Sync . Logging
Description : Logging utilities
License : GPL-3
Maintainer : < >
Stability : experimental
Log meassages of various log levels either via main transfromer stack
or via just IO . Uses
< -yamamoto/logger kazu - yamamoto / logger >
Module : Dat... |
1ccfdb21f07abd121614a18be4594576f3818093b71fe113895d44464016dac5 | zippy/anansi | channel.clj |
(ns anansi.test.streamscapes.channel
(:use [anansi.streamscapes.channel] :reload)
(:use [anansi.ceptr]
[anansi.streamscapes.streamscapes]
[anansi.receptor.scape]
[anansi.receptor.user :only [user-def]]
[anansi.receptor.host :only [host-def]])
(:use [midje.sweet])
(:use [clojure.... | null | https://raw.githubusercontent.com/zippy/anansi/881aa279e5e7836f3002fc2ef7623f2ee1860c9a/test/anansi/test/streamscapes/channel.clj | clojure | use the error param to simulate errors or not
hack off the milliseconds
hack off the milliseconds |
(ns anansi.test.streamscapes.channel
(:use [anansi.streamscapes.channel] :reload)
(:use [anansi.ceptr]
[anansi.streamscapes.streamscapes]
[anansi.receptor.scape]
[anansi.receptor.user :only [user-def]]
[anansi.receptor.host :only [host-def]])
(:use [midje.sweet])
(:use [clojure.... |
e679834a3e8e3e079068c67e627ad9da23a076dfd7b2d03949cdfe22c23477e8 | jeaye/safepaste | home.clj | (ns safepaste.home
(:require [safepaste.css :as css]
[hiccup.page :as page]))
(def default-expiry "day")
(defn render [id request]
(let [placeholder "Enter your paste here…"]
(page/html5
[:head
; Have search engines ignore everything but the home page
(when (not-empty id)
... | null | https://raw.githubusercontent.com/jeaye/safepaste/646232d1adb1ed9a6b76f26636753e196145c43c/src/clj/safepaste/home.clj | clojure | Have search engines ignore everything but the home page | (ns safepaste.home
(:require [safepaste.css :as css]
[hiccup.page :as page]))
(def default-expiry "day")
(defn render [id request]
(let [placeholder "Enter your paste here…"]
(page/html5
[:head
(when (not-empty id)
[:meta {:name "robots" :content "noindex"}])
[:style (... |
bea1833f3f67cb47c0552400d49a6623bb343a68dd9fa1a4deb006d6f3d9fb01 | ghc/ghc | T21605d.hs | module T21605d where
f (x :: Prelude.id) = x | null | https://raw.githubusercontent.com/ghc/ghc/b3be0d185b6e597fa517859430cf6d54df04ca46/testsuite/tests/rename/should_fail/T21605d.hs | haskell | module T21605d where
f (x :: Prelude.id) = x | |
4062757df1cbd35e3fc53676ed1187ffc2325cec9878aed779b50ec3f78f544a | iskandr/parakeet-retired | Int.ml | open BaseCommon
module IntOrd = struct
type t = int
let compare = compare
end
include IntOrd
module Map = BaseMap.Make(IntOrd)
module Set = BaseSet.Make(IntOrd)
module Graph = Graph.Make(IntOrd)
let add = (+)
let sub = (-)
... | null | https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/Base/Int.ml | ocaml | open BaseCommon
module IntOrd = struct
type t = int
let compare = compare
end
include IntOrd
module Map = BaseMap.Make(IntOrd)
module Set = BaseSet.Make(IntOrd)
module Graph = Graph.Make(IntOrd)
let add = (+)
let sub = (-)
... | |
9b3dad6cd3b8b57bd514213079b9d8ecce9461a4cba760bc84af58bb7ae1cd73 | zalando-stups/essentials | api_test.clj | (ns org.zalando.stups.essentials.api-test
(:require [midje.sweet :refer :all]
[clojure.test :refer :all]
[org.zalando.stups.essentials.api :refer :all]
[org.zalando.stups.essentials.test-utils :refer :all]
[clj-http.client :as http]
[org.zalando.stups.friboo... | null | https://raw.githubusercontent.com/zalando-stups/essentials/f61111a0b76e9d90d161abdc6cbe9c280c717edb/test/org/zalando/stups/essentials/api_test.clj | clojure | (ns org.zalando.stups.essentials.api-test
(:require [midje.sweet :refer :all]
[clojure.test :refer :all]
[org.zalando.stups.essentials.api :refer :all]
[org.zalando.stups.essentials.test-utils :refer :all]
[clj-http.client :as http]
[org.zalando.stups.friboo... | |
c607a84214e6b994997725311d37c1af51f1fcda8765c6a7a21167d5cca09e61 | AccelerateHS/accelerate-examples | Config.hs | # LANGUAGE TemplateHaskell #
module Config where
import Data.Label
import System.Console.GetOpt
data Config
= Config
{ _configRandomSize :: Maybe Int
}
$(mkLabels [''Config])
defaults :: Config
defaults = Config Nothing
options :: [OptDescr (Config -> Config)]
options =
[ Option [] ["size"] (ReqArg (set ... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-examples/a973ee423b5eadda6ef2e2504d2383f625e49821/examples/quicksort/Config.hs | haskell | # LANGUAGE TemplateHaskell #
module Config where
import Data.Label
import System.Console.GetOpt
data Config
= Config
{ _configRandomSize :: Maybe Int
}
$(mkLabels [''Config])
defaults :: Config
defaults = Config Nothing
options :: [OptDescr (Config -> Config)]
options =
[ Option [] ["size"] (ReqArg (set ... | |
4624c8a19d824a00a248d38a60d7ca3bd82725d818592c5405ed43309556d86a | making/clj-gae-blank | project.clj | (defproject clj-gae-blank "0.1.1"
:description "a blank project for clojure on GAE"
:repositories {"maven.seasar.org" ""}
:dependencies [[org.clojure/clojure "1.1.0"]
[org.clojure/clojure-contrib "1.1.0"]
[compojure "0.4.0"]
[am.ik/clj-gae-ds "0.2.1"]
... | null | https://raw.githubusercontent.com/making/clj-gae-blank/45b7b702cbfb2f83fc9ad1d7836d06e2a6b953f6/project.clj | clojure | (defproject clj-gae-blank "0.1.1"
:description "a blank project for clojure on GAE"
:repositories {"maven.seasar.org" ""}
:dependencies [[org.clojure/clojure "1.1.0"]
[org.clojure/clojure-contrib "1.1.0"]
[compojure "0.4.0"]
[am.ik/clj-gae-ds "0.2.1"]
... | |
77d1d7ff6584e1379f63b8a26494258ffcca0fc47d08a8c8c2f4485e2bbaf73b | hdevtools/hdevtools | Info.hs | # LANGUAGE CPP #
{-# LANGUAGE RankNTypes #-}
module Info
( getIdentifierInfo
, getType
) where
import Data.Generics (GenericQ, mkQ, extQ, gmapQ)
import Data.List (find, sortBy, intersperse)
import Data.Maybe (catMaybes, fromMaybe)
import Data.Typeable (Typeable)
import MonadUtils (liftIO)
import qualified ... | null | https://raw.githubusercontent.com/hdevtools/hdevtools/a866f017b74f4b27fabda0861f635da82e43d9fe/src/Info.hs | haskell | # LANGUAGE RankNTypes #
----------------------------------------------------------------------------
Most of the following code was taken from the source code of 'ghc-mod' (with
some stylistic changes)
/~kazu/proj/ghc-mod/
-yamamoto/ghc-mod/
-----------------------------------------------------------------... | # LANGUAGE CPP #
module Info
( getIdentifierInfo
, getType
) where
import Data.Generics (GenericQ, mkQ, extQ, gmapQ)
import Data.List (find, sortBy, intersperse)
import Data.Maybe (catMaybes, fromMaybe)
import Data.Typeable (Typeable)
import MonadUtils (liftIO)
import qualified CoreUtils
import qualified D... |
12586281362729d14a9a4a102215fa153bc71b9704da2373b09a0ae968edcf0c | hidaris/thinking-dumps | 2-5.rkt | #lang eopl
;;; A data-structure representation of environments
;;; Env = (empty-env) | (extend-env Var SchemeVal Env)
;;; Var = Sym
;;; empty-env : () -> Env
(define empty-env
(lambda ()'()))
extend - env : SchemeVal x Env - > Env
(define extend-env
(lambda (var val env)
(cons `(,var ,val) env)))
;;; ap... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/eopl-solutions/chap2/2-5.rkt | racket | A data-structure representation of environments
Env = (empty-env) | (extend-env Var SchemeVal Env)
Var = Sym
empty-env : () -> Env
apply-env : Env x Var -> SchemeVal | #lang eopl
(define empty-env
(lambda ()'()))
extend - env : SchemeVal x Env - > Env
(define extend-env
(lambda (var val env)
(cons `(,var ,val) env)))
(define apply-env
(lambda (env search-var)
(cond
((null? env)
(report-no-binding-found search-var))
((and (pair? env) (pair? (ca... |
4bcb40aa3fc9a9bed3f3c7ad8998968721131137ffb4e3d1b1b36f05885e2b7a | eholk/harlan | specialize-string-equality.scm | (library
(harlan middle specialize-string-equality)
(export specialize-string-equality)
(import (rnrs)
(nanopass)
(harlan middle languages M9))
(define (type-of e)
(nanopass-case
(M9.3 Expr) e
((int ,i) 'int)
((bool ,b) 'bool)
((var ,t ,x) t)
((call (var (fn (... | null | https://raw.githubusercontent.com/eholk/harlan/3afd95b1c3ad02a354481774585e866857a687b8/harlan/middle/specialize-string-equality.scm | scheme | (library
(harlan middle specialize-string-equality)
(export specialize-string-equality)
(import (rnrs)
(nanopass)
(harlan middle languages M9))
(define (type-of e)
(nanopass-case
(M9.3 Expr) e
((int ,i) 'int)
((bool ,b) 'bool)
((var ,t ,x) t)
((call (var (fn (... | |
48c083eb11077110fe1bf7a3b3e6402c5d161d7b9dc48d26ef626e4356847802 | TorXakis/TorXakis | HelperToSMT.hs |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
module HelperToSMT
where
import Data.Ch... | null | https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/solve/test/HelperToSMT.hs | haskell |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
module HelperToSMT
where
import Data.Ch... | |
713baab36683474a03d82e7670333e513d1e29743c41fc6e114c8cf652d66aeb | tov/dssl2 | comment.rkt | #lang racket/base
(provide do-comment
do-uncomment
do-toggle-comment)
(require "line-summary.rkt"
"editor-helpers.rkt"
(only-in racket/class send))
(define *indent-size* 4)
text% ( [ listof Line - summary ] ) - >
(define (do-toggle-comment text [summaries (summarize-span text)]... | null | https://raw.githubusercontent.com/tov/dssl2/105d18069465781bd9b87466f8336d5ce9e9a0f3/private/drracket/comment.rkt | racket | #lang racket/base
(provide do-comment
do-uncomment
do-toggle-comment)
(require "line-summary.rkt"
"editor-helpers.rkt"
(only-in racket/class send))
(define *indent-size* 4)
text% ( [ listof Line - summary ] ) - >
(define (do-toggle-comment text [summaries (summarize-span text)]... | |
e865b17a3534f6368c331ee4bfb1cfb65edf7b30ea5280cb64a24fc85c43789b | may-liu/qtalk | http_muc_session.erl | -module(http_muc_session).
-include("ejabberd.hrl").
-include("logger.hrl").
-include("http_req.hrl").
-include("jlib.hrl").
-export([clean_session_list/1,make_muc_presence/0,update_user_presence_a/4,update_user_presence_a/5,update_pg_muc_register/3,kick_muc_user/2]).
-export([remove_presence_a/4,get_value/3,delete_u... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/http_muc_session.erl | erlang | ok. | -module(http_muc_session).
-include("ejabberd.hrl").
-include("logger.hrl").
-include("http_req.hrl").
-include("jlib.hrl").
-export([clean_session_list/1,make_muc_presence/0,update_user_presence_a/4,update_user_presence_a/5,update_pg_muc_register/3,kick_muc_user/2]).
-export([remove_presence_a/4,get_value/3,delete_u... |
872ebcfc37106017f085c7877e1066c02ac9315ac18f219c8e33c2f47428c3da | shirok/Gauche | skew-list.scm | ;;;
;;; data.skew-list - Skewed Binary Random Access List
;;;
Copyright ( c ) 2019 - 2022 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistributions of source code must r... | null | https://raw.githubusercontent.com/shirok/Gauche/b773899dbe0b2955e1c4f1daa066da874070c1e4/lib/data/skew-list.scm | scheme |
data.skew-list - Skewed Binary Random Access List
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and th... | Copyright ( c ) 2019 - 2022 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
Implements SkewList as described in
: ... |
54d6598512b0d12ca89e2d3395df84ad25251a4dcdefcd259c5b349cb5f0c197 | gfour/gic | LAR.hs | -- | Implementation with lazy activation records (LARs), C back-end.
--
-- The main module that compiles the LAR language to C code.
--
-- Memory allocation:
--
( 1 ) The stack is used for C function calls ( trivially ) and calls that
-- escape analysis shows they can allocate their LAR on the stack.
--
... | null | https://raw.githubusercontent.com/gfour/gic/d5f2e506b31a1a28e02ca54af9610b3d8d618e9a/SLIC/LAR/LAR.hs | haskell | | Implementation with lazy activation records (LARs), C back-end.
The main module that compiles the LAR language to C code.
Memory allocation:
escape analysis shows they can allocate their LAR on the stack.
activation records.
| Compiles a program to C, given the variable types and the compi... | ( 1 ) The stack is used for C function calls ( trivially ) and calls that
( 2 ) A second memory area is allocated in the heap for the rest of the
module SLIC.LAR.LAR (compileModL, createSemiGCARInfra,
declarationsBuiltins, epilogue,
genInitMod, headersC, macrosC, main... |
edb10397bb4c91fb23dc61c3fb662d2db5c641c862b3a1884b490b6737e68d32 | ghc/packages-Cabal | setup-reexport.test.hs | import Test.Cabal.Prelude
-- Test that we can resolve a module name ambiguity when reexporting
-- by explicitly specifying what package we want.
main = setupAndCabalTest $ do
skipUnless =<< ghcVersionIs (>= mkVersion [7,9])
withPackageDb $ do
withDirectory "p" $ setup_install []
withDirectory "q... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/Ambiguity/setup-reexport.test.hs | haskell | Test that we can resolve a module name ambiguity when reexporting
by explicitly specifying what package we want. | import Test.Cabal.Prelude
main = setupAndCabalTest $ do
skipUnless =<< ghcVersionIs (>= mkVersion [7,9])
withPackageDb $ do
withDirectory "p" $ setup_install []
withDirectory "q" $ setup_install []
withDirectory "reexport" $ setup_install []
withDirectory "reexport-test" $ do
... |
7f63942b9f7dd76a84ed3156b8b6087aa3b3e4c0719bd5ba130fc64b7cce6d22 | sbcl/sbcl | move.lisp | the ARM VM definition of operand loading / saving and the Move VOP
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The softw... | null | https://raw.githubusercontent.com/sbcl/sbcl/7d26a6a80cfc290ac044b98f20c1f211048c10e8/src/compiler/arm64/move.lisp | lisp | more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
This is a FIXNUM, as IMMEDIATE-CONSTANT-SC only
accepts integers if they are FIXNUMs.
frame for argument or known value passing.
Load the s... | the ARM VM definition of operand loading / saving and the Move VOP
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB-VM")
(defun load-immediate-word (y val ... |
df711dadbccef83b7b298c1e5a1a10fcefec120db8e3cee099533858aadf2e82 | timbod7/haskell-chart | Bars.hs | -----------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.Chart.Plot.Bars
Copyright : ( c ) 2006 , 2014
-- License : BSD-style (see chart/COPYRIGHT)
--
-- Bar Charts
--
# LANGUAGE TemplateHaskell #
module Graphics.Rendering.Chart.Plot.Bars(
... | null | https://raw.githubusercontent.com/timbod7/haskell-chart/8c5a823652ea1b4ec2adbced4a92a8161065ead6/chart/Graphics/Rendering/Chart/Plot/Bars.hs | haskell | ---------------------------------------------------------------------------
|
Module : Graphics.Rendering.Chart.Plot.Bars
License : BSD-style (see chart/COPYRIGHT)
Bar Charts
^ Bars for a fixed x are stacked vertically
on top of each other.
^ Bars for a fixed x are put horizontally
beside each ... | Copyright : ( c ) 2006 , 2014
# LANGUAGE TemplateHaskell #
module Graphics.Rendering.Chart.Plot.Bars(
PlotBars(..),
PlotBarsStyle(..),
PlotBarsSpacing(..),
PlotBarsAlignment(..),
BarsPlotValue(..),
plotBars,
plot_bars_style,
plot_bars_item_styles,
plot_bars_titles,
plo... |
ac366cd24fe6c6d26041a91b3b14a48f6c401e1a6933a5fc525e1140659bba5f | malcolmsparks/clj-logging-config | test_log4j.clj | clj - logging - config - Logging configuration for Clojure .
by
Copyright ( c ) . All rights reserved .
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
;... | null | https://raw.githubusercontent.com/malcolmsparks/clj-logging-config/d474a3cda79890bd8a8d41edb51f7c1b2ec40523/src/test/clojure/clj_logging_config/log4j/test_log4j.clj | clojure | 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 this notice, or any other, from this
software.
should) make use of functionality that ... | clj - logging - config - Logging configuration for Clojure .
by
Copyright ( c ) . All rights reserved .
The use and distribution terms for this software are covered by the Eclipse
(ns clj-logging-config.log4j.test-log4j
(:use clojure.test
clojure.tools.logging
clj-logging-config.log4j)... |
a3f08289510287dc8d22ecd13d8f1e13455ea53dda497c8cabab06bd43f74351 | openmusic-project/openmusic | cocoa.lisp | -*- Mode : Lisp ; rcs - header : " $ Header : /hope / lwhope1 - cam / hope.0 / compound/61 / LISPopengl / RCS / cocoa.lisp , v 1.8.2.2 2021/11/22 20:35:11 " -*-
Copyright ( c ) 1987 - -2021 LispWorks Ltd. All rights reserved .
Support for OpenGL with CAPI / Cocoa .
;; Symbols in the CAPI-COCOA-LIB package ar... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/02d1ffa81d096df1006c38c145918480f1b78065/OPENMUSIC/code/api/externals/OpenGL/opengl-lw/cocoa.lisp | lisp | rcs - header : " $ Header : /hope / lwhope1 - cam / hope.0 / compound/61 / LISPopengl / RCS / cocoa.lisp , v 1.8.2.2 2021/11/22 20:35:11 " -*-
Symbols in the CAPI-COCOA-LIB package are not part of a supported API.
Invoking setView here does not work for some reason so do it in
%start-rendering using the set-view... |
Copyright ( c ) 1987 - -2021 LispWorks Ltd. All rights reserved .
Support for OpenGL with CAPI / Cocoa .
(in-package "OPENGL")
(defun opengl-pane-representation-view (rep)
(capi-cocoa-lib::representation-main-view rep))
(defstruct cocoa-context
context
pixel-format
set-view)
(defmethod %make-context (... |
5dd1f57e5368f6b080095e3e0b83c6ddd626a3135082a19032465ec876026587 | sharkdp/yinsh | Floyd.hs | | Simply the best AI for Yinsh , seriously .
module Floyd ( aiFloyd
, mhNumber
, rhRingMoves
, rhConnected
, rhControlledMarkers
, rhCombined
, rhZero
)
where
import AI
import Yinsh
TODO : adjust numbers : 5 , 10
floyd... | null | https://raw.githubusercontent.com/sharkdp/yinsh/8139baf6a0dc7d1fc8a07b152b6c6420694e3108/src/Floyd.hs | haskell | active player. | | Simply the best AI for Yinsh , seriously .
module Floyd ( aiFloyd
, mhNumber
, rhRingMoves
, rhConnected
, rhControlledMarkers
, rhCombined
, rhZero
)
where
import AI
import Yinsh
TODO : adjust numbers : 5 , 10
floyd... |
7727943a0156ea6f4e3b481e56cbd1ffe116600e61b93c4674fe9277bd2a8d2a | den1k/vimsical | views.cljs | (ns vimsical.frontend.landing.views
(:require [vimsical.frontend.views.icons :as icons]
[vimsical.frontend.ui.views :as ui.views]
[vimsical.frontend.util.dom :refer-macros [e>]]
[goog.net.XhrIo]
[reagent.core :as reagent]
[vimsical.common.util.core :as util]... | null | https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/src/frontend/vimsical/frontend/landing/views.cljs | clojure |
* Waitlist Form
handling as success also, b/c we're getting
an error even tough the email gets logged
Wrappers
temp
temp
Video Player
:auto-play false
necessary to autoplay on iOS
but seeming not currently supported in react
:plays-inline true
Scroll Player
Landing Sections
"You do the work, we m... | (ns vimsical.frontend.landing.views
(:require [vimsical.frontend.views.icons :as icons]
[vimsical.frontend.ui.views :as ui.views]
[vimsical.frontend.util.dom :refer-macros [e>]]
[goog.net.XhrIo]
[reagent.core :as reagent]
[vimsical.common.util.core :as util]... |
8fdf77eafc6e1e3688c4572d8804b5218f4afb4b7460c15c85f6280e58ee6960 | VisionsGlobalEmpowerment/webchange | views.cljs | (ns webchange.ui.components.panel.views
(:require
[reagent.core :as r]
[webchange.ui.components.available-values :as available-values]
[webchange.ui.components.icon.views :refer [system-icon]]
[webchange.ui.utils.get-class-name :refer [get-class-name]]))
(defn panel
[{:keys [class-name class-name-c... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/e5747e187937d85e9c92c728d52a704f323f00ef/src/cljs/webchange/ui/components/panel/views.cljs | clojure | (ns webchange.ui.components.panel.views
(:require
[reagent.core :as r]
[webchange.ui.components.available-values :as available-values]
[webchange.ui.components.icon.views :refer [system-icon]]
[webchange.ui.utils.get-class-name :refer [get-class-name]]))
(defn panel
[{:keys [class-name class-name-c... | |
24b852d41c60bd1461d318489e49eb3387e9d52809409bd3f19abae4e3aaffd8 | KavehYousefi/Esoteric-programming-languages | main.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Line numbering
;; ==============
;; Yielded as a conjecture by perusal of the infinite loop example,
instructions are enumerated starting at one ( 1 ) ; a fact endowed with
;; pertinence in regard to the goto or jump command "^".
;;
;; C... | null | https://raw.githubusercontent.com/KavehYousefi/Esoteric-programming-languages/39ae5aaa27c8949fe4b64190b81c21501da5b783/Xaxa/Xaxa_001/main.lisp | lisp |
Line numbering
==============
Yielded as a conjecture by perusal of the infinite loop example,
a fact endowed with
pertinence in regard to the goto or jump command "^".
Confrontend with a deficiency regarding the behavior of a goto
adjudgment have been concluded that an infringement upon the lower
the prog... | destination outside of the range [ 1 , number_of_instructions ] , the
bound , that is , a destination less than or equal to zero , shall
default to one ( 1 ) , whereas a contralateral transgression terminates
Author :
Date : 2022 - 05 - 28
(deftype command ()
"The ``command'' type enumerates the re... |
a5120fcb9814785915ea5b1662dcd126ee1d84e098cdd0839a6f657622fe9824 | xapi-project/xen-api | xen_api_lwt_unix.mli |
* Copyright ( C ) 2012 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in fi... | null | https://raw.githubusercontent.com/xapi-project/xen-api/5c2fb7b8de6b511cf17f141f3d03895c6d767b55/ocaml/xen-api-client/lwt/xen_api_lwt_unix.mli | ocaml | * [make ?timeout uri] returns an 'rpc' function which can be
passed to Client.* functions
* [make ?timeout uri] returns an 'rpc' function which can be
passed to Client.* functions |
* Copyright ( C ) 2012 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in fi... |
f98130ffb848291f844065a600018c06ae101abf0f60cd0ab2e8cb3c1529dea1 | Eduap-com/WordMat | dcpose.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $... | null | https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/hompack/lisp/dcpose.lisp | lisp | Compiled by f2cl version:
Using Lisp CMU Common Lisp snapshot-2020-04 (21D Unicode)
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl6.l , v 1d5cbacbb9... |
76e1ba35a6e3676a405e3cd1a756519f28b8f2cea7ee101a76eb5153b5f42c29 | sru-systems/protobuf-simple | DoubleListPacked.hs | -- Generated by protobuf-simple. DO NOT EDIT!
module Types.DoubleListPacked where
import Control.Applicative ((<$>))
import Prelude ()
import qualified Data.ProtoBufInt as PB
newtype DoubleListPacked = DoubleListPacked
{ value :: PB.Seq PB.Double
} deriving (PB.Show, PB.Eq, PB.Ord)
instance PB.Default DoubleList... | null | https://raw.githubusercontent.com/sru-systems/protobuf-simple/ee0f26b6a8588ed9f105bc9ee72c38943133ed4d/test/Types/DoubleListPacked.hs | haskell | Generated by protobuf-simple. DO NOT EDIT! | module Types.DoubleListPacked where
import Control.Applicative ((<$>))
import Prelude ()
import qualified Data.ProtoBufInt as PB
newtype DoubleListPacked = DoubleListPacked
{ value :: PB.Seq PB.Double
} deriving (PB.Show, PB.Eq, PB.Ord)
instance PB.Default DoubleListPacked where
defaultVal = DoubleListPacked
... |
aae61df78ad8bc2e486b72384ae2657ea1afc3a4039d267491e76e4d940b751f | glutamate/bugpan | PlotGnuplot.hs | # LANGUAGE GeneralizedNewtypeDeriving , FlexibleInstances , ExistentialQuantification #
# LANGUAGE TypeOperators , FlexibleContexts , GADTs , ScopedTypeVariables , DeriveDataTypeable #
module PlotGnuplot where
import EvalM
import System.IO
import System.Cmd
import System.Exit
--import Math.Probably.FoldingStats hidin... | null | https://raw.githubusercontent.com/glutamate/bugpan/d0983152f5afce306049262cba296df00e52264b/PlotGnuplot.hs | haskell | import Math.Probably.FoldingStats hiding (F)
print pid
-> [String] {-^ Options for gnuplot -}
-> [String] {-^ Options for gnuplot -}
quote s =
end of theft
histArr :: (Int,Int) -> [Double] -> UArray Int Double
removeFile "/tmp/gnuplotCmds"
crop\n"
:
: PcntDiv b
newtype Dashed a = Dashed {unDashed :: a }
: b)... | # LANGUAGE GeneralizedNewtypeDeriving , FlexibleInstances , ExistentialQuantification #
# LANGUAGE TypeOperators , FlexibleContexts , GADTs , ScopedTypeVariables , DeriveDataTypeable #
module PlotGnuplot where
import EvalM
import System.IO
import System.Cmd
import System.Exit
import Control.Monad
import Data.Unique
i... |
e9e7c52971a2e36e294f66337adf53ea7ae1133c7288c89c447d04116aa8b720 | dongcarl/guix | gnome.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2017 , 2019 , 2021 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/guix/import/gnome.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2017 , 2019 , 2021 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix import gnome)
#:use-module (guix upstream)
#:use-module (guix utils)
#:us... |
1386a984eb2406c02bc67c77ac3c1cd3c8b7019f92df2bf538fd19d5a8371ad4 | tmcgilchrist/ocaml-gitlab | runner.ml | open Cmdliner
open Config
let envs = Gitlab.Env.envs
let json =
let doc = "Print output as formatted json" in
Arg.(value & flag & info [ "json" ] ~doc)
let list_cmd config =
let pp f r =
Fmt.pf f "%-20i %-20s" r.Gitlab_j.runner_id r.Gitlab_j.runner_description
in
let printer runners json =
if json ... | null | https://raw.githubusercontent.com/tmcgilchrist/ocaml-gitlab/de4d1cc31d172e599943fe712269f165f1c88909/cli/runner.ml | ocaml | open Cmdliner
open Config
let envs = Gitlab.Env.envs
let json =
let doc = "Print output as formatted json" in
Arg.(value & flag & info [ "json" ] ~doc)
let list_cmd config =
let pp f r =
Fmt.pf f "%-20i %-20s" r.Gitlab_j.runner_id r.Gitlab_j.runner_description
in
let printer runners json =
if json ... | |
a6d88e1ecae12b774fb1c03c793465804bfecdd899d7fc8cd952f44a9ac73023 | lexi-lambda/racket-commonmark | pro-git.rkt | #lang racket/base
;; This module benchmarks commonmark against markdown, using an input corpus
derived by concatenating the sources of all the localizations of the
first edition of by . ( This is the benchmarking technique
used by cmark < > . )
(require benchmark
net/git-checkout
racket/... | null | https://raw.githubusercontent.com/lexi-lambda/racket-commonmark/1d7f1d5fc70bedfbe201c2e794da69dc7afe6e63/commonmark-bench/benchmarks/commonmark/pro-git.rkt | racket | This module benchmarks commonmark against markdown, using an input corpus | #lang racket/base
derived by concatenating the sources of all the localizations of the
first edition of by . ( This is the benchmarking technique
used by cmark < > . )
(require benchmark
net/git-checkout
racket/file
racket/format
racket/list
racket/match
... |
8a965d8e19699d6c4d736daa7f9c255fe8a2e1c90a7bd03053943e9776bb449e | LexiFi/landmarks | test.ml | let _ =
let[@landmark] test1 x = x
in test1 "marc", test1 2
let _ =
let[@landmark] test2 (type t) (x : t) = x
in test2 "marc", test2 2
let _ =
let obj = object method[@landmark] test3 x = x end
in obj # test3 "marc", obj # test3 2
let () =
let open Landmark in
if profiling () then begin
let open ... | null | https://raw.githubusercontent.com/LexiFi/landmarks/ea90c657f39d03d14d892732ad58123711eb9457/tests/poly/test.ml | ocaml | let _ =
let[@landmark] test1 x = x
in test1 "marc", test1 2
let _ =
let[@landmark] test2 (type t) (x : t) = x
in test2 "marc", test2 2
let _ =
let obj = object method[@landmark] test3 x = x end
in obj # test3 "marc", obj # test3 2
let () =
let open Landmark in
if profiling () then begin
let open ... | |
cb5e9b376f7098ed7f81952434e38bf65c67779994c714ddf43fa334cde24ed5 | spurious/sagittarius-scheme-mirror | %3a49.scm | ;;; -*- Scheme -*-
;;;
;;; SRFI-49: Indentation-sensitive syntax
;;;
Copyright ( c ) 2010 - 2012 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistributions of sou... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/srfi/%253a49.scm | scheme | -*- Scheme -*-
SRFI-49: Indentation-sensitive syntax
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of condi... | Copyright ( c ) 2010 - 2012 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(library (srfi :49)
(export group
... |
2499cab68ef6959966ce87f15c452d30bfac2f94a6089e09c1d7fb5097cffb2c | jayunit100/RudolF | mysqlscript.clj | ;(ns src.dojo.mysqlscript)
(import java.io.File)
(use 'clojure.stacktrace)
(defn read-dir
"String -> [String]"
[string]
(map #(.getAbsolutePath %)
(.listFiles (File. string))))
(defn make-command
"String -> MySQL String"
[filename]
(str "load data local infile '" filename "' into table assigne... | null | https://raw.githubusercontent.com/jayunit100/RudolF/8936bafbb30c65c78b820062dec550ceeea4b3a4/dojo/src/dojo/mysqlscript.clj | clojure | (ns src.dojo.mysqlscript) |
(import java.io.File)
(use 'clojure.stacktrace)
(defn read-dir
"String -> [String]"
[string]
(map #(.getAbsolutePath %)
(.listFiles (File. string))))
(defn make-command
"String -> MySQL String"
[filename]
(str "load data local infile '" filename "' into table assignedshifts;\n"))
(defn make-... |
74e006bd99fbd126a4fd69744486ea7e601b1db96a87bb6700c80e852df72f84 | tomgr/libcspm | Prelude.hs | | This module contains all the builtin definitions for the input CSPM
-- language.
{-# LANGUAGE OverloadedStrings #-}
module CSPM.Prelude (
BuiltIn(..),
builtins,
builtInName,
builtInWithName,
transparentFunctionForOccName,
externalFunctionForOccName,
locatedBuiltins,
)
where
import qual... | null | https://raw.githubusercontent.com/tomgr/libcspm/24d1b41954191a16e3b5e388e35f5ba0915d671e/src/CSPM/Prelude.hs | haskell | language.
# LANGUAGE OverloadedStrings #
the set. In particular, the following all allow holes to be punched
through the type checker and process values to be compared. For
P == STOP. | | This module contains all the builtin definitions for the input CSPM
module CSPM.Prelude (
BuiltIn(..),
builtins,
builtInName,
builtInWithName,
transparentFunctionForOccName,
externalFunctionForOccName,
locatedBuiltins,
)
where
import qualified Data.ByteString.Char8 as B
import qualifie... |
1d5c5cdc29696e4118d7889a0ec60e797d918423f3b27fd2dd649b6ca25cc327 | maximk/zergling | toppage_handler.erl | -module(toppage_handler).
-export([init/3]).
-export([handle/2,terminate/3]).
init({tcp,http}, Req, []) ->
TsProxyReceived = zergling_app:timestamp(),
keeper ! {get,self()},
OtherVars = receive {vars,X} -> X end,
TsReqReceived = proplists:get_value(ts_req_received, OtherVars),
TsLingStarted = proplists:get_val... | null | https://raw.githubusercontent.com/maximk/zergling/0e45a9bd401543f187f2a33ef764576ade3686ac/src/toppage_handler.erl | erlang | never reached
A single request per instance | -module(toppage_handler).
-export([init/3]).
-export([handle/2,terminate/3]).
init({tcp,http}, Req, []) ->
TsProxyReceived = zergling_app:timestamp(),
keeper ! {get,self()},
OtherVars = receive {vars,X} -> X end,
TsReqReceived = proplists:get_value(ts_req_received, OtherVars),
TsLingStarted = proplists:get_val... |
7df6d2d1523c9290fd74acd89b1cbd41d51dcf96f870ab5dfb40f19935073168 | ucsd-progsys/dsolve | common.ml |
* Copyright © 2008 The Regents of the University of California . All rights reserved .
*
* Permission is hereby granted , without written agreement and without
* license or royalty fees , to use , copy , modify , and distribute this
* software and its documentation for any purpose , provided that the
... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/typing/common.ml | ocaml | ^ string_of_int (get_unique ()))
**************************************************************
************ Output levels ***********************************
**************************************************************
verbosity levels by purpose
must be > ol_dquals
**********************************************... |
* Copyright © 2008 The Regents of the University of California . All rights reserved .
*
* Permission is hereby granted , without written agreement and without
* license or royalty fees , to use , copy , modify , and distribute this
* software and its documentation for any purpose , provided that the
... |
f571e55cc7903930dbc50f94cb21c46f28f2d576fc759acb1823f33c2a71dc19 | eguven/erlsna | gatekeeper.erl | -module(gatekeeper).
-behaviour(gen_server).
-export([start_gatekeeper/0, add_agent/2, remove_agent/1, clean/0, agent_exists/1,
find_agent/1, find_multi/1, all_agents/0, all_agents/1, all_relations/0]).
-export([start_link/0]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_ch... | null | https://raw.githubusercontent.com/eguven/erlsna/ec82682db69f29cb0eeef65471773519f0176340/src/gatekeeper.erl | erlang | ---------------------------------------------------------------------
Description module gatekeeper
---------------------------------------------------------------------
Gatekeeper is a gen_server process responsible of doing record
---------------------------------------------------------------------
to start gatek... | -module(gatekeeper).
-behaviour(gen_server).
-export([start_gatekeeper/0, add_agent/2, remove_agent/1, clean/0, agent_exists/1,
find_agent/1, find_multi/1, all_agents/0, all_agents/1, all_relations/0]).
-export([start_link/0]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_ch... |
7a4eb749aaa78f10aed4aa3809a490cdf0cc050273c3fff448a3b1f6a1474776 | pa-ba/compdata | HOAS.hs | # LANGUAGE
TemplateHaskell ,
MultiParamTypeClasses ,
FlexibleInstances ,
FlexibleContexts ,
UndecidableInstances ,
TypeOperators ,
ScopedTypeVariables ,
TypeSynonymInstances #
TemplateHaskell,
MultiParamTypeClasses,
FlexibleInstances,
FlexibleContexts,
UndecidableInstances,
T... | null | https://raw.githubusercontent.com/pa-ba/compdata/5783d0e11129097e045cabba61643114b154e3f2/benchmark/Functions/Comp/HOAS.hs | haskell | # LANGUAGE
TemplateHaskell ,
MultiParamTypeClasses ,
FlexibleInstances ,
FlexibleContexts ,
UndecidableInstances ,
TypeOperators ,
ScopedTypeVariables ,
TypeSynonymInstances #
TemplateHaskell,
MultiParamTypeClasses,
FlexibleInstances,
FlexibleContexts,
UndecidableInstances,
T... | |
409cd2c082767c311f36cc0298a27b06495b573d15d0643879b9fb41312ad6ef | chef/mixer | import_test.erl | -module(import_test).
-include_lib("eunit/include/eunit.hrl").
-define(EXPORTS(Mod), Mod:module_info(exports)).
single_test_() ->
[{<<"All functions on 'single' stubbed properly">>,
[?_assert(lists:member({doit, 0}, ?EXPORTS(single))),
?_assert(lists:member({doit, 1}, ?EXPORTS(single))),
?_asser... | null | https://raw.githubusercontent.com/chef/mixer/0d1322433e7e2237eb1270dc5a028fa014335134/test/import_test.erl | erlang | -module(import_test).
-include_lib("eunit/include/eunit.hrl").
-define(EXPORTS(Mod), Mod:module_info(exports)).
single_test_() ->
[{<<"All functions on 'single' stubbed properly">>,
[?_assert(lists:member({doit, 0}, ?EXPORTS(single))),
?_assert(lists:member({doit, 1}, ?EXPORTS(single))),
?_asser... | |
9f045d52030a5749bc4a5e3d4cf6ba111f2d8ebf8bb1fe9dd7fbd9e8977cd54e | tweag/ormolu | Module.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
-- | Rendering of modules.
module Ormolu.Printer.Meat.Module
( p_hsModule,
)
where
import Control.Monad
import GHC.Hs hiding (comment)
import GHC.Types.SrcLoc
import Ormolu.Parser.CommentStream
import Ormolu.Parser.Pragma
impo... | null | https://raw.githubusercontent.com/tweag/ormolu/54642a7966d1d0787ba84636a2eb52f6729f600e/src/Ormolu/Printer/Meat/Module.hs | haskell | # LANGUAGE OverloadedStrings #
| Rendering of modules.
| Render a module-like entity (either a regular module or a backpack
signature).
| Stack header
| Pragmas and the associated comments
| AST to print | # LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
module Ormolu.Printer.Meat.Module
( p_hsModule,
)
where
import Control.Monad
import GHC.Hs hiding (comment)
import GHC.Types.SrcLoc
import Ormolu.Parser.CommentStream
import Ormolu.Parser.Pragma
import Ormolu.Printer.Combinators
import Ormolu.Printer.Comments
i... |
0893769a9dc94a8c7c2dd4c7299b08fde307ab2e63c799952b094538aec361dc | MinaProtocol/mina | transaction_validator.ml | open Base
open Mina_base
module Ledger = Mina_ledger.Ledger
let within_mask l ~f =
let mask =
Ledger.register_mask l (Ledger.Mask.create ~depth:(Ledger.depth l) ())
in
let r = f mask in
if Result.is_ok r then Ledger.commit mask ;
ignore
(Ledger.unregister_mask_exn ~loc:Caml.__LOC__ mask : Ledger.unat... | null | https://raw.githubusercontent.com/MinaProtocol/mina/57e2ea1b87fe1a24517e1c62f51cc59fe9bc87cd/src/lib/transaction_snark/transaction_validator.ml | ocaml | open Base
open Mina_base
module Ledger = Mina_ledger.Ledger
let within_mask l ~f =
let mask =
Ledger.register_mask l (Ledger.Mask.create ~depth:(Ledger.depth l) ())
in
let r = f mask in
if Result.is_ok r then Ledger.commit mask ;
ignore
(Ledger.unregister_mask_exn ~loc:Caml.__LOC__ mask : Ledger.unat... | |
a0b803ad4ed95e0e61bf3cc094da00954d3ad8332215438daa15b0d5c4b7cd25 | kitlang/kit | Toolchain.hs | module Kit.Toolchain (
module Kit.Toolchain.CCompiler,
) where
import Kit.Toolchain.CCompiler
| null | https://raw.githubusercontent.com/kitlang/kit/2769a7a8e51fe4466c50439d1a1ebdad0fb79710/src/Kit/Toolchain.hs | haskell | module Kit.Toolchain (
module Kit.Toolchain.CCompiler,
) where
import Kit.Toolchain.CCompiler
| |
8dcad3d05ba2f371d88a18cdff7708b7eef44feb65a5b67bf9d89b33350ad013 | askvortsov1/nittany_market | csv.ml | module LoadCsv (M : Models.Model_intf.Model) = struct
let load ?(transform = fun x -> x) file_name
(module Db : Caqti_lwt.CONNECTION) =
let module CsvUtil = Csvfields.Csv.Record (M) in
let module Repo = Models.Model_intf.Make_ModelRepository (M) in
let data = CsvUtil.csv_load file_name in
Lwt_li... | null | https://raw.githubusercontent.com/askvortsov1/nittany_market/08ffcad2bb2ead9aaeb85b22b88aa2af879e36ad/lib/csv.ml | ocaml | module LoadCsv (M : Models.Model_intf.Model) = struct
let load ?(transform = fun x -> x) file_name
(module Db : Caqti_lwt.CONNECTION) =
let module CsvUtil = Csvfields.Csv.Record (M) in
let module Repo = Models.Model_intf.Make_ModelRepository (M) in
let data = CsvUtil.csv_load file_name in
Lwt_li... | |
2781454b81adf6f1ff73bdfde0e78839b0bb42cf8a98864e808a2fe745fe2e0c | mrkkrp/megaparsec | Megaparsec.hs | {-# LANGUAGE OverloadedStrings #-}
module ParsersBench.CSV.Megaparsec
( parseCSV,
)
where
import Control.Monad
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import Data.Vector (Vector)
import qualified Data.Vector as V
import Data.Void
import Text.Megaparsec
import Text.Megaparsec.Byte... | null | https://raw.githubusercontent.com/mrkkrp/megaparsec/a804c07ff3887c3c60ab41bfb3faa71291ef82dc/parsers-bench/ParsersBench/CSV/Megaparsec.hs | haskell | # LANGUAGE OverloadedStrings #
| Parse a CSV file without conversion of individual records.
to prevent reading empty line at the end of file |
module ParsersBench.CSV.Megaparsec
( parseCSV,
)
where
import Control.Monad
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import Data.Vector (Vector)
import qualified Data.Vector as V
import Data.Void
import Text.Megaparsec
import Text.Megaparsec.Byte
type Parser = Parsec Void ByteStr... |
fe9f80794735e9d2c51be58694acc0a0919cd8895df1122a13fd20bfac78b65f | Quviq/quickcheck-contractmodel | Utils.hs | module Test.QuickCheck.ContractModel.Internal.Utils where
import Test.QuickCheck.ContractModel.Internal.Common
import Data.Map qualified as Map
import Cardano.Api
getTxOuts :: Tx Era -> [TxOut CtxTx Era]
getTxOuts (getTxBody -> TxBody content) = txOuts content
getTxInputs :: Tx Era -> UTxO Era -> [TxOut CtxUTxO Era... | null | https://raw.githubusercontent.com/Quviq/quickcheck-contractmodel/071628000ad391ba6849b4d8407b5375228d235d/quickcheck-contractmodel/src/Test/QuickCheck/ContractModel/Internal/Utils.hs | haskell | module Test.QuickCheck.ContractModel.Internal.Utils where
import Test.QuickCheck.ContractModel.Internal.Common
import Data.Map qualified as Map
import Cardano.Api
getTxOuts :: Tx Era -> [TxOut CtxTx Era]
getTxOuts (getTxBody -> TxBody content) = txOuts content
getTxInputs :: Tx Era -> UTxO Era -> [TxOut CtxUTxO Era... | |
b60d5ad76316a87754d70b15cdd4761e2a0aa25786475d19dea7c2be608a1511 | haroldcarr/learn-haskell-coq-ml-etc | Common.hs | {-# LANGUAGE OverloadedStrings #-}
module Common where
import Data.Attoparsec.ByteString.Char8
import Data.ByteString.Char8 as BSC
parseFully :: Result r -> Either String (String, r)
parseFully r0 = case handlePartial r0 of
Fail u ctxs msg -> Left (BSC.unpack u ++ " " ++ show ctxs +... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/fix-free/2016-01-benjamin-hodgson-parsing-to-free-monads/Common.hs | haskell | # LANGUAGE OverloadedStrings #
tell the parser there is no more input |
module Common where
import Data.Attoparsec.ByteString.Char8
import Data.ByteString.Char8 as BSC
parseFully :: Result r -> Either String (String, r)
parseFully r0 = case handlePartial r0 of
Fail u ctxs msg -> Left (BSC.unpack u ++ " " ++ show ctxs ++ " " ++ msg)
Done u r -> ... |
8f82bf6bfbb13316d1794d5a3f0b9d617ed8feaff38ca3da1eaaa6e529c44c86 | finnishtransportagency/harja | integraatioloki_test.clj | (ns harja.palvelin.integraatiot.integraatioloki-test
(:require [clojure.test :refer [deftest is use-fixtures]]
[com.stuartsierra.component :as component]
[harja.testi :refer :all]
[harja.palvelin.komponentit.tietokanta :as tietokanta]
[harja.palvelin.integraatiot.integr... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/488b1e096f0611e175221d74ba4f2ffed6bea8f1/test/clj/harja/palvelin/integraatiot/integraatioloki_test.clj | clojure | (ns harja.palvelin.integraatiot.integraatioloki-test
(:require [clojure.test :refer [deftest is use-fixtures]]
[com.stuartsierra.component :as component]
[harja.testi :refer :all]
[harja.palvelin.komponentit.tietokanta :as tietokanta]
[harja.palvelin.integraatiot.integr... | |
da56a5cbe94b9e65d073c8375f32078319cf6c115bb4bb95429383eae17d6ba5 | BitGameEN/bitgamex | ecrn_agent.erl | , LLC . All Rights Reserved .
%%%
This file is provided to you under the BSD License ; you may not use
%%% this file except in compliance with the License.
%%%-------------------------------------------------------------------
%%% @doc
%%% Agent for cronish testing
-module(ecrn_agent).
-behaviour(gen_server).
... | null | https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/erlcron/src/ecrn_agent.erl | erlang |
this file except in compliance with the License.
-------------------------------------------------------------------
@doc
Agent for cronish testing
API
gen_server callbacks
===================================================================
Types
=================================================================... | , LLC . All Rights Reserved .
This file is provided to you under the BSD License ; you may not use
-module(ecrn_agent).
-behaviour(gen_server).
-export([start_link/2,
cancel/1,
get_datetime/1,
set_datetime/3,
recalculate/1,
validate/1]).
-export([init/1, handle_call... |
9ce4e00980526fa12a7c0cbbc9ac19574f288f0fa8799f3eb09d7163df5068a8 | SevereOverfl0w/bukkure | blocks.clj | ;; TODO: Check this file manually
(ns bukkure.blocks
(:require [bukkure.logging :as log]
[bukkure.items :as i]
[bukkure.player :as plr]
[bukkure.bukkit :as bk]))
(defn left-face
"Get the face 270deg from the given one. Stays the same for up/down"
[key]
({:up :up, :down :down... | null | https://raw.githubusercontent.com/SevereOverfl0w/bukkure/2091d70191127e617c1a7ce12f1c7b96585f124e/src/bukkure/blocks.clj | clojure | TODO: Check this file manually
If we're negative, do the opposite thing.
to be finished......
(material :air) | (ns bukkure.blocks
(:require [bukkure.logging :as log]
[bukkure.items :as i]
[bukkure.player :as plr]
[bukkure.bukkit :as bk]))
(defn left-face
"Get the face 270deg from the given one. Stays the same for up/down"
[key]
({:up :up, :down :down
:north :east, :east :south
... |
69978b4816dd8722e30ef01c5eda8a599e2faeb84ef146c546838e4b318cd623 | pjotrp/guix | algebra.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 , 2014 , 2015 < >
Copyright © 2013 , 2015 < >
Copyright © 2014 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public Lice... | null | https://raw.githubusercontent.com/pjotrp/guix/96250294012c2f1520b67f12ea80bfd6b98075a2/gnu/packages/algebra.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 , 2013 , 2014 , 2015 < >
Copyright © 2013 , 2015 < >
Copyright © 2014 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages alge... |
57a6cd71bc9166fef3e48528caef4005d5e9544e861d815348c9f5efc39b89ef | omcljs/om | core.cljs | (ns examples.verify.core
(:require [om.core :as om :include-macros true]
[om.dom :as dom :include-macros true]))
(enable-console-print!)
(defn mincase [data owner]
(reify
om/IWillUpdate
(will-update [this next-props next-state]
(.log js/console "om/IWillUpdate invoked"))
om/IRender
... | null | https://raw.githubusercontent.com/omcljs/om/3a1fbe9c0e282646fc58550139b491ff9869f96d/examples/verify/src/core.cljs | clojure | (ns examples.verify.core
(:require [om.core :as om :include-macros true]
[om.dom :as dom :include-macros true]))
(enable-console-print!)
(defn mincase [data owner]
(reify
om/IWillUpdate
(will-update [this next-props next-state]
(.log js/console "om/IWillUpdate invoked"))
om/IRender
... | |
4008ff000ff3d158b264fb830669dd651eee28539bd6d7a36667d9cd1f4ec4e4 | Oblosys/proxima | GrammarInfo.hs | module GrammarInfo where
import SequentialTypes
import CodeSyntax
import Data.Map(Map)
import qualified Data.Map as Map
import Data.Set(Set)
import qualified Data.Set as Set
import CommonTypes
import Data.List(intersect,(\\))
type LMH = (Vertex,Vertex,Vertex)
data Info = Info { tdpToTds :: Table Vertex
... | null | https://raw.githubusercontent.com/Oblosys/proxima/f154dff2ccb8afe00eeb325d9d06f5e2a5ee7589/uuagc/src/GrammarInfo.hs | haskell | module GrammarInfo where
import SequentialTypes
import CodeSyntax
import Data.Map(Map)
import qualified Data.Map as Map
import Data.Set(Set)
import qualified Data.Set as Set
import CommonTypes
import Data.List(intersect,(\\))
type LMH = (Vertex,Vertex,Vertex)
data Info = Info { tdpToTds :: Table Vertex
... | |
d462ed96205a5e66cd9d7409ee8491046a0c169d0a3ac508cf195f05d83006ea | brianhempel/maniposynth | map.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/brianhempel/maniposynth/8c8e72f2459f1ec05fefcb994253f99620e377f3/ocaml-4.07.1/stdlib/map.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
module type OrderedType =
sig
type t
val compare: t -> t -> int
end
module type S =
sig
... |
dcd085bc3df399054e1ee21f59cb8b37ec7f8c4a7bd7d349363289438c8311c8 | skanev/playground | 22.scm | EOPL exercise 3.22
;
; The concrete syntax of this section uses different syntax for a built-in
; operation, such as difference, from a procedure call. Modify the concrete
; syntax so that the user of this language need not know which operations are
; built-in and which are defined procedures. The exercise may range ... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/03/22.scm | scheme |
The concrete syntax of this section uses different syntax for a built-in
operation, such as difference, from a procedure call. Modify the concrete
syntax so that the user of this language need not know which operations are
built-in and which are defined procedures. The exercise may range from very
easy to hard, d... | EOPL exercise 3.22
This is quite annoying using SLLGEN . I 'm doing it with a particularly nasty
(load-relative "cases/proc/env.scm")
(define-datatype expression expression?
(const-exp
(num number?))
(diff-exp
(minuend expression?)
(subtrahend expression?))
(zero?-exp
(expr expression?))
... |
96a7c1909287e05ff8cfc5eb8cbd7b750d06c20d4f138f622de387a59579444c | footprintanalytics/footprint-web | pulse_channel_test.clj | (ns metabase.models.pulse-channel-test
(:require [clojure.test :refer :all]
[medley.core :as m]
[metabase.models.collection :refer [Collection]]
[metabase.models.pulse :refer [Pulse]]
[metabase.models.pulse-channel :as pulse-channel :refer [PulseChannel]]
[m... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/models/pulse_channel_test.clj | clojure | Test out our predicate functions
helper functions
format user details like they would come back for a channel recipient
create a channel then select its details
create-pulse-channel!
should validate even if `:email` isn't specified | (ns metabase.models.pulse-channel-test
(:require [clojure.test :refer :all]
[medley.core :as m]
[metabase.models.collection :refer [Collection]]
[metabase.models.pulse :refer [Pulse]]
[metabase.models.pulse-channel :as pulse-channel :refer [PulseChannel]]
[m... |
7bb55541f35d8ac28a4599d28e4a5439af2a42e7bea1343b28bbecb0948701c7 | TerrorJack/ghc-alter | Internals.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
# LANGUAGE CPP #
{-# OPTIONS_HADDOCK hide #-}
#include "MachDeps.h"
#if WORD_SIZE_IN_BITS == 32
# define WSHIFT 5
# define MMASK 31
#elif WORD_SIZE_IN_BITS == 64
# define WSHIFT 6
# define MMASK 63
#else
# error unsupported WORD_SIZE_IN... | null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/integer-gmp/src/GHC/Integer/Logarithms/Internals.hs | haskell | # OPTIONS_HADDOCK hide #
'wordLog2#' are of general usefulness, the others are only needed
for a fast implementation of 'fromRational'. Since they are needed
up in the docs.
See
for the origin of the code in this module
| Extended version of 'integerLog2#'
Assumption: Integer is strictly positive
Find the ... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
# LANGUAGE CPP #
#include "MachDeps.h"
#if WORD_SIZE_IN_BITS == 32
# define WSHIFT 5
# define MMASK 31
#elif WORD_SIZE_IN_BITS == 64
# define WSHIFT 6
# define MMASK 63
#else
# error unsupported WORD_SIZE_IN_BITS
#endif
| Fast ' Inte... |
3372c245007545a0c8c72a5f42f0789effc3ceaed0300c17e7768a5a0e823185 | HeinrichApfelmus/reactive-banana | CRUDIncremental.hs | ----------------------------------------------------------------------------
reactive - banana - wx
Example : ListBox with CRUD operations
-----------------------------------------------------------------------------
reactive-banana-wx
Example: ListBox with CRUD operations
--------------... | null | https://raw.githubusercontent.com/HeinrichApfelmus/reactive-banana/79482f3e9bfab493e2d2197f70cdb11787b33a03/reactive-banana-wx/src/CRUDIncremental.hs | haskell | --------------------------------------------------------------------------
---------------------------------------------------------------------------
----------------------------------------------------------------------------}
----------------------------------------------------------------------------
Main
----... | reactive - banana - wx
Example : ListBox with CRUD operations
reactive-banana-wx
Example: ListBox with CRUD operations
# LANGUAGE ScopedTypeVariables #
# LANGUAGE RecursiveDo #
import Control.Monad (join)
import qualified Data.List
import Data.Maybe
import qualified Data.Map as Map
impor... |
66306183a34b49417454e42957401d7ee84125165d05faa2abc268e6fea565bb | PEZ/rich4clojure | problem_134.clj | (ns rich4clojure.elementary.problem-134
(:require [hyperfiddle.rcf :refer [tests]]))
;; = A nil key =
By 4Clojure user :
;; Difficulty: Elementary
;; Tags: [maps]
;;
;; Write a function which, given a key and map, returns
;; true iff the map contains an entry with that key and
;; its value is nil.
(def __ :test... | null | https://raw.githubusercontent.com/PEZ/rich4clojure/2ccfac041840e9b1550f0a69b9becbdb03f9525b/src/rich4clojure/elementary/problem_134.clj | clojure | = A nil key =
Difficulty: Elementary
Tags: [maps]
Write a function which, given a key and map, returns
true iff the map contains an entry with that key and
its value is nil.
Share your solution, and/or check how others did it: | (ns rich4clojure.elementary.problem-134
(:require [hyperfiddle.rcf :refer [tests]]))
By 4Clojure user :
(def __ :tests-will-fail)
(comment
)
(tests
(__ :a {:a nil :b 2}) :=
(__ :b {:a nil :b 2}) :=
(__ :c {:a nil :b 2}) :=)
|
aebe5d21d7cf4ce941a4c23a0afd4c4f5e55f8cd76dfc09512b11e040ee72601 | MalloZup/fullrocketmetal | core_test.clj | (ns fullrocketmetal.core-test
(:require [clojure.test :refer :all]
[fullrocketmetal.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/MalloZup/fullrocketmetal/6029a2d2bf6c59910611650e7adaaf7b4c3697ae/test/fullrocketmetal/core_test.clj | clojure | (ns fullrocketmetal.core-test
(:require [clojure.test :refer :all]
[fullrocketmetal.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
89ecb615262cac8213620ab520aef0153d14c6c73f639ec5964af0a52f1907ab | bravit/bob19-tutorial-types | 11-phantoms.hs | # LANGUAGE GeneralizedNewtypeDeriving #
-- Does it make sense to have types without values? Absolutely!
-- 'unit' is called a phantom type
newtype Weight unit = Weight Double
deriving (Num, Show)
data Kg
data Lb
w1 :: Weight Kg
w1 = Weight 81
w2 :: Weight Lb
w2 = Weight 120
--ghci
-- >>> w1 + w2
--... | null | https://raw.githubusercontent.com/bravit/bob19-tutorial-types/ba2a575e36b97ec01a18a39115e8a96a8543a53f/code/11-phantoms.hs | haskell | Does it make sense to have types without values? Absolutely!
'unit' is called a phantom type
ghci
>>> w1 + w2
<TYPE ERROR!>
>>> :back
ghci
$
>>> kg2lb w1 + w2
Weight 298.605
>>> :☛ This is type level!
>>> :☛ Unfortunately, this works too:
$
>>> w3
Weight 0.0 | # LANGUAGE GeneralizedNewtypeDeriving #
newtype Weight unit = Weight Double
deriving (Num, Show)
data Kg
data Lb
w1 :: Weight Kg
w1 = Weight 81
w2 :: Weight Lb
w2 = Weight 120
kg2lb :: Weight Kg -> Weight Lb
kg2lb (Weight wkg) =
Weight (wkg * 2.205)
> > > let w3 = Weight 0 : :... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.