_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 |
|---|---|---|---|---|---|---|---|---|
3211872091e860a15ffd2cdb14260c6c27d993a45a5101e703b7009ed66167fa | privet-kitty/cl-competitive | bipartite-p.lisp | (defpackage :cp/bipartite-p
(:use :cl)
(:export #:bipartite-p))
(in-package :cp/bipartite-p)
;; PAY ATTENTION TO THE STACK SIZE!
(declaim (inline bipartite-p)
(ftype (function * (values (or null simple-bit-vector) &optional)) bipartite-p))
(defun bipartite-p (graph)
"Checks if GRAPH is bipartite and ret... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/bipartite-p.lisp | lisp | PAY ATTENTION TO THE STACK SIZE! | (defpackage :cp/bipartite-p
(:use :cl)
(:export #:bipartite-p))
(in-package :cp/bipartite-p)
(declaim (inline bipartite-p)
(ftype (function * (values (or null simple-bit-vector) &optional)) bipartite-p))
(defun bipartite-p (graph)
"Checks if GRAPH is bipartite and returns the vector of colorings if so,
... |
222f59c81139d0ba2a23b1a2645c0a31824863546c220f21bb5ed6cd61ac73d6 | matthias-margush/clpr | project.clj | (defproject lein-clpr "0.1.4"
:description "Lein plugin for -margush/clpr"
:url "-margush/clpr/tree/master/lein-clpr"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:eval-in-leiningen true)
| null | https://raw.githubusercontent.com/matthias-margush/clpr/ec811070a5fa933583f9738badcfef5a762298eb/lein-clpr/project.clj | clojure | (defproject lein-clpr "0.1.4"
:description "Lein plugin for -margush/clpr"
:url "-margush/clpr/tree/master/lein-clpr"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:eval-in-leiningen true)
| |
da08a812f10691106baf29d4fda40b6bba9e8cead1168e4db090d0905fc64c77 | johnlinvc/erruby | erruby_vm.erl | -module(erruby_vm).
-include("rb.hrl").
-export([eval_file/2, scanl/3]).
-export([new_nil/1, new_string/2]).
-export([eval_method_with_exit/5, yield/2]).
-export([file_name/1]).
print_ast(Ast) ->
erruby_debug:debug_1("Ast: ~p ~n",[Ast]).
print_env(Env) ->
erruby_debug:debug_1("Env: ~p ~n",[Env]).
scanl(_F, Acc, ... | null | https://raw.githubusercontent.com/johnlinvc/erruby/60df66495a01f9dda08bd3f670bfe9dc0661a168/src/erruby_vm.erl | erlang | TODO call method using method object
TODO impl ancestors
erruby_debug:debug_tmp("resolve_future future ~p~n", [Result]),
erruby_debug:debug_tmp("resolve_future Any ~p~n", [Any]),
TODO raise exception instead | -module(erruby_vm).
-include("rb.hrl").
-export([eval_file/2, scanl/3]).
-export([new_nil/1, new_string/2]).
-export([eval_method_with_exit/5, yield/2]).
-export([file_name/1]).
print_ast(Ast) ->
erruby_debug:debug_1("Ast: ~p ~n",[Ast]).
print_env(Env) ->
erruby_debug:debug_1("Env: ~p ~n",[Env]).
scanl(_F, Acc, ... |
9fd3af87639acef3eab655b830bf6f28d569d9c632a8560a27011a231d28cd5e | VisionsGlobalEmpowerment/webchange | state.cljs | (ns webchange.lesson-builder.widgets.page-remove.state
(:require
[re-frame.core :as re-frame]
[webchange.lesson-builder.state :as state]
[webchange.lesson-builder.state-flipbook :as flipbook-state]
[webchange.utils.flipbook :as flipbook-utils]))
(re-frame/reg-sub
::page-idx
:<- [::state/activity-... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/0df52dd08d54f14d4ec5d2717f48031849a7ee16/src/cljs/webchange/lesson_builder/widgets/page_remove/state.cljs | clojure | (ns webchange.lesson-builder.widgets.page-remove.state
(:require
[re-frame.core :as re-frame]
[webchange.lesson-builder.state :as state]
[webchange.lesson-builder.state-flipbook :as flipbook-state]
[webchange.utils.flipbook :as flipbook-utils]))
(re-frame/reg-sub
::page-idx
:<- [::state/activity-... | |
bd53796dd6d6bbd3b987d96ab4413b1fe5c0d1a2f5fd46552c0845f7c683173c | privet-kitty/cl-competitive | prim.lisp | ;;;
MST ( Prim 's algorithm )
;;; (Poorly implemented and obsolete. I leave it just for my reference.)
;;;
(defpackage :cp/prim
(:use :cl :cp/binary-heap)
(:export #:find-mst))
(in-package :cp/prim)
;; vertex . cost
(define-binary-heap heap
:order (lambda (x y) (< (cdr x) (cdr y)))
:element-type (cons fixnu... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/prim.lisp | lisp |
(Poorly implemented and obsolete. I leave it just for my reference.)
vertex . cost
Test | MST ( Prim 's algorithm )
(defpackage :cp/prim
(:use :cl :cp/binary-heap)
(:export #:find-mst))
(in-package :cp/prim)
(define-binary-heap heap
:order (lambda (x y) (< (cdr x) (cdr y)))
:element-type (cons fixnum fixnum))
(defun find-mst (graph)
(let* ((n (length graph))
(pqueue (make-heap n))
... |
d2f8fef5fdd72f7e703345d0b0d1bebb050724e35f2ce920fd9ed670c97895e7 | ku-fpg/sunroof-compiler | MVar.hs |
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - missing - methods #
-- | 'JSMVar' provides the same functionality and
-- concurrency abstraction in Javascript compu... | null | https://raw.githubusercontent.com/ku-fpg/sunroof-compiler/5d8edafea515c4c2b4e7631799f35d8df977e289/Language/Sunroof/JS/MVar.hs | haskell | # LANGUAGE OverloadedStrings #
| 'JSMVar' provides the same functionality and
concurrency abstraction in Javascript computations
-------------------------------------------------------------
JSMVar Type
-------------------------------------------------------------
| 'JSMVar' abstraction. The type parameter give... |
# LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - missing - methods #
as ' Control . Concurrent . MVar ' in Haskell .
module Language.Sunroof.JS.MVar
( JSMVar
, newMVar, newEmptyMVar
, putMVar,... |
bb9142c36e71d0654fe8f5112236169ba114b2551a538b82ff614e1179635b9a | kieranbrowne/clojure-tensorflow | core.clj | (ns rnn.core
(:require [clojure-tensorflow.ops :as tf]
[clojure-tensorflow.layers :as layer]
[clojure-tensorflow.optimizers :as optimize]
[clojure-tensorflow.core :refer [run]]))
;; Training data
(def data
(clojure.string/join (repeat 5 "meow ")))
(defn encode-one-hot
"Encode... | null | https://raw.githubusercontent.com/kieranbrowne/clojure-tensorflow/a1771cda9e108c8575da7addbe4fe55283c5149b/examples/rnn/src/rnn/core.clj | clojure | Training data
In an rnn the output of a layer is added to the next input
layer in a network.
Define network / model
Run network | (ns rnn.core
(:require [clojure-tensorflow.ops :as tf]
[clojure-tensorflow.layers :as layer]
[clojure-tensorflow.optimizers :as optimize]
[clojure-tensorflow.core :refer [run]]))
(def data
(clojure.string/join (repeat 5 "meow ")))
(defn encode-one-hot
"Encode string into one ... |
e444119841d07acc3c285908c3ec5f254e3f68e51294d308eff7f34c000e3caf | cassiel/thi-ng-geom-starter | shaders.cljs | (ns thi-ng-geom-starter.shaders
(:require
[thi.ng.geom.matrix :as mat]
[thi.ng.geom.gl.fx :as fx]
[thi.ng.glsl.core :as glsl :include-macros true]
[thi.ng.glsl.color :as col]
[thi.ng.glsl.vertex :as vertex]
[thi.ng.dstruct.core :as d]))
(def threshold-shader-spec
(d/merge-deep
fx/shader-spec
... | null | https://raw.githubusercontent.com/cassiel/thi-ng-geom-starter/f32a8a195f1b95da5e4e44228174b8db8a26fb87/src/cljs/thi_ng_geom_starter/shaders.cljs | clojure |
:blend true
:blend-fn [glc/src-alpha glc/one] | (ns thi-ng-geom-starter.shaders
(:require
[thi.ng.geom.matrix :as mat]
[thi.ng.geom.gl.fx :as fx]
[thi.ng.glsl.core :as glsl :include-macros true]
[thi.ng.glsl.color :as col]
[thi.ng.glsl.vertex :as vertex]
[thi.ng.dstruct.core :as d]))
(def threshold-shader-spec
(d/merge-deep
fx/shader-spec
... |
b73c45e7416bf68668cf721b8ce2d1f542e407e114f83ac7e0653af2ef5cd20b | mcgizzle/haxchange | Haxchange.hs | module Haxchange
(module Haxchange.Types) where
import Haxchange.Types
| null | https://raw.githubusercontent.com/mcgizzle/haxchange/620a4c93ae28abdd637b7c1fd8b018628b3bd0e9/src/Haxchange.hs | haskell | module Haxchange
(module Haxchange.Types) where
import Haxchange.Types
| |
74851956ffb536732cdba02c07a8909b1b1a58ee9228abb90c6c93767a520a97 | xxyzz/SICP | Exercise_1_46.rkt | #lang racket/base
(define (iterative-improve good-enough? improve)
(lambda (first-guess)
(define (iter guess)
(if (good-enough? guess)
guess
(iter (improve guess))))
(iter first-guess)))
(define (average x y) (/ (+ x y) 2))
(define (square x) (* x x))
... | null | https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/1_Building_Abstractions_with_Procedures/1.3_Formulating_Abstractions_with_Higher-Order_Procedures/Exercise_1_46.rkt | racket | #lang racket/base
(define (iterative-improve good-enough? improve)
(lambda (first-guess)
(define (iter guess)
(if (good-enough? guess)
guess
(iter (improve guess))))
(iter first-guess)))
(define (average x y) (/ (+ x y) 2))
(define (square x) (* x x))
... | |
bef16b7704d82e7c5e031dfdd1ae881ea842b6a653f6ae19058557edacff78c9 | mzuther/MoccaFaux | project.clj | (defproject de.mzuther/moccafaux.core "1.5.1"
:description "Adapt power management to changes in the environment."
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:dependencies [[org.clojure/clojure "1.10.3"]
[org.clojure/data.json ... | null | https://raw.githubusercontent.com/mzuther/MoccaFaux/91a2f57e2676701b83497bda68dfd9b7143105ab/project.clj | clojure | :injections [(newline)
(prn s))
(newline)
(flush)] | (defproject de.mzuther/moccafaux.core "1.5.1"
:description "Adapt power management to changes in the environment."
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:dependencies [[org.clojure/clojure "1.10.3"]
[org.clojure/data.json ... |
a97d0680a859da043cf71aead346981be15b32c6cc6c0f23c56e18d7f9baaa59 | hidaris/thinking-dumps | parser.rkt | #lang racket
(require "ast.rkt")
(provide (all-defined-out))
;; easy version
;; (: string->sexp (-> String Any))
(define (string->sexp s)
(read (open-input-string s)))
;; (: def? (Any -> Boolean))
(define (def? x)
(match x
[(list 'proc _ _) #t] ;; ((proc _ _) x) or (f x) or ((f x ...) y)
[(? symbol? x) ... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/eopl-solutions/chap3/3-28/parser.rkt | racket | easy version
(: string->sexp (-> String Any))
(: def? (Any -> Boolean))
((proc _ _) x) or (f x) or ((f x ...) y)
(: list-of-symbol? (Any -> Boolean))
(: parse-sexp (-> Any Expression))
(Let var
(parse-sexp val)
(parse-sexp body))]
(: parse (-> String Program)) | #lang racket
(require "ast.rkt")
(provide (all-defined-out))
(define (string->sexp s)
(read (open-input-string s)))
(define (def? x)
(match x
[(? symbol? x) #t]
[(list (? symbol? x) _ ...) #t]
[(list (? list? x) _ ...) #t]
[_ #f]))
(define (list-of-symbol? x)
(andmap symbo... |
6e5a7062cc92870c944f92c59cdf5dd19be765d91141f061b77cef6f2f78fc0f | sdiehl/kaleidoscope | Lexer.hs | module Lexer where
import Text.Parsec.String (Parser)
import Text.Parsec.Language (emptyDef)
import Text.Parsec.Prim (many)
import qualified Text.Parsec.Token as Tok
lexer :: Tok.TokenParser ()
lexer = Tok.makeTokenParser style
where
ops = ["+","*","-","/",";",",","<"]
names = ["def","extern"]
style = ... | null | https://raw.githubusercontent.com/sdiehl/kaleidoscope/682bdafe6d8f90caca4cdd0adb30bd3ebd9eff7b/src/chapter4/Lexer.hs | haskell | module Lexer where
import Text.Parsec.String (Parser)
import Text.Parsec.Language (emptyDef)
import Text.Parsec.Prim (many)
import qualified Text.Parsec.Token as Tok
lexer :: Tok.TokenParser ()
lexer = Tok.makeTokenParser style
where
ops = ["+","*","-","/",";",",","<"]
names = ["def","extern"]
style = ... | |
c375f218844bcddf16df53e0febfe6fdc349f1c90b077e87ce69bf7e51546afd | cedlemo/OCaml-GI-ctypes-bindings-generator | Boolean_cell_accessible_private.ml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Boolean_cell_accessible_private"
| null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Boolean_cell_accessible_private.ml | ocaml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Boolean_cell_accessible_private"
| |
8a90ba3a08e76458aab7edbf493a86e3b49ae0dbbe135471f37b774f10b4a29e | txyyss/Project-Euler | Euler109.hs | In the game of darts a player throws three darts at a target board
which is split into twenty equal sized sections numbered one to
twenty .
-- The score of a dart is determined by the number of the region that
-- the dart lands in. A dart landing outside the red/green outer ring
scores zero . The black and cre... | null | https://raw.githubusercontent.com/txyyss/Project-Euler/d2f41dad429013868445c1c9c1c270b951550ee9/Euler109.hs | haskell | The score of a dart is determined by the number of the region that
the dart lands in. A dart landing outside the red/green outer ring
single scores. However, the red/green outer ring and middle ring
score double and treble scores respectively.
There are many variations of rules but in the most popular game the
no... | In the game of darts a player throws three darts at a target board
which is split into twenty equal sized sections numbered one to
twenty .
scores zero . The black and cream regions inside this ring represent
At the centre of the board are two concentric circles called the
bull region , or bulls - eye . T... |
0e48416a548645fbd7528a351e34a02ce043f0eefe8fdc8d3df728ba2dc7ce34 | binsec/binsec | lmap.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/22ee39aad58219e8837b6ba15f150ba04a498b63/src/base/lmap.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
e0c0d40a5f72792cda7b8bc1c748c0e7e6d817c9266efdc02d8725dd7b454555 | vmware-archive/diegotaskscheduler | task_submitter.clj | (ns diegoscheduler.task-submitter
(:require [com.stuartsierra.component :as component]
[clojure.core.async :refer [go-loop <! chan]]
[clojure.tools.logging :as log]))
(defrecord TaskSubmitter
[new-tasks postfn api-url]
component/Lifecycle
(start [component]
(go-loop []
(when... | null | https://raw.githubusercontent.com/vmware-archive/diegotaskscheduler/080fa07815f3e66cdbf1ce804d0944d0561812fc/src/diegoscheduler/task_submitter.clj | clojure | (ns diegoscheduler.task-submitter
(:require [com.stuartsierra.component :as component]
[clojure.core.async :refer [go-loop <! chan]]
[clojure.tools.logging :as log]))
(defrecord TaskSubmitter
[new-tasks postfn api-url]
component/Lifecycle
(start [component]
(go-loop []
(when... | |
a02611a1d4b5bda129d8026c4d364db30a7ff8e869dd17bae08d0847a477efe3 | Emmanuel-PLF/facile | fcl_nonlinear.ml | (***********************************************************************)
(* *)
FaCiLe
A Functional Constraint Library
(* ... | null | https://raw.githubusercontent.com/Emmanuel-PLF/facile/3b6902e479019c25b582042d9a02152fec145eb0/lib/fcl_nonlinear.ml | ocaml | *********************************************************************
under the terms of the GNU Lesser Gener... | FaCiLe
A Functional Constraint Library
, , LOG , CENA
Copyright 2004 CENA . All rights reserved . This file is distributed
$ I d : fcl_nonlinear.ml , v 1.8 2004/08/12 15:22:07 bar... |
b0d4c2c0976e48358f6a7b09ee9c2f37e09d31207e7632a7fd5b736a94ee18d1 | CrossRef/cayenne | ctn_test.clj | (ns cayenne.ctn-test
(:require [clojure.test :refer :all]
[cayenne.ids.ctn :refer :all]))
(deftest normalize-ctn-test
(testing "normalize-ctn converts to lower case"
(is (= (normalize-ctn "ISRCTN12345") "isrctn12345"))
(is (= (normalize-ctn "isrctn12345") "isrctn12345"))))
(deftest ctn-proxy-t... | null | https://raw.githubusercontent.com/CrossRef/cayenne/02321ad23dbb1edd3f203a415f4a4b11ebf810d7/test/cayenne/ctn_test.clj | clojure | (ns cayenne.ctn-test
(:require [clojure.test :refer :all]
[cayenne.ids.ctn :refer :all]))
(deftest normalize-ctn-test
(testing "normalize-ctn converts to lower case"
(is (= (normalize-ctn "ISRCTN12345") "isrctn12345"))
(is (= (normalize-ctn "isrctn12345") "isrctn12345"))))
(deftest ctn-proxy-t... | |
efe3cfb9035ebc29fcd759004c82a07c15014a2289b441774dd37336b4ef8a88 | gen-smtp/gen_smtp | gen_smtp_client.erl | Copyright 2009 < > . All rights reserved .
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the following conditions are met:
%%%
%%% 1. Redistributions of source code must retain the above copyright notice,
%%% this list of conditions ... | null | https://raw.githubusercontent.com/gen-smtp/gen_smtp/2307e79c9e242bcbfa99dcaf5e6314d875666e83/src/gen_smtp_client.erl | erlang |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form... | Copyright 2009 < > . All rights reserved .
THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT ` ` AS IS '' AND ANY EXPRESS OR
EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT ,
INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES
( INCLUDING , BUT NOT LIMITED TO , PROCUREME... |
6d2380a6357b818222dd59d85a9b2de812af246f4d02cf8b333e9695f7ea8b8b | yminer/libml | mlrc.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
[ LibML - Machine Learning Library ]
Copyright ( C ) 2002 - 2003 LAGACHERIE
This program is free software ; you can redistribute it and/or
modify it under the te... | null | https://raw.githubusercontent.com/yminer/libml/1475dd87c2c16983366fab62124e8bbfbbf2161b/src/mlrc/mlrc.ml | ocaml | *
MLRC (Machine Learning Remote Control) is a program which can communicate
with several mld daemons and feed them with some computations.
*
A daemon is a host name or IP adress (the string) and a port
number (the int).
*
A host name or an IP adress.
*
Port number.
*
Raised if one tries to add... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
[ LibML - Machine Learning Library ]
Copyright ( C ) 2002 - 2003 LAGACHERIE
This program is free software ; you can redistribute it and/or
modify it under the te... |
62e9a583da2ce51f79df07adbfc9b8b9ba7f20fefe8e73fa96d7c9dc8ce75e40 | nominolo/lambdachine | V78.hs | module Ghc.Api.V78 where
| null | https://raw.githubusercontent.com/nominolo/lambdachine/49d97cf7a367a650ab421f7aa19feb90bfe14731/compiler/Ghc/Api/V78.hs | haskell | module Ghc.Api.V78 where
| |
1378112848a1860e120f7997c3ed07c2ff899ce4cc47acd415192418d6af0ecf | onyx-platform/onyx | embedded_media_driver.clj | (ns onyx.messaging.aeron.embedded-media-driver
(:require [taoensso.timbre :refer [fatal info debug warn] :as timbre]
[com.stuartsierra.component :as component]
[onyx.static.default-vals :refer [arg-or-default]])
(:import [io.aeron.driver MediaDriver MediaDriver$Context ThreadingMode]))
(def... | null | https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/src/onyx/messaging/aeron/embedded_media_driver.clj | clojure | (ns onyx.messaging.aeron.embedded-media-driver
(:require [taoensso.timbre :refer [fatal info debug warn] :as timbre]
[com.stuartsierra.component :as component]
[onyx.static.default-vals :refer [arg-or-default]])
(:import [io.aeron.driver MediaDriver MediaDriver$Context ThreadingMode]))
(def... | |
52013f0b0da11dab9e723d3866d0f95e602ad3a9550a1e97a46caf52627e754e | awslabs/s2n-bignum | bignum_sqr_4_8_alt.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/arm/proofs/bignum_sqr_4_8_alt.ml | ocaml | =========================================================================
=========================================================================
*** print_literal_from_elf "arm/fastmul/bignum_sqr_4_8_alt.o";;
***
arm_ADDS X9 X9 X9
arm_ADCS X11 X11 X11
-------------------------------------------------------... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
4x4->8 squaring optimized for uarchs with higher multiplier throug... |
d8da682495c47797e2123d8cf66b1c787d33c87aae3581904f1547b0fc4c5327 | metasoarous/oz | core.clj | (ns example-project.core
(:require [oz.core :as oz]))
(defn foo
"I don't do a whole lot."
[x]
(println x "Hello, World!"))
| null | https://raw.githubusercontent.com/metasoarous/oz/7676f6c798dafb87381f71ee3451b94f8460e49f/example-projects/lein-repl-example/src/example_project/core.clj | clojure | (ns example-project.core
(:require [oz.core :as oz]))
(defn foo
"I don't do a whole lot."
[x]
(println x "Hello, World!"))
| |
c9b597be357c26fb899e815761dfbe32189ddcfd62b9de23f4952b4c5066b88a | deepfire/holotype | Port.hs | {-# OPTIONS_GHC -Weverything #-}
# OPTIONS_GHC -Wno - all - missed - specialisations #
{-# OPTIONS_GHC -Wno-implicit-prelude #-}
# OPTIONS_GHC -Wno - missing - export - lists #
# OPTIONS_GHC -Wno - missing - import - lists #
# OPTIONS_GHC -Wno - monomorphism - restriction #
{-# OPTIONS_GHC -Wno-name-shadowing #-}
# OPT... | null | https://raw.githubusercontent.com/deepfire/holotype/d33052f588b74616560b81616ffc4a0142f8a617/src/Holo/Port.hs | haskell | # OPTIONS_GHC -Weverything #
# OPTIONS_GHC -Wno-implicit-prelude #
# OPTIONS_GHC -Wno-name-shadowing #
# OPTIONS_GHC -Wno-unused-do-bind #
# OPTIONS_GHC -Wno-redundant-constraints #
XXX: due to HasCallStack
Local imports
according to user-controlled Settings.
according to user-controlled Settings.
| A GL 'Fra... | # OPTIONS_GHC -Wno - all - missed - specialisations #
# OPTIONS_GHC -Wno - missing - export - lists #
# OPTIONS_GHC -Wno - missing - import - lists #
# OPTIONS_GHC -Wno - monomorphism - restriction #
# OPTIONS_GHC -Wno - orphans #
# OPTIONS_GHC -Wno - type - defaults #
# OPTIONS_GHC -Wno - unsafe #
# OPTIONS_GHC -Wno -... |
4a065c53fd5f524e103fd93c4a847c5a237b55013af2f101efe62276588c3ef4 | acl2/acl2 | print-dag-array-to-file.lisp | ; Printing dag-arrays to files
;
Copyright ( C ) 2008 - 2011 and Stanford University
Copyright ( C ) 2013 - 2022 Kestrel Institute
Copyright ( C ) 2016 - 2020 Kestrel Technology , LLC
;
License : A 3 - clause BSD license . See the file books/3BSD - mod.txt .
;
Author : ( )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/acl2/acl2/69204c321c7948154d5912e65544f3826c5fd14b/books/kestrel/axe/print-dag-array-to-file.lisp | lisp | Printing dag-arrays to files
for newline-string
this lets us call open-output-channel!
returns state
because this calls pprint-object-or-string
fixme call something faster? ;fixme save this cons?
returns state
move to acl2-arrays book? maybe not, because of the trust-tag..
because this calls pprint-object-or-str... | Copyright ( C ) 2008 - 2011 and Stanford University
Copyright ( C ) 2013 - 2022 Kestrel Institute
Copyright ( C ) 2016 - 2020 Kestrel Technology , LLC
License : A 3 - clause BSD license . See the file books/3BSD - mod.txt .
Author : ( )
(in-package "ACL2")
(include-book "misc/file-io" :dir :system)
(i... |
675245bced50b5ffce398fc6fcd23c91a387e2d50c83257d7732b52ea0a3465f | imdea-software/leap | Valid.ml |
(***********************************************************************)
(* *)
LEAP
(* *)
, IMDEA ... | null | https://raw.githubusercontent.com/imdea-software/leap/5f946163c0f80ff9162db605a75b7ce2e27926ef/src/solvers/Valid.ml | ocaml | *********************************************************************
... |
LEAP
, IMDEA Software Institute
Copyright 2011 IMDEA Software Institute
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compl... |
61b61c6411a882fe6aae6dab63172e40945e0d9069838871ceaafb2d003a63eb | emqx/emqx | emqx_mqtt_props_SUITE.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2018 - 2023 EMQ Technologies Co. , Ltd. 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 o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx/test/emqx_mqtt_props_SUITE.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2018 - 2023 EMQ Technologies Co. , Ltd. 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(emqx_mqtt_props_SUITE).
-compile(export_all).
-compile(nowarn_export_all).
-include_li... |
c952af564befc5174a3ed2fb6e35e16c7622a368919ec2934c04e99bf0b9e40c | mogenslund/liq2 | fundamental_mode.cljc | (ns liq2.modes.fundamental-mode
(:require [clojure.string :as str]
[liq2.editor :as editor :refer [apply-to-buffer switch-to-buffer get-buffer]]
[liq2.buffer :as buffer :refer [delete-region shrink-region set-insert-mode]]
[liq2.util :as util]))
(defn non-repeat-fun
[fun]
(whe... | null | https://raw.githubusercontent.com/mogenslund/liq2/66a323a75804154ea51c3ff9d3c23cbd26c9d24d/src/liq2/modes/fundamental_mode.cljc | clojure | (when (not= (@editor/state ::repeat-counter) 0) (swap! editor/state assoc ::repeat-counter 0)) | (ns liq2.modes.fundamental-mode
(:require [clojure.string :as str]
[liq2.editor :as editor :refer [apply-to-buffer switch-to-buffer get-buffer]]
[liq2.buffer :as buffer :refer [delete-region shrink-region set-insert-mode]]
[liq2.util :as util]))
(defn non-repeat-fun
[fun]
(whe... |
07f0b50669b097172d1c22f3824b33dca10c357be817ad7cc32ab704c684b12e | ryanpbrewster/haskell | ValidBST.hs | import Data.Maybe( isJust )
import Control.Monad( replicateM )
main = do
num_tests <- readLn :: IO Int
inputs <- replicateM num_tests readInput
mapM_ (putStrLn . solveInstance) inputs
discard one line , then split the next line into words and parse them
readInput :: IO [Int]
readInput = getLine >> fmap ... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/HackerRank/ValidBST/ValidBST.hs | haskell |
- Bulk of the solution is below
| import Data.Maybe( isJust )
import Control.Monad( replicateM )
main = do
num_tests <- readLn :: IO Int
inputs <- replicateM num_tests readInput
mapM_ (putStrLn . solveInstance) inputs
discard one line , then split the next line into words and parse them
readInput :: IO [Int]
readInput = getLine >> fmap ... |
229dc34d00f0b32ff3e5bc237cf0af40b9756f55487e9641b06c1031e6cacff2 | serokell/qtah | QGraphicsItem.hs | This file is part of Qtah .
--
Copyright 2015 - 2018 The Qtah Authors .
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your option) ... | null | https://raw.githubusercontent.com/serokell/qtah/abb4932248c82dc5c662a20d8f177acbc7cfa722/qtah-generator/src/Graphics/UI/Qtah/Generator/Interface/Widgets/QGraphicsItem.hs | haskell |
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MER... | This file is part of Qtah .
Copyright 2015 - 2018 The Qtah Authors .
the Free Software Foundation , either version 3 of the License , or
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
module Graphics.UI.Qtah.Generator.Interface.Wi... |
5d262276da8a910e8e3b6cc569b29f8c7f3c66a3a4102fa4fa5fc2ed2d361e07 | srid/ema | Prism.hs | module Ema.Route.Prism (
module X,
-- * Handy encoders
eitherRoutePrism,
-- * Handy lenses
htmlSuffixPrism,
stringIso,
showReadPrism,
) where
import Data.Text qualified as T
import Ema.Route.Prism.Check as X
import Ema.Route.Prism.Type as X
import Optics.Core (Iso', Prism', iso, preview, prism', review... | null | https://raw.githubusercontent.com/srid/ema/61faae56aa0f3c6ca815f344684cc566f6341662/ema/src/Ema/Route/Prism.hs | haskell | * Handy encoders
* Handy lenses
| Returns a new route `Prism_` that supports *either* of the input routes.
The resulting route `Prism_`'s model type becomes the *product* of the input models.
| module Ema.Route.Prism (
module X,
eitherRoutePrism,
htmlSuffixPrism,
stringIso,
showReadPrism,
) where
import Data.Text qualified as T
import Ema.Route.Prism.Check as X
import Ema.Route.Prism.Type as X
import Optics.Core (Iso', Prism', iso, preview, prism', review)
stringIso :: (ToString a, IsString a) =... |
71fddd82c6fd56287991da6c88807200f1059a4e769e7b093d901abad8a7b4b6 | mitchellwrosen/planet-mitchell | Unsafe.hs | module Coerce.Unsafe
( unsafeCoerce
) where
import Unsafe.Coerce (unsafeCoerce)
| null | https://raw.githubusercontent.com/mitchellwrosen/planet-mitchell/18dd83204e70fffcd23fe12dd3a80f70b7fa409b/planet-mitchell/src/Coerce/Unsafe.hs | haskell | module Coerce.Unsafe
( unsafeCoerce
) where
import Unsafe.Coerce (unsafeCoerce)
| |
4724c9e876ec58a9a39d3151f094022402be85eb25585c2e6febc9d2a2cb99cd | mmontone/cl-forms | subform.lisp | (in-package :cl-forms)
(defclass subform-form-field (form-field)
((subform-builder :initarg :subform-builder
:initform nil
:type (or null function)
:accessor field-subform-builder)
(subform :initarg :subform
:initform nil
:type (o... | null | https://raw.githubusercontent.com/mmontone/cl-forms/af252b8646b7545ac778c9aa881903efcc311f2d/src/fields/subform.lisp | lisp | (in-package :cl-forms)
(defclass subform-form-field (form-field)
((subform-builder :initarg :subform-builder
:initform nil
:type (or null function)
:accessor field-subform-builder)
(subform :initarg :subform
:initform nil
:type (o... | |
d284270362b22031e8b18e710a5c88d6e10ca0b8d34b16375ebdfa6eaa9be174 | PatrickMaier/HdpH | Location.hs | -- Locations
-- includes API for error and debug messages
--
Author : ,
-----------------------------------------------------------------------------
# LANGUAGE StandaloneDeriving #
# LANGUAGE GeneralizedNewtypeDeriving #
# OPTIONS_GHC -fno - warn - orphans #
module Control.Parallel.HdpH.Internal.Location
... | null | https://raw.githubusercontent.com/PatrickMaier/HdpH/e836a5bcf5a6c93239f9c0d0109d7b81b459897f/hdph/src/Control/Parallel/HdpH/Internal/Location.hs | haskell | Locations
includes API for error and debug messages
---------------------------------------------------------------------------
* node IDs (and their constitutent parts)
:: Node -> [String]
:: Node -> NT.EndPointAddress
:: [String] -> NT.EndPointAddress -> Node
* reading all node IDs and this node's own node ... | Author : ,
# LANGUAGE StandaloneDeriving #
# LANGUAGE GeneralizedNewtypeDeriving #
# OPTIONS_GHC -fno - warn - orphans #
module Control.Parallel.HdpH.Internal.Location
instances : , Ord , Show , NFData , Serialize , Hashable
instances : Exception , Show ,
) where
import Prelude hiding (error)
impo... |
ae1ed1e301f99cedb81482bcdb9a5edf1fe0c6b424a859b5e51e24aec19039fe | semerdzhiev/fp-2020-21 | squares-example.rkt | Прост пример , който показва как да изведем квадрат
Тази функция не е част от решението .
Нейната цел е да демонстрира как да .
(define (example)
(display #\┌)
(display #\─)
(display #\─)
(display #\─)
(display #\┐)
(display #\newline)
(display #\│)
(display #\space)
(display #\space)
(dis... | null | https://raw.githubusercontent.com/semerdzhiev/fp-2020-21/64fa00c4f940f75a28cc5980275b124ca21244bc/homework/1/squares-example.rkt | racket | Прост пример , който показва как да изведем квадрат
Тази функция не е част от решението .
Нейната цел е да демонстрира как да .
(define (example)
(display #\┌)
(display #\─)
(display #\─)
(display #\─)
(display #\┐)
(display #\newline)
(display #\│)
(display #\space)
(display #\space)
(dis... | |
bf29a865463827629a93b9e9900134b07a5c3114bfe2e8ceb8cee98786f7ff28 | AccelerateHS/accelerate | Elt.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DefaultSignatures #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications ... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate/7c769b761d0b2a91f318096b9dd3fced94616961/src/Data/Array/Accelerate/Sugar/Elt.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# OPTIONS_HADDOCK hide #
|
Module : Data.Array.Accelerate.Sugar.Elt
License : BSD3
Stability : experimental
| The 'Elt' class charac... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
Copyright : [ 2008 .. 2020 ] The Accelerate Team
Maintainer : < ... |
e18e572c4869c12dfcfa4fabb7422180535bded5d2c6af1116569c6ad2d56ed4 | theodormoroianu/SecondYearCourses | LambdaChurch_20210415170039.hs | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415170039.hs | haskell | alpha-equivalence
subst u x t defines [u/x]t, i.e., substituting u for x in t
This substitution avoids variable captures so it is safe to be used when
reducing terms with free variables (e.g., if evaluating inside lambda abstractions)
^ substitution term
^ variable to be substitutes
^ term in which the substit... | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... |
5ec8bfb2159444da7b4a4f023a8f34f61d54c6757c1565600435cd7cdfe922ac | tezos/tezos-mirror | type.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/32c9ef7c4ad3c6ec14e16ab3d75e353266925fb1/src/proto_alpha/lib_benchmark/lib_benchmark_type_inference/type.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
ba495734b2d6650537e086a7630d855754e072a23fb57d1358238ceacfa7d21c | christiaanb/clash | Utils.hs | module CLasH.Utils where
-- Standard Imports
import qualified Maybe
import Data.Accessor
import qualified Data.Accessor.Monad.Trans.StrictState as MonadState
import qualified Data.Map as Map
import qualified Control.Monad as Monad
import qualified Control.Monad.Trans.State.Strict as State
import qualified Debug.Trace ... | null | https://raw.githubusercontent.com/christiaanb/clash/18247975e8bbd3f903abc667285e11228a640457/clash/CLasH/Utils.hs | haskell | Standard Imports
Make a caching version of a stateful computatation.
^ The key to use for the cache
^ The accessor to get at the cache
^ How to compute the value to cache?
^ The resulting value, from the cache or freshly
computed.
Found in cache, just return
Not found, compute it and put it in the cache
is ... | module CLasH.Utils where
import qualified Maybe
import Data.Accessor
import qualified Data.Accessor.Monad.Trans.StrictState as MonadState
import qualified Data.Map as Map
import qualified Control.Monad as Monad
import qualified Control.Monad.Trans.State.Strict as State
import qualified Debug.Trace as Trace
makeCach... |
6c2fcfc3f17a52bd10d3a3e44dda8c6218c132ab4ef2a924fcd91f1d0c3e9f35 | aistrate/Okasaki | Ex02_06_Test.hs | import Test.HUnit
import TestHelper
import UnbalancedSet
import Ex02_06
main = do printTime $ runTestTT tests
return ()
tests = test [
"lookupFM" ~: test
[
lookupFM 'a' fmap1 ~?= Just 1,
lookupFM 'b' fmap1 ~?= Just 2,
lookupFM 'c' fmap1 ~?= Just 3,
lookupFM 'd' fmap1 ~?= Just 4,
loo... | null | https://raw.githubusercontent.com/aistrate/Okasaki/cc1473c81d053483bb5e327409346da7fda10fb4/MyCode/Ch02/Ex02_06_Test.hs | haskell | import Test.HUnit
import TestHelper
import UnbalancedSet
import Ex02_06
main = do printTime $ runTestTT tests
return ()
tests = test [
"lookupFM" ~: test
[
lookupFM 'a' fmap1 ~?= Just 1,
lookupFM 'b' fmap1 ~?= Just 2,
lookupFM 'c' fmap1 ~?= Just 3,
lookupFM 'd' fmap1 ~?= Just 4,
loo... | |
97f72951d0c27d641b8310513717d7710b5d6e9a6b83a08218c25187bc2118ab | hypernumbers/hypernumbers | ustring.erl | @doc strings for Erlang .
@author < > [ ]
-module(ustring).
%% Strings <-> Ustrings
-export([new/1, new/2, empty/0, to/2, pr/1]).
%% Information.
-export([len/1, len/2]).
%% String transformation.
-export([upcase/1, downcase/1, capitalize/1, capitalize/2]).
%% String processing.
-export([concat/2, subst... | null | https://raw.githubusercontent.com/hypernumbers/hypernumbers/281319f60c0ac60fb009ee6d1e4826f4f2d51c4e/lib/starling/src/ustring.erl | erlang | Strings <-> Ustrings
Information.
String transformation.
String processing.
Standard string module compatibility layer.
@doc Creates an empty string.
@doc Makes string printable.
@doc Returns length of string in graphemes (characters as users see them).
@doc Converts string to uppercase.
@doc Converts string ... | @doc strings for Erlang .
@author < > [ ]
-module(ustring).
-export([new/1, new/2, empty/0, to/2, pr/1]).
-export([len/1, len/2]).
-export([upcase/1, downcase/1, capitalize/1, capitalize/2]).
-export([concat/2, substr/2, substr/3, index/2, rindex/2, gsub/3]).
Comparison .
-export([eql/2, exact/2]).
... |
5d57b6f8ee7d35b517e6acfa81cf88dc9a8175f061fb58d7efc88ce58be15222 | dariusf/ppx_polyprint | config.ml |
module Adapter : PolyPrint.TraceConfig = struct
class api = object (self)
inherit PolyPrint.DefaultTraceConfig.api as super
method run1 fn_name (a_n, pr_a, a) pr_res fn =
Debug.no_1 fn_name pr_a pr_res fn a
method run2 fn_name (a_n, pr_a, a) (b_n, pr_b, b) pr_res fn =
Debug.no_2 fn_name pr... | null | https://raw.githubusercontent.com/dariusf/ppx_polyprint/6cd87e948a27888d251f851424ad8bd5545989ad/examples/debug.ml/src/config.ml | ocaml |
module Adapter : PolyPrint.TraceConfig = struct
class api = object (self)
inherit PolyPrint.DefaultTraceConfig.api as super
method run1 fn_name (a_n, pr_a, a) pr_res fn =
Debug.no_1 fn_name pr_a pr_res fn a
method run2 fn_name (a_n, pr_a, a) (b_n, pr_b, b) pr_res fn =
Debug.no_2 fn_name pr... | |
38c2295f23d7cf6074766a1ae79e53b050d9121ad571405ceb7983df5548e08f | haskell-opengl/OpenGLRaw | ColorClamp.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.INGR.ColorClamp
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
--------------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/INGR/ColorClamp.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.INGR.ColorClamp
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enums | # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.INGR.ColorClamp (
glGetINGRColorClamp,
gl_INGR_color_clamp,
pattern GL_ALPHA_MAX_CLAMP_INGR,
pattern GL_ALPHA_MIN_CLAMP_INGR,
pattern GL_BLUE_MAX_CLAMP_INGR,
pattern GL_BLUE_MIN_CLAMP_INGR,
pattern G... |
5fb4714d679ec3c9f473270a11b402a605c77e2ca8cff7a408b4178e1943d283 | csg-tokyo/typelevelLR | TestValid1.hs |
import Expr
main :: IO ()
main = print $ begin |> num 1 |> end
| null | https://raw.githubusercontent.com/csg-tokyo/typelevelLR/ca5853890fac7fb819a026f0fd15d8b43f7c8470/examples/haskell/expr/TestValid1.hs | haskell |
import Expr
main :: IO ()
main = print $ begin |> num 1 |> end
| |
09541c2dcf4896950421ef0d5fdb13d66705c73a1e209640f7d646a79dfa01ce | marcoheisig/cl-mpi | serial-tests.lisp | (in-package :cl-mpi-test-suite)
(in-suite mpi-serial-tests)
(defmacro with-fresh-mpi-context (&body body)
"Execute body with *STANDARD-COMMUNICATOR* bound to a new unique
communicator. This prevents errors within BODY to affect other parts of the
program."
`(let ((*standard-communicator* (mpi-comm-dup)))
(unw... | null | https://raw.githubusercontent.com/marcoheisig/cl-mpi/ba92be06ec1dca74d0ca5256aa387d8a28c8ad86/test-suite/serial-tests.lisp | lisp | point to point communication | (in-package :cl-mpi-test-suite)
(in-suite mpi-serial-tests)
(defmacro with-fresh-mpi-context (&body body)
"Execute body with *STANDARD-COMMUNICATOR* bound to a new unique
communicator. This prevents errors within BODY to affect other parts of the
program."
`(let ((*standard-communicator* (mpi-comm-dup)))
(unw... |
5f1ec22d6f771f6a5dfbeb0871f092554d709f35c5e96b079a34a99691d691e6 | lemmih/hsSDL2 | lesson3.hs | module Main where
import Control.Concurrent
import Graphics.UI.SDL as SDL
import Graphics.UI.SDL.Image as Image
-----------------------
-- Window parameters --
screenSize :: Size
screenSize = Size 640 480
screenPosition :: Position
screenPosition = Position 100 100
screenTitle :: String
screenTitle = "Lession 3"
... | null | https://raw.githubusercontent.com/lemmih/hsSDL2/7a785dc1b8df28143155c8a7c36e4ab69a10df81/Examples/twinklebear/lesson3.hs | haskell | ---------------------
Window parameters --
----------------
-----------
Helpers -- | module Main where
import Control.Concurrent
import Graphics.UI.SDL as SDL
import Graphics.UI.SDL.Image as Image
screenSize :: Size
screenSize = Size 640 480
screenPosition :: Position
screenPosition = Position 100 100
screenTitle :: String
screenTitle = "Lession 3"
main :: IO ()
main =
SDL.withInit [InitEver... |
3327ffee4fb76b892807b5dca643f4df88e3226097bb0148c799f31235c0ab60 | DerekCuevas/interview-cake-clj | core.clj | (ns bracket-validator.core
(:gen-class))
(def ^:private openers #{\( \{ \[})
(def ^:private closers #{\) \} \]})
(def ^:private closer->opener {\) \( \} \{ \] \[})
(defn- update-stack [stack char]
(cond
(contains? openers char)
(conj stack char)
(contains? closers char)
(if (= (peek stack) (cl... | null | https://raw.githubusercontent.com/DerekCuevas/interview-cake-clj/f17d3239bb30bcc17ced473f055a9859f9d1fb8d/bracket-validator/src/bracket_validator/core.clj | clojure | (ns bracket-validator.core
(:gen-class))
(def ^:private openers #{\( \{ \[})
(def ^:private closers #{\) \} \]})
(def ^:private closer->opener {\) \( \} \{ \] \[})
(defn- update-stack [stack char]
(cond
(contains? openers char)
(conj stack char)
(contains? closers char)
(if (= (peek stack) (cl... | |
7b43bfbcfd5999d7289b5707ffbd88cfe77b3e78a51faf213a6dc82f514bdc6d | commercialhaskell/stack | main.hs | import Lib2
main = lib2
| null | https://raw.githubusercontent.com/commercialhaskell/stack/255cd830627870cdef34b5e54d670ef07882523e/test/integration/tests/multi-test/files/sub-package/src/main.hs | haskell | import Lib2
main = lib2
| |
614224c12d2453c185fd286e4452534921441fed5938155837d0661944c956a9 | ocamllabs/ocaml-modular-implicits | testA.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/lib-threads/testA.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
let private_data = (Hashtbl.create 17 :... |
d59020e16e6c64d504d9b21e8564654758e16bf9ebf83a924f041db66d4ecc1d | fragnix/fragnix | Data.HashSet.hs | # LANGUAGE Haskell98 #
{-# LINE 1 "Data/HashSet.hs" #-}
# LANGUAGE CPP , DeriveDataTypeable #
# LANGUAGE RoleAnnotations #
# LANGUAGE TypeFamilies #
# LANGUAGE Trustworthy #
------------------------------------------------------------------------
-- |
-- Module ... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/scotty/Data.HashSet.hs | haskell | # LINE 1 "Data/HashSet.hs" #
----------------------------------------------------------------------
|
Module : Data.HashSet
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
A set of /hashable/ values. A set cannot contain duplicate items.
The implementation is... | # LANGUAGE Haskell98 #
# LANGUAGE CPP , DeriveDataTypeable #
# LANGUAGE RoleAnnotations #
# LANGUAGE TypeFamilies #
# LANGUAGE Trustworthy #
Copyright : 2011
A ' HashSet ' makes no guarantees as to the order of its elements .
' HashSet ' is often faster ... |
8211b44e071fba6475d89ead5619beca106aef55fd448afdad5699fca60a792e | bondy-io/bondy | bondy_rbac_group.erl | %% =============================================================================
%% bondy_rbac_group.erl -
%%
Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved .
Copyright ( c ) 2013 Basho Technologies , Inc.
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not us... | null | https://raw.githubusercontent.com/bondy-io/bondy/570cea3c79714e6db0d1ce64169eb43e2c94c54d/apps/bondy/src/bondy_rbac_group.erl | erlang | =============================================================================
bondy_rbac_group.erl -
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... | Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved .
Copyright ( c ) 2013 Basho Technologies , Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(bondy_rbac_group).
-include_lib("wamp/include/wamp.... |
0fb38321f7f08601ffa284ca84f5990bd2e42060d9589686aebfbf198e1860d2 | lehins/massiv | Plus.hs | {-# LANGUAGE BangPatterns #-}
module Main where
import Criterion.Main
import Data.Massiv.Array as A
import Data.Massiv.Bench as A
import Prelude as P
main :: IO ()
main = do
let !sz = Sz2 8000 6000
arr1 = arrRLightIx2 P Seq sz
arr2 = arrRHeavyIx2 P Seq sz
defaultMain
[ bgroup
"Plus"
... | null | https://raw.githubusercontent.com/lehins/massiv/67a920d4403f210d0bfdad1acc4bec208d80a588/massiv-bench/bench/Plus.hs | haskell | # LANGUAGE BangPatterns #
memory bound, too many workers only make it slower |
module Main where
import Criterion.Main
import Data.Massiv.Array as A
import Data.Massiv.Bench as A
import Prelude as P
main :: IO ()
main = do
let !sz = Sz2 8000 6000
arr1 = arrRLightIx2 P Seq sz
arr2 = arrRHeavyIx2 P Seq sz
defaultMain
[ bgroup
"Plus"
[ env (return (arr1, arr2))... |
a7dba46573672de325e6f388de78446f7f0858f4c6a3f278d1bbbed8ba344e63 | dyzsr/ocaml-selectml | internal_variable_names.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/middle_end/internal_variable_names.ml | ocaml | ************************************************************************
OCaml
... | , Jane Street Europe
Copyright 2017 Jane Street Group LLC
the GNU Lesser General Public License version 2.1 , with the
[@@@ocaml.warning "+a-4-9-30-40-41-42-66"]
open! Int_replace_polymorphic_compare
type t = string
let ap... |
d7d195cd2b3f2e7866ae8d06db2dcfd9392dba2d6c08756f2a4c2b2702195f6e | footprintanalytics/footprint-web | normalize_query.clj | (ns metabase.query-processor.middleware.normalize-query
"Middleware that converts a query into a normalized, canonical form."
(:require [clojure.tools.logging :as log]
[metabase.mbql.normalize :as mbql.normalize]
[metabase.query-processor.error-type :as qp.error-type]
[metabase.u... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/query_processor/middleware/normalize_query.clj | clojure | (ns metabase.query-processor.middleware.normalize-query
"Middleware that converts a query into a normalized, canonical form."
(:require [clojure.tools.logging :as log]
[metabase.mbql.normalize :as mbql.normalize]
[metabase.query-processor.error-type :as qp.error-type]
[metabase.u... | |
cbf5099fe9f403b280b866b98eb3e235e734c4268e7b2cb1d82b08ffa211c8aa | tschady/advent-of-code | matrix_test.clj | (ns aoc.matrix-test
(:require [aoc.matrix :as sut]
[clojure.test :refer :all]))
(deftest rotate-seq-left
(is (= (seq "xooo") (sut/rotate-seq-left 1 "oxoo")))
(is (= (seq "ooox") (sut/rotate-seq-left 10 "oxoo"))))
(deftest rotate-seq-right
(is (= (seq "ooxo") (sut/rotate-seq-right 1 "oxoo"))))
| null | https://raw.githubusercontent.com/tschady/advent-of-code/1e4a95ef580c3bf635837eff52aa998b0acfc666/test/aoc/matrix_test.clj | clojure | (ns aoc.matrix-test
(:require [aoc.matrix :as sut]
[clojure.test :refer :all]))
(deftest rotate-seq-left
(is (= (seq "xooo") (sut/rotate-seq-left 1 "oxoo")))
(is (= (seq "ooox") (sut/rotate-seq-left 10 "oxoo"))))
(deftest rotate-seq-right
(is (= (seq "ooxo") (sut/rotate-seq-right 1 "oxoo"))))
| |
d1a44e914b8c59dbe542fd1a744716486864004a9a79b68eae2992854066b60b | srid/neuron | Backend.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE ViewPatterns #
# LANGUAGE NoImplicitPrelude #
module Neuron.Backend where
import Colog (WithLog, log)
import qualified Data.Text as T
import Network.Wai.App... | null | https://raw.githubusercontent.com/srid/neuron/1f127b8343dbe05e057688988b289066df1cdedb/src/Neuron/Backend.hs | haskell | # LANGUAGE OverloadedStrings #
| Run a HTTP server to serve a directory of static files
| Host
| Port number to bind to
| Directory to serve.
disk. | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE ViewPatterns #
# LANGUAGE NoImplicitPrelude #
module Neuron.Backend where
import Colog (WithLog, log)
import qualified Data.Text as T
import Network.Wai.Application.Static (defaultFileServerS... |
acccee0a5a664010425b8d2e96f11a5a226bf32cee059f8cfd1a4090484b3edc | bartima3us/gen_bittorrent | gen_bittorrent_message.erl | %%%-------------------------------------------------------------------
@author
( C ) 2018 ,
%%% @doc
%%%
%%% @end
Created : 03 . Feb 2018 14.25
%%%-------------------------------------------------------------------
-module(gen_bittorrent_message).
-author("bartimaeus").
%% API
-export([
handshake/3,
k... | null | https://raw.githubusercontent.com/bartima3us/gen_bittorrent/e06c99a042c9312f37b75162171606cd8f24c576/src/gen_bittorrent_message.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
@doc
Send `handshake` message
@doc
Send `keep alive` message
@doc
Send `choke` message
@doc
Send `unchoke` message
@doc
Send `interested` message
@doc
... | @author
( C ) 2018 ,
Created : 03 . Feb 2018 14.25
-module(gen_bittorrent_message).
-author("bartimaeus").
-export([
handshake/3,
keep_alive/1,
choke/1,
unchoke/1,
interested/1,
not_interested/1,
have/2,
bitfield/2,
request_piece/2,
request_piece/4,
create_pipeline_... |
37df0a422cd69ff85b985292902621aa583cef5d63df86b083d73e5af025b192 | camsaul/toucan2 | after_select_test.clj | (ns toucan2.tools.after-select-test
(:require
[clojure.string :as str]
[clojure.test :refer :all]
[clojure.walk :as walk]
[toucan2.insert :as insert]
[toucan2.instance :as instance]
[toucan2.protocols :as protocols]
[toucan2.select :as select]
[toucan2.test :as test]
[toucan2.tools.after-se... | null | https://raw.githubusercontent.com/camsaul/toucan2/5204b34d46f5adb3e52b022218049abe9b336928/test/toucan2/tools/after_select_test.clj | clojure | & fields happens in the query so stuff added by after-select should still come back. | (ns toucan2.tools.after-select-test
(:require
[clojure.string :as str]
[clojure.test :refer :all]
[clojure.walk :as walk]
[toucan2.insert :as insert]
[toucan2.instance :as instance]
[toucan2.protocols :as protocols]
[toucan2.select :as select]
[toucan2.test :as test]
[toucan2.tools.after-se... |
79192769ac4f9bc149a85ac15b9ffc16e509bdacd29df1d118af82e05b15f4e6 | kind2-mc/kind2 | lustreIndex.mli | This file is part of the Kind 2 model checker .
Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa
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 a... | null | https://raw.githubusercontent.com/kind2-mc/kind2/c601470eb68af9bd3b88828b04dbcdbd6bd6bbf5/src/lustre/lustreIndex.mli | ocaml | * An index element
* Field name as index of a record
* Integer literal as index of a tuple
* Integer literal as index of a list
* Integer literal as index of an array
* Variable as index of an array of given size
Index to the representation field of an abstract type
* A sequence of indexes
* Pretty-print a sin... | This file is part of the Kind 2 model checker .
Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa
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 a... |
d946f6a99702aa952af61885e73484672461b768ed766ae119f2d5ce1fd9c383 | tilk/vocoder | Conduit.hs | |
Module : Vocoder . Conduit
Description : Phase vocoder in Conduit
Copyright : ( c ) , 2021
License : BSD2
This module wraps phase vocoder algorithms for use in Conduit .
Two variants are provided , one for single channel processing ,
and another for processing multiple c... | null | https://raw.githubusercontent.com/tilk/vocoder/540d489d87fdb5d0cdc0ee4e0bd7df774f734d47/vocoder-conduit/src/Vocoder/Conduit.hs | haskell | * Single-channel functions
* Multi-channel functions
| Corrects for volume change introduced by STFT processing.
| Perform the phase vocoder analysis phase.
| Perform the phase vocoder synthesis phase.
| Perform frequency domain processing on overlapping frames.
| Perform frequency domain processing on a chunked... | |
Module : Vocoder . Conduit
Description : Phase vocoder in Conduit
Copyright : ( c ) , 2021
License : BSD2
This module wraps phase vocoder algorithms for use in Conduit .
Two variants are provided , one for single channel processing ,
and another for processing multiple c... |
bf14672aeb5784ea0a9d7c73271d7f74e85bf1b510f7aad0e0bd7b22926932db | bigmlcom/sketchy | count_min.clj | Copyright 2013 , 2014 , 2015 BigML
Licensed under the Apache License , Version 2.0
;; -2.0
(ns bigml.sketchy.test.count-min
(:require [clojure.test :refer :all]
(bigml.sketchy [count-min :as cm])))
(defn- make-data [size]
(let [rnd (java.util.Random. 0)]
(vec (concat
(repeatedly (int... | null | https://raw.githubusercontent.com/bigmlcom/sketchy/f06c6f29035f19bbbdaf86c582fed2722032d283/test/bigml/sketchy/test/count_min.clj | clojure | -2.0 | Copyright 2013 , 2014 , 2015 BigML
Licensed under the Apache License , Version 2.0
(ns bigml.sketchy.test.count-min
(:require [clojure.test :refer :all]
(bigml.sketchy [count-min :as cm])))
(defn- make-data [size]
(let [rnd (java.util.Random. 0)]
(vec (concat
(repeatedly (int (* 0.1 ... |
bfba3e2447fcb0fa7044d670be31f8e5fced982a40609957dda99197da267f36 | clojure/core.typed | csp.cljs | from blog
(ns cljs.core.typed.test.csp
(:refer-clojure :exclude [map])
(:require [cljs.core.async :as async
:refer [<! >! chan put! timeout]]
[clojure.string :as string]
[cljs.core.typed.test.dnolen.utils.dom :refer [by-id set-html! offset]]
[cljs.core.typed.te... | null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.js/test/cljs/cljs/core/typed/test/csp.cljs | clojure | from blog
(ns cljs.core.typed.test.csp
(:refer-clojure :exclude [map])
(:require [cljs.core.async :as async
:refer [<! >! chan put! timeout]]
[clojure.string :as string]
[cljs.core.typed.test.dnolen.utils.dom :refer [by-id set-html! offset]]
[cljs.core.typed.te... | |
bcc8bd677986b3dcf66098f2a068c62dfbbafca9219c82207acbe4858134f76f | uw-unsat/leanette-popl22-artifact | deduce.rkt | #lang rosette
; routines related to using the solver to make deductions about lines/boards.
(provide (all-defined-out))
(require
rosette/solver/smt/z3
"../core/core.rkt"
"rules.rkt"
"action.rkt"
"context.rkt"
"board.rkt"
"symbolic.rkt")
; line? -> line-transition?
; calculates the largest possible tra... | null | https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-3/nonograms/puzzle/src/nonograms/deduce.rkt | racket | routines related to using the solver to make deductions about lines/boards.
line? -> line-transition?
calculates the largest possible transition logically deducible from the given line line,
using the solver as an oracle.
(printf "t cache: ~a\nasserts ~a\n" (hash-count (term-cache)) (length (asserts)))
greedily ch... | #lang rosette
(provide (all-defined-out))
(require
rosette/solver/smt/z3
"../core/core.rkt"
"rules.rkt"
"action.rkt"
"context.rkt"
"board.rkt"
"symbolic.rkt")
(define (strongest-deduction-of start-ctx)
(with-terms
(parameterize ([current-bitwidth #f])
(define checker (current-solver))
(de... |
0f735874542b4cb703260c328a02969982fc378d4abf05c580fab595a5acc022 | ichko/fmi-fp-2020-21 | solutions.hs | lookup' :: Eq k => [(k, v)] -> k -> v -> v
lookup' mappings key missingValue =
case mappings of
[] -> missingValue
((k, v) : t) ->
if k == key
then v
else lookup' t key missingValue
lSystem :: Eq a => [a] -> [(a, [a])] -> [[a]]
lSystem axiom rules = loop axiom
where
nextCharState ... | null | https://raw.githubusercontent.com/ichko/fmi-fp-2020-21/83dea8db7666e7a8a372d82301d71c79d5b798ff/week-03/solutions.hs | haskell | lookup' :: Eq k => [(k, v)] -> k -> v -> v
lookup' mappings key missingValue =
case mappings of
[] -> missingValue
((k, v) : t) ->
if k == key
then v
else lookup' t key missingValue
lSystem :: Eq a => [a] -> [(a, [a])] -> [[a]]
lSystem axiom rules = loop axiom
where
nextCharState ... | |
ccf957da7d7e69f7dd183e0739f658c4f720539dd5d64abe3dd77aeb1487abb0 | lucasdicioccio/deptrack-project | Utils.hs | {-# LANGUAGE BangPatterns #-}
module Devops.Utils (
checkExitCodeAndStdout
, checkBinaryExitCodeAndStdout
, checkExitCode
, blindRun , blindRunPreinstalled , blindRunInDir, blindRunWithEnv
, retryWithBackoff
, replaceInFile
) where
import Control.Concurrent (threadDelay)
import ... | null | https://raw.githubusercontent.com/lucasdicioccio/deptrack-project/cd3d59a796815af8ae8db32c47b1e1cdc209ac71/deptrack-devops-recipes/src/Devops/Utils.hs | haskell | # LANGUAGE BangPatterns #
^ check function
^ binary path
^ command args
|Run blindly a process, extending current environment with given key/value pairs |
module Devops.Utils (
checkExitCodeAndStdout
, checkBinaryExitCodeAndStdout
, checkExitCode
, blindRun , blindRunPreinstalled , blindRunInDir, blindRunWithEnv
, retryWithBackoff
, replaceInFile
) where
import Control.Concurrent (threadDelay)
import Control.Exception (IOE... |
e2262fdd60480791e0fc3402fe5a3a0f239c3965280301e547077949dc759218 | YoshikuniJujo/test_haskell | Main.hs | module Main where
import Lib
main :: IO ()
main = print $ add foo 321
| null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/8c4764c826d50e6b7bca28928e7e33cd0fd54d5c/tribial/try-use-foo-pkg/app/Main.hs | haskell | module Main where
import Lib
main :: IO ()
main = print $ add foo 321
| |
b5294f8f9d93fcdea9606a750c276e66d6a02b7ea7faf71a686a62e8fd0fd42d | haroldcarr/plutus-pioneer-program-3 | Contract.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
{-# LANGUAGE TypeOperators #-}
module Week04.Contract where
import Control.Monad.Freer.Extras as Extras
import Data.Functor (void)
import Data.Text (Text, unpack)
import Data.Void ... | null | https://raw.githubusercontent.com/haroldcarr/plutus-pioneer-program-3/b66f285d4bb5457ced740c50adb490b50aa0ed74/Lecture-04/Contract.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators #
----------------------------------------------------------------------------
v v v v
*** run with/out this commented out
active contract
-----------------------------------------------------------... | # LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
module Week04.Contract where
import Control.Monad.Freer.Extras as Extras
import Data.Functor (void)
import Data.Text (Text, unpack)
import Data.Void (Void)
import Plutus.Contract as Contract
impo... |
007efc1864758328870b9ba95e6a295ff6e8b1f265904303ac9f7a53e2bed3d9 | facebookincubator/retrie | Patterns.hs | 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.
--
# LANGUAGE CPP #
{-# LANGUAGE GADTs #-}
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
module Retrie.Rewrites.Patterns (patt... | null | https://raw.githubusercontent.com/facebookincubator/retrie/fb58d0484935a6a0dcbe93035ffc0fdc30b7bf03/Retrie/Rewrites/Patterns.hs | haskell |
LICENSE file in the root directory of this source tree.
# LANGUAGE GADTs # | Copyright ( c ) Facebook , Inc. and its affiliates .
This source code is licensed under the MIT license found in the
# LANGUAGE CPP #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
module Retrie.Rewrites.Patterns (patternSynonymsToRewrites) where
import Control.Monad.State (StateT(runStateT), lift)
impor... |
9b1e1d0e80026dbab18c9234b8232db9d2a350f19a68290080e9fdb6f2084e8f | borodust/claw-legacy | enum.lisp | (cl:in-package :claw.cffi.c)
(defun trim-enum-prefix (key-values)
(let ((prefix (common-prefix (map 'vector (compose #'string #'car) key-values))))
(flet ((trim-key (key-value)
(let ((key (car key-value))
(value (cdr key-value)))
(cons (format-symbol (symbol-packag... | null | https://raw.githubusercontent.com/borodust/claw-legacy/3cd4a96fca95eb9e8d5d069426694669f81b2250/src/cffi/c/generator/enum.lisp | lisp | (cl:in-package :claw.cffi.c)
(defun trim-enum-prefix (key-values)
(let ((prefix (common-prefix (map 'vector (compose #'string #'car) key-values))))
(flet ((trim-key (key-value)
(let ((key (car key-value))
(value (cdr key-value)))
(cons (format-symbol (symbol-packag... | |
be6c1c09d41a1e24fa7ce218d19541c0d36cf9a7aafd3c34d4b73cc2b84ebf8c | arenadotio/pgx | pgx_lwt_unix.mli | include Pgx_lwt.S
| null | https://raw.githubusercontent.com/arenadotio/pgx/8d5ca02213faa69e692c5d0dc3e81408db3774a1/pgx_lwt_unix/src/pgx_lwt_unix.mli | ocaml | include Pgx_lwt.S
| |
43c75ee439fd1182527eda1f13403a0e8c3e44caee2f54b80dfbbad690879b24 | pjones/themoviedb | HTTP.hs | -- |
--
-- Copyright:
-- This file is part of the package themoviedb. It is subject to
-- the license terms in the LICENSE file found in the top-level
-- directory of this distribution and at:
--
--
--
-- No part of this package, including this file, may be copied,
-- modified, propagated, or distribute... | null | https://raw.githubusercontent.com/pjones/themoviedb/1b3f34cafda360cd26f44808cd4d311b691afa8e/src/Network/API/TheMovieDB/Internal/HTTP.hs | haskell | |
Copyright:
This file is part of the package themoviedb. It is subject to
the license terms in the LICENSE file found in the top-level
directory of this distribution and at:
No part of this package, including this file, may be copied,
modified, propagated, or distributed except according to ... | License : MIT
module Network.API.TheMovieDB.Internal.HTTP
( apiBaseURL,
defaultImagePrefix,
apiGET,
)
where
import Control.Exception
import Network.API.TheMovieDB.Internal.Settings
import Network.API.TheMovieDB.Internal.Types
import qualified Network.HTTP.Client as HC
import Network.HTTP.Types
apiBaseUR... |
66f70223a6b95f9dc0555e4259b1ed19fb68c288d6c05dea03b96391b3caa0fd | futurice/haskell-mega-repo | ActiveAccounts.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE DerivingVia #
# LANGUAGE InstanceSigs #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFa... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/95fe8e33ad6426eb6e52a9c23db4aeffd443b3e5/reports-app/src/Futurice/App/Reports/ActiveAccounts.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeOperators #
* Report
* Types | # LANGUAGE DerivingVia #
# LANGUAGE InstanceSigs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE StandaloneDeriving #
module Futurice.App.Reports.ActiveAccounts (
activeAccount... |
a23d0e0c47250736345ec110393074fb259611d646c5a3c6d597710a2a5623cb | NaOHman/XMonadPlus | EZConfig.hs | --------------------------------------------------------------------
-- |
Module : XMonad . Util . EZConfig
Copyright : < >
< > ( key parsing )
-- License : BSD3-style (see LICENSE)
--
Maintainer : < >
--
-- Useful helper functions for amending the default configura... | null | https://raw.githubusercontent.com/NaOHman/XMonadPlus/1495e102ae3304817d1897a393e1f31fef71d41f/xmonad-contrib-darcs/XMonad/Util/EZConfig.hs | haskell | ------------------------------------------------------------------
|
License : BSD3-style (see LICENSE)
Useful helper functions for amending the default configuration, and for
parsing keybindings specified in a special (emacs-like) format.
(See also "XMonad.Util.CustomKeys" in xmonad-contrib.)
-----------... | Module : XMonad . Util . EZConfig
Copyright : < >
< > ( key parsing )
Maintainer : < >
module XMonad.Util.EZConfig (
additionalKeys, additionalKeysP,
removeKeys, removeKeysP,
additi... |
788a867742dab681037ac5d95b0d9870eb9b482d0ba4fcae5e758d1194457c3d | semerdzhiev/fp-2020-21 | 4-test.rkt | #lang racket/base
(require rackunit rackunit/gui racket/include)
(include "4.rkt")
(test/gui
(test-suite
"ascending?"
(test-true "0 is ascending" (ascending? 0))
(test-true "1 is ascending" (ascending? 1))
(test-true "123 is ascending" (ascending? 123))
(test-true "1259 is ascending" (ascending? 1259))
(... | null | https://raw.githubusercontent.com/semerdzhiev/fp-2020-21/64fa00c4f940f75a28cc5980275b124ca21244bc/exam/2020-11-07/4-test.rkt | racket | #lang racket/base
(require rackunit rackunit/gui racket/include)
(include "4.rkt")
(test/gui
(test-suite
"ascending?"
(test-true "0 is ascending" (ascending? 0))
(test-true "1 is ascending" (ascending? 1))
(test-true "123 is ascending" (ascending? 123))
(test-true "1259 is ascending" (ascending? 1259))
(... | |
b3c99041021d4733a6e0040204b12d4bac1bdfc2ff59e77d894d24478b215362 | haroldcarr/learn-haskell-coq-ml-etc | OC.hs | # LANGUAGE GADTs #
# LANGUAGE KindSignatures #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
module RankNTypes.OC where
import Control.Monad.State
import System.Random
import Data.Char
24 Days of GHC Extensions : Rank N Types : higher - rank polymorphism
“ ertes ” Söylemez
concre... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/ghc-extensions/src/RankNTypes/OC.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE TypeFamilies #
Rank-1 polymorphism
above is *an* identity function
'id' is a family of functions indexed by 'a' ("universally quantified" over 'a')
id signature PROMISES it works forall a
applying it DEMANDS a specific type
--------------------------------------------... | # LANGUAGE GADTs #
# LANGUAGE KindSignatures #
module RankNTypes.OC where
import Control.Monad.State
import System.Random
import Data.Char
24 Days of GHC Extensions : Rank N Types : higher - rank polymorphism
“ ertes ” Söylemez
concrete monomorphic values ( i.e. , function values )
- different t... |
1421af45961404b1a885bd00ab88d83bd3dd838b4f02b1bebf693d7bb931242d | clingen-data-model/genegraph | algebra.clj | (ns genegraph.database.query.algebra
(:require [genegraph.database.instance :refer [db]]
[genegraph.database.query.types :as types]
[genegraph.database.util :as util :refer [tx]]
[genegraph.database.names :as names :refer
[local-class-names local-property-names
... | null | https://raw.githubusercontent.com/clingen-data-model/genegraph/624f649fb354842b7d62a106b022928eb05eb1ae/src/genegraph/database/query/algebra.clj | clojure | :extend (OpExtend/create (op a2) (var-expr-list a1))
(VarExprList. ^List (var-seq a1))
(var-aggr-list a2))
:order (OpOrder. (op a2) (sort-conditions a1)) | (ns genegraph.database.query.algebra
(:require [genegraph.database.instance :refer [db]]
[genegraph.database.query.types :as types]
[genegraph.database.util :as util :refer [tx]]
[genegraph.database.names :as names :refer
[local-class-names local-property-names
... |
9a88b7add78bcec3400fe2569e4bbad5a2aea678a34e46f3b8adf028b63ec885 | johnwhitington/camlpdf | pdfspace.mli | (** Colour Spaces *)
(** A Tristimulus Point *)
type point = float * float * float
(** ICC Based Colour Spaces *)
type iccbased =
{icc_n : int;
icc_alternate : t;
icc_range : float array;
icc_metadata : Pdf.pdfobject option;
icc_stream : Pdf.pdfobject}
(** Colour spaces *)
and t =
| DeviceGray
| DeviceR... | null | https://raw.githubusercontent.com/johnwhitington/camlpdf/dc7cfafaf9671bed1503a5c4143632922226b02d/pdfspace.mli | ocaml | * Colour Spaces
* A Tristimulus Point
* ICC Based Colour Spaces
* Colour spaces
White, Black, Gamma
White, Black, Gamma, Matrix
White, Black, Range
Base colourspace, lookup table
* Produce a debug string
* Read the name of a colour, if it has one.
* Read a colourspace from a PDF given a document, page res... |
type point = float * float * float
type iccbased =
{icc_n : int;
icc_alternate : t;
icc_range : float array;
icc_metadata : Pdf.pdfobject option;
icc_stream : Pdf.pdfobject}
and t =
| DeviceGray
| DeviceRGB
| DeviceCMYK
| ICCBased of iccbased
| Pattern
| PatternWithBaseColourspace of t
| Separ... |
6f4d9cab29ad3f5e17feab054be4e94998d57ed8f20e7835b52b14de22eb6129 | ghc/ghc | TimerManager.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE CPP #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleInstances #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE Trustworthy #
TODO : use the new Windows IO manager
module GHC.Event.TimerManager
#if defined(javascript_HOST_ARCH)
() where
#else
( -- * Types
... | null | https://raw.githubusercontent.com/ghc/ghc/3e09cf82ad111e0a6feed81b726849ceaaf3c805/libraries/base/GHC/Event/TimerManager.hs | haskell | # LANGUAGE BangPatterns #
* Types
* Creation
* Running
* Registering interest in timeout events
----------------------------------------------------------------------
Imports
----------------------------------------------------------------------
Types
| The event manager state.
# UNPACK #
# UNPACK #
# UNPACK #
#... | # LANGUAGE CPP #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleInstances #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE Trustworthy #
TODO : use the new Windows IO manager
module GHC.Event.TimerManager
#if defined(javascript_HOST_ARCH)
() where
#else
TimerManager
, new
, newWith
, new... |
7c9f87c10bcea444ba6bd82c49094f9ec96ffc7a277861de6ef9e71d9670dab2 | discus-lang/ddc | Base.hs |
Suppress Data . Monoid warnings during GHC 8.4.1 transition
{-# OPTIONS -Wno-unused-imports #-}
module DDC.Core.Transform.Lambdas.Base
( S, evalState
, newVar
, newVarExtend
, Result (..)
, isLiftyContext)
where
import DDC.Core.Exp.Annot.Ctx
import DDC.Core.Exp.Annot
import ... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core/DDC/Core/Transform/Lambdas/Base.hs | haskell | # OPTIONS -Wno-unused-imports #
-------------------------------------------------------------------------------------------------
| State holding a variable name prefix and counter to
create fresh variable names.
| Evaluate a desguaring computation,
using the given prefix for freshly introduced variables.
| A... |
Suppress Data . Monoid warnings during GHC 8.4.1 transition
module DDC.Core.Transform.Lambdas.Base
( S, evalState
, newVar
, newVarExtend
, Result (..)
, isLiftyContext)
where
import DDC.Core.Exp.Annot.Ctx
import DDC.Core.Exp.Annot
import DDC.Data.Name
import qualified Contro... |
24c923f950a0d2649fdd66e7706caebdd11db19b723df51382b408ce34ac3e4e | cram2/cram | check.lisp | ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
(in-package :it.bese.fiveam)
;;;; * Checks
;;;; At the lowest level testing the system requires that certain
;;;; forms be evaluated and that certain post conditions are met: the
;;;; value returned must satisfy a certain predicate, the form must
;;;; (or must not) sign... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/fiveam/src/src/check.lisp | lisp | -*- Mode: Lisp; indent-tabs-mode: nil -*-
* Checks
At the lowest level testing the system requires that certain
forms be evaluated and that certain post conditions are met: the
value returned must satisfy a certain predicate, the form must
(or must not) signal a certain condition, etc. In FiveAM these
low level ... |
(in-package :it.bese.fiveam)
(defvar *test-dribble* t)
(defmacro with-*test-dribble* (stream &body body)
`(let ((*test-dribble* ,stream))
(declare (special *test-dribble*))
,@body))
(eval-when (:compile-toplevel :load-toplevel :execute)
(def-special-environment run-state ()
result-list
curr... |
da982f3f7491c9919f5f8745e7cff59441937e70a2366c626efce2360b3175df | clash-lang/clash-compiler | BitIndex.hs | |
Copyright : ( C ) 2013 - 2016 , University of Twente
2021 , QBayLogic B.V.
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
Copyright : (C) 2013-2016, University of Twente
2021, QBayLogic B.V.
License : BSD2 (see the fi... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/0bc08c17cebc4a459877a565b33cff714636b116/clash-prelude/src/Clash/Prelude/BitIndex.hs | haskell | |
Copyright : ( C ) 2013 - 2016 , University of Twente
2021 , QBayLogic B.V.
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
Copyright : (C) 2013-2016, University of Twente
2021, QBayLogic B.V.
License : BSD2 (see the fi... | |
a1ee5b5b53ba97dd46d5009a3c385c8d423dba4c0f9065ee7db7e2707f75b8b6 | returntocorp/semgrep | lexer_parser_ruby.ml | type state =
| Bol (* beginning of line *)
| AfterCommand (* after command, before args *)
| EndOfExpr (* end of expr / literal *)
| AfterDef (* after a 'def' or '.' token *)
| AfterLocal (* after a local variable *)
(* alternatives:
* - THIS FILE: use continuation and special epsilon trick in
* Lexer_... | null | https://raw.githubusercontent.com/returntocorp/semgrep/00f1e67bbb80f00e29db3381288fc00398b6868a/languages/ruby/dyp/lexer_parser_ruby.ml | ocaml | beginning of line
after command, before args
end of expr / literal
after a 'def' or '.' token
after a local variable
alternatives:
* - THIS FILE: use continuation and special epsilon trick in
* Lexer_ruby.token to do the switch
* - instead of passing continuations, have a state for each lexer rule
*... | type state =
type t = {
mutable state : state;
}
and cps_lexer = t -> Lexing.lexbuf -> Parser_ruby.token
let beg_state t = t.state <- Bol
let mid_state t = t.state <- AfterCommand
let end_state t = t.state <- EndOfExpr
let def_state t = t.state <- AfterDef
let local_state t = t.state <- AfterLocal
let create entr... |
1fde97c25efdadbd54e6fda3543be5b68a7c81575c6132088d8325de03d18a50 | xapi-project/xen-api | q.ml |
* Copyright ( c ) Citrix Systems Inc.
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AN... | null | https://raw.githubusercontent.com/xapi-project/xen-api/ad2f11bc6837bfda1700b67865ce8d11bc954014/ocaml/message-switch/switch/q.ml | ocaml | if transient, name of the owning connection
compute a valid next_id
If a queue doesn't exist then drop the message
operations which need to be persisted
origin * queue * id * body
drop |
* Copyright ( c ) Citrix Systems Inc.
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AN... |
7625b26bfc6d28990ea2aabbb8a167c36b0322022942fa394d286156986e6050 | channable/alfred-margaret | Searcher.hs | -- Alfred-Margaret: Fast Aho-Corasick string searching
Copyright 2022 Channable
--
Licensed under the 3 - clause BSD license , see the LICENSE file in the
-- repository root.
{-# LANGUAGE BangPatterns #-}
# LANGUAGE CPP #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
... | null | https://raw.githubusercontent.com/channable/alfred-margaret/be96f07bb74c5aa65ce01d664de5d98badbee307/src/Data/Text/AhoCorasick/Searcher.hs | haskell | Alfred-Margaret: Fast Aho-Corasick string searching
repository root.
# LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
efficiently find those needles.
To enforce this invariant, the fields are not exposed from this module.
There is a separate constructor function.
tedious. Because the automaton is fully... | Copyright 2022 Channable
Licensed under the 3 - clause BSD license , see the LICENSE file in the
# LANGUAGE CPP #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE TupleSections #
module Data.Text.AhoCorasick.Searcher
( Searcher
, automaton
, build
, buildNeedleIdSearcher
, ... |
a50e1c25295f0dd9af99e16859c584305eccec9ea3239438beb768b572ab629a | reanimate/reanimate | doc_noto.hs | #!/usr/bin/env stack
-- stack runghc --package reanimate
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Reanimate
import Reanimate.LaTeX
import Reanimate.Builtin.Documentation
main :: IO ()
main = reanimate $ docEnv $ staticFrame 1 $
center $ withStrokeWidth 0 $ wit... | null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/examples/doc_noto.hs | haskell | stack runghc --package reanimate
# LANGUAGE OverloadedStrings # | #!/usr/bin/env stack
module Main (main) where
import Reanimate
import Reanimate.LaTeX
import Reanimate.Builtin.Documentation
main :: IO ()
main = reanimate $ docEnv $ staticFrame 1 $
center $ withStrokeWidth 0 $ withFillOpacity 1 $ scale 4 $
latexCfg noto "noto"
|
bf63d7e50a6d5754224f6e27479fb09a67e927101ac63b39ee8fd0eac1a58d82 | tweag/ormolu | transform-multi-line3-out.hs | # LANGUAGE TransformListComp #
baz' xs ys =
[ ( x,
y
)
| x <- xs,
y <- ys,
then group using
First comment
Second comment
]
| null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/value/function/comprehension/transform-multi-line3-out.hs | haskell | # LANGUAGE TransformListComp #
baz' xs ys =
[ ( x,
y
)
| x <- xs,
y <- ys,
then group using
First comment
Second comment
]
| |
b32ab0739903d5233ac7c9ef4f190a385b8e528764b614d396b6600c4bdff4f5 | ryanpbrewster/haskell | P122.hs | module Problems.P122
( solve
) where
- The most naive way of computing n15 requires fourteen multiplications :
-
- n × n × ... × n = n15
-
- But using a " binary " method you can compute it in six multiplications :
-
- n × n = n^2
- n^2 × = n^4
- n^4 × n^4 = n^8
- n^8 × n^4 = n^12
... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/src/Problems/P122.hs | haskell | module Problems.P122
( solve
) where
- The most naive way of computing n15 requires fourteen multiplications :
-
- n × n × ... × n = n15
-
- But using a " binary " method you can compute it in six multiplications :
-
- n × n = n^2
- n^2 × = n^4
- n^4 × n^4 = n^8
- n^8 × n^4 = n^12
... | |
a043a57bc79373091fe9553ce6eb6d8697596c109b3584922794f568af2fe176 | input-output-hk/cardano-wallet | Gen.hs | # LANGUAGE DataKinds #
module Cardano.Wallet.Primitive.Passphrase.Gen
( genUserPassphrase
, shrinkUserPassphrase
, genPassphraseScheme
, genEncryptionPassphrase
) where
import Prelude
import Cardano.Wallet.Primitive.Passphrase
( Passphrase (..)
, PassphraseMaxLength (..)
, PassphraseM... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/80756f919d7811219e23632bbe59214e0f5e25f5/lib/wallet/src/Cardano/Wallet/Primitive/Passphrase/Gen.hs | haskell | # LANGUAGE DataKinds #
module Cardano.Wallet.Primitive.Passphrase.Gen
( genUserPassphrase
, shrinkUserPassphrase
, genPassphraseScheme
, genEncryptionPassphrase
) where
import Prelude
import Cardano.Wallet.Primitive.Passphrase
( Passphrase (..)
, PassphraseMaxLength (..)
, PassphraseM... | |
3a183d502bc25de4725888df595d9c3eb2e9369d549b4bb6b26715b3c41d6653 | alexander-yakushev/foreclojure-android | main.clj | (ns org.bytopia.foreclojure.main
(:require clojure.set
[clojure.java.io :as io]
[neko.activity :refer [defactivity set-content-view! get-state]]
[neko.data :refer [like-map]]
[neko.debug :refer [*a]]
[neko.find-view :refer [find-view find-views]]
... | null | https://raw.githubusercontent.com/alexander-yakushev/foreclojure-android/912529f9ea7c13874ffaa37a015c62a5165223b5/src/clojure/org/bytopia/foreclojure/main.clj | clojure | (on-ui (refresh-ui (*a)))
(load-userpic (*a) "unlogic")
progress-start
progress-stop
Try relogin
Mark new problems as solved although we don't have the code yet.
Upload solutions to locally solved problems which aren't synced.
Download new problems and insert them into database
(reload-from-server (*a) true)
... | (ns org.bytopia.foreclojure.main
(:require clojure.set
[clojure.java.io :as io]
[neko.activity :refer [defactivity set-content-view! get-state]]
[neko.data :refer [like-map]]
[neko.debug :refer [*a]]
[neko.find-view :refer [find-view find-views]]
... |
49aede19814164cc26f7aee52e38a7e5f3326d6d65b087dc3154e789335f6677 | pflanze/chj-schemelib | scheme-meta-homogenous-vector--include.scm | (define (uvector? v)
(or (u8vector? v)
(u16vector? v)
(u32vector? v)
(u64vector? v)))
(define (svector? v)
(or (s8vector? v)
(s16vector? v)
(s32vector? v)
(s64vector? v)))
(define (fvector? v)
(or (f32vector? v)
(f64vector? v)))
(define (homogenous-vector? v)
(or (uv... | null | https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/scheme-meta-homogenous-vector--include.scm | scheme | (define (uvector? v)
(or (u8vector? v)
(u16vector? v)
(u32vector? v)
(u64vector? v)))
(define (svector? v)
(or (s8vector? v)
(s16vector? v)
(s32vector? v)
(s64vector? v)))
(define (fvector? v)
(or (f32vector? v)
(f64vector? v)))
(define (homogenous-vector? v)
(or (uv... | |
fa6f4d09023a409dabe3924c3ab48d9bafc08a2707a6617f6083248354594a43 | ucsd-progsys/liquidhaskell | Tyvar.hs | module Tyvar () where
{-@ foo :: Eq b => a -> b -> a @-}
foo :: Eq b => a -> b -> a
foo = undefined
| null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/20cd67af038930cb592d68d272c8eb1cbe3cb6bf/tests/pos/Tyvar.hs | haskell | @ foo :: Eq b => a -> b -> a @ | module Tyvar () where
foo :: Eq b => a -> b -> a
foo = undefined
|
4543602d8d056b693995132655ad50116754dcaf39c083b0d9fb5e83773834b6 | g000001/tagger | tag-trainer.lisp | -*- Package : TAG - TRAINER ; Syntax : Common - Lisp ; Mode : Lisp ; Base : 10 -*-
Copyright ( c ) 1991 , 1992 by Xerox Corporation
(cl:defpackage :tag-trainer
(:use :common-lisp :cl-extensions :cons-resource :string-resource
:sv-resource :hmm :float-vector
:tdb :tag-basics)
(:shadow common-lisp:pi)
(:expor... | null | https://raw.githubusercontent.com/g000001/tagger/a4e0650c55aba44250871b96e2220e1b4953c6ab/orig/src/analysis/tag-trainer.lisp | lisp | Syntax : Common - Lisp ; Mode : Lisp ; Base : 10 -*-
Training
({:valid :not-valid} start-tag end-tag*)
Symbol-Biases is a list of lists of the form
({:valid :not-valid} class tag*)
(start-tag end-tag*)
Symbol-Biases is a list of the forms
(class tag*)
Next token just returns the class number
write trained hmm... |
Copyright ( c ) 1991 , 1992 by Xerox Corporation
(cl:defpackage :tag-trainer
(:use :common-lisp :cl-extensions :cons-resource :string-resource
:sv-resource :hmm :float-vector
:tdb :tag-basics)
(:shadow common-lisp:pi)
(:export train-on-docs train-on-files train-combination))
(cl:in-package :tag-trainer)
... |
36111906027776e88cde09a27c7c0609c20678b6abc41341d90e06f2b6b62364 | ertugrulcetin/ClojureNews | entry.clj | (ns clj.dao.entry
(:refer-clojure :exclude [sort find])
(:require [monger.collection :as mc]
[monger.operators :refer :all]
[monger.query :refer :all]
[clj.dao.db-conf :as db]
[clj.util.entity :as entity-util])
(:import (org.bson.types ObjectId)
(java.uti... | null | https://raw.githubusercontent.com/ertugrulcetin/ClojureNews/28002f6b620fa4977d561b0cfca0c7f6a635057b/src/clj/dao/entry.clj | clojure | Story
Ask | (ns clj.dao.entry
(:refer-clojure :exclude [sort find])
(:require [monger.collection :as mc]
[monger.operators :refer :all]
[monger.query :refer :all]
[clj.dao.db-conf :as db]
[clj.util.entity :as entity-util])
(:import (org.bson.types ObjectId)
(java.uti... |
50632a70a393f3c48932f438c20ff96149578586c7f8afaca09db94ade8d2194 | homegrownlabs/boot-sim | boot_sim.clj | (ns io.homegrown.boot-sim
{:boot/export-tasks true}
(:require [boot.core :refer :all]
[datomic.api :as d]
[clojure.pprint :refer [pprint print-table]]))
(deftask bootstrap
"Bootstrap a Datomic database with simulation schema."
[d uri URI str "Datomic database URI (e.g. \"datomi... | null | https://raw.githubusercontent.com/homegrownlabs/boot-sim/77c49401da93e3226fc68a0095c2d306d5262aeb/src/io/homegrown/boot_sim.clj | clojure | (ns io.homegrown.boot-sim
{:boot/export-tasks true}
(:require [boot.core :refer :all]
[datomic.api :as d]
[clojure.pprint :refer [pprint print-table]]))
(deftask bootstrap
"Bootstrap a Datomic database with simulation schema."
[d uri URI str "Datomic database URI (e.g. \"datomi... | |
e03fe4ede0b40a28b9c438210c6a76df0ff124b0aa519a4856e971790fadcd73 | nominolo/lambdachine | Lex.hs | # OPTIONS_GHC -XNoImplicitPrelude #
module Text.Read.Lex
-- lexing types
( Lexeme(..) -- :: *; Show, Eq
-- lexer
: : leading spaces
, hsLex -- :: ReadP String
: : Reads just one char , with H98 escapes
: : a = > a - > ( Bool ) - > ( Char - > Int ) - > ReadP a
: : a = > ... | null | https://raw.githubusercontent.com/nominolo/lambdachine/49d97cf7a367a650ab421f7aa19feb90bfe14731/libraries/base/Text/Read/Lex.hs | haskell | lexing types
:: *; Show, Eq
lexer
:: ReadP String
# SOURCE #
^ Haskell lexemes.
^ Character literal
^ String literal, with escapes interpreted
^ Integer literal
^ Floating point literal
---------------------------------------------------------------------------
Single character lexemes
---------------... | # OPTIONS_GHC -XNoImplicitPrelude #
module Text.Read.Lex
: : leading spaces
: : Reads just one char , with H98 escapes
: : a = > a - > ( Bool ) - > ( Char - > Int ) - > ReadP a
: : a = > ReadP a
: : a = > ReadP a
: : a = > ReadP a
)
where
import Text.ParserCombinators.ReadP
impo... |
00694323620b8e5d085e36f76303acc169de3f2ec3f8bccde4ea01fd9eed36f2 | andrejbauer/alg | alg.ml | (* The main program. *)
open Config
open Output
module A = Algebra
module CM = Check_model
module IntMap = Util.IntMap ;;
Convert a string given via the --size command - line option to a list of sizes .
let sizes_of_str str =
let interval_of_str str =
try
let k = String.index str '-' in
let a = ... | null | https://raw.githubusercontent.com/andrejbauer/alg/95715bb1bf93fcc534a8d6c7c96c8913dc03de0c/src/alg.ml | ocaml | The main program.
A big wrapper for error reporting.
References that store the command-line options
Command-line axioms.
Command-line options and usage
First we process the command line.
Parse the arguments. Treat the anonymous arguments as files to be read.
Read the input file.
Compute the theory name ... |
open Config
open Output
module A = Algebra
module CM = Check_model
module IntMap = Util.IntMap ;;
Convert a string given via the --size command - line option to a list of sizes .
let sizes_of_str str =
let interval_of_str str =
try
let k = String.index str '-' in
let a = int_of_string (String.su... |
fcde351f4ca17c92da663a7847080a0f00b188363622bde2b16300528a4f8b6f | CloudI/CloudI | rebar_ct.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% ex: ts=4 sw=4 et
%% -------------------------------------------------------------------
%%
rebar : Erlang Build Tools
%%
Copyright ( c ) 2009 ( )
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this softw... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/rebar/src/rebar_ct.erl | erlang | ex: ts=4 sw=4 et
-------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sel... | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
rebar : Erlang Build Tools
Copyright ( c ) 2009 ( )
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the... |
be36a6bf29b485bae9e1b357fa77d1aef8517c71e7322d8268d107dcde0f963d | release-project/benchmarks | baboon.erl | %%%-------------------------------------------------------------------
%%% BABOON MODULE
%%%
@author upon a design by
( C ) 2015 , RELEASE project
%%% @doc
Baboon module is a quick implementation of the Chaos Monkey to
%%% kill name-registered processes only. It must be executed in
%%% the dashb... | null | https://raw.githubusercontent.com/release-project/benchmarks/55f042dca3a2c680e2967c59edc9636456047bd5/IM/RSD-IM/baboon.erl | erlang | -------------------------------------------------------------------
BABOON MODULE
@doc
kill name-registered processes only. It must be executed in
the dashboard node.
Usage: baboon:start(Time_Interval).
where Time_Interval is time in milliseconds.
@end
-----------------------------------... | @author upon a design by
( C ) 2015 , RELEASE project
Baboon module is a quick implementation of the Chaos Monkey to
Created : 22 Jul 2015 by
-module(baboon).
-export([start/1]).
) - > pid ( )
start(Timer) ->
spawn(fun() -> chaos_on(Timer) end).
) - > no_return ( )
chaos_on(Timer) ->... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.