_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 |
|---|---|---|---|---|---|---|---|---|
f61baa60a72506b6a4dbc501f46f94b8e763f8b5593865ceb66b37d8f8a35151 | exercism/babashka | pig_latin_test.clj | (ns pig-latin-test
(:require [clojure.test :refer [deftest is]]
pig-latin))
;; ay is added to words that start with vowels
(deftest word-beginning-with-a
(is (= "appleay"
(pig-latin/translate "apple"))))
(deftest word-beginning-with-e
(is (= "earay"
(pig-latin/translate "ear"))))
... | null | https://raw.githubusercontent.com/exercism/babashka/7375f1938ff95b242320313eaeedb8eca31a1b5b/exercises/practice/pig-latin/test/pig_latin_test.clj | clojure | ay is added to words that start with vowels
some letter clusters are treated like a single consonant
some letter clusters are treated like a single vowel
phrases are translated | (ns pig-latin-test
(:require [clojure.test :refer [deftest is]]
pig-latin))
(deftest word-beginning-with-a
(is (= "appleay"
(pig-latin/translate "apple"))))
(deftest word-beginning-with-e
(is (= "earay"
(pig-latin/translate "ear"))))
(deftest word-beginning-with-i
(is (= "igloo... |
b5d69c4884403b50f1bc51457171ff1116be9f48e60dd7929f1ca18864d1707f | sharplispers/ironclad | common.lisp | ;;;; -*- mode: lisp; indent-tabs-mode: nil -*-
;;;; common.lisp -- efficient implementations of mod32 arithmetic and macros
;;; Functions in this file are intended to be fast
(in-package :crypto)
(defmacro defconst (name value)
`(defconstant ,name
(if (boundp ',name)
(symbol-value ',name)
,value... | null | https://raw.githubusercontent.com/sharplispers/ironclad/6cc4da8554558ee2e89ea38802bbf6d83100d4ea/src/common.lisp | lisp | -*- mode: lisp; indent-tabs-mode: nil -*-
common.lisp -- efficient implementations of mod32 arithmetic and macros
Functions in this file are intended to be fast
be portable, so we define our own.
We write something like this all over the place.
a global specification of optimization settings
extracting individua... |
(in-package :crypto)
(defmacro defconst (name value)
`(defconstant ,name
(if (boundp ',name)
(symbol-value ',name)
,value)))
CMUCL and SBCL both have an internal type for this , but we 'd like to
(deftype index () '(mod #.array-dimension-limit))
(deftype index+1 () `(mod ,(1+ array-dimension... |
9bd5eb597d0674f9147e533d37f82171d10bd705be1bbfb09a717fc55502216a | bitc/hs-term-emulator | SimpleTerm.hs | module System.Terminal.Emulator.Term.SimpleTerm
( SimpleTerm (..),
termToSimpleTerm,
)
where
import Control.Lens
import Data.Foldable (toList)
import qualified Data.Vector.Unboxed as VU
import System.Terminal.Emulator.Term (Term, cursorPos, scrollBackLines, termScreen)
import System.Terminal.Emulator.TermLines... | null | https://raw.githubusercontent.com/bitc/hs-term-emulator/184356db032930c9ea6fa5b954bbafdf0c2ce516/hs-term-emulator/test/System/Terminal/Emulator/Term/SimpleTerm.hs | haskell | | A simplified terminal that doesn't have an alt screen or colors | module System.Terminal.Emulator.Term.SimpleTerm
( SimpleTerm (..),
termToSimpleTerm,
)
where
import Control.Lens
import Data.Foldable (toList)
import qualified Data.Vector.Unboxed as VU
import System.Terminal.Emulator.Term (Term, cursorPos, scrollBackLines, termScreen)
import System.Terminal.Emulator.TermLines... |
994b33d2942e195f79bb3bf7ae3c18858b872a5e1523d62625effefe3b727bef | mathematical-systems/clml | package.lisp | (cl:defpackage :fork-future-test
(:use :cl :fork-future :stefil)
)
| null | https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/addons/fork-future/test/package.lisp | lisp | (cl:defpackage :fork-future-test
(:use :cl :fork-future :stefil)
)
| |
1be4ae95bc262e331a91708a49ef99d72b0d5479f9304114f449eb9d2e163285 | AdaCore/why3 | eliminate_algebraic.ml | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
(* ... | null | https://raw.githubusercontent.com/AdaCore/why3/03f27e383b7191f9df0c7df84016a6450603f864/src/transform/eliminate_algebraic.ml | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
General Public License version 2.1 , with the special exception
open Ident
open Ty
open Term
open Decl
open Theory
open Task
a type constructor generates an infinite ty... |
c4f2f40d0cc62475d95331a4da048ce9aa7c542354b8e43fcca90687c3fc0d14 | well-typed-lightbulbs/rpi | clock.mli | val freq : unit -> int option
val set_pwm_clock : int -> (unit, int) result
val kill : unit -> unit
| null | https://raw.githubusercontent.com/well-typed-lightbulbs/rpi/9bedf5735277c66009dffb0c70489ca0f88d84fc/src/peripherals/clock.mli | ocaml | val freq : unit -> int option
val set_pwm_clock : int -> (unit, int) result
val kill : unit -> unit
| |
45a6a36978f214ff3a6468e70f2ae1dbb4166b02d44743df3f8bab2aa6891cf6 | esl/erlang-web | wtype_password.erl | The contents of this file are subject to the Erlang Web Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
Erlang Web Public License along with this software . If not , it can be
%% retrieved via the world... | null | https://raw.githubusercontent.com/esl/erlang-web/2e5c2c9725465fc5b522250c305a9d553b3b8243/lib/wparts-1.4.1/src/wtype_password.erl | erlang | compliance with the License. You should have received a copy of the
retrieved via the world wide web at -consulting.com/.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
---------------------------------... | The contents of this file are subject to the Erlang Web Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
Erlang Web Public License along with this software . If not , it can be
Software distributed under the License is distributed on an " AS IS "
The Initial Developer o... |
48ec8fa5cf2e9e7f306c0ae3f4e4d3f6ea6338c6a6fcd42f0aa5760dec993408 | babashka/babashka | test_report.clj | (ns foo
(:require
[clojure.test :as t]))
(t/deftest bar
(t/is (= 1 2) "1 is not equal to 2"))
(binding [t/report (fn [m]
(prn (update m :var (comp :name meta))))]
(t/test-var #'bar))
| null | https://raw.githubusercontent.com/babashka/babashka/3dfc15f5a40efaec07cba991892c1207a352fab4/test-resources/babashka/test_report.clj | clojure | (ns foo
(:require
[clojure.test :as t]))
(t/deftest bar
(t/is (= 1 2) "1 is not equal to 2"))
(binding [t/report (fn [m]
(prn (update m :var (comp :name meta))))]
(t/test-var #'bar))
| |
d476f8bd305e4b7a3c069db1b53115c9d363ccfba7824d54ff9ca0b0125fc778 | ocaml-ppx/ppx | test.ml | #require "ppx.traverse";;
type t =
{ x : int
; y : u
}
and u = A of int | B of t
[@@deriving traverse]
[%%expect{|
type t = { x : int; y : u; }
and u = A of int | B of t
class virtual map :
object
method virtual int : int -> int
method t : t -> t
method u : u -> u
end
class virtual iter :
obje... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/test/traverse/test.ml | ocaml | #require "ppx.traverse";;
type t =
{ x : int
; y : u
}
and u = A of int | B of t
[@@deriving traverse]
[%%expect{|
type t = { x : int; y : u; }
and u = A of int | B of t
class virtual map :
object
method virtual int : int -> int
method t : t -> t
method u : u -> u
end
class virtual iter :
obje... | |
a989dd47b11e333eaf5f7ee920dd412167010bdb4a598c6c53fe4ea59c87ce32 | haskell-distributed/distributed-process | Throughput.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveDataTypeable #-}
import System.Environment
import Control.Monad
import Control.Applicative
import Control.Distributed.Process
import Control.Distributed.Process.Node
import Network.Transport.TCP (createTransport, defaultTCPParameters, defaultTCPAddr)
import Data.Binary
... | null | https://raw.githubusercontent.com/haskell-distributed/distributed-process/ccc002c928d29335b5eb73be1d876007adaa0b53/benchmarks/Throughput.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE DeriveDataTypeable #
Copied from Data.Binary |
import System.Environment
import Control.Monad
import Control.Applicative
import Control.Distributed.Process
import Control.Distributed.Process.Node
import Network.Transport.TCP (createTransport, defaultTCPParameters, defaultTCPAddr)
import Data.Binary
import qualified Data.ByteString.Lazy as BSL
import Data.Typeable
... |
26ab69bf94b7b33b1ece327c20c65c81615804621c69e860350aa9b64ab8877a | scalaris-team/scalaris | mockup_l_on_cseq.erl | 2009 - 2014 Zuse Institute Berlin
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
d... | null | https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/test/mockup_l_on_cseq.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 gov... | 2009 - 2014 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
@doc helper module for measuring latency between nodes .
-module(mockup_l_on_cseq).
-author('').
-vsn('$Id$').
-... |
015ebba3f80aff1b1292c2fd9f749db63a12ade0997f3bb40de0066619df1e9d | samply/blaze | spec.clj | (ns blaze.db.tx-cache.spec
(:require
[clojure.spec.alpha :as s]))
(s/def :blaze.db.tx-cache/max-size
nat-int?)
| null | https://raw.githubusercontent.com/samply/blaze/c479410a9198526453a0df769ab7db2e6d5dd654/modules/db/src/blaze/db/tx_cache/spec.clj | clojure | (ns blaze.db.tx-cache.spec
(:require
[clojure.spec.alpha :as s]))
(s/def :blaze.db.tx-cache/max-size
nat-int?)
| |
4166b9d4a9c827ecd9c92bdf1c4a1bec592ef9885c5b71265f19fa1de1c2167a | calyau/maxima | transs.lisp | -*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The data in this file contains enhancments. ;;;;;
;;; ;;;;;
... | null | https://raw.githubusercontent.com/calyau/maxima/9352a3f5c22b9b5d0b367fddeb0185c53d7f4d02/src/transs.lisp | lisp | Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
The data in this file contains enhancments. ;;;;;
;;;;;
; ; ; ;
All rights reserved ;;;;;
; ;
User-hacking ... |
(in-package :maxima)
(macsyma-module transs)
There are various macros to cons - up filename TEMPLATES
which to into . The filenames should be the only
of RENAMEF / MERGEF / DELETE - FILE is assumed .
(defmvar $tr_file_tty_messagesp nil
"It TRUE messages about translation of the file are sent
to the TTY a... |
07817f66d75cf35afda8dadf33bd395b0a9e7597200352e3ff256abb666ebba8 | beamparticle/beamparticle | beamparticle_nlp_top_page_handler.erl | %%%-------------------------------------------------------------------
%%% @doc
%%% A handler to serve dynamic landing page for nlp
%%% @end
%%%
%%% %CopyrightBegin%
%%%
Copyright < > 2017 .
All Rights Reserved .
%%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%% you may not use this... | null | https://raw.githubusercontent.com/beamparticle/beamparticle/65dcea1569d06b331b08cd9f8018ece4b176b690/handlers/beamparticle_nlp_top_page_handler.erl | erlang | -------------------------------------------------------------------
@doc
A handler to serve dynamic landing page for nlp
@end
%CopyrightBegin%
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 ... | Copyright < > 2017 .
All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(beamparticle_nlp_top_page_handler).
-include("beamparticle_constants.hrl").
-export([init/2]).
init(Req0, Opts) ->
... |
a8e2ffbba129a9d47a28c833b29c5f5aad3c56a525929e8608146c31b7b231ed | gersh/erlang-rtmp | rtmpt.erl | @author < > [ ]
2009
@doc RTMPT interface . Used from web - server .
RTMPT protocol is a tunneling protocol for RTMP . Technically it is implemented in following way :
Flash client connects to HTTP server several times a second and sends POST /idle requests with session i d ,
given in ... | null | https://raw.githubusercontent.com/gersh/erlang-rtmp/57157fb3be20278af19c87232f99aa9a83041d18/src/rtmpt.erl | erlang | If server needs to send data to client, it buffers these bytes somewhere, associated with session id.
Usually you may not bother about POST /close request, because I have never seen it.
@reference See <a href="" target="_top"></a> for more information.
@end
The MIT License
Permission is hereby granted, free ... | @author < > [ ]
2009
@doc RTMPT interface . Used from web - server .
RTMPT protocol is a tunneling protocol for RTMP . Technically it is implemented in following way :
Flash client connects to HTTP server several times a second and sends POST /idle requests with session i d ,
given in ... |
915462831f6ad1d592ebcc9609ff71c67b71ce9a2fb7ab2cc881bcbaec8d3fc7 | returntocorp/semgrep | foo.ml | let x a b =
(* ERROR: match *)
Pervasives.compare a b
| null | https://raw.githubusercontent.com/returntocorp/semgrep/8c379c2c73b4ece1b1316655b00e21a8af3f00bb/tests/patterns/ocaml/foo.ml | ocaml | ERROR: match | let x a b =
Pervasives.compare a b
|
6cc6d1b6a8026fe5f45afad17a2a0189ac1a708847c4e2a3a58cd591831a76c6 | andersfugmann/borderline | frontend.ml | (** Type and utility function for the frontend *)
open Core
open Common
module Ip6 = Ipset.Ip6
module Ip4 = Ipset.Ip4
type prefix = string
type id = string * Lexing.position
module Process = struct
type t = Mangle | Filter | Nat
let of_stringy (id, pos) =
match String.lowercase id with
| "mangle" -> Mangl... | null | https://raw.githubusercontent.com/andersfugmann/borderline/ca51ad98cff0c37a3cd6a7717535319233e6f062/src/frontend.ml | ocaml | * Type and utility function for the frontend | open Core
open Common
module Ip6 = Ipset.Ip6
module Ip4 = Ipset.Ip4
type prefix = string
type id = string * Lexing.position
module Process = struct
type t = Mangle | Filter | Nat
let of_stringy (id, pos) =
match String.lowercase id with
| "mangle" -> Mangle
| "filter" -> Filter
| "nat" -> Nat
... |
c12474dbebc5ccc48177dccc1ddbe3f473971a50638eaa20a404eb73f0d59cdb | HeinrichApfelmus/david-cope-cmmc | BACH-1-3.lisp | (defVar BACH-1-3 '((0 36 1000 4 127) (0 55 1000 3 127) (0 60 1000 2 127) (0 64 1000 1 127)
(1000 60 500 2 127) (1000 36 1000 4 127) (1000 55 1000 3 127) (1000 64 1000 1 127)
(1500 59 500 2 127) (2000 38 1000 4 127) (2000 53 1000 3 127) (2000 57 500 2 127)
(2000 65 1000 1 127) (2500 59 500 2 127) (3000 40 1000 4 127)... | null | https://raw.githubusercontent.com/HeinrichApfelmus/david-cope-cmmc/bc48564fda68383811773b56590161387dcf09c0/apprentice-chapter-11/data/BACH-1-3.lisp | lisp | (defVar BACH-1-3 '((0 36 1000 4 127) (0 55 1000 3 127) (0 60 1000 2 127) (0 64 1000 1 127)
(1000 60 500 2 127) (1000 36 1000 4 127) (1000 55 1000 3 127) (1000 64 1000 1 127)
(1500 59 500 2 127) (2000 38 1000 4 127) (2000 53 1000 3 127) (2000 57 500 2 127)
(2000 65 1000 1 127) (2500 59 500 2 127) (3000 40 1000 4 127)... | |
ea18b92fea0a431afb03f8189c3c86afc8235a196cc526da320508eaf483a2d4 | simmone/racket-simple-xlsx | write-workbook-rels-test.rkt | #lang racket
(require simple-xml)
(require rackunit/text-ui rackunit)
(require "../../../xlsx/xlsx.rkt")
(require "../../../lib/lib.rkt")
(require"../../../xl/_rels/workbook-xml-rels.rkt")
(require racket/runtime-path)
(define-runtime-path workbook_xml_rels_file "workbook.xml.rels")
(define test-workbook-xml-rel... | null | https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/tests/xl/_rels/write-workbook-rels-test.rkt | racket | #lang racket
(require simple-xml)
(require rackunit/text-ui rackunit)
(require "../../../xlsx/xlsx.rkt")
(require "../../../lib/lib.rkt")
(require"../../../xl/_rels/workbook-xml-rels.rkt")
(require racket/runtime-path)
(define-runtime-path workbook_xml_rels_file "workbook.xml.rels")
(define test-workbook-xml-rel... | |
6dfcc8f5e9d54004be7eb73540042bfb6d5af40443c964422c5165c33c7f2066 | apache/couchdb-ioq | ioq_server.erl | 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 the License is distributed on an " A... | null | https://raw.githubusercontent.com/apache/couchdb-ioq/961a5c84b2079689a7e61d675685011d57629b36/src/ioq_server.erl | erlang | 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
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(ioq_server).
-behaviour(gen_server).
-vsn(1).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2,
code_change/3]).
-expo... |
f0a78213fbad82f65eb0c968880f56155cecf7d7fa696ec1864b4442b580656c | m4dc4p/haskelldb | test-sum.hs | import Database.HaskellDB
import TestConnect
import Dp037.D3proj_time_reports
q = do
reports <- table d3proj_time_reports
project (userid << reports!userid
# xid << _sum (reports!xid))
test db
= do
result <- query db q
mapM_ (putStrLn . show) result
main = do
putStrLn... | null | https://raw.githubusercontent.com/m4dc4p/haskelldb/a1fbc8a2eca8c70ebe382bf4c022275836d9d510/test/old/test-sum.hs | haskell | import Database.HaskellDB
import TestConnect
import Dp037.D3proj_time_reports
q = do
reports <- table d3proj_time_reports
project (userid << reports!userid
# xid << _sum (reports!xid))
test db
= do
result <- query db q
mapM_ (putStrLn . show) result
main = do
putStrLn... | |
7200fb124016d52530de408f69b6e3dd13f74126c7c065405f02ba03652991a4 | hackwaly/ocamlearlybird | unix.ml | *
* Copyright ( C ) 2021
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation , either version 3 of the
* License , or ( at your option ) any later version .
*
* Th... | null | https://raw.githubusercontent.com/hackwaly/ocamlearlybird/165174e3cc749ba416ec7ebfb4b521e5fac744db/src/ground/unix.ml | ocaml | *
* Copyright ( C ) 2021
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation , either version 3 of the
* License , or ( at your option ) any later version .
*
* Th... | |
aff29465c694b296baf9d79bbee6d44dce19bfed57d7d1bf4e34fa7b40de48cd | lispbuilder/lispbuilder | scene.lisp |
(in-package #:rm)
(defclass generic-scene (node)
((parent-window
:reader window
:initform nil)))
(defclass scene (generic-scene event-handler)()
(:default-initargs
:events '(on-idle on-create on-destroy on-paint on-resize on-expose
on-quit on-wm-event on-user on-mouse-move on-mouse-up on-mouse-d... | null | https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-openrm/openrm/scene.lisp | lisp | #2 - NODE only
Do nothing.
#2 - NODE only
Do nothing.
Camera
Events |
(in-package #:rm)
(defclass generic-scene (node)
((parent-window
:reader window
:initform nil)))
(defclass scene (generic-scene event-handler)()
(:default-initargs
:events '(on-idle on-create on-destroy on-paint on-resize on-expose
on-quit on-wm-event on-user on-mouse-move on-mouse-up on-mouse-d... |
bd90437e76183815e23e597879e08a94943af6958337982d0c94b35064935f8f | racket/plot | isosurface.rkt | #lang typed/racket/base
(require typed/racket/class racket/match racket/list math/flonum racket/math
(only-in typed/pict pict)
plot/utils
"../common/type-doc.rkt"
"../common/utils.rkt")
(provide (all-defined-out))
;; ================================================================... | null | https://raw.githubusercontent.com/racket/plot/c4126001f2c609e36c3aa12f300e9c673ab1a806/plot-lib/plot/private/plot3d/isosurface.rkt | racket | ===================================================================================================
Surfaces of constant value (isosurfaces)
===================================================================================================
Nested isosurfaces
g is a 3D-sampler, which is a memoized proc. Recalculat... | #lang typed/racket/base
(require typed/racket/class racket/match racket/list math/flonum racket/math
(only-in typed/pict pict)
plot/utils
"../common/type-doc.rkt"
"../common/utils.rkt")
(provide (all-defined-out))
(: isosurface3d-render-proc (-> 3D-Sampler Real Positive-Integer
... |
f4101a6fa5069adcbd150e57977027e36d0e29d9845d989d0862cddec37a0267 | erlang/rebar3 | rebar_prv_xref.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% ex: ts=4 sw=4 et
-module(rebar_prv_xref).
-behaviour(provider).
-export([init/1,
do/1,
format_error/1,
filter_xref_results/3]).
-include("rebar.hrl").
-include_lib("providers/include/providers.hrl").
-define(PROVIDER, xr... | null | https://raw.githubusercontent.com/erlang/rebar3/048412ed4593e19097f4fa91747593aac6706afb/apps/rebar/src/rebar_prv_xref.erl | erlang | ex: ts=4 sw=4 et
===================================================================
Public API
===================================================================
Run xref checks
Run custom queries
===================================================================
=============================================... | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
-module(rebar_prv_xref).
-behaviour(provider).
-export([init/1,
do/1,
format_error/1,
filter_xref_results/3]).
-include("rebar.hrl").
-include_lib("providers/include/providers.hrl").
-define(PROVIDER, xref).
-define(DEPS, [... |
d935f05b1ea35dc9d2dd773a025a40368c3ad26797eb2afa67165866cf7d2f31 | mransan/raft-udp | raft_srv_stats.mli | (** Statistics collection and display *)
* { 2 Counter / Rate }
val raft_msg_send : Raft_utl_counter.Counter.t
val raft_msg_recv : Raft_utl_counter.Counter.t
val log : Raft_utl_counter.Counter.t
val heartbeat : Raft_utl_counter.Counter.t
val client_connections : Raft_utl_counter.Counter.t
val client_reques... | null | https://raw.githubusercontent.com/mransan/raft-udp/ffa307fa6d8bdaa3133f3cc66149ac7dfda5fc7c/src/srv/raft_srv_stats.mli | ocaml | * Statistics collection and display
* {2 Performance Measurement}
* {2 Configuration} |
* { 2 Counter / Rate }
val raft_msg_send : Raft_utl_counter.Counter.t
val raft_msg_recv : Raft_utl_counter.Counter.t
val log : Raft_utl_counter.Counter.t
val heartbeat : Raft_utl_counter.Counter.t
val client_connections : Raft_utl_counter.Counter.t
val client_requests : Raft_utl_counter.Counter.t
val appen... |
032a63f8fe9d5b4443417f033437a3ad76fd1dc05d9e6d82424b65100e43f971 | joehillen/craft | Json.hs | # LANGUAGE ExistentialQuantification #
{-# LANGUAGE GADTs #-}
module Craft.Config.Json where
import Control.Lens
import Data.Aeson
import Data.Aeson.Encode.Pretty (encodePretty)
import Craft
import Craft.Config
import qualified Data.ByteString.Char... | null | https://raw.githubusercontent.com/joehillen/craft/de31caa7f86cceaab23dbef0f05208bb853cf73b/src/Craft/Config/Json.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE ExistentialQuantification #
module Craft.Config.Json where
import Control.Lens
import Data.Aeson
import Data.Aeson.Encode.Pretty (encodePretty)
import Craft
import Craft.Config
import qualified Data.ByteString.Char8 as B8
import qualified Data.ByteString... |
b4bd316a006db2dfcde18d92e735992fa39d8d986507c76ee0ff092bf15a9b89 | cucapra/diospyros | q-prod.rkt | #lang rosette
(require "../ast.rkt"
"../configuration.rkt"
"../utils.rkt"
"matrix-multiply.rkt")
(provide q-prod:only-spec
q-prod:keys)
;; Runs the spec with symbolic inputs and returns:
;; - the resulting formula.
;; - the prelude instructions (list)
;; - outputs that the postlud... | null | https://raw.githubusercontent.com/cucapra/diospyros/5c9fb6d3bda40d7bb395546aaefc78e6813b729f/src/examples/q-prod.rkt | racket | Runs the spec with symbolic inputs and returns:
- the resulting formula.
- the prelude instructions (list)
- outputs that the postlude should write to
what about r-t? | #lang rosette
(require "../ast.rkt"
"../configuration.rkt"
"../utils.rkt"
"matrix-multiply.rkt")
(provide q-prod:only-spec
q-prod:keys)
(define (q-prod:only-spec config)
(define aq (make-symbolic-matrix 4 1 'aq))
(define at (make-symbolic-matrix 3 1 'at))
(define bq (make-sy... |
028ee153a3d0e8eaf1e5006b90c652984b3be2d540f475fa465664407bbdf6c7 | bamarco/onyx-sim | core_test.cljs | (ns onyx.sim.core-test
(:require-macros [cljs.test :refer (is deftest testing)])
(:require [cljs.test]))
(deftest example-passing-test
(is (= 1 1)))
| null | https://raw.githubusercontent.com/bamarco/onyx-sim/5c911eec3540db7ba5e6681fe405070e03ecb4de/test/cljs/onyx/sim/core_test.cljs | clojure | (ns onyx.sim.core-test
(:require-macros [cljs.test :refer (is deftest testing)])
(:require [cljs.test]))
(deftest example-passing-test
(is (= 1 1)))
| |
2a60b4c624811d3ca946931305f9a7cecff827f47d4ba47e17e7943d5008cf10 | screenshotbot/screenshotbot-oss | artifacts.lisp | ;;;; Copyright 2018-Present Modern Interpreters Inc.
;;;;
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(uiop:define-package :screenshotbot/artifacts
(:use #:cl #:alexandria)
(:import-f... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/8ee422327e7dd8a133bd1ae52bb562dbc732ea61/src/screenshotbot/artifacts.lisp | lisp | Copyright 2018-Present Modern Interpreters Inc.
DEPRECATED: DO NOT USE.
can't mock because of multithreading
Using chipz etc are super slow :/ | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(uiop:define-package :screenshotbot/artifacts
(:use #:cl #:alexandria)
(:import-from #:screenshotbot/server
#:*domain*
... |
0255ab088afbc63102081168ac076ff370b30d40dd783f56bc4f0e1ff0aa9313 | swarmpit/swarmpit | slt.clj | (ns swarmpit.slt
(:require [clojure.core.cache :as cache]
[swarmpit.uuid :refer [uuid]]
[swarmpit.base64 :as base64]))
(def cache (atom (cache/ttl-cache-factory {} :ttl 10000)))
(defn- generate
[]
(->> (uuid)
(base64/encode)))
(defn create
[username]
(let [slt (generate)]
... | null | https://raw.githubusercontent.com/swarmpit/swarmpit/38ffbe08e717d8620bf433c99f2e85a9e5984c32/src/clj/swarmpit/slt.clj | clojure | (ns swarmpit.slt
(:require [clojure.core.cache :as cache]
[swarmpit.uuid :refer [uuid]]
[swarmpit.base64 :as base64]))
(def cache (atom (cache/ttl-cache-factory {} :ttl 10000)))
(defn- generate
[]
(->> (uuid)
(base64/encode)))
(defn create
[username]
(let [slt (generate)]
... | |
79985b9950c7f8b8ef35e87de4a0b8d47470e14a1599c0693653a9d3d936f0e9 | HunterYIboHu/htdp2-solution | ex524.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex524) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter6/Section33/ex524.rkt | racket | about the language level of this file in a form that our tools can easily process.
graphic constants
data definitions
'left represents the combination of the missionaries and cannibals
on the left side of the river; 'right represents the combination of
the missionaries and cannibals on the right side of the river... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex524) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(require 2htdp/image)
(require 2htdp/universe)
(defin... |
51fdf47e28f1604c1bd99f233357ae6d4e4e09cef8f35456174b75d09d8be519 | spell-music/csound-expression | SigSpace.hs | # OPTIONS_GHC -fno - warn - orphans #
# Language
TypeFamilies ,
MultiParamTypeClasses ,
FlexibleInstances ,
FlexibleContexts #
TypeFamilies,
MultiParamTypeClasses,
FlexibleInstances,
FlexibleContexts #-}
module Csound.SigSpace(
SigSpace(..), Bi... | null | https://raw.githubusercontent.com/spell-music/csound-expression/29c1611172153347b16d0b6b133e4db61a7218d5/csound-expression/src/Csound/SigSpace.hs | haskell | * Stereo sig space
| Spectral crossfade.
| Generic spectral crossfade.
| Weighted sum.
| It applies an effect and balances the processed signal by original one.
| It applies an effect and balances the processed signal by original one.
Also it applies an effect and mixes the processed balanced signal with origina... | # OPTIONS_GHC -fno - warn - orphans #
# Language
TypeFamilies ,
MultiParamTypeClasses ,
FlexibleInstances ,
FlexibleContexts #
TypeFamilies,
MultiParamTypeClasses,
FlexibleInstances,
FlexibleContexts #-}
module Csound.SigSpace(
SigSpace(..), Bi... |
ade414e1ad1750fd41a3e6ec5f1b7cede8927e67783b51cbd6aba90b8ee45ae6 | hausdorff/pyli | Pyli.hs | import System.IO (hGetContents, stdin)
import qualified Lexer as Lexer
import qualified Parser as Parser
import DerpInterface
import Data.Set
-- This `main` allows us to generate a compiler binary, see cabal file
main :: IO ()
main = do code <- (hGetContents stdin)
let res = toList $ Parser.parseFile $ Lexe... | null | https://raw.githubusercontent.com/hausdorff/pyli/4b3e8c3990c30864f8b820e11d6a56a9415cc894/src/Pyli.hs | haskell | This `main` allows us to generate a compiler binary, see cabal file | import System.IO (hGetContents, stdin)
import qualified Lexer as Lexer
import qualified Parser as Parser
import DerpInterface
import Data.Set
main :: IO ()
main = do code <- (hGetContents stdin)
let res = toList $ Parser.parseFile $ Lexer.lex code
case res of
[] -> putStrLn "#f"
... |
48ac269b884adf1c46c6590e38b85c4f03130993aa17fe24232595ab0e8544c3 | dinosaure/docteur | make.ml | open Rresult
open Lwt.Infix
let ( >>? ) = Lwt_result.bind
let () = Random.self_init ()
module Append = struct
type 'a rd = < rd : unit ; .. > as 'a
type 'a wr = < wr : unit ; .. > as 'a
type 'a mode =
| Rd : < rd : unit > mode
| Wr : < wr : unit > mode
| RdWr : < rd : unit ; wr : unit > mode
typ... | null | https://raw.githubusercontent.com/dinosaure/docteur/2cc5a10eb3f60981fe9121cfab6017912291a1c1/bin/make.ml | ocaml | TODO(dinosaure): Windows support. | open Rresult
open Lwt.Infix
let ( >>? ) = Lwt_result.bind
let () = Random.self_init ()
module Append = struct
type 'a rd = < rd : unit ; .. > as 'a
type 'a wr = < wr : unit ; .. > as 'a
type 'a mode =
| Rd : < rd : unit > mode
| Wr : < wr : unit > mode
| RdWr : < rd : unit ; wr : unit > mode
typ... |
d9e6ab05a4f2dad56955dede307712c979ebfac56eb3e8ff36ce5c7c251e4c51 | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | GetCustomersCustomerSubscriptionsSubscriptionExposedId.hs | {-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
-- | Contains the different functions to run the operation getCustomersCustomerSubscriptionsS... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Operations/GetCustomersCustomerSubscriptionsSubscriptionExposedId.hs | haskell | # LANGUAGE ExplicitForAll #
# LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains the different functions to run the operation getCustomersCustomerSubscriptionsSubscriptionExposedId
| > GET /v1/customers/{customer}/subscriptions/{subscription_exposed_id}
| Contains all available parameters of this opera... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module StripeAPI.Operations.GetCustomersCustomerSubscriptionsSubscriptionExposedId where
import qualified Control.Monad.Fail
import qualified Control.Monad.Trans.Reader
import qualified D... |
8a8d5365232a82b2bb53ab446af570eab778a231dba4dce33810babc1e4d0074 | lisp/de.setf.thrift | AnnotationTest.lisp | ;;; -*- Package: thrift-generated -*-
;;;
Autogenerated by Thrift
;;; DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
(def-package :thrift-generated)
(thrift:def-struct "foo"
(("bar" nil :type i32 :id 1)
("baz" nil :type i32 :id 2)
("qux" nil :type i32 :id 3)
("bop" nil :type i32 :id 4)... | null | https://raw.githubusercontent.com/lisp/de.setf.thrift/32b0d1ca3d9fa95327165b8090e1021bc563ed3e/test/gen-cl/AnnotationTest.lisp | lisp | -*- Package: thrift-generated -*-
DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING | Autogenerated by Thrift
(def-package :thrift-generated)
(thrift:def-struct "foo"
(("bar" nil :type i32 :id 1)
("baz" nil :type i32 :id 2)
("qux" nil :type i32 :id 3)
("bop" nil :type i32 :id 4)))
|
fc627619de2e44562052d8776901207d958930a554ddf10e413690ea541bd29f | ocaml/ocamlbuild | ocaml_utils.ml | (***********************************************************************)
(* *)
(* ocamlbuild *)
(* *)
, , projet Galliu... | null | https://raw.githubusercontent.com/ocaml/ocamlbuild/792b7c8abdbc712c98ed7e69469ed354b87e125b/src/ocaml_utils.ml | ocaml | *********************************************************************
ocamlbuild
... | , , projet Gallium , INRIA Rocquencourt
Copyright 2007 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
Original author :
open My_std
open Format
open Lo... |
bb69e4911c44e4b3df49e8c9b2e74adb45c4a202c64fd6c60cb30279824f4a06 | lamdu/lamdu | Fonts.hs | module Lamdu.Editor.Fonts
( makeGetFonts
) where
import qualified Control.Lens as Lens
import Data.IORef
import Data.MRUMemo (memoIO)
import GUI.Momentu (Font, Zoom)
import qualified GUI.Momentu.Zoom as Zoom
import Lamdu.Config.Sampler (Sampler, Sample)
import qualified ... | null | https://raw.githubusercontent.com/lamdu/lamdu/ea65512595713911cdf1974a69c8148bdeeb6d0b/src/Lamdu/Editor/Fonts.hs | haskell | fonts linger and are uncollected. They leak not
only memory but file descriptors, and those run out | module Lamdu.Editor.Fonts
( makeGetFonts
) where
import qualified Control.Lens as Lens
import Data.IORef
import Data.MRUMemo (memoIO)
import GUI.Momentu (Font, Zoom)
import qualified GUI.Momentu.Zoom as Zoom
import Lamdu.Config.Sampler (Sampler, Sample)
import qualified ... |
82c996590247f3efa18c039ab15cbd3770c0cf52307459a2d0d55cd7baa53403 | danidiaz/tailfile-hinotify | tests.hs | # language NumDecimals #
{-# language OverloadedStrings #-}
module Main where
import Data.Foldable
import Data.Monoid
import Data.ByteString(ByteString)
import Data.ByteString.Char8(unpack)
import qualified Data.ByteString as Bytes
import Control.Concurrent (threadDelay)
import Control.Monad
import Control.Exception
i... | null | https://raw.githubusercontent.com/danidiaz/tailfile-hinotify/14397104511664e786aeedcda76469faf172acdf/tests/tests.hs | haskell | # language OverloadedStrings # | # language NumDecimals #
module Main where
import Data.Foldable
import Data.Monoid
import Data.ByteString(ByteString)
import Data.ByteString.Char8(unpack)
import qualified Data.ByteString as Bytes
import Control.Concurrent (threadDelay)
import Control.Monad
import Control.Exception
import Data.IORef
import Control.Con... |
aca31f5eef48f57fcce55ad5076617976e703903b1ddeba3dc04f8a58314f34f | mcorbin/meuse | message_test.clj | (ns meuse.message-test
(:require [meuse.message :refer :all]
[clojure.test :refer :all]))
(deftest yanked?->msg-test
(is (= "yank" (yanked?->msg true)))
(is (= "unyank" (yanked?->msg false))))
(deftest publish-commit-msg-test
(is (= ["foo 1.1.2"
"meuse published foo 1.1.2"]
(pub... | null | https://raw.githubusercontent.com/mcorbin/meuse/d2b74543fce37c8cde770ae6f6097cabb509a804/test/meuse/message_test.clj | clojure | (ns meuse.message-test
(:require [meuse.message :refer :all]
[clojure.test :refer :all]))
(deftest yanked?->msg-test
(is (= "yank" (yanked?->msg true)))
(is (= "unyank" (yanked?->msg false))))
(deftest publish-commit-msg-test
(is (= ["foo 1.1.2"
"meuse published foo 1.1.2"]
(pub... | |
72fe5eb00caaf9a26aaa4f5c9bb858d9300bd86ab77d20b317452c08de4da8f3 | smarkets/smk_erlang_sdk | smk_sock.erl | @copyright 2010 Mochi Media , Inc.
@doc MochiWeb socket - wrapper for plain and ssl sockets .
-module(smk_sock).
-export([listen/4, accept/1, recv/3, send/2, close/1, port/1, peername/1,
setopts/2, type/1, connect/5]).
listen(Ssl, Port, Opts, SslOpts) ->
case Ssl of
true ->
case ssl:listen(P... | null | https://raw.githubusercontent.com/smarkets/smk_erlang_sdk/f56ba38201a8d3bc6e2621a402e16f486f8acf09/src/smk_sock.erl | erlang | @copyright 2010 Mochi Media , Inc.
@doc MochiWeb socket - wrapper for plain and ssl sockets .
-module(smk_sock).
-export([listen/4, accept/1, recv/3, send/2, close/1, port/1, peername/1,
setopts/2, type/1, connect/5]).
listen(Ssl, Port, Opts, SslOpts) ->
case Ssl of
true ->
case ssl:listen(P... | |
87862e0c0c1f9d88400ede449bbf7fbbb7604e20849261efcd4c6a950fda1578 | mstksg/inCode | Huffman.hs | # LANGUAGE ScopedTypeVariables #
-- -huffman-compression-in-haskell-part-1-trees
-- -huffman-compression-in-haskell-part-2-binary
module Huffman where
import Control.Monad.Trans.State.Strict
import Control.Monad
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as M
import PQueue
... | null | https://raw.githubusercontent.com/mstksg/inCode/e1f80a3dfd83eaa2b817dc922fd7f331cd1ece8a/code-samples/huffman/Huffman.hs | haskell | -huffman-compression-in-haskell-part-1-trees
-huffman-compression-in-haskell-part-2-binary
| Frequency tables
FreqTable: A map of items to their frequency of occurrence.
listFreq: Build a frequency table of `a`'s from a list of `a`'s.
monad instead of a fold. Identical, mostly, and sorta pointless.
| List... | # LANGUAGE ScopedTypeVariables #
module Huffman where
import Control.Monad.Trans.State.Strict
import Control.Monad
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as M
import PQueue
import PreTree
import Weighted
type FreqTable a = Map a Int
listFreq :: Ord a => [a] -> FreqTab... |
be9a86b181fb03535fec13fcc4b07c0a50d78f9f089ea4427c95b7d9d527cde2 | haskell-tools/haskell-tools | RemoveSignatures.hs | module Refactor.InlineBinding.RemoveSignatures where
b u v = u <++> v
(<++>) :: String -> String -> String
x <++> y = x ++ y
infixl 7 <++> | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/InlineBinding/RemoveSignatures.hs | haskell | module Refactor.InlineBinding.RemoveSignatures where
b u v = u <++> v
(<++>) :: String -> String -> String
x <++> y = x ++ y
infixl 7 <++> | |
2c7a648bdc9d786ee8d23ebef733f65d01cbc266af7ff139ced207f812dd6ecb | diku-kmc/kleenexlang | UTF8.hs | module KMC.Util.UTF8 (encodeChar) where
import Data.ByteString (unpack)
import qualified Data.Text as T
import qualified Data.Text.Encoding as TE
import Data.Word
encodeChar :: Char -> [Word8]
encodeChar = unpack . TE.encodeUtf8 . T.singleton
| null | https://raw.githubusercontent.com/diku-kmc/kleenexlang/d474c6015339c261b2e7bf37061175fd69185baf/src/KMC/Util/UTF8.hs | haskell | module KMC.Util.UTF8 (encodeChar) where
import Data.ByteString (unpack)
import qualified Data.Text as T
import qualified Data.Text.Encoding as TE
import Data.Word
encodeChar :: Char -> [Word8]
encodeChar = unpack . TE.encodeUtf8 . T.singleton
| |
43bb56315a272771b8faaec9e6f9fa8b9636e1e33225333134b9f8ada97c84f9 | RutledgePaulV/kube-api | core.clj | (ns kube-api.io.core
(:require [kube-api.core.core :as kube]
[clojure.tools.logging :as log]
[kube-api.io.io :as io])
(:import [okhttp3 WebSocket]
[okio ByteString]
[java.io OutputStream IOException]
[java.nio.channels ServerSocketChannel]
[java.ne... | null | https://raw.githubusercontent.com/RutledgePaulV/kube-api/ff335b5e9dbf0f10ed00227733f26898d57c2c55/kube-api-io/src/kube_api/io/core.clj | clojure | data
error
)
) | (ns kube-api.io.core
(:require [kube-api.core.core :as kube]
[clojure.tools.logging :as log]
[kube-api.io.io :as io])
(:import [okhttp3 WebSocket]
[okio ByteString]
[java.io OutputStream IOException]
[java.nio.channels ServerSocketChannel]
[java.ne... |
779dc461ae57f0ce9ae4e57788e3e6af16881cb96cf0fa5c58b4f2b91af9e306 | gsakkas/rite | 3283.ml |
let rec clone x n = if n > 0 then x :: (clone x (n - 1)) else [];;
let padZero l1 l2 =
if (List.length l1) < (List.length l2)
then ((List.append (clone 0 ((List.length l2) - (List.length l1))) l1), l2)
else (l1, (List.append (clone 0 ((List.length l1) - (List.length l2))) l2));;
let rec removeZero l =
match ... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14/3283.ml | ocaml |
let rec clone x n = if n > 0 then x :: (clone x (n - 1)) else [];;
let padZero l1 l2 =
if (List.length l1) < (List.length l2)
then ((List.append (clone 0 ((List.length l2) - (List.length l1))) l1), l2)
else (l1, (List.append (clone 0 ((List.length l1) - (List.length l2))) l2));;
let rec removeZero l =
match ... | |
b48e19e54bb7ca2d78c6c5d5046eb3f0d906138c94ea112fdac353a892c1e96a | viktoriafordos/ew20 | refusr_security.erl | %% %CopyrightBegin%
%%
Copyright 2020 . All Rights Reserved .
%%
%% Licensed under the CC0-1.0 License (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%%
%%
%% Unless required by applicable law or agreed to in writing, software... | null | https://raw.githubusercontent.com/viktoriafordos/ew20/4cafe419eda62bf5aa2455a1cfb4409d70897a4d/refusr_security.erl | erlang | %CopyrightBegin%
Licensed under the CC0-1.0 License (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright 2020 . All Rights Reserved .
distributed under the License is distributed on an " AS IS " BASIS ,
-module(refusr_security).
-export([run/1]).
-export([builtin_unsafe_func_calls/0]).
-define(DANGEROUS_FUNC_MFAS,
{erlang, binary_to_atom, 2},
{erlang, list_to_atom, 1},
{ets, n... |
34f777825bad71c566427e31fde00f03891368d3383cefafafc2721451fe3734 | migamake/json-autotype | Fstab.hs |
# LANGUAGE TemplateHaskell #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
# LANGUAGE DeriveGeneric #
module ExamplesJsonSchemaFstab where
import System.Exit (exitFailure, exitSuccess)
impor... | null | https://raw.githubusercontent.com/migamake/json-autotype/6244e1f2c0352e9a18657051b65df62b9af157cd/json-autotype/examples/json-schema/Fstab.hs | haskell | # LANGUAGE RecordWildCards #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators # |
# LANGUAGE TemplateHaskell #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE DeriveGeneric #
module ExamplesJsonSchemaFstab where
import System.Exit (exitFailure, exitSuccess)
import System.IO (stderr, hPutStrLn)
import qualified Data.ByteString.Lazy.Char8 as BSL
import ... |
31904024207489f12aa1b64efff7c599032f9e81b253cae90bd39451dcc0248e | mmontone/cl-rest-server | swagger.lisp | (defpackage rs.swagger
(:use :cl :rest-server)
(:export :define-swagger-resource))
(in-package :rs.swagger)
(defmacro define-swagger-resource (api-name)
(let ((api (find-api api-name)))
`(progn
;; Swagger docs API definition
(with-api ,api-name
(define-api-resource api-docs (:document... | null | https://raw.githubusercontent.com/mmontone/cl-rest-server/cd3a08681a1c3215866fedcd36a6bc98d223d52d/src/swagger.lisp | lisp | Swagger docs API definition
Swagger docs API implementation
Configure the API to work with Swagger
A primitive type
A schema reference
A composite type
(error "Don't know how to encode this")
(error "Not implemented yet") | (defpackage rs.swagger
(:use :cl :rest-server)
(:export :define-swagger-resource))
(in-package :rs.swagger)
(defmacro define-swagger-resource (api-name)
(let ((api (find-api api-name)))
`(progn
(with-api ,api-name
(define-api-resource api-docs (:documentation "Swagger API docs"
... |
682b407f90e7ffe5222507fbbb1fd3f54da6f65ef26aa0d414a55a451c958528 | hgoes/vvt | SVComp.hs | module Main where
import LLVM.FFI
import Foreign.Ptr
import Foreign.C
import Data.List (stripPrefix)
import System.IO
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Foldable
import System.Console.GetOpt
import System.Exit
import System.Environm... | null | https://raw.githubusercontent.com/hgoes/vvt/dd2809753d7e5059d9103ea578f36afa8294cd84/bin/SVComp.hs | haskell | Mark loads from globals as non-locks
Mark stores to globals as non-locks
instructionInsertBefore nref call | module Main where
import LLVM.FFI
import Foreign.Ptr
import Foreign.C
import Data.List (stripPrefix)
import System.IO
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Foldable
import System.Console.GetOpt
import System.Exit
import System.Environm... |
ae165ac03cca57b292a7618da84f4e26f5646a95e7473881d4fee5660b626333 | manuel-serrano/hop | multimedia.scm | ;*=====================================================================*/
;* .../project/hop/2.2.x/arch/android/hopdroid/multimedia.scm */
;* ------------------------------------------------------------- */
* Author : * /
* Creation : Thu Oct 14... | null | https://raw.githubusercontent.com/manuel-serrano/hop/481cb10478286796addd2ec9ee29c95db27aa390/arch/android/hopdroid/multimedia.scm | scheme | *=====================================================================*/
* .../project/hop/2.2.x/arch/android/hopdroid/multimedia.scm */
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* Access and control mult... | * Author : * /
* Creation : Thu Oct 14 09:54:12 2010 * /
* Last change : Mon Oct 25 09:17:29 2010 ( serrano ) * /
* Copyright : 2010 * /
(module __hopdroid-multimedia
... |
703646f174d04cf7fea6770da04bce4b7ed883992a9f630e1fa148bcb378cb4f | sgbj/MaximaSharp | format.lisp | ;;; -*- Mode:LISP; Package:MACSYMA -*-
* * ( c ) Copyright 1981 Massachusetts Institute of Technology * *
(macsyma-module format)
(declare (special $floatformat $floatint $floatfrac $floatprec $floatwidth
$floatoptions $aliases $stringdisp $lispdisp))
(defmvar $floatformat nil)
(defmvar $floatint 1)
(defmvar ... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/numeric/format.lisp | lisp | -*- Mode:LISP; Package:MACSYMA -*- |
* * ( c ) Copyright 1981 Massachusetts Institute of Technology * *
(macsyma-module format)
(declare (special $floatformat $floatint $floatfrac $floatprec $floatwidth
$floatoptions $aliases $stringdisp $lispdisp))
(defmvar $floatformat nil)
(defmvar $floatint 1)
(defmvar $floatfrac 2)
(defmvar $floatprec 3)
(d... |
c02af442b509809d99ee8cfbd438dd3c7132db66e9109ee0f4bacec8840cf9e0 | racket/eopl | interp.rkt | #lang eopl
(require "lang.rkt")
(require "data-structures.rkt")
(require "environments.rkt")
(require "store.rkt")
(require "classes.rkt")
(require (only-in racket pretty-print))
(provide value-of-program value-of instrument-let instrument-newref)
;;;;;;;;;;;;;;;; switches for instrument-let ;;;;;;;;;;;;;;;;
(defi... | null | https://raw.githubusercontent.com/racket/eopl/43575d6e95dc34ca6e49b305180f696565e16e0f/tests/chapter9/typed-oo/interp.rkt | racket | switches for instrument-let ;;;;;;;;;;;;;;;;
say (instrument-let #t) to turn instrumentation on.
(instrument-let #f) to turn it off again.
the interpreter ;;;;;;;;;;;;;;;;
args need to be non-empty for type checker
new cases for typed-oo
exercise: add instrumentation to apply-method, like that for
apply-pro... | #lang eopl
(require "lang.rkt")
(require "data-structures.rkt")
(require "environments.rkt")
(require "store.rkt")
(require "classes.rkt")
(require (only-in racket pretty-print))
(provide value-of-program value-of instrument-let instrument-newref)
(define instrument-let (make-parameter #f))
value - of - progr... |
54a57bbab4de4d31b5583402f8b5df6f7eb7a23c49c3c9f0df0e521b0400c28a | zchn/ethereum-analyzer | StorageJson.hs | module Ethereum.Analyzer.TestData.StorageJson
( storageJson
) where
import Protolude hiding (show)
storageJson :: Text
storageJson =
"{" <> " \"contracts\": {" <> " \"storage.sol:SimpleStorage\": {" <>
" }" <>
" }," <>
" \"sourceList\": [" <>
" \"storage.sol\"" <>
" ],... | null | https://raw.githubusercontent.com/zchn/ethereum-analyzer/f2a60d8b451358971f1e3b1a61658f5741c4c099/ethereum-analyzer/test/Ethereum/Analyzer/TestData/StorageJson.hs | haskell | module Ethereum.Analyzer.TestData.StorageJson
( storageJson
) where
import Protolude hiding (show)
storageJson :: Text
storageJson =
"{" <> " \"contracts\": {" <> " \"storage.sol:SimpleStorage\": {" <>
" }" <>
" }," <>
" \"sourceList\": [" <>
" \"storage.sol\"" <>
" ],... | |
384542653aa0ebc3d48f76347cd96e7b003e38d2773b22f1e2f9e67fb2640193 | poroh/ersip | ersip_uri_tel_test.erl | %%%
Copyright ( c ) 2021 Dmitry Poroh
%%% All rights reserved.
Distributed under the terms of the MIT License . See the LICENSE file .
%%%
%%% TEL URI tests
%%%
-module(ersip_uri_tel_test).
-include_lib("eunit/include/eunit.hrl").
%%===================================================================
%% Cases
%%=... | null | https://raw.githubusercontent.com/poroh/ersip/74ff784b2aab2c5a0e7e1570af4d3b06e7b4bfc1/test/uri/ersip_uri_tel_test.erl | erlang |
All rights reserved.
TEL URI tests
===================================================================
Cases
===================================================================
===================================================================
Helpers
============================================================... | Copyright ( c ) 2021 Dmitry Poroh
Distributed under the terms of the MIT License . See the LICENSE file .
-module(ersip_uri_tel_test).
-include_lib("eunit/include/eunit.hrl").
global_parse_test() ->
{ok, Tel} = ersip_uri_tel:parse(<<"tel:+1(650)555-0123;ext=123">>),
?assertEqual(global, ersip_uri_tel:ty... |
c63946be7f255eef90715245de9c5b13d6c03816f7966055931cfe7f8c4d120c | tolysz/prepare-ghcjs | Types.hs | DataKinds is needed for deriveAll0 calls on GHC 8
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
module DataFamilies.Types where
imp... | null | https://raw.githubusercontent.com/tolysz/prepare-ghcjs/8499e14e27854a366e98f89fab0af355056cf055/spec-lts8/aeson/tests/DataFamilies/Types.hs | haskell | # LANGUAGE GADTs # | DataKinds is needed for deriveAll0 calls on GHC 8
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
module DataFamilies.Types where
import Prelude ()
import P... |
52a2a4c62355f9a2e13a728977403acaf67a47e4f5b5e7978db91168cd813ead | appleshan/cl-http | cl-http-70-132.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Package : http ; Base : 10 ; Patch - File : t -*-
Patch file for CL - HTTP version 70.132
;;; Reason: Function HTTP::%HANDLE-END-OF-FILE-FOR-WITH-TRANSFER-DECODING: new.
Function HTTP::%MAKE - LOCAL - STREAM - FUNCTION - FOR - WITH - TRANSFER - DECODING : caref... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lispm/server/patch/cl-http-70/cl-http-70-132.lisp | lisp | Syntax : ansi - common - lisp ; Package : http ; Base : 10 ; Patch - File : t -*-
Reason: Function HTTP::%HANDLE-END-OF-FILE-FOR-WITH-TRANSFER-DECODING: new.
DEFINE-CONDITION HTTP::INSUFFICIENT-DATA: mixin end-of-file so resignalling of condition works.
DOMAIN - FIXES.LISP.33 ) ,
MAILBOX - FORMAT.LISP.24 ) ,
MAILE... | Patch file for CL - HTTP version 70.132
Function HTTP::%MAKE - LOCAL - STREAM - FUNCTION - FOR - WITH - TRANSFER - DECODING : careful with client retries .
Written by JCMa , 5/11/01 15:55:58
while running on FUJI - VLM from FUJI:/usr / lib / symbolics / ComLink-39 - 8 - F - MIT-8 - 5.vlod
with Open Genera 2... |
ec97e4a6d40c6a9a40b7616aa594eb8199b4cd160a27c0aea4d5c9d900d35364 | akapav/js | jsos.lisp | (in-package :cl-js)
(defvar *env*)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defparameter *std-types*
#(:object :function :array :string :arguments :regexp #+js-dates :date :error :type-error
:reference-error :syntax-error :uri-error :range-error :eval-error :boolean :number))
(defun type-... | null | https://raw.githubusercontent.com/akapav/js/3a9a1a887bef6b571922f2820f871935121052a5/jsos.lisp | lisp | (Some of this code is *really* unorthogonal, repeating itself a
lot. This is mostly due to the fact that we are using different
code paths, some of which can assume previously-checked conditions,
to optimize.)
Space leak when we don't have weak hashes
Used for non-cached lookups
Writing
Check prototypes for rea... | (in-package :cl-js)
(defvar *env*)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defparameter *std-types*
#(:object :function :array :string :arguments :regexp #+js-dates :date :error :type-error
:reference-error :syntax-error :uri-error :range-error :eval-error :boolean :number))
(defun type-... |
667667fd679a92186ddc69b377b61a56a700f1a52a86e70be1e3a9478ff7768f | psilord/option-9 | think.lisp | (in-package :option-9)
#+option-9-debug (declaim (optimize (safety 3) (space 0) (speed 0) (debug 3)))
;; Thinking happens on each physics fixed timestep.
;; By default, nothing thinks...
(defmethod think (ent)
nil)
;; but enemies think...
(defmethod think ((ent enemy))
(cond
((plusp (time-to-next-action ent... | null | https://raw.githubusercontent.com/psilord/option-9/44d96cbc5543ee2acbdcf45d300207ef175462bc/think.lisp | lisp | Thinking happens on each physics fixed timestep.
By default, nothing thinks...
but enemies think...
If there is more time to go, we'll have to wait.
Otherwise we have an idea to do something.
To remove periodicity, we'll recompute the idea-rate
Then, we wait until that time comes. | (in-package :option-9)
#+option-9-debug (declaim (optimize (safety 3) (space 0) (speed 0) (debug 3)))
(defmethod think (ent)
nil)
(defmethod think ((ent enemy))
(cond
((plusp (time-to-next-action ent))
(decf (time-to-next-action ent) *dt*))
(t
(idea ent)
(setf (idea-rate ent) (compute-rat... |
a34e227045f0a299852eeea5887b5059e887a2660b94966f577ae119de4fb94f | gildor478/ounit | fakeHTML.ml | (**************************************************************************)
The OUnit library
(* *)
Copyright ( C ) 2002 - 2008 Maas - Maarten Zeeman .
Copyright... | null | https://raw.githubusercontent.com/gildor478/ounit/faf4936b17507406c7592186dcaa3f25c6fc138a/test/fakeHTML/fakeHTML.ml | ocaml | ************************************************************************
Permission is hereby grante... | The OUnit library
Copyright ( C ) 2002 - 2008 Maas - Maarten Zeeman .
Copyright ( C ) 2010 OCamlCore SARL
Copyright ( C ) 2013
The package OUnit is cop... |
2d8ccd413e0f2b7bc4290c0a94d8f4950ac9d673a0bbd8e582b63917c38114e5 | alesaccoia/festival_flinger | ogi_token.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<--OHSU-->;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
Oregon Health & Science University ; ;
Division of Biomedical Computer Science ; ;
... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/ogi/ogi_token.scm | scheme | <--OHSU-->;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;
;
;
;
;
;;
;
release of the Festival TTS system. ;;
... |
(set! OGI_english_token_pos_cart_trees
'(
("[0-9]+"
((lisp_num_digits < 3.8)
((p.lisp_token_pos_guess is month)
((lisp_month_range is 0) ((year)) ((ordinal)))
((n.lisp_token_pos_guess is month)
((lisp_month_range is 0) ((cardinal)) ((ordinal)))
((n.lisp_token_pos_guess is numeric)
... |
148c757ff9ebf912c9e6dbcbdb673c00885d6fbcf8a28612ba9ddfdf786b2963 | biocad/openapi3 | TypeShape.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
module Data.OpenApi.Internal.TypeShape where
import Data.Proxy
import GHC.Generics
import GHC.TypeLits
import GHC.Exts (Constraint)
-- | Shape of a datatype.
data TypeShape
... | null | https://raw.githubusercontent.com/biocad/openapi3/e4b27f3b5dbc938a10b4a78eb88d0dca6341eab9/src/Data/OpenApi/Internal/TypeShape.hs | haskell | # LANGUAGE ConstraintKinds #
| Shape of a datatype.
^ A simple enumeration.
^ A product or a sum of non-unit products.
^ Mixed sum type with both unit and non-unit constructors.
| A combined shape for a product type.
| A combined shape for a sum type.
| Infer a 'TypeShape' for a generic representation of a type. | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
module Data.OpenApi.Internal.TypeShape where
import Data.Proxy
import GHC.Generics
import GHC.TypeLits
import GHC.Exts (Constraint)
data TypeShape
type family ProdCombine (a :: TypeShape) (b :: TypeShape) :... |
3bb70f015aa23e6ab5744bb89a0883441238e40ad9571de5f4f2ec8827e09db5 | onedata/op-worker | file_copy.erl | %%%--------------------------------------------------------------------
@author
( C ) 2016 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%--------------------------------------------------------------------
%%% @doc
%%% Implementation of copy.
%%% @end... | null | https://raw.githubusercontent.com/onedata/op-worker/02bfef7737b6e8dbcf0559f0a207f290e069fd21/src/modules/logical_file_manager/utils/file_copy.erl | erlang | --------------------------------------------------------------------
@end
--------------------------------------------------------------------
@doc
Implementation of copy.
@end
--------------------------------------------------------------------
API
Callback called after each successful write operation;
the num... | @author
( C ) 2016 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(file_copy).
-author("Tomasz Lichon").
-include("global_definitions.hrl").
-include("modules/fslogic/acl.hrl").
-include("modules/fslogic/fslogic_common.hrl").
-include("modules/logical_file... |
0d75a649a500d696e144c47aafae2fc5cf72505739dda27d76fd6ade9ca5aa2c | 3b/learnopengl | transformations.lisp | ;;;; shader code
(defpackage transformations/shaders
(:use #:3bgl-glsl/cl)
;; shadow POSITION so we don't conflict with the default definition
of CL : POSITION as ( input position : vec4 : location 0 )
(:shadow position))
(in-package transformations/shaders)
(input position :vec3 :location 0)
(input color :vec... | null | https://raw.githubusercontent.com/3b/learnopengl/30f910895ef336ac5ff0b4cc676af506413bb953/factored/transformations.lisp | lisp | shader code
shadow POSITION so we don't conflict with the default definition
back to normal lisp code
we use sb-cga for matrix/vector math
create the transformation
get matrix's uniform location and set matrix | (defpackage transformations/shaders
(:use #:3bgl-glsl/cl)
of CL : POSITION as ( input position : vec4 : location 0 )
(:shadow position))
(in-package transformations/shaders)
(input position :vec3 :location 0)
(input color :vec3 :location 1 :stage :vertex)
(input tex-coord :vec2 :location 2)
(output our-color :ve... |
73c49c1762ffa668fbb60751294596c7f154ad57db452e1bb27bf4c506d7002d | herbelin/coq-hh | check.ml | (************************************************************************)
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/checker/check.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
************************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Util
open Names
... |
cbb582a41e7ecac72ce63660fb744b70745d67ac675e9b2b7e5d6ad2e8ef75dc | haskell-tools/haskell-tools | MultiMatch.hs | module Refactor.InlineBinding.MultiMatch where
b = a
a x "a" = x
a "a" y = y
a x y = x ++ y | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/InlineBinding/MultiMatch.hs | haskell | module Refactor.InlineBinding.MultiMatch where
b = a
a x "a" = x
a "a" y = y
a x y = x ++ y | |
2ead28532f3117c56860608a43f3521b0d3b7bc8f73ac71901557de26926fe10 | 8c6794b6/haskell-sc-scratch | Take04c.hs | # LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE UndecidableInstances #
|
Module : $ Header$
Copy... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/Oleg/TTF/Extra/Take04c.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE GADTs #
----------------------------------------------------------------------------
Eval interpreter
----------------------------------------------------------------------------
Show interpreter
----------------------------------------------------------------------------
Syntax tr... | # LANGUAGE NoMonomorphismRestriction #
# LANGUAGE KindSignatures #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE UndecidableInstances #
|
Module : $ Header$
CopyRight : ( c ) 8c6794b6
License : : ... |
3a241625bce84d3527eaed8103277d5289a51524041fb6b7e6745bccb3b9fcdc | Julow/oowd | internal.ml | let remove parent child = parent#remove child
| null | https://raw.githubusercontent.com/Julow/oowd/9eee1694b73cf518cf9eb33a0d541882ec308ea2/lablgtk3-lwd/internal.ml | ocaml | let remove parent child = parent#remove child
| |
a07e2b80a7ce77da753fc02aee07f27d750d33fd99998b96fb3fb6d34ac0d129 | simingwang/emqx-plugin-kafkav5 | logger_olp.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2017 - 2020 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/rel/emqx_plugin_kafka/lib/kernel-8.3/src/logger_olp.erl | erlang |
%CopyrightBegin%
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 lan... | Copyright Ericsson AB 2017 - 2020 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(logger_olp).
-behaviour(gen_server).
-include("logger_olp.hrl").
-include("logger_internal.hrl").
-export([... |
155f07d14b13b74219a1986e7c4952a69fbbb1176d2b039d509e5f76b8851247 | abailly/xxi-century-typed | Run.hs | # LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE TypeSynonymInstances #-}
module Minilang.REPL.Run where
import Control.Monad.Catch
import Data.Text hiding (replicate)
import qualified Data.Text as Text
import Debug.Trace (trace)... | null | https://raw.githubusercontent.com/abailly/xxi-century-typed/89df5eab3747ddb0ea37030ddb1947fb8c14265b/minilang/src/Minilang/REPL/Run.hs | haskell | # LANGUAGE TypeSynonymInstances #
| Run a REPL session | # LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
module Minilang.REPL.Run where
import Control.Monad.Catch
import Data.Text hiding (replicate)
import qualified Data.Text as Text
import Debug.Trace (trace)
import Minilang.Env
import Minilang.E... |
e60f0de34752c016df774a98ab1414e8c9d0077e32fc8c8697a66ed57e7157ea | cljfx/cljfx | color_input.clj | (ns cljfx.fx.color-input
"Part of a public API"
(:require [cljfx.composite :as composite]
[cljfx.lifecycle :as lifecycle]
[cljfx.coerce :as coerce])
(:import [javafx.scene.effect ColorInput]))
(set! *warn-on-reflection* true)
(def props
(composite/props ColorInput
:width [:setter l... | null | https://raw.githubusercontent.com/cljfx/cljfx/543f7409290051e9444771d2cd86dadeb8cdce33/src/cljfx/fx/color_input.clj | clojure | (ns cljfx.fx.color-input
"Part of a public API"
(:require [cljfx.composite :as composite]
[cljfx.lifecycle :as lifecycle]
[cljfx.coerce :as coerce])
(:import [javafx.scene.effect ColorInput]))
(set! *warn-on-reflection* true)
(def props
(composite/props ColorInput
:width [:setter l... | |
42f20bbe793478b86c6b72d5da0f1d0bc4828f3c58d0ea60a687a18afcf4ba96 | haskell/hackage-server | BuildReport.hs | # LANGUAGE CPP #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
# LANG... | null | https://raw.githubusercontent.com/haskell/hackage-server/3b75f8c52d8c0bfc94c4c57295d18505b5360f6e/src/Distribution/Server/Features/BuildReports/BuildReport.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
---------------------------------------------------------------------------
|
Module : Distribution.Client.Reporting
License : BSD-like
Maintainer :
Stability : experimental
Portability : portable
Anon... | # LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
Copyright : ( c ) 2008
module Distribution.Server.Features.BuildReports.Bui... |
a2b64f82596f9ddef2d077631dbff4e15177a9704f67106b5f2be79cc8334f75 | tweag/asterius | cgrun021.hs | -- !!! Tests garbage collection in the branch of a case
-- !!! alternative where the constructor is returned in the heap.
This is also a rather stressful test for another reason .
The mutual recursion between munch and f causes lots of
closures to be built , of the form ( munch n s ) , for some n and s.
... | null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/codeGen/cgrun021.hs | haskell | !!! Tests garbage collection in the branch of a case
!!! alternative where the constructor is returned in the heap.
(NB: call the "error" makes it strict)
garbage collection *HERE*, please!
(forced by the closure for n-1)
munch and f are mutually recursive, just to be nasty |
This is also a rather stressful test for another reason .
The mutual recursion between munch and f causes lots of
closures to be built , of the form ( munch n s ) , for some n and s.
Now , all of these closures are entered and each has as its value
the result delivere by the next ; so the result ... |
aebbaa2174890a24910327318026bdcb83a3048fd0fc485c6ea8fb8b9dbe1c34 | vikram/lisplibraries | wiki.lisp | ;; -*- lisp -*-
;;;; * Dependencies
(asdf:oos 'asdf:load-op :cl-ppcre)
(asdf:oos 'asdf:load-op :ucw.examples)
(in-package :it.bese.ucw-user)
;;;; * Introduction
;;;; This tutorial will show you how to create web applications with
UnCommon Web ( UCW ) . During this tutorial we will create two
distinct , but ... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/ucw-boxset/ucw_dev/examples/wiki.lisp | lisp | -*- lisp -*-
* Dependencies
* Introduction
This tutorial will show you how to create web applications with
style," will be developed using the same mind set and
organization as you would use with any other web framework
wiki, "UCW style," will be an idiomatic UCW application.
interfaces can coexist within the s... |
(asdf:oos 'asdf:load-op :cl-ppcre)
(asdf:oos 'asdf:load-op :ucw.examples)
(in-package :it.bese.ucw-user)
UnCommon Web ( UCW ) . During this tutorial we will create two
distinct , but similar , wikis . The first , " regular
( though it will use as much of UCW as possible ) . The second
We 've named... |
b7716f447f873b6831c3a9df83bad3e0e2ddd0c8110f9974fe18e258762b2c14 | facebook/infer | ResultsDirEntryName.mli |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/3199c49bb27f3cc823db10137f04f01a51025b3d/infer/src/base/ResultsDirEntryName.mli | ocaml | * Entries in the results directory (infer-out/).
* directory for storing allocation traces
* the analysis database
* the capture database
* list of infer-out/ directories that contain capture artefacts
* results of the clang test determinator
* directory for datalog facts
* directory containing debug data
* con... |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
82db649abd61e15d73c3e64c10f2d8c3354a46c48d47bd923828c5a966ccf633 | TrustInSoft/tis-kernel | oneret.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/kernel_internals/typing/oneret.ml | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
Copyright ( C ) 2001 - 2003
< > ... |
9cad95595437b788085ba912d89d36cc0ee4879b7f71e6dfed49e59e6a9ee177 | pink-gorilla/webly | provider.cljc | (ns modular.oauth2.provider
(:require
[clojure.string]
[clojure.set :refer [rename-keys]]
[taoensso.timbre :as timbre :refer [debug info infof error]]
[cemerick.url :refer [url url-encode]]
[modular.oauth2.provider.google :as google]
[modular.oauth2.provider.github :as github]
[modular.oauth2.pro... | null | https://raw.githubusercontent.com/pink-gorilla/webly/1cbac54fc22dfdf01eefdecbd7ce99f86aa79bd2/oauth2/src/modular/oauth2/provider.cljc | clojure | our page strucutre for different providers
PROVIDER LIST
RING CONFIG
AUTHORIZE - START
(let [{:keys [proto host port path]} (url url-str)
(str ":" port)
"")
url-str-no-qp (str proto ":" host port-str path)]
(info "url without qp: " url-str-no-qp)
:response_type au... | (ns modular.oauth2.provider
(:require
[clojure.string]
[clojure.set :refer [rename-keys]]
[taoensso.timbre :as timbre :refer [debug info infof error]]
[cemerick.url :refer [url url-encode]]
[modular.oauth2.provider.google :as google]
[modular.oauth2.provider.github :as github]
[modular.oauth2.pro... |
c316192994a02b6d03d87dc67dbe107ede82d0f4794e1c8d6f0cf8924dad115f | penrose/geometric-queries | ShapeUtils.hs | # LANGUAGE RankNTypes , AllowAmbiguousTypes , NoMonomorphismRestriction #
{-# LANGUAGE ConstraintKinds #-}
module ShapeUtils where
import MathUtils
import Debug.Trace
import Numeric.AD
type Autofloat a = (RealFloat a, Floating a, Real a, Show a, Ord a)
-- TODO: update and "store" state info in backend maybe and let... | null | https://raw.githubusercontent.com/penrose/geometric-queries/79676192b2740e7bed39535611db8949b7846e14/rewrite-incomplete/ShapeUtils.hs | haskell | # LANGUAGE ConstraintKinds #
TODO: update and "store" state info in backend maybe and let frontend only visualize
-- sketch code for an objective record. Idea is to store & pass indices instead of all information
data Objective a = Objective {
shapes :: [Int],
objective :: Int, -- list of function elsewhere
}... | # LANGUAGE RankNTypes , AllowAmbiguousTypes , NoMonomorphismRestriction #
module ShapeUtils where
import MathUtils
import Debug.Trace
import Numeric.AD
type Autofloat a = (RealFloat a, Floating a, Real a, Show a, Ord a)
data Shape a =
Pt (Point a)
| Seg (LineSeg a)
| Poly (Polygon a)
| Pline (Polyline a... |
6f72ab4585c0d3aa3b9c89f4a2e7014bfd19ed84451e887c28434614923d2beb | niamu/digimon-card-game | common.cljc | (ns dcg.codec.common
(:require
[clojure.set :as set]
[clojure.string :as string]
#?(:cljs [goog.crypt :as crypt])))
(def version 5)
(def prefix "DCG")
(def header-size
"version & digi-eggs deck count, checksum, and deck name length bytes"
3)
(def language->bits
{:ja 0x00
:en 0x01
:zh 0x02})
(d... | null | https://raw.githubusercontent.com/niamu/digimon-card-game/b56dd7c2e035da7a900f49db6d371f9ba781e0f4/src/dcg/codec/common.cljc | clojure | Base64 string | (ns dcg.codec.common
(:require
[clojure.set :as set]
[clojure.string :as string]
#?(:cljs [goog.crypt :as crypt])))
(def version 5)
(def prefix "DCG")
(def header-size
"version & digi-eggs deck count, checksum, and deck name length bytes"
3)
(def language->bits
{:ja 0x00
:en 0x01
:zh 0x02})
(d... |
9d186633e4a10ff656517e0b32ad8dbf1750164eb200523ac547fb9d8d012b27 | sunng87/rigui | project.clj | (defproject rigui "0.5.4-SNAPSHOT"
:description "Timing Wheels"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.11.1" :scope "provided"]
[org.clojure/clojurescript "1.11.4" :scope "provided"]
[org.clojure/cor... | null | https://raw.githubusercontent.com/sunng87/rigui/f5d90183392f9aeb7aa8e12b30ab8c196046ca3a/project.clj | clojure | (defproject rigui "0.5.4-SNAPSHOT"
:description "Timing Wheels"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.11.1" :scope "provided"]
[org.clojure/clojurescript "1.11.4" :scope "provided"]
[org.clojure/cor... | |
766c72fa878fbeeadab93ddba62fa288d48f29a61dfac977d2db3813cbbaa51c | ghc/packages-Cabal | LegacyExeDependency.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
module Distribution.Types.LegacyExeDependency
( LegacyExeDependency(..)
) where
import Distribution.Compat.Prelude
import Prelude ()
import Distribution.Parsec
import Distribution.Pretty
import Distribution.Version (VersionRange, anyVersion)
im... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/Cabal/Distribution/Types/LegacyExeDependency.hs | haskell | # LANGUAGE DeriveDataTypeable #
| Describes a legacy `build-tools`-style dependency on an executable
It is "legacy" because we do not know what the build-tool referred to. It
could refer to a pkg-config executable (PkgconfigName), or an internal
executable (UnqualComponentName). Thus the name is stringly typed.
| # LANGUAGE DeriveGeneric #
module Distribution.Types.LegacyExeDependency
( LegacyExeDependency(..)
) where
import Distribution.Compat.Prelude
import Prelude ()
import Distribution.Parsec
import Distribution.Pretty
import Distribution.Version (VersionRange, anyVersion)
import qualified Distribution.Compat.C... |
6c34c7093d477f3e71fcbcf7cb233e58972ac60316c815c7a0b14159dc01f168 | nonowarn/has | Engine.hs | module Data.Has.Engine where
import Data.Has.TypeList
| @Field a@ is a type list which contains only one element of
And every field in the records should be this type .
--
If you concatenate fields with at type - level , @(&)@ at
-- value-level, it becomes a record can be manipulated by functions
-- i... | null | https://raw.githubusercontent.com/nonowarn/has/225931d880efadd433bb18d3c6163f2ff01ba120/src/Data/Has/Engine.hs | haskell |
value-level, it becomes a record can be manipulated by functions
in this module.
concatenated rows. For example, Following expressions are
valid.
> -- Concatenation of rows (i.e. record)
> field "string" & field True
> -- Concatenation of records
> -- ... And concatenations between a field and a rec... | module Data.Has.Engine where
import Data.Has.TypeList
| @Field a@ is a type list which contains only one element of
And every field in the records should be this type .
If you concatenate fields with at type - level , @(&)@ at
type Field a = a ::: TyNil
| Creates a ' Field ' of
field :: a -> Field a
f... |
40608bf3e86d7a1a233b5d1637c2abed7abf04dd9b655e611a786fc630005887 | keyfender/keyfender | contents.ml |
module Raw (T : sig type t end) =
struct
type t = T.t
let to_raw (x:t) = Marshal.to_string x []
let of_raw x : t = Marshal.from_string x 0
let t = Irmin.Type.(like string) of_raw to_raw
let merge = Irmin.Merge.idempotent (Irmin.Type.option t)
end
module Sexp
(T : S.SexpConvertable)
: Irmin.Contents.S with... | null | https://raw.githubusercontent.com/keyfender/keyfender/af7d1b1ada0c70ec98f04b2a701095efac805106/src/contents.ml | ocaml |
module Raw (T : sig type t end) =
struct
type t = T.t
let to_raw (x:t) = Marshal.to_string x []
let of_raw x : t = Marshal.from_string x 0
let t = Irmin.Type.(like string) of_raw to_raw
let merge = Irmin.Merge.idempotent (Irmin.Type.option t)
end
module Sexp
(T : S.SexpConvertable)
: Irmin.Contents.S with... | |
6c74617d19f962717b493840b27e18b8c8c8518da1db0f2f2d9ee4c673f6aa18 | graninas/Functional-Design-and-Architecture | Listing 5.9 - STM example.hs | module StmExample where
import Control.Monad (forever, mapM_)
import Control.Concurrent (forkIO, threadDelay, killThread, ThreadId)
import Control.Concurrent.STM
(newTVarIO, readTVar, writeTVar, atomically, TVar, STM (..))
increaseValueTrans :: TVar Int -> STM ()
increaseValueTrans tvVal = do
val <- readTVar... | null | https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/1736abc16d3e4917fc466010dcc182746af2fd0e/First-Edition/BookSamples/CH05/Listing%205.9%20-%20STM%20example.hs | haskell | module StmExample where
import Control.Monad (forever, mapM_)
import Control.Concurrent (forkIO, threadDelay, killThread, ThreadId)
import Control.Concurrent.STM
(newTVarIO, readTVar, writeTVar, atomically, TVar, STM (..))
increaseValueTrans :: TVar Int -> STM ()
increaseValueTrans tvVal = do
val <- readTVar... | |
d70394362892d368f0c21b730e27871a7c2fec21efbf8a64bfcb2a5e653c923c | philnguyen/soft-contract | last-pair.rkt | #lang racket
(require soft-contract/fake-contract)
(define (lastpair x)
(if (cons? #|HERE|# x) (lastpair (cdr x)) x))
(provide/contract
[lastpair (cons? . -> . cons?)])
| null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/fail-ce/last-pair.rkt | racket | HERE | #lang racket
(require soft-contract/fake-contract)
(define (lastpair x)
(provide/contract
[lastpair (cons? . -> . cons?)])
|
c50df216697b9bdc0d0ffa5efb0f5df0ddb618e210c9620380ca488b9d3e83e1 | overtone/shadertone | 03demo_translate.clj | (ns demo3
(:require [shadertone.shader :as s]
[shadertone.translate :as trans]))
translate this Clojure - like code to a GLSL shader
(trans/defshader simple
'((uniform vec3 iResolution)
(uniform float iGlobalTime)
(defn void main []
(setq vec2 uv (/ gl_FragCoord.xy iResolution.xy))
... | null | https://raw.githubusercontent.com/overtone/shadertone/eac82509601621fa788550c6548409fdf845b965/examples/03demo_translate.clj | clojure | (print simple)
wrap the shader in an atom to allow it to be watched & modified
swap it out for something simple
swap it back | (ns demo3
(:require [shadertone.shader :as s]
[shadertone.translate :as trans]))
translate this Clojure - like code to a GLSL shader
(trans/defshader simple
'((uniform vec3 iResolution)
(uniform float iGlobalTime)
(defn void main []
(setq vec2 uv (/ gl_FragCoord.xy iResolution.xy))
... |
c3bd2b6363bef54bc77d3ea2ca56da6625209894f2e726de8d4bbb1f814445ff | nkaretnikov/OOHaskell | Existential.hs | {-# OPTIONS -fglasgow-exts #-}
( C ) 2004 - 2005 , Oleg Kiselyov &
's overlooked object system
module Polymorph where
import Shape
import Circle
import Rectangle
-- Existential envelope for `drawables'
data Drawable = forall a. Draw a
=> Drawable (Shape a)
Weirich 's / 's test case
main =
do
... | null | https://raw.githubusercontent.com/nkaretnikov/OOHaskell/ddf42cfa62f8bd27643ff6db136dec6c14466232/repository/shapes/Haskell/Shapes2/Existential.hs | haskell | # OPTIONS -fglasgow-exts #
Existential envelope for `drawables'
Handle the shapes polymorphically
Handle rectangle-specific instance
Create a rectangle instance |
( C ) 2004 - 2005 , Oleg Kiselyov &
's overlooked object system
module Polymorph where
import Shape
import Circle
import Rectangle
data Drawable = forall a. Draw a
=> Drawable (Shape a)
Weirich 's / 's test case
main =
do
let scribble = [ Drawable (rectangle 10 20 5 6)
... |
3dcd6714afb94f369a8f5a82ff2d938a9411c1606b38b8975bdadf935cf8548b | roelvandijk/numerals | TestData.hs | |
[ @ISO639 - 1@ ] -
[ @ISO639 - 2@ ] ach
[ @ISO639 - 3@ ] ach
[ @Native name@ ] [ @English name@ ]
[@ISO639-1@] -
[@ISO639-2@] ach
[@ISO639-3@] ach
[@Native name@] Lwo
[@English name@] Acholi
-}
module Text.Numeral.Language.ACH.TestData (... | null | https://raw.githubusercontent.com/roelvandijk/numerals/b1e4121e0824ac0646a3230bd311818e159ec127/src-test/Text/Numeral/Language/ACH/TestData.hs | haskell | ------------------------------------------------------------------------------
Imports
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Test data
---------------------------------------------------------------... | |
[ @ISO639 - 1@ ] -
[ @ISO639 - 2@ ] ach
[ @ISO639 - 3@ ] ach
[ @Native name@ ] [ @English name@ ]
[@ISO639-1@] -
[@ISO639-2@] ach
[@ISO639-3@] ach
[@Native name@] Lwo
[@English name@] Acholi
-}
module Text.Numeral.Language.ACH.TestData (... |
bd59febad7849b035e6be2c6496b2a1f5797c4c6e2907c4ba7fdf50bd272e25a | feliciofilipe/university | Exp.hs |
( c ) MP - I ( 1998/9 - 2006/7 ) and CP ( 2005/6 - 2018/19 )
module Exp where
import Cp
import BTree
import LTree
import List
import Data.List
import FTree
import System.Process
import GHC.IO.Exception
import St
-- (0) Functions dependent on your OS -------------------------------------
wopen = ("start/b "++)
mo... | null | https://raw.githubusercontent.com/feliciofilipe/university/f2b5a00921c97d48033edbe21488ac829927caae/2nd/CP/src/Exp.hs | haskell | (0) Functions dependent on your OS -------------------------------------
open = wopen
---------------------------------------------------
expressions are either variables
or terms involving operators and
subterms
-----------------------------------------------------
-------------------------------------------------... |
( c ) MP - I ( 1998/9 - 2006/7 ) and CP ( 2005/6 - 2018/19 )
module Exp where
import Cp
import BTree
import LTree
import List
import Data.List
import FTree
import System.Process
import GHC.IO.Exception
import St
wopen = ("start/b "++)
mopen = ("open "++)
1 ) Windows
2 ) Mac OS
open = mopen
expShow fn e ... |
e3dd125e8d13cafb608a492380bfe3c445580cf41d6896c710cd0d18a16fa46d | Fandoozle/AutoCAD | ReplaceTXTwBlock.lsp |
;;;; This replaces txt with a block with an attribute tag
(defun c:Txt2Blk (/ T2B_Selection T2B_Baseblock T2B_AttributeTag T2B_ActiveLayout T2B_ActiveDoc T2B_Text T2B_Block)
(setq T2B_Baseblock "ANNO-13A")
(setq T2B_AttributeTag "CH1")
(if
(and
(not (vl-catch-all-error-p (vl-catch-all-app... | null | https://raw.githubusercontent.com/Fandoozle/AutoCAD/18480cd17c9b46718762c3155f2bca1be2e2e5e2/ReplaceTXTwBlock.lsp | lisp | This replaces txt with a block with an attribute tag |
(defun c:Txt2Blk (/ T2B_Selection T2B_Baseblock T2B_AttributeTag T2B_ActiveLayout T2B_ActiveDoc T2B_Text T2B_Block)
(setq T2B_Baseblock "ANNO-13A")
(setq T2B_AttributeTag "CH1")
(if
(and
(not (vl-catch-all-error-p (vl-catch-all-apply 'vla-item (list (vla-get-Blocks (setq T2B_ActiveDoc (vl... |
bce940c1740a6415ef7eaab7e83116a73abb509bb312f823f910f2c3ccc58201 | BranchTaken/Hemlock | test_mul.ml | open! Basis.Rudiments
open! Basis
open U128
let test () =
let rec test_pairs = function
| [] -> ()
| (x, y) :: pairs' -> begin
let z = x * y in
File.Fmt.stdout
|> fmt ~alt:true ~zpad:true ~width:32L ~radix:Radix.Hex ~pretty:true x
|> Fmt.fmt " * "
|> fmt ~alt:true ~zpa... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/u128/test_mul.ml | ocaml | open! Basis.Rudiments
open! Basis
open U128
let test () =
let rec test_pairs = function
| [] -> ()
| (x, y) :: pairs' -> begin
let z = x * y in
File.Fmt.stdout
|> fmt ~alt:true ~zpad:true ~width:32L ~radix:Radix.Hex ~pretty:true x
|> Fmt.fmt " * "
|> fmt ~alt:true ~zpa... | |
a27f5399abf7114fcd8e72cd381256aae4b939a98984581588a5a99404b4ee4d | lispnik/cl-http | translations.lisp | -*- Syntax : Ansi - Common - Lisp ; Base : 10 ; Mode : lisp ; Package : common - lisp - user -*-
;;;
Copyright , 1994 - 1995
;;; All rights reserved.
;;;
Tried to make MAC - TRANSLATIONS.LISP more portable - OBC
Copyright ( C ) 1995 , OBC for non MCL Genera ports .
;;;
;;;;;;---------------------------------... | null | https://raw.githubusercontent.com/lispnik/cl-http/84391892d88c505aed705762a153eb65befb6409/lw/translations.lisp | lisp | Base : 10 ; Mode : lisp ; Package : common - lisp - user -*-
All rights reserved.
-------------------------------------------------------------------
LOGICAL PATHNAME HOST FOR HTTP
use namestring to get host component too
wild-bit) | Copyright , 1994 - 1995
Tried to make MAC - TRANSLATIONS.LISP more portable - OBC
Copyright ( C ) 1995 , OBC for non MCL Genera ports .
#+(or Allegro LispWorks)
(in-package "CL-USER")
(defparameter *http-directory*
(or #+MCL (directory-namestring ccl:*loading-file-source-file*)
#+Genera "jefferson.ai... |
6c34cfdf9fe3f9e5fcf08adb8671eefe4986fac8bddae32e93c5f52096614786 | knutin/elli | elli_example_middleware.erl | -module(elli_example_middleware).
-export([handle/2, handle_event/3]).
-behaviour(elli_handler).
%%
%% ELLI
%%
handle(Req, _Args) ->
case elli_request:path(Req) of
[<<"middleware">>, <<"short-circuit">>] ->
{200, [], <<"short circuit!">>};
_ ->
ignore
end.
%%
%% ELL... | null | https://raw.githubusercontent.com/knutin/elli/35eb9e8af459f48698bae7c6096d128e2f34fd6a/src/elli_example_middleware.erl | erlang |
ELLI
ELLI EVENT CALLBACKS
| -module(elli_example_middleware).
-export([handle/2, handle_event/3]).
-behaviour(elli_handler).
handle(Req, _Args) ->
case elli_request:path(Req) of
[<<"middleware">>, <<"short-circuit">>] ->
{200, [], <<"short circuit!">>};
_ ->
ignore
end.
handle_event(_Event, ... |
81639a8e60667d1202100f3c95d87151059d37a411428bdac81d59e034958c12 | ocaml-opam/opam-compiler | op.ml | open! Import
let try_ r ~if_command_failed =
match r with
| Ok x -> Ok x
| Error (`Command_failed _) as e ->
let open Let_syntax.Result in
let* () = if_command_failed () in
e
| Error _ as e -> e
let create runner github_client source switch_name ~configure_command =
let switch_name =
m... | null | https://raw.githubusercontent.com/ocaml-opam/opam-compiler/0e4d8e2547c839d32da995d6748f55c4a56183a1/lib/op.ml | ocaml | open! Import
let try_ r ~if_command_failed =
match r with
| Ok x -> Ok x
| Error (`Command_failed _) as e ->
let open Let_syntax.Result in
let* () = if_command_failed () in
e
| Error _ as e -> e
let create runner github_client source switch_name ~configure_command =
let switch_name =
m... | |
170474af4c7172f3f3578d617161aa1e4211dbba16b184b0513fc87795277f52 | amir-sabbaghi/proxy | HTTPParser.hs | module HTTPParser ( HTTPRequest (..)
, parseHTTP
, parse
, httpParser
) where
import Text.Parsec
import Text.Parsec.ByteString
import Text.Parsec.Prim
import Text.Parsec.Combinator
import Text.Parsec.Char
import Data.ByteString hiding (elem, count... | null | https://raw.githubusercontent.com/amir-sabbaghi/proxy/9dadd56e7b365eb2e70759da10d3a517c07783df/src/HTTPParser.hs | haskell | module HTTPParser ( HTTPRequest (..)
, parseHTTP
, parse
, httpParser
) where
import Text.Parsec
import Text.Parsec.ByteString
import Text.Parsec.Prim
import Text.Parsec.Combinator
import Text.Parsec.Char
import Data.ByteString hiding (elem, count... | |
4be6c49e081d07ccee274fc780cd606c345f4e896242104ff0480927a7b58169 | huangjs/cl | dgetrf.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l ,... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/share/lapack/lapack/dgetrf.lisp | lisp | Compiled by f2cl version:
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 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l , v 1.48 2008/08/24 00:56:27 rt... |
c7dab40229083781960a716e89e9eee3e30b321452f1651cc850abd73363d201 | Dasudian/DSDIN | dsdo_query_tx.erl |
-module(dsdo_query_tx).
-include("oracle_txs.hrl").
-behavior(dsdtx).
%% Behavior API
-export([new/1,
type/0,
fee/1,
ttl/1,
nonce/1,
origin/1,
check/5,
process/5,
accounts/1,
signers/2,
serialization_template/1,
seria... | null | https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/dsdoracle/src/dsdo_query_tx.erl | erlang | Behavior API
Additional getters
swagger schema name
-- Local functions ------------------------------------------------------- |
-module(dsdo_query_tx).
-include("oracle_txs.hrl").
-behavior(dsdtx).
-export([new/1,
type/0,
fee/1,
ttl/1,
nonce/1,
origin/1,
check/5,
process/5,
accounts/1,
signers/2,
serialization_template/1,
serialize/1,
... |
531aaf1872d468005f44025bf3d15080478e2c57c349a415447d84cc2baaa6b7 | csgordon/cayenne | CSyntax.hs | module CSyntax(CProgram(..), CModule(..), CInterface(..), CExpr(..), CType, CSumType(..),
COpenArg(..), CClause(..), CPat(..), CBind(..), COpenArgs(..), Literal(..), CEqChain(..),
CDefn(..), CProp(..), CDef(..), CSign(..), CArg(..), cApply, cVar, CArgB) where
import Lex(isIdChar)
import BinParse(Fixity(..))
im... | null | https://raw.githubusercontent.com/csgordon/cayenne/7fdf59b5e21124b5caa9f776199a30cd0e5d88b2/CSyntax.hs | haskell | ppSummands d cs = text ("ppSummands") -- ++ show (length cs))
--separate (map (pp d) cs) | module CSyntax(CProgram(..), CModule(..), CInterface(..), CExpr(..), CType, CSumType(..),
COpenArg(..), CClause(..), CPat(..), CBind(..), COpenArgs(..), Literal(..), CEqChain(..),
CDefn(..), CProp(..), CDef(..), CSign(..), CArg(..), cApply, cVar, CArgB) where
import Lex(isIdChar)
import BinParse(Fixity(..))
im... |
8b43fcc697530e24b8967e9b93bf73b66e3af99e0e1dad8688f69e0089c13e96 | aggelgian/erlang-algorithms | dfs.erl | %% @doc DFS Algorithm
%%
%% <p>For examples you can check the <code>dfs_demo</code> module.</p>
%%
-module(dfs).
-export([run/2]).
-type stack() :: [{graph:vertex(), term()}].
-type states() :: dict:dict().
-type parents() :: dict:dict().
%% ----------------------------------------------------------
%% DFS Abst... | null | https://raw.githubusercontent.com/aggelgian/erlang-algorithms/8ceee72146f2a6eff70a16e3e9a74d2ed072fa0a/src/dfs.erl | erlang | @doc DFS Algorithm
<p>For examples you can check the <code>dfs_demo</code> module.</p>
----------------------------------------------------------
DFS Abstractions
----------------------------------------------------------
Stack Abstractions
States Abstractions
Parents Abstractions
==========================... |
-module(dfs).
-export([run/2]).
-type stack() :: [{graph:vertex(), term()}].
-type states() :: dict:dict().
-type parents() :: dict:dict().
-define(EMPTY_STACK(), []).
-define(IS_EMPTY(S), S =:= []).
-define(ADD_TO_STACK(Node, Cost, S), [{Node, Cost}|S]).
-define(REMOVE_FROM_STACK(S), {hd(S), tl(S)}).
State '... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.