_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 |
|---|---|---|---|---|---|---|---|---|
2a531051252e9be631b190d07a2424f42abd27753ec4ecb388ddda2bc61b5a55 | ceronman/cloxure | parser.clj | (ns cloxure.parser
"Parser for the Lox programming language."
(:require
[cloxure.token :as token]
[cloxure.ast :as ast]
[cloxure.error :refer [token-error]]))
;; -----------------------------------------------------------------
;; Grammar:
;; ---------------------------------------------------------------... | null | https://raw.githubusercontent.com/ceronman/cloxure/1cd57ff7c4afd223a711bfe3dc6fb56faf21c6d9/src/cloxure/parser.clj | clojure | -----------------------------------------------------------------
Grammar:
-----------------------------------------------------------------
declaration → classDecl
| funDecl
| varDecl
| statement ;
classDecl → 'class' IDENTIFIER ('<' IDENTIFIER) ?... | (ns cloxure.parser
"Parser for the Lox programming language."
(:require
[cloxure.token :as token]
[cloxure.ast :as ast]
[cloxure.error :refer [token-error]]))
| ifStmt
(defn- new-parser [tokens]
{::tokens tokens
::errors []
::statements []
::current 0
::expr nil})
(... |
68c981f24f131f06723da6a1aac1af239db0d413bd27ffba34ffb9775adc8918 | ghc/packages-base | ConsoleHandler.hs | # LANGUAGE Trustworthy #
# LANGUAGE CPP #
-----------------------------------------------------------------------------
-- |
-- Module : GHC.ConsoleHandler
Copyright : ( c ) The University of Glasgow
-- License : see libraries/base/LICENSE
--
-- Maintainer :
-- Stability : internal
Portabili... | null | https://raw.githubusercontent.com/ghc/packages-base/52c0b09036c36f1ed928663abb2f295fd36a88bb/GHC/ConsoleHandler.hs | haskell | ---------------------------------------------------------------------------
|
Module : GHC.ConsoleHandler
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
Installing Win32 console handlers.
---------------------------------------------------------------------------
| ... | # LANGUAGE Trustworthy #
# LANGUAGE CPP #
Copyright : ( c ) The University of Glasgow
Portability : non - portable ( GHC extensions )
NB . the contents of this module are only available on Windows .
module GHC.ConsoleHandler
#if !defined(mingw32_HOST_OS) && !defined(__HADDOCK__)
where
#else /* wh... |
80c2fdd4d04e50187f4c4faa6cc624028d776697e6e9c61588d4cf60aa67f5c0 | fumieval/extensible | tangle.hs | # LANGUAGE TypeOperators , PolyKinds , FlexibleContexts , FlexibleInstances , TemplateHaskell , DataKinds #
import Control.Monad.Trans.Class
import Data.Extensible
import Data.Functor.Identity
import Data.Proxy
mkField "foo bar baz"
type Rec = ["foo" :> String, "bar" :> Int, "baz" :> Double, "qux" :> Bool]
class Mak... | null | https://raw.githubusercontent.com/fumieval/extensible/6b119e922c1c109c2812d4ad3a2153838528c39d/examples/tangle.hs | haskell | # LANGUAGE TypeOperators , PolyKinds , FlexibleContexts , FlexibleInstances , TemplateHaskell , DataKinds #
import Control.Monad.Trans.Class
import Data.Extensible
import Data.Functor.Identity
import Data.Proxy
mkField "foo bar baz"
type Rec = ["foo" :> String, "bar" :> Int, "baz" :> Double, "qux" :> Bool]
class Mak... | |
ddb05ab16eeff4c197a2eb62278361332d369c4445e3d7dfb6a7adf1c5f8ebbd | karen/haskell-book | MaybeLib.hs | isJust :: Maybe a -> Bool
isJust Nothing = False
isJust (Just _) = True
isNothing :: Maybe a -> Bool
isNothing Nothing = True
isNothing (Just _) = False
mayybee :: b -> (a -> b) -> Maybe a -> b
mayybee acc _ Nothing = acc
mayybee acc f (Just x) = f x
fromMaybe :: a -> Maybe a -> a
fromMaybe fb Nothing = fb
fromMaybe... | null | https://raw.githubusercontent.com/karen/haskell-book/90bb80ec3203fde68fc7fda1662d9fc8b509d179/src/ch12/MaybeLib.hs | haskell | isJust :: Maybe a -> Bool
isJust Nothing = False
isJust (Just _) = True
isNothing :: Maybe a -> Bool
isNothing Nothing = True
isNothing (Just _) = False
mayybee :: b -> (a -> b) -> Maybe a -> b
mayybee acc _ Nothing = acc
mayybee acc f (Just x) = f x
fromMaybe :: a -> Maybe a -> a
fromMaybe fb Nothing = fb
fromMaybe... | |
e07c43dfce9e6d64ee421239a9a819f084cfaf081153839741dba32d61422df7 | josefs/Gradualizer | gradualizer_prop_SUITE.erl | -module(gradualizer_prop_SUITE).
-compile([export_all, nowarn_export_all]).
-define(NUMTESTS, list_to_integer(os:getenv("PROP_NUMTESTS", "100"))).
%% Aliases
-define(gp, gradualizer_prop).
all() ->
[
reduce_type,
remove_pos_removes_pos,
normalize_type,
glb,
int_range_to_types,
int_... | null | https://raw.githubusercontent.com/josefs/Gradualizer/9493c66e724ff6b322f0a437de84fe0869c2f872/test/gradualizer_prop_SUITE.erl | erlang | Aliases
type_check_forms
Clear gradualizer_db data between test runs.
Helpers
but the upstream version doesn't allow to pass options to the property test tool. | -module(gradualizer_prop_SUITE).
-compile([export_all, nowarn_export_all]).
-define(NUMTESTS, list_to_integer(os:getenv("PROP_NUMTESTS", "100"))).
-define(gp, gradualizer_prop).
all() ->
[
reduce_type,
remove_pos_removes_pos,
normalize_type,
glb,
int_range_to_types,
int_range_to_ty... |
d06d5c1d80165059856be3b1242028569355c5281d371b0f93e33cedf6f7a3f9 | pyrocat101/opal | infer.ml |
* Infer - a Hackerrank FP challenge :
*
* Infer - a Hackerrank FP challenge:
*
*)
(* ----------------------------- opal.ml START ------------------------------ *)
module LazyStream = struct
type 'a t = Cons of 'a * 'a t Lazy.t | Nil
let of_stream stream =
let rec next stream =
try Cons(Stre... | null | https://raw.githubusercontent.com/pyrocat101/opal/ac495a4fc141cf843da74d223baecca47324acd4/examples/infer.ml | ocaml | ----------------------------- opal.ml START ------------------------------
------------------------------ opal.ml END -------------------------------
parser
destructive-unification based implementation of algorithm W
level: nested level of let-expression used by generalization
printer for type
keep track o... |
* Infer - a Hackerrank FP challenge :
*
* Infer - a Hackerrank FP challenge:
*
*)
module LazyStream = struct
type 'a t = Cons of 'a * 'a t Lazy.t | Nil
let of_stream stream =
let rec next stream =
try Cons(Stream.next stream, lazy (next stream))
with Stream.Failure -> Nil
in
n... |
269424ba07747cd9babdb90b672c0881bcd60acf3949817ba15c24be5330e9a2 | aiya000/haskell-examples | io.hs | # LANGUAGE DataKinds #
# LANGUAGE OverloadedLabels #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
import Data.Extensible
context :: Eff '["io" >: IO] ()
context = liftEff #io $ putStrLn "hi"
main :: IO ()
main = retractEff context
| null | https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Data/Extensible/Effect/io.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE OverloadedLabels #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
import Data.Extensible
context :: Eff '["io" >: IO] ()
context = liftEff #io $ putStrLn "hi"
main :: IO ()
main = retractEff context
| |
4d1bf5b3df171db5060208f9dadbff579db86741d0fd0c70decfad99a351558c | NoRedInk/haskell-libraries | Text.hs | -- | A built-in representation for efficient string manipulation.
@Text@ values are /not/ lists of characters .
module Text
( -- * Text
Text,
isEmpty,
length,
reverse,
repeat,
replace,
-- * Building and Splitting
append,
concat,
split,
join,
words,
lines,
--... | null | https://raw.githubusercontent.com/NoRedInk/haskell-libraries/7af1e05549e09d519b08ab49dff956b5a97d4f7e/nri-prelude/src/Text.hs | haskell | | A built-in representation for efficient string manipulation.
* Text
* Building and Splitting
* Get Substrings
* Int Conversions
* Float Conversions
* Char Conversions
* List Conversions
* Formatting
| Cosmetic operations such as padding with extra characters or trimming whitespace.
* Higher-Order Functions... | @Text@ values are /not/ lists of characters .
module Text
Text,
isEmpty,
length,
reverse,
repeat,
replace,
append,
concat,
split,
join,
words,
lines,
slice,
left,
right,
dropLeft,
dropRight,
* Check for Substrings
contains,
startsWith,
... |
53edd953ceca7053053bd58fb790861796fc15e02a7f7ee4bf30565092961f19 | nedap/speced.def | specs.cljc | (ns nedap.speced.def.specs
"Specs for this library."
(:require
#?(:clj [clojure.spec.alpha :as spec] :cljs [cljs.spec.alpha :as spec])
[nedap.speced.def.doc :refer [doc-registry rebl-doc-registry]]
[nedap.speced.def.impl.def-with-doc #?(:clj :refer :cljs :refer-macros) [def-with-doc]]
[nedap.speced.def.... | null | https://raw.githubusercontent.com/nedap/speced.def/55053e53e749f77753294f3ee8d4639470840f8c/src/nedap/speced/def/specs.cljc | clojure | (ns nedap.speced.def.specs
"Specs for this library."
(:require
#?(:clj [clojure.spec.alpha :as spec] :cljs [cljs.spec.alpha :as spec])
[nedap.speced.def.doc :refer [doc-registry rebl-doc-registry]]
[nedap.speced.def.impl.def-with-doc #?(:clj :refer :cljs :refer-macros) [def-with-doc]]
[nedap.speced.def.... | |
52970032166a0bdd5e2c49cd50ce9524380c0cbbef79c9666b44d8c9568dcb88 | rish987/trackswitch-manuform | usb_holder.clj | (ns usb_holder
(:refer-clojure :exclude [use import])
(:require [scad-clj.scad :refer :all]
[scad-clj.model :refer :all]))
(defn deg2rad [degrees]
(* (/ degrees 180) pi))
(def usb-holder-clearance 0.3)
(def usb-holder-bottom-offset
(/ usb-holder-clearance 2)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; USB... | null | https://raw.githubusercontent.com/rish987/trackswitch-manuform/6e82bae682c3cea3abbd2c5a5128adb258cbb0d8/src/usb_holder.clj | clojure |
USB Controller Holder ;;
USB Controller Holder Cutout ;;
cut out some space in the front too | (ns usb_holder
(:refer-clojure :exclude [use import])
(:require [scad-clj.scad :refer :all]
[scad-clj.model :refer :all]))
(defn deg2rad [degrees]
(* (/ degrees 180) pi))
(def usb-holder-clearance 0.3)
(def usb-holder-bottom-offset
(/ usb-holder-clearance 2)
)
(def wall-thickness 2)
(def clear... |
d8f0b65489997dd5ec96141ae5e03eef2d7f01ea5159d579431c86109c71661c | bsaleil/lc | types.scm | ;;---------------------------------------------------------------------------
;;
Copyright ( c ) 2015 , . 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 so... | null | https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/lib/types.scm | scheme | ---------------------------------------------------------------------------
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 ... | Copyright ( c ) 2015 , . All rights reserved .
THIS SOFTWARE IS PROVIDED ` ` AS IS '' AND ANY EXPRESS OR
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT
THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT
(define (port? p)
(or (input-port? p)
(ou... |
171e62f332f967837ce3a5e70817dfb10c2e505544f20df2bbf71d6fb4e751a1 | psyeugenic/fgraph | provisual_sup.erl | Copyright ( C ) 2012
%%
%% File: provisual_sup.erl
Author : Björn - Egil Dahlberg
Created : 2012 - 06 - 15
-module(provisual_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
%% Helper macro for declaring children of supervisor
-define(CHILD(I, ... | null | https://raw.githubusercontent.com/psyeugenic/fgraph/c485fefc9de78012b13b35abe59f0d29090ff6d1/src/provisual_sup.erl | erlang |
File: provisual_sup.erl
API
Supervisor callbacks
Helper macro for declaring children of supervisor
===================================================================
API functions
===================================================================
===========================================================... | Copyright ( C ) 2012
Author : Björn - Egil Dahlberg
Created : 2012 - 06 - 15
-module(provisual_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
start_link() ->
supervisor:start_link({local, ?MO... |
addf82cffb0a3d261bbe4ffaacfc54f6f7b15e0f9cb321dc5a52509d98e017df | SnootyMonkey/coming-soon | redis.clj | (ns coming-soon.lib.redis
(:require [taoensso.carmine :as car]
[coming-soon.config :as config]
[clojure.string :refer (blank?)]))
;; Redis config
(defn- conn-spec
"Determine if we should connect with a Redis URL, and if so, which one"
[]
(let [url (config/redis :redis-connect-URL)
... | null | https://raw.githubusercontent.com/SnootyMonkey/coming-soon/52f9ed9911b8eeb005f43dd13f3ff0285c418e01/src/coming_soon/lib/redis.clj | clojure | Redis config
Instance specific namespace | (ns coming-soon.lib.redis
(:require [taoensso.carmine :as car]
[coming-soon.config :as config]
[clojure.string :refer (blank?)]))
(defn- conn-spec
"Determine if we should connect with a Redis URL, and if so, which one"
[]
(let [url (config/redis :redis-connect-URL)
env (config/r... |
65e82688648c069c863e047d54ebf3f91b665a60573fb74ea8a3bfaa6bfb8515 | samply/blaze | spec.clj | (ns blaze.scheduler.spec
(:require
[blaze.scheduler.protocol :as p]
[clojure.spec.alpha :as s])
(:import
[java.util.concurrent ScheduledFuture]))
(s/def :blaze/scheduler
#(satisfies? p/Scheduler %))
(s/def :blaze.scheduler/future
#(instance? ScheduledFuture %))
| null | https://raw.githubusercontent.com/samply/blaze/281ca0f35c845ed6e7b7f37fe2d4b9a060b065ca/modules/scheduler/src/blaze/scheduler/spec.clj | clojure | (ns blaze.scheduler.spec
(:require
[blaze.scheduler.protocol :as p]
[clojure.spec.alpha :as s])
(:import
[java.util.concurrent ScheduledFuture]))
(s/def :blaze/scheduler
#(satisfies? p/Scheduler %))
(s/def :blaze.scheduler/future
#(instance? ScheduledFuture %))
| |
a1d6ba0f716e958275ebba296d9cdae85f4bf3a1fb5ce0e196b2fd0a90cfb40d | mabragor/cl-vhdl | parse-misc.lisp |
(in-package #:cl-vhdl)
(define-ebnf-rule physical-literal "[ decimal-literal | based-literal ] UNIT-name"
;; At this lexical stage of parsing we can't tell whether something is a unit or a variable name
(if (not 1st)
(fail-parse "Implicit physical literals can't be resolved at this stage.")
`(,2nd ,1s... | null | https://raw.githubusercontent.com/mabragor/cl-vhdl/1ce015c90e02a6379ae5fc69b6b936988c564bc2/src/parse/parse-misc.lisp | lisp | At this lexical stage of parsing we can't tell whether something is a unit or a variable name |
(in-package #:cl-vhdl)
(define-ebnf-rule physical-literal "[ decimal-literal | based-literal ] UNIT-name"
(if (not 1st)
(fail-parse "Implicit physical literals can't be resolved at this stage.")
`(,2nd ,1st)))
(define-vhdl-rule decimal-literal () (v dec-number-literal))
(define-vhdl-rule based-literal ... |
6761f193104674eb52fb2dec2cfe18fa9d8dff50b96eefd76ea6201cccf0c7e8 | pallet/pallet-vmfest | profiles.clj | {:dev {:dependencies
[[org.clojure/clojure "1.4.0"]
[com.palletops/pallet "0.8.0-beta.10"]
[com.palletops/pallet "0.8.0-beta.10" :classifier "tests"]
[ch.qos.logback/logback-classic "1.0.9"]]
:plugins [[codox/codox.leiningen "0.6.4"]
[lein-marginalia "0.7.1"]]}
:n... | null | https://raw.githubusercontent.com/pallet/pallet-vmfest/b0cef2030063ca02ff86daa754d870c13186d695/profiles.clj | clojure | disable checkouts | {:dev {:dependencies
[[org.clojure/clojure "1.4.0"]
[com.palletops/pallet "0.8.0-beta.10"]
[com.palletops/pallet "0.8.0-beta.10" :classifier "tests"]
[ch.qos.logback/logback-classic "1.0.9"]]
:plugins [[codox/codox.leiningen "0.6.4"]
[lein-marginalia "0.7.1"]]}
:d... |
0768f58b6abd5f352099f76c811e65fc0e62a81e5575e053b166e85fdc90078d | nvim-treesitter/nvim-treesitter | indents.scm | [
(annotation_targets)
(const_list)
(enum)
(interface)
(implicit_generics)
(generics)
(group)
(method_parameters)
(named_return_types)
(struct)
(struct_shorthand)
(union)
] @indent
((struct_shorthand (property)) @aligned_indent
(#set! "delimiter" "()"))
((const_list (const_value)) @aligned_i... | null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/598b878a2b44e7e7a981acc5fc99bf8273cd1d0f/queries/capnp/indents.scm | scheme | [
(annotation_targets)
(const_list)
(enum)
(interface)
(implicit_generics)
(generics)
(group)
(method_parameters)
(named_return_types)
(struct)
(struct_shorthand)
(union)
] @indent
((struct_shorthand (property)) @aligned_indent
(#set! "delimiter" "()"))
((const_list (const_value)) @aligned_i... | |
9016d3316cd1f5b45204c09cec29479b6d0b47fbd488ea052f470c8b9f57775c | bobot/FetedelascienceINRIAsaclay | solver.mli | File : solver.mli
Copyright ( C ) 2008
< >
WWW : /
< >
This library is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2.1 or
later as published by the Free Software Foundation , with the special
... | null | https://raw.githubusercontent.com/bobot/FetedelascienceINRIAsaclay/87765db9f9c7211a26a09eb93e9c92f99a49b0bc/2010/robot/examples_mindstorm_lab/rubik/solver.mli | ocaml | * Strategies to solve the cube. | File : solver.mli
Copyright ( C ) 2008
< >
WWW : /
< >
This library is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2.1 or
later as published by the Free Software Foundation , with the special
... |
8bb647add9281536f41eac0133973ba4cebf3f1fe95c3aae9517bb688a180eba | erlang/rebar3 | rebar_hg_resource.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% ex: ts=4 sw=4 et
-module(rebar_hg_resource).
-behaviour(rebar_resource_v2).
-export([init/2,
lock/2,
download/4,
needs_update/2,
make_vsn/2]).
%% For backward compatibility
-export([ download/3
]).
-incl... | null | https://raw.githubusercontent.com/erlang/rebar3/048412ed4593e19097f4fa91747593aac6706afb/apps/rebar/src/rebar_hg_resource.erl | erlang | ex: ts=4 sw=4 et
For backward compatibility
Return `true' if either the hg url or tag/branch/ref is not the same as
the currently checked out repo for the dep
For backward compatibility | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
-module(rebar_hg_resource).
-behaviour(rebar_resource_v2).
-export([init/2,
lock/2,
download/4,
needs_update/2,
make_vsn/2]).
-export([ download/3
]).
-include("rebar.hrl").
-spec init(atom(), rebar_state:... |
19ebc163bc721c4308b9d8e54acf54fef0cee51441efbe41ad2334551363ca21 | metabase/metabase | send_pulses_test.clj | (ns ^:mb/once metabase.task.send-pulses-test
(:require
[clojure.test :refer :all]
[metabase.email :as email]
[metabase.email-test :as et]
[metabase.models.card :refer [Card]]
[metabase.models.pulse :refer [Pulse]]
[metabase.models.pulse-card :refer [PulseCard]]
[metabase.models.pulse-channel :ref... | null | https://raw.githubusercontent.com/metabase/metabase/c659e767d1371db8820dc867f3538edcd694265a/test/metabase/task/send_pulses_test.clj | clojure | Send the pulse, though it's not going to send anything. Typically we'd block waiting for the message to
arrive, but there should be no message
This sends a test message. If we see our test message that means we didn't send a pulse message (which
is what we want) | (ns ^:mb/once metabase.task.send-pulses-test
(:require
[clojure.test :refer :all]
[metabase.email :as email]
[metabase.email-test :as et]
[metabase.models.card :refer [Card]]
[metabase.models.pulse :refer [Pulse]]
[metabase.models.pulse-card :refer [PulseCard]]
[metabase.models.pulse-channel :ref... |
3801bf3796b53f298eeb8f8877abb89b1119e2a1431e120f984082bbe5988249 | texttheater/xminid | xmonad.hs | import Control.Monad
import Data.Maybe
import XMonad
import XMonad.Config.Gnome
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.SetWMName (setWMName)
import XMonad.Util.EZConfig
import XMonad.Util.Run
main = xmonad $ gnomeConfig {
-- Use Win key rather than Alt. Alt is used by GNOME for many things.
modMa... | null | https://raw.githubusercontent.com/texttheater/xminid/c23a09d3931d743ea488bdd51265fee01507254c/xmonad.hs | haskell | Use Win key rather than Alt. Alt is used by GNOME for many things.
-contrib/issues/288
fix fullscreen
Workaround for
/+source/xmonad/+bug/1813049 | import Control.Monad
import Data.Maybe
import XMonad
import XMonad.Config.Gnome
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.SetWMName (setWMName)
import XMonad.Util.EZConfig
import XMonad.Util.Run
main = xmonad $ gnomeConfig {
modMask = mod4Mask,
startupHook = composeAll [
startupHook gnomeCon... |
1cac7f9ec3809c6e32a1c427214f7f5db0327efff09168a3d743de13f8e0f9d3 | askonomm/clarktown | horizontal_line_block_test.clj | (ns clarktown.matchers.horizontal-line-block-test
(:require
[clojure.test :refer [deftest testing is]]
[clarktown.matchers.horizontal-line-block :as horizontal-line-block]))
(deftest horizontal-line-block-matcher-test
(testing "Is a horizontal line block"
(is (true? (horizontal-line-block/match? "***"... | null | https://raw.githubusercontent.com/askonomm/clarktown/dcb21ec0104cdec3ca9976374868c5837ad9d0b9/test/clarktown/matchers/horizontal_line_block_test.clj | clojure | (ns clarktown.matchers.horizontal-line-block-test
(:require
[clojure.test :refer [deftest testing is]]
[clarktown.matchers.horizontal-line-block :as horizontal-line-block]))
(deftest horizontal-line-block-matcher-test
(testing "Is a horizontal line block"
(is (true? (horizontal-line-block/match? "***"... | |
a29ce0f7d4d0e3c349ea9fa1044d4fccbd42db90cfbd24c172cc1b6dd1ba9c2f | songyahui/AlgebraicEffect | depend.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/songyahui/AlgebraicEffect/27688952b598a101a27523be796e8011d70b02de/parsing/depend.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Asttypes
open Location
open Longident
open Parsetree
module String = Misc.Stdlib.String
let pp_deps... |
e98d56df2fd262f8274b62bb32e1a508380863ec0f9322a828c66ab7699c2dab | dfinity-side-projects/winter | Unit.hs | module Unit (tests) where
import Test.Tasty (TestTree, testGroup)
tests :: TestTree
tests = testGroup "unit" []
| null | https://raw.githubusercontent.com/dfinity-side-projects/winter/2cc31576fe029d85c37d21fc9ea4902c5c64b5a9/test/Unit.hs | haskell | module Unit (tests) where
import Test.Tasty (TestTree, testGroup)
tests :: TestTree
tests = testGroup "unit" []
| |
8c8892e40e6a4cf376f4089180a42c70ebafeadd9606e4ad6a8deb229052ec60 | bhaskara/programmable-reinforcement-learning | stratagus-env.lisp | (in-package stratagus-env)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; global vars
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar *socket* nil "The socket being used by the game.")
;;;;;;;... | null | https://raw.githubusercontent.com/bhaskara/programmable-reinforcement-learning/8afc98116a8f78163b3f86076498d84b3f596217/lisp/envs/stratagus/stratagus-env.lisp | lisp |
global vars
class definition
constructor takes single required initarg :game-socket, which must be a socket connected to a
running instance of the game
after initializing, set value of state slot to be current game state
(set-world (generate-map e) e))
i commented this out temporarily because it caused an e... | (in-package stratagus-env)
(defvar *socket* nil "The socket being used by the game.")
(defclass <stratagus-env> (<fully-observable-env>)
((game-socket :type socket-stream-internet-active
:accessor stratagus-env-game-socket
:initform (make-socket :remote-host 'localhost :remote-port 4870)
:reader game... |
5e20e57d8ba786b22a10f92f1487f48395af8dc8aae0ee290637121a7a7f6a24 | realworldocaml/book | test_variants_more.ml | open Base
[@@@warning "-37"]
module _ = struct
type t = A of [ `A of int ] [@@deriving_inline sexp_grammar]
let _ = fun (_ : t) -> ()
let (t_sexp_grammar : t Sexplib0.Sexp_grammar.t) =
{ untyped =
Lazy
(lazy
(Variant
{ case_sensitivity = Case_sensitive_except_f... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ppx_sexp_conv/test/sexp_grammar/test_variants_more.ml | ocaml | open Base
[@@@warning "-37"]
module _ = struct
type t = A of [ `A of int ] [@@deriving_inline sexp_grammar]
let _ = fun (_ : t) -> ()
let (t_sexp_grammar : t Sexplib0.Sexp_grammar.t) =
{ untyped =
Lazy
(lazy
(Variant
{ case_sensitivity = Case_sensitive_except_f... | |
16d3a450fe8a8d4d986610c2c934310d80f52a99405b6ab3d3ce204b117183b9 | racket/typed-racket | 2d-typed.rkt |
#lang 2d typed/racket/base
(require 2d/match)
(: f : Integer Integer -> Integer)
(define (f x y)
#2dmatch
╔════════════════╦═══╦════════════════════════╗
║ y ║ 0 ║ #{b : Integer} ║
║ x ║ ║ ║
╠════════════════╬═══╬════════════════════════╣
║ 0 ... | null | https://raw.githubusercontent.com/racket/typed-racket/0236151e3b95d6d39276353cb5005197843e16e4/typed-racket-test/succeed/2d-typed.rkt | racket |
#lang 2d typed/racket/base
(require 2d/match)
(: f : Integer Integer -> Integer)
(define (f x y)
#2dmatch
╔════════════════╦═══╦════════════════════════╗
║ y ║ 0 ║ #{b : Integer} ║
║ x ║ ║ ║
╠════════════════╬═══╬════════════════════════╣
║ 0 ... | |
569bf2a2174f534156ed77ead905a52b8510a80488fb8148adf40b18af4cc5b7 | GrammaticalFramework/gf-core | Utilities.hs | -- | Basic utilities
module PGF.Utilities where
import Data.Set(empty,member,insert)
-- | Like 'Data.List.nub', but O(n log n) instead of O(n^2), since it uses a set to lookup previous things.
-- The result list is stable (the elements are returned in the order they occur), and lazy.
Requires that the list elem... | null | https://raw.githubusercontent.com/GrammaticalFramework/gf-core/9b4f2dd18b64b770aaebfa1885085e8e3447f119/src/runtime/haskell/PGF/Utilities.hs | haskell | | Basic utilities
| Like 'Data.List.nub', but O(n log n) instead of O(n^2), since it uses a set to lookup previous things.
The result list is stable (the elements are returned in the order they occur), and lazy.
Code ruthlessly taken from <>
| Replace all occurences of an element by another element. | module PGF.Utilities where
import Data.Set(empty,member,insert)
Requires that the list elements can be compared by .
nub' :: Ord a => [a] -> [a]
nub' = loop empty
where loop _ [] = []
loop seen (x : xs)
| member x seen = loop seen xs
| otherwise = x... |
e007f6f5960d692a115337662b5b56375256863a52022d1009630470aeb1c04b | xh4/web-toolkit | sizing.lisp | (in-package :css-test)
(in-suite :css-test)
(test sizing
(width "1px")
(height "1px")
(min-width "1px")
(min-height "1px")
(max-width "1px")
(max-height "1px")
(box-sizing "content-box"))
| null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/test/css/sizing.lisp | lisp | (in-package :css-test)
(in-suite :css-test)
(test sizing
(width "1px")
(height "1px")
(min-width "1px")
(min-height "1px")
(max-width "1px")
(max-height "1px")
(box-sizing "content-box"))
| |
4534fa1453d3bed71569d08c1c4acfaeac32625c0496f4737c7c0543c27d6bcd | clojure/core.typed | core.clj | (ns ^:skip-wiki clojure.core.typed.ext-test.clojure.core
(:require [clojure.test :refer [deftest is]]
[clojure.core.typed :as t]))
(defn eval-in-ns [form]
(binding [*ns* *ns*]
(in-ns (gensym))
(refer-clojure)
(form)))
(deftest ns-test
; type checked
(let [form `(ns ~'foo)
expec... | null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/lib.clojure/test/clojure/core/typed/ext_test/clojure/core.clj | clojure | type checked
type error
eval | (ns ^:skip-wiki clojure.core.typed.ext-test.clojure.core
(:require [clojure.test :refer [deftest is]]
[clojure.core.typed :as t]))
(defn eval-in-ns [form]
(binding [*ns* *ns*]
(in-ns (gensym))
(refer-clojure)
(form)))
(deftest ns-test
(let [form `(ns ~'foo)
expected nil
r... |
8ab0006c6043ee9537c970a9e75bec10b844ff036a67f14f28aa1555be006c7b | ce-box/CE3104-Scheme-Language | 01-elementary-numeric-operations.rkt | #|---------------------------------------------------
ELEMENTARY NUMERIC OPERATIONS
The Scheme language has the following form with the
functions:
> (f arg1 arg2 arg3 ... argN)
In the programming environment to perform the basic
mathematical operations have the reserved functions:
addition... | null | https://raw.githubusercontent.com/ce-box/CE3104-Scheme-Language/573373b52abb37114520714792c78901bb3ba681/code-examples/01-elementary-numeric-operations.rkt | racket | ---------------------------------------------------
ELEMENTARY NUMERIC OPERATIONS
The Scheme language has the following form with the
functions:
> (f arg1 arg2 arg3 ... argN)
In the programming environment to perform the basic
mathematical operations have the reserved functions:
addition, ... |
#lang racket
(+ 5 4)
(+ 5 4 3)
(- 7 4)
(- 7 4 1)
(- 7.1 4.1 2)
(* 2 4)
(* 2 4 3)
(* 2.1 4.2 3.7)
(/ 10 2)
(/ 10 3)
(/ 10 2 2)
(/ 10.1 2 2.1)
( 2 * 3 * 4 ) + ( 5 * 4 ) = 44
(+ (* 2 3 4) (* 5 4))
|
0d76345e1d0d655300f46e6903e36879255281ddd422c48292ed94fe13c55802 | kappelmann/engaging-large-scale-functional-programming | Exercise01.hs | module Exercise01 where
type Quad = (Integer, Integer, Integer, Integer)
contestTeams :: (Integer, Integer) -> Quad
contestTeams (n, k) = (v0, v0*k, v0*k*k, v0*k*k*k)
-- head $ filter (`sumTuple` n) (allContests k)
where
x = n `div` (k^3 + k^2 + k + 1)
k3 = k^3
stuff = 1 + k + k^2 + k^3... | null | https://raw.githubusercontent.com/kappelmann/engaging-large-scale-functional-programming/8ed2c056fbd611f1531230648497cb5436d489e4/resources/contest/example_data/01/uploads/antitaktik/Exercise01.hs | haskell | head $ filter (`sumTuple` n) (allContests k) | module Exercise01 where
type Quad = (Integer, Integer, Integer, Integer)
contestTeams :: (Integer, Integer) -> Quad
contestTeams (n, k) = (v0, v0*k, v0*k*k, v0*k*k*k)
where
x = n `div` (k^3 + k^2 + k + 1)
k3 = k^3
stuff = 1 + k + k^2 + k^3
v0 = n `div` stuff
contestC :: (Integer, I... |
6f0da5a64eddeb1949fc0a63d2a5cbbabab208838b7861a513ce339ff64484b6 | bendyworks/api-server | Routes.hs | module Api.Routes (routes) where
import Api.Helpers.Controller (status422)
import qualified Api.Controllers.Resource as Resource
import qualified Api.Controllers.User as User
import qualified Data.Text.Lazy as LT
import Api.Types.Server
import Network.HTTP.Types
import Web.Scotty.Trans
routes :: ApiS... | null | https://raw.githubusercontent.com/bendyworks/api-server/9dd6d7c2599bd1c5a7e898a417a7aeb319415dd2/lib/Api/Routes.hs | haskell | module Api.Routes (routes) where
import Api.Helpers.Controller (status422)
import qualified Api.Controllers.Resource as Resource
import qualified Api.Controllers.User as User
import qualified Data.Text.Lazy as LT
import Api.Types.Server
import Network.HTTP.Types
import Web.Scotty.Trans
routes :: ApiS... | |
53a4628ddb0d14309d9c1b84e6029ce28cbf746d3e709e1dbb2f3330b9ffe667 | replikativ/datahike | entity_test.cljc | (ns datahike.test.entity-test
(:require
[#?(:cljs cljs.reader :clj clojure.edn) :as edn]
#?(:cljs [cljs.test :as t :refer-macros [is deftest testing]]
:clj [clojure.test :as t :refer [is deftest testing]])
[clojure.walk]
[datahike.api :as d]
[datahike.db :as db]
[datahike.impl.entit... | null | https://raw.githubusercontent.com/replikativ/datahike/408cb0f538a837267e44b098df895fa00348fe10/test/datahike/test/entity_test.cljc | clojure | IFn form
read back in to account for unordered-ness | (ns datahike.test.entity-test
(:require
[#?(:cljs cljs.reader :clj clojure.edn) :as edn]
#?(:cljs [cljs.test :as t :refer-macros [is deftest testing]]
:clj [clojure.test :as t :refer [is deftest testing]])
[clojure.walk]
[datahike.api :as d]
[datahike.db :as db]
[datahike.impl.entit... |
05d49b8b368fab46f272adaadef38cd7137430ee0ebdb8dbcef36694d64cda28 | wireapp/wire-server | Conversation.hs | -- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License... | null | https://raw.githubusercontent.com/wireapp/wire-server/c27541d7456e3ea07ce5c8991585d0ffc4fac226/services/galley/src/Galley/Cassandra/Conversation.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module Galley.Cassandra.Conversa... |
42c98b8a2f88c2a5b7013a0969511faa416acc3304a309af304063ff5cd6cd04 | aeternity/mnesia_leveled | mnesia_leveled_tuning.erl | %%----------------------------------------------------------------
Copyright ( c ) 2018 Aeternity Anstalt
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License at
%%
%% ... | null | https://raw.githubusercontent.com/aeternity/mnesia_leveled/11c480b5546ed6087ae688e8596bd596a1f7bdd1/src/mnesia_leveled_tuning.erl | erlang | ----------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions an... | Copyright ( c ) 2018 Aeternity Anstalt
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(mnesia_leveled_tuning).
-expor... |
9bddcd68fe80962937c905162c36984910b2bff867d5a45e7f134522afb000f5 | alavrik/piqi | piqi_base64.ml |
Copyright 2014
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
distributed... | null | https://raw.githubusercontent.com/alavrik/piqi/bcea4d44997966198dc295df0609591fa787b1d2/piqilib/piqi_base64.ml | ocaml | TODO: add more base64 validation; the base64 library doesn't do any
* validation |
Copyright 2014
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
distributed... |
bdddbfa1c514f735367735eb246c68c2af868e63cd3f01ca709cce537ff8615d | vikram/lisplibraries | tests.lisp | -*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
I d : $ I d : tests.lisp 8702 2004 - 03 - 08 01:41:52Z
Purpose : Self Test suite for XLUnit
;;;;
;;;; *******************************... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/xlunit-0.6.2/tests.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
*************************************************************************
FILE IDENTIFICATION
*************************************************************************
Helper test fixture
Main test fixture | I d : $ I d : tests.lisp 8702 2004 - 03 - 08 01:41:52Z
Purpose : Self Test suite for XLUnit
(in-package #:cl-user)
(defpackage #:xlunit-tests
(:use #:cl #:xlunit)
(:export #:do-tests))
(in-package #:xlunit-tests)
(define-condition test-condition (error)
())
(defclass was-run (test-case)
((log :... |
b3387966d466ffe09eafecc5d26950288fbbd5ff6005a5e1b522ecc55a1ed558 | ocaml-flambda/ocaml-jst | lazy_backtrack.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* ... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/5bf2820278c58f6715dcfaf6fa61e09a9b0d8db3/utils/lazy_backtrack.ml | ocaml | ************************************************************************
OCaml
Fabrice L... | Copyright 2012 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type ('a,'b) t = ('a,'b) eval ref
and ('a,'b) eval =
| Done of 'b
| Raise of exn
| Thunk of 'a
type undo =
| Nil
| Cons : ('a, 'b) t * 'a * undo -> undo
type... |
7abc00ff5727a74276076c5fa2ad87fab91693582ef68957ea37e66d7aa44cd4 | exoscale/clojure-kubernetes-client | v2beta2_horizontal_pod_autoscaler.clj | (ns clojure-kubernetes-client.specs.v2beta2-horizontal-pod-autoscaler
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-object-meta :refer :all]
[clojure-kubernetes-client.specs.v2beta2-horizontal-pod-autoscaler-spec :refer :all]... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v2beta2_horizontal_pod_autoscaler.clj | clojure | (ns clojure-kubernetes-client.specs.v2beta2-horizontal-pod-autoscaler
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-object-meta :refer :all]
[clojure-kubernetes-client.specs.v2beta2-horizontal-pod-autoscaler-spec :refer :all]... | |
0d4ce9f5cdb9787e488e25ec0b893c32b1ab49c2103e63392bb859b4e38233db | casperschipper/ocaml-cisp | null_lookup.ml |
let mkBoermanFading2 ( ) =
let open Cisp in
let memsize = 10.0 in
let tabIndex = seq [ 0.0;sec memsize ] in
let dura = ch [ | 0.5 ; 2.0/.3.0 ; 3.0/.2.0 ; 2.0 | ] | > Seq.map ( fun x - > x * . ) in
let readpos = in
let buffer = Array.make ( ) 0.0 in
let input = Process.inputSeq 0 ... | null | https://raw.githubusercontent.com/casperschipper/ocaml-cisp/4926eaa1332a6d7ef4404cc9962666399ecca88f/examples/null_lookup.ml | ocaml |
let mkBoermanFading2 ( ) =
let open Cisp in
let memsize = 10.0 in
let tabIndex = seq [ 0.0;sec memsize ] in
let dura = ch [ | 0.5 ; 2.0/.3.0 ; 3.0/.2.0 ; 2.0 | ] | > Seq.map ( fun x - > x * . ) in
let readpos = in
let buffer = Array.make ( ) 0.0 in
let input = Process.inputSeq 0 ... | |
765ad736470d87417709f1b580d256e8fb633b18d9613ad8dafc129afa510b93 | ppaml-op3/insomnia | Eval.hs | # LANGUAGE ViewPatterns , FlexibleContexts ,
module FOmega.Eval where
import Control.Applicative (Applicative(..))
import Control.Lens
import Control.Monad (forM, replicateM, unless, zipWithM_)
import Control.Monad.IO.Class (MonadIO(..))
import Control.Monad.Reader (MonadReader(..), ReaderT(..), asks)
import Control... | null | https://raw.githubusercontent.com/ppaml-op3/insomnia/5fc6eb1d554e8853d2fc929a957c7edce9e8867d/src/FOmega/Eval.hs | haskell | intAdd :: Int -> Int -> Int
realAdd :: Real -> Real -> Real
realMul :: Real -> Real -> Real
ifIntLt :: forall a . Int -> Int -> ({} -> a) -> ({} -> a) -> ({} -> a)
ifRealLt :: forall a . Real -> Real -> ({} -> a) -> ({} -> a) -> ({} -> a)
distChooseImpl :: forall a . Real -> Dist a -> Dist a -> Dist a
distUnifor... | # LANGUAGE ViewPatterns , FlexibleContexts ,
module FOmega.Eval where
import Control.Applicative (Applicative(..))
import Control.Lens
import Control.Monad (forM, replicateM, unless, zipWithM_)
import Control.Monad.IO.Class (MonadIO(..))
import Control.Monad.Reader (MonadReader(..), ReaderT(..), asks)
import Control... |
c46f5eb464f949e5fcd68e5922bb947a2987a431090dd5e43178948482127acd | ucsd-progsys/liquidhaskell | LawInstances.hs | # LANGUAGE FlexibleContexts #
module Language.Haskell.Liquid.LawInstances ( checkLawInstances ) where
import qualified Data.List as L
import qualified Data.Maybe as Mb
import Text.PrettyPrint.HughesPJ hiding ((<>))
import ... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/8d905ff44e3b5c8b94d7ca561a1f1db1452caeec/src/Language/Haskell/Liquid/LawInstances.hs | haskell | text "\nesubt1 = " <+> pprint esubst1 | # LANGUAGE FlexibleContexts #
module Language.Haskell.Liquid.LawInstances ( checkLawInstances ) where
import qualified Data.List as L
import qualified Data.Maybe as Mb
import Text.PrettyPrint.HughesPJ hiding ((<>))
import ... |
1637d5a3282cd809d232d2a9c6a32e1577bfd6a9ca45e70798676fd53d80f29a | alexandergunnarson/quantum | cache.cljc | (ns quantum.test.core.cache
(:refer-clojure :exclude [for])
(:require
[quantum.core.async :as async]
[quantum.core.cache :as ns]
[quantum.core.collections :as coll
:refer [for]]
[quantum.core.test :as test
:refer [deftest is testing]]))
#?(:clj
(defn test:memoize*
([f])
([f m-0 & [... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/test/quantum/test/core/cache.cljc | clojure | (ns quantum.test.core.cache
(:refer-clojure :exclude [for])
(:require
[quantum.core.async :as async]
[quantum.core.cache :as ns]
[quantum.core.collections :as coll
:refer [for]]
[quantum.core.test :as test
:refer [deftest is testing]]))
#?(:clj
(defn test:memoize*
([f])
([f m-0 & [... | |
99e8b11751c242036b4800caca9eb7b9ca96e9495855dbf307b21976e6011d5f | dfinity/motoko | generated.mli | val release : string option
val id : string
| null | https://raw.githubusercontent.com/dfinity/motoko/ccf8997d7e3b36bf4ad68c91ac5cd1d9c1a14c6e/src/source_id/generated.mli | ocaml | val release : string option
val id : string
| |
7f360ef078edced37d0e3cc438367aebadddbe6b2f304ee74b050a4932e1663b | samrocketman/home | xtns-mosteller-lava-logo.scm | ;
; The GIMP -- an image manipulation program
Copyright ( C ) 1995 and
;
Lava Logo V1.2 ( 11 - 2007 ) script for GIMP 2.4
Created by 10 - 2007
; Comments directed to (computer graphics and art section)
;
; Tags: logo, lava
;
; Author statement:
;
; Interesting text effects can be achieved by varying fon... | null | https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/xtns-mosteller-lava-logo.scm | scheme |
The GIMP -- an image manipulation program
Comments directed to (computer graphics and art section)
Tags: logo, lava
Author statement:
Interesting text effects can be achieved by varying font, text-color, shadow-color, gradient and lava roughness
Checking raw layers options dispays raw layers only
------... | Copyright ( C ) 1995 and
Lava Logo V1.2 ( 11 - 2007 ) script for GIMP 2.4
Created by 10 - 2007
Unchecking the animation option produces a static image with one text layer with shadow ( semi - flattened )
Checking the animation option produces 4 layers , drop shadowed and semi - flattened for use as a... |
a2e6fb61c74a73fa4994adf4b685876959d1c60ea90a50b8b51052385e89a7c3 | ml4tp/tcoq | check_stat.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/checker/check_stat.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Names
open Cic
o... |
e6272a680434a1d1d36d48dfb9a79a529ab899c5f0ca2f0c32366e7dc0493381 | samply/blaze | protocols.clj | (ns blaze.fhir.spec.type.protocols)
(defprotocol FhirType
(-type [_])
(-interned [_])
(-value [_])
(-has-primary-content [value]
"Returns true if there is primary JSON content available.")
(-serialize-json [value generator]
"Serializes the primary content of `value`.
For primitive types, the pr... | null | https://raw.githubusercontent.com/samply/blaze/d10c9b7c02bb4a4e4efa95579e4ad3b1f4110c5f/modules/fhir-structure/src/blaze/fhir/spec/type/protocols.clj | clojure | (ns blaze.fhir.spec.type.protocols)
(defprotocol FhirType
(-type [_])
(-interned [_])
(-value [_])
(-has-primary-content [value]
"Returns true if there is primary JSON content available.")
(-serialize-json [value generator]
"Serializes the primary content of `value`.
For primitive types, the pr... | |
66120db6d7671c47a2e9ccf1f666347f43a88965279d1bea4e63130eab2fccb9 | GaloisInc/macaw | Eval.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
module Data.Macaw.RISCV.Eval
( riscvInitialBlockRegs
, riscvInitialAbsState
, riscvCallParams
, riscvAddrWidth
, absEvalArchFn
) where
import qualified Data.Macaw.AbsDomain.AbsState as MA
import qualified Data.Macaw.CFG as MC
import qualified Data.Macaw... | null | https://raw.githubusercontent.com/GaloisInc/macaw/82640e7a4b8f842f4da31d9dfab451c0c7288b3c/macaw-riscv/src/Data/Macaw/RISCV/Eval.hs | haskell | # LANGUAGE GADTs #
| At the beginning of each block, the PC holds the address of the block.
| At the beginning of each function, GPR_RA holds the return address. | # LANGUAGE FlexibleContexts #
module Data.Macaw.RISCV.Eval
( riscvInitialBlockRegs
, riscvInitialAbsState
, riscvCallParams
, riscvAddrWidth
, absEvalArchFn
) where
import qualified Data.Macaw.AbsDomain.AbsState as MA
import qualified Data.Macaw.CFG as MC
import qualified Data.Macaw.Memory as MM
import qu... |
095e8b73985929530a006ac496db7f44dcd736186d378390dc8c992f51739a73 | plow-technologies/quickcheck-arbitrary-template | GeneratorsSpec.hs | # LANGUAGE TemplateHaskell #
module Test.QuickCheck.TH.GeneratorsSpec (tests) where
import Data.List
import Test.QuickCheck.TH.Generators
import Test.Tasty
import Test.Tasty.QuickCheck (Arbitrary)
import qualified Test.Tasty.QuickCheck as QC
-- | These example types should b... | null | https://raw.githubusercontent.com/plow-technologies/quickcheck-arbitrary-template/97d6243f9d3b7dddb0a1c6329de9f3f8ad49c813/test/Test/QuickCheck/TH/GeneratorsSpec.hs | haskell | | These example types should build arbitrary instances correctly | # LANGUAGE TemplateHaskell #
module Test.QuickCheck.TH.GeneratorsSpec (tests) where
import Data.List
import Test.QuickCheck.TH.Generators
import Test.Tasty
import Test.Tasty.QuickCheck (Arbitrary)
import qualified Test.Tasty.QuickCheck as QC
data ExampleSumTypes
= Example... |
5d9f8ca2c53f6524afc1e6ceb266a967233d2f8749354219976606b4eb2da36f | pawurb/haskell-pg-extras | SeqScans.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
module PGExtras.Queries.SeqScans (seqScansSQL, displaySeqScans) where
import PGExtras.Helpers (maybeText, maybeInt)
import Database.PostgreSQL.Simple
import Text.RawString.QQ
import qualified Data.Text as Text
import Control.Monad (forM_)
import Data.List (i... | null | https://raw.githubusercontent.com/pawurb/haskell-pg-extras/1cddde5f784c6fa2286dd0090389237925918bd8/src/PGExtras/Queries/SeqScans.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE QuasiQuotes #
module PGExtras.Queries.SeqScans (seqScansSQL, displaySeqScans) where
import PGExtras.Helpers (maybeText, maybeInt)
import Database.PostgreSQL.Simple
import Text.RawString.QQ
import qualified Data.Text as Text
import Control.Monad (forM_)
import Data.List (intercalate)
seqScansSQL :: Query
s... |
b27aa8024c11dfdff0e53b62aaf1ce91922e12b6b4438a3f071558ce3087c9a2 | Opetushallitus/aipal | organisaatiopalvelu.clj | Copyright ( c ) 2014 The Finnish National Board of Education - Opetushallitus
;;
This program is free software : Licensed under the EUPL , Version 1.1 or - as
soon as they will be approved by the European Commission - subsequent versions
of the EUPL ( the " Licence " ) ;
;;
;; You may not use this work except... | null | https://raw.githubusercontent.com/Opetushallitus/aipal/767bd14ec7153dc97fdf688443b9687cdb70082f/aipal/src/clj/aipal/arkisto/organisaatiopalvelu.clj | clojure |
You may not use this work except in compliance with the Licence.
You may obtain a copy of the Licence at: /
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | Copyright ( c ) 2014 The Finnish National Board of Education - Opetushallitus
This program is free software : Licensed under the EUPL , Version 1.1 or - as
soon as they will be approved by the European Commission - subsequent versions
European Union Public Licence for more details .
(ns aipal.arkisto.organis... |
4aa3b668be2b7b4a9b545f23632a9dc4b5c197de97c6fa18570134ff596a5457 | binaryage/chromex | privacy.cljs | (ns chromex.ext.privacy (:require-macros [chromex.ext.privacy :refer [gen-wrap]])
(:require [chromex.core]))
; -- properties -------------------------------------------------------------------------------------------------------------
(defn network* [config]
(gen-wrap :property ::network config))
(defn service... | null | https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts/chromex/ext/privacy.cljs | clojure | -- properties ------------------------------------------------------------------------------------------------------------- | (ns chromex.ext.privacy (:require-macros [chromex.ext.privacy :refer [gen-wrap]])
(:require [chromex.core]))
(defn network* [config]
(gen-wrap :property ::network config))
(defn services* [config]
(gen-wrap :property ::services config))
(defn websites* [config]
(gen-wrap :property ::websites config))
|
4e2bda8a730cf671df30bf8be3b9a80019839729cc812b8550eefd9e22e818a7 | esl/MongooseIM | mongoose_graphql_stats_admin_query.erl | -module(mongoose_graphql_stats_admin_query).
-behaviour(mongoose_graphql).
-export([execute/4]).
-import(mongoose_graphql_helper, [make_error/2]).
-ignore_xref([execute/4]).
-include("../mongoose_graphql_types.hrl").
-include("mongoose.hrl").
-include("jlib.hrl").
execute(_Ctx, stats, <<"globalStats">>, _Args) ->
... | null | https://raw.githubusercontent.com/esl/MongooseIM/0fbad9e60efdf60aa74582cc945df3461c89f16c/src/graphql/admin/mongoose_graphql_stats_admin_query.erl | erlang | -module(mongoose_graphql_stats_admin_query).
-behaviour(mongoose_graphql).
-export([execute/4]).
-import(mongoose_graphql_helper, [make_error/2]).
-ignore_xref([execute/4]).
-include("../mongoose_graphql_types.hrl").
-include("mongoose.hrl").
-include("jlib.hrl").
execute(_Ctx, stats, <<"globalStats">>, _Args) ->
... | |
c6510fd05b3611a0d20c27082594b24e138eaa1e668980500fe369ac878e0e3f | 97jaz/gregor | datetime-provider.rkt | #lang racket/base
(require rackunit
rackunit/text-ui
gregor
gregor/time)
(run-tests
(test-suite "[datetime providers]"
(test-case "datetime-provider?"
(check-true (datetime-provider? (datetime 2000)))
(check-true (datetime-provider? (moment 2000)))
(check-true (datetime-... | null | https://raw.githubusercontent.com/97jaz/gregor/91d71c6082fec4197aaf9ade57aceb148116c11c/gregor-test/gregor/tests/datetime-provider.rkt | racket | #lang racket/base
(require rackunit
rackunit/text-ui
gregor
gregor/time)
(run-tests
(test-suite "[datetime providers]"
(test-case "datetime-provider?"
(check-true (datetime-provider? (datetime 2000)))
(check-true (datetime-provider? (moment 2000)))
(check-true (datetime-... | |
306d8d3655bb50da9d412678317ada19b495459a2e784d4b83472740150f52ce | jeffshrager/biobike | rnaz.lisp | -*- mode : Lisp ; Syntax : Common - Lisp ; Package : ; -*-
(in-package :bio)
;;; +=========================================================================+
| Copyright ( c ) 2002 - 2005 JP , , |
;;; | |
;;; | Permission is h... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Lib/rnaz.lisp | lisp | Syntax : Common - Lisp ; Package : ; -*-
+=========================================================================+
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software and associated docu... |
(in-package :bio)
| Copyright ( c ) 2002 - 2005 JP , , |
| " Software " ) , to deal in the Software without restriction , including |
| distribute , sublicense , and/or sell copies of the Software , and to |
| permit persons to whom the Software is furnished to do so , subject to ... |
71aa3d15abd8d7e99c1175ff4a24407716afc286eeb967d08462ff9aaed47bd5 | janestreet/merlin-jst | pparse.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Cri... | null | https://raw.githubusercontent.com/janestreet/merlin-jst/073998f367d299375a6093df2eed215fe3a3640b/src/ocaml/driver/pparse.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Std
val apply_rewriters_str: ppx:string... |
316fc2e35b136e2495e62068650beeaf9d99c92364395bc62928fa2d9e3ee533 | syallop/DHT | Client.hs | module DHT.Client
( module Client
)
where
import DHT.Client.Op as Client
| null | https://raw.githubusercontent.com/syallop/DHT/a376cf5a423f50212cfd856dcf733eb5177fc00c/DHT/Client.hs | haskell | module DHT.Client
( module Client
)
where
import DHT.Client.Op as Client
| |
c830ce38c578b443055d9f0a0938be9597e2c2d85221f95cdd64422ea7aed7b7 | orthecreedence/drakma-async | package.lisp | (defpackage :drakma-async
(:use :cl :alexandria :flexi-streams :cl-async-future :alexandria :drakma :puri :flexi-streams :chunga)
(:shadow http-request)
(:shadowing-import-from :drakma
syntax-error)
(:export #:http-request
#:http-eof
#:http-timeout)
(:import-fro... | null | https://raw.githubusercontent.com/orthecreedence/drakma-async/3353e5cd8c14e40ac1f21e4065b07c75065b1500/package.lisp | lisp | (defpackage :drakma-async
(:use :cl :alexandria :flexi-streams :cl-async-future :alexandria :drakma :puri :flexi-streams :chunga)
(:shadow http-request)
(:shadowing-import-from :drakma
syntax-error)
(:export #:http-request
#:http-eof
#:http-timeout)
(:import-fro... | |
b2fa172bbd2320cd7e0df2d2b90936d6fb90b81c43667d93c82a0ebbaec6a251 | LeventErkok/sbv | AES.hs | -----------------------------------------------------------------------------
-- |
Module : BenchSuite . Crypto . AES
Copyright : ( c )
-- License : BSD3
-- Maintainer:
-- Stability : experimental
--
Bench suite for Documentation . SBV.Examples . Crypto . AES
-------------------------... | null | https://raw.githubusercontent.com/LeventErkok/sbv/cfaa40b8c8ff8e1b7ff9ab71304654f6f531ba72/SBVBenchSuite/BenchSuite/Crypto/AES.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD3
Maintainer:
Stability : experimental
---------------------------------------------------------------------------
# OPTIONS_GHC -Wall -Werror #
benchmark suite | Module : BenchSuite . Crypto . AES
Copyright : ( c )
Bench suite for Documentation . SBV.Examples . Crypto . AES
module BenchSuite.Crypto.AES(benchmarks) where
import Documentation.SBV.Examples.Crypto.AES
import Data.SBV
import BenchSuite.Bench.Bench
benchmarks :: Runner
benchmarks ... |
29dc63aafc5c174620c2300c3d137e4ba18d4a98c201f6580003328ac23a9e61 | Storkle/clj-forex | account.clj | ;;TODO: unit test everything
;;TODO: create a new atom-hash on merging, etc????????
(clojure.core/use 'nstools.ns)
(ns+ forex.module.account
(:clone clj.core)
(:require forex.backend.mql.socket-service)
(:use forex.util.core
forex.util.emacs
forex.util.general forex.util.log
forex.module.in... | null | https://raw.githubusercontent.com/Storkle/clj-forex/1800b982037b821732b9df1e2e5ea1eda70f941f/src/forex/module/account.clj | clojure | TODO: unit test everything
TODO: create a new atom-hash on merging, etc????????
TODO: do we need all of these assertions?
TODO: return 0 instead?
TODO: act as a regular modify if we dont pass in sl,tp,or price
TOODOs: how do we get map with defaults?
see
now, use modify to change sl and tp
clojure.lang.Atom | (clojure.core/use 'nstools.ns)
(ns+ forex.module.account
(:clone clj.core)
(:require forex.backend.mql.socket-service)
(:use forex.util.core
forex.util.emacs
forex.util.general forex.util.log
forex.module.indicator
forex.module.error forex.module.account.utils)
(:require [forex.m... |
2a60e9fa908641607d4db64c43c1676758940d8d88ddeba4fe40adeefdb6750c | ekimber/clj-strava | api.clj | (ns clj-strava.api
(:require [clojure.string :as str]
[org.httpkit.client :as http]
[clojure.data.json :as json]
[clj-strava.client :as client]
[clojure.java.io :as io]
[clojure.core.async :refer [chan go >!]]
[environ.core :refer [env]])
(:imp... | null | https://raw.githubusercontent.com/ekimber/clj-strava/c7cce98b5b76c605d2fdf9f396802840be93d81f/src/clj_strava/api.clj | clojure | (ns clj-strava.api
(:require [clojure.string :as str]
[org.httpkit.client :as http]
[clojure.data.json :as json]
[clj-strava.client :as client]
[clojure.java.io :as io]
[clojure.core.async :refer [chan go >!]]
[environ.core :refer [env]])
(:imp... | |
7a60904892359c8bff801f738530a295489da0fc97e0e150db8bc8fe5cae73ed | AeneasVerif/aeneas | TypesAnalysis.ml | open Types
module A = LlbcAst
type subtype_info = {
under_borrow : bool; (** Are we inside a borrow? *)
under_mut_borrow : bool; (** Are we inside a mut borrow? *)
}
[@@deriving show]
(** See {!type_decl_info} *)
type type_param_info = subtype_info [@@deriving show]
type expl_info = subtype_info [@@deriving sh... | null | https://raw.githubusercontent.com/AeneasVerif/aeneas/d8d661d02cf0068753ae3963156896492dfde50a/compiler/TypesAnalysis.ml | ocaml | * Are we inside a borrow?
* Are we inside a mut borrow?
* See {!type_decl_info}
* Does the type (transitively) contains a static borrow?
* Does the type (transitively) contains a borrow?
* Does the type (transitively) contains nested borrows?
* Generic definition
* Various informations about the borrows
* Gives... | open Types
module A = LlbcAst
type subtype_info = {
}
[@@deriving show]
type type_param_info = subtype_info [@@deriving show]
type expl_info = subtype_info [@@deriving show]
type type_borrows_info = {
contains_static : bool;
contains_borrow : bool;
contains_nested_borrows : bool;
contains_borrow_under_mut :... |
2347297d851ba7b8bf3c03dabced0a18cf7d0c5a9295a49eb3871cd99addd829 | e-bigmoon/haskell-blog | Example12.hs | #!/usr/bin/env stack
stack repl --resolver lts-15.4
--package wai
--package yesod - core
--package wai
--package yesod-core
-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
import Network.Wai (pathInfo)
import Yesod.Core (HandlerT, RenderRoute (..),
... | null | https://raw.githubusercontent.com/e-bigmoon/haskell-blog/5c9e7c25f31ea6856c5d333e8e991dbceab21c56/sample-code/yesod/ch20/Example12.hs | haskell | resolver lts-15.4
package wai
package yesod - core
package wai
package yesod-core
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
| Our foundation datatype. | #!/usr/bin/env stack
-}
import Network.Wai (pathInfo)
import Yesod.Core (HandlerT, RenderRoute (..),
Yesod,
YesodDispatch (..), toPathPiece, fromPathPiece, redirect, notFound, yesodRunner, warp)
data App = App
instance Yesod App
instan... |
256f67ed29a277a7f8b6a042abc132cc8c62be9f6bdead43f87f247ea2bc8b73 | shayne-fletcher/zen | mod.ml | let rec fib : int -> int =
fun n ->
if n < 2 then 1
else fib (n-1) + fib (n-2)
let format_result : int -> string =
fun n ->
Printf.sprintf "Result is %d\n" n
Register named closures for C clients .
let _ = Callback.register "fib" fib
and _ = Callback.register "format_result" format_result
| null | https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/embed/mod.ml | ocaml | let rec fib : int -> int =
fun n ->
if n < 2 then 1
else fib (n-1) + fib (n-2)
let format_result : int -> string =
fun n ->
Printf.sprintf "Result is %d\n" n
Register named closures for C clients .
let _ = Callback.register "fib" fib
and _ = Callback.register "format_result" format_result
| |
4c7509d50cdfc119fd93235231b07dbe74dd25981cf5090d3f3362ea634ee3b4 | dakrone/cheshire | benchmark.clj | (ns cheshire.test.benchmark
(:use [clojure.test])
(:require [cheshire.core :as core]
[cheshire.custom :as old]
[cheshire.generate :as custom]
[clojure.data.json :as cj]
[clojure.java.io :refer [file input-stream resource]]
[clj-json.core :as clj-json]
... | null | https://raw.githubusercontent.com/dakrone/cheshire/d2153a60ff242afabbbe5499ecf1d2674e8c568a/benchmarks/cheshire/test/benchmark.clj | clojure | These tests just print out results, nothing else, they also | (ns cheshire.test.benchmark
(:use [clojure.test])
(:require [cheshire.core :as core]
[cheshire.custom :as old]
[cheshire.generate :as custom]
[clojure.data.json :as cj]
[clojure.java.io :refer [file input-stream resource]]
[clj-json.core :as clj-json]
... |
94e0ae44d695998edc7b8f40637a31634c288aec5932fc4016d256fa7fb0490a | nubank/umschreiben-clj | requires.clj | (ns umschreiben-clj.requires
(:refer-clojure :exclude [replace])
(:require [rewrite-clj.node :as n]
[rewrite-clj.zip :as z]
[umschreiben-clj.internals.requires :as internals.requires]))
(defn replace-using-require
"Returns a modified version of <node> where <usage> conforms to <require*>.... | null | https://raw.githubusercontent.com/nubank/umschreiben-clj/e32863caf66aba5bd9f7f61d2b046fe1cbcc51e2/src/umschreiben_clj/requires.clj | clojure | => must return a node or s-expr
simple usage
providing a custom replace-fn
=> must return a node or s-expr
simple usage
providing a custom replace-fn | (ns umschreiben-clj.requires
(:refer-clojure :exclude [replace])
(:require [rewrite-clj.node :as n]
[rewrite-clj.zip :as z]
[umschreiben-clj.internals.requires :as internals.requires]))
(defn replace-using-require
"Returns a modified version of <node> where <usage> conforms to <require*>.... |
c4c3eaf714b6b75a52f5f98e81a35f9735d86d718e0193dd3b85a9f33ed06a1d | souenzzo/souenzzo.github.io | main.cljs | (ns drawing.main
(:require [goog.dom :as gdom]))
;; -raytracer/
(def width (* 0.5 640))
(def height (* 0.5 480))
(defn v-subtract
[a b]
{:x (- (:x a) (:x b))
:y (- (:y a) (:y b))
:z (- (:z a) (:z b))})
(defn v-dot-product
[a b]
(+ (* (:x a) (:x b))
(* (:y a) (:y b))
(* (:z a) (:z b))))
(def... | null | https://raw.githubusercontent.com/souenzzo/souenzzo.github.io/30a811c4e5633ad07bba1d58d19eb091dac222e9/drawing/src/drawing/main.cljs | clojure | -raytracer/
)) | (ns drawing.main
(:require [goog.dom :as gdom]))
(def width (* 0.5 640))
(def height (* 0.5 480))
(defn v-subtract
[a b]
{:x (- (:x a) (:x b))
:y (- (:y a) (:y b))
:z (- (:z a) (:z b))})
(defn v-dot-product
[a b]
(+ (* (:x a) (:x b))
(* (:y a) (:y b))
(* (:z a) (:z b))))
(defn v-length
[a... |
f5e69f96c7d7d0922d7ad777251306a0e73a6a253a413076d872eca6850d4240 | amarpotghan/crjdt-haskell | Types.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE DeriveFoldable #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
# LANGUAGE MultiParamTypeClasses #
module Data.Crjdt.Types where
import Data.String
import Data.Text
import Data.Vo... | null | https://raw.githubusercontent.com/amarpotghan/crjdt-haskell/8412ada8136f49ab12a314407983d95a6ad39d43/src/Data/Crjdt/Types.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE DeriveTraversable #
TODO: rethink about this type | # LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE DeriveFoldable #
# LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
# LANGUAGE MultiParamTypeClasses #
module Data.Crjdt.Types where
import Data.String
import Data.Text
import Data.Void
newtype Var = Variable { getName :: Text } deriving (S... |
39f691d8b2db8d91b856d330df0d6d97f7f5fdf15a62cc990049b9bb51839024 | elaye/mushu | Main.hs | module Main where
import ClassyPrelude
import UI (start)
main :: IO ()
main = start
| null | https://raw.githubusercontent.com/elaye/mushu/fae1c4819b0ff06af4ae0c8a6e3cbe155f12ff98/app/Main.hs | haskell | module Main where
import ClassyPrelude
import UI (start)
main :: IO ()
main = start
| |
1a819a45aa60049f49924150fb726293ec53620316309f92d950e8176df3d03d | jordanthayer/ocaml-search | random_walk.ml | (**
Randomly walks until the specified number of steps have been taken
then just stop.
*)
let random_walk sif args =
(**does a random walk using sif. args says how many steps to take.*)
(*shouldn't have any arguments.*)
let n_steps = Search_args.get_int "random_walk" args 0 in
let rec do_random_walk ... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/random/random_walk.ml | ocaml | *
Randomly walks until the specified number of steps have been taken
then just stop.
*does a random walk using sif. args says how many steps to take.
shouldn't have any arguments. |
let random_walk sif args =
let n_steps = Search_args.get_int "random_walk" args 0 in
let rec do_random_walk s count =
if(count = 0) then s
else
(
let children = fst (List.split (sif.Search_interface.domain_expand s 0.0)) in
let chosen = Wrlist.random_elt children in
do_random_walk chosen (coun... |
e1da5cee380c6307196b2c1517a5e6f09d94acb46403a7c47cb6ccfa260b72ca | positiondev/rivet | V0.hs | {-# LANGUAGE OverloadedStrings #-}
module Database.Rivet.V0 (
Migration
, createTable
, dropTable
, renameColumn
, addColumn
, dropColumn
, sql
, ColumnSpec(..)
) where
import Data.Maybe (fromMaybe)
import Data.Monoid
import Data.Text (Text)
import ... | null | https://raw.githubusercontent.com/positiondev/rivet/51b627cbc568e98fd424b4d3049554685c5da310/rivet-core/src/Database/Rivet/V0.hs | haskell | # LANGUAGE OverloadedStrings #
the spec for how the table should be recreated. Obviously this is
reasonably unsafe, as we aren't checking that it looks like that
currently (so up and down may not be inverses if you mess that up).
what the column should look like when you re-add it in order to
build the inverse. | module Database.Rivet.V0 (
Migration
, createTable
, dropTable
, renameColumn
, addColumn
, dropColumn
, sql
, ColumnSpec(..)
) where
import Data.Maybe (fromMaybe)
import Data.Monoid
import Data.Text (Text)
import Database.Rivet
data ColumnSpec = ... |
b063a34cde1b62ef711fd000b3498375f8cf334e66c97142e96cb21b7d5166df | TristanCacqueray/haskell-butler | Storage.hs | module Butler.Core.Storage (
Storage,
newStorage,
getStoragePath,
scopeStorage,
syncThread,
-- * Read/Write
StorageAddress (..),
writeStorage,
readStorage,
) where
import Data.ByteString qualified as BS
import Data.Map qualified as Map
import System.Directory (createDirectoryIfMiss... | null | https://raw.githubusercontent.com/TristanCacqueray/haskell-butler/7db4b3c92564a95a41c0d46b9ee426cf413f692b/src/Butler/Core/Storage.hs | haskell | * Read/Write
flush request added in between
| The syncThread must be started for the storage to persist
Check if path is in journal to be written to disk
Check if path is on disk | module Butler.Core.Storage (
Storage,
newStorage,
getStoragePath,
scopeStorage,
syncThread,
StorageAddress (..),
writeStorage,
readStorage,
) where
import Data.ByteString qualified as BS
import Data.Map qualified as Map
import System.Directory (createDirectoryIfMissing)
import System.P... |
200bd9ae73209023f3892385618a37200c3ba2b8c1923afdda44038915618212 | manuel-serrano/bigloo | css_ast.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / api / web / src / Llib / css_ast.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/api/web/src/Llib/css_ast.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* The CSS ast class hierarchy */
*===========================... | * serrano / prgm / project / bigloo / api / web / src / Llib / css_ast.scm * /
* Author : * /
* Creation : Sun Mar 29 10:04:44 2009 * /
* Last change : We d Oct 7 15:30:46 2015 ( serrano ) * /
* ... |
c2841e44b879aa3b2a1517787f320f69d456ce0acda9623378b96e07d6295d31 | HugoPeters1024/hs-sleuth | FileRead.hs | -- | Benchmarks simple file reading
--
-- Tested in this benchmark:
--
-- * Reading a file from the disk
--
module Benchmarks.FileRead
( benchmark
) where
import Control.Applicative ((<$>))
import Criterion (Benchmark, bgroup, bench, whnfIO)
import qualified Data.ByteString as SB
import qualified Data.ByteStri... | null | https://raw.githubusercontent.com/HugoPeters1024/hs-sleuth/385655e62031959a14a3bac5e9ccd1c42c045f0c/test-project/text-1.2.3.2/benchmarks/haskell/Benchmarks/FileRead.hs | haskell | | Benchmarks simple file reading
Tested in this benchmark:
* Reading a file from the disk
| module Benchmarks.FileRead
( benchmark
) where
import Control.Applicative ((<$>))
import Criterion (Benchmark, bgroup, bench, whnfIO)
import qualified Data.ByteString as SB
import qualified Data.ByteString.Lazy as LB
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import qualified Data... |
8e9a1e1ff8fcacf46ab27b17ea7892d035f4e24c50aeb984f92d048f1a55227b | leo-project/leo_storage | leo_storage_mq.erl | %%====================================================================
%%
%% LeoFS Storage
%%
Copyright ( c ) 2012 - 2016 Rakuten , Inc.
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% ... | null | https://raw.githubusercontent.com/leo-project/leo_storage/9bd2bb0b7cedcdbe1bf0b5c4dcf708be16664d2a/src/leo_storage_mq.erl | erlang | ====================================================================
LeoFS Storage
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language gov... | Copyright ( c ) 2012 - 2016 Rakuten , Inc.
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
LeoFS Storage - MQ Client
-module(... |
f076d1fef3a1e9f27f0819599d2fcc5f0276324040974ae27f00fb794d4d38a9 | braveclojure/babooka | args.clj | *command-line-args*
| null | https://raw.githubusercontent.com/braveclojure/babooka/d0755a23a744ed148b4a56259e07c4ae7f36da2b/src/args.clj | clojure | *command-line-args*
| |
66adeae084400dc19161e2324522943de0f8169664bf17a395117095a28deea8 | ocaml/ocamlbuild | options.ml | (***********************************************************************)
(* *)
(* ocamlbuild *)
(* *)
, , projet Galliu... | null | https://raw.githubusercontent.com/ocaml/ocamlbuild/792b7c8abdbc712c98ed7e69469ed354b87e125b/src/options.ml | ocaml | *********************************************************************
ocamlbuild
... | , , projet Gallium , INRIA Rocquencourt
Copyright 2007 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
Original author :
type command_spec = Command.sp... |
35628481916322bdef29831058b4364eb5610fa7133ee73ed153e032695653f2 | evincarofautumn/Ward | Orphans.hs | # OPTIONS_GHC -Wno - orphans #
{-# LANGUAGE OverloadedStrings #-}
module Orphans() where
import qualified Data.Aeson as A
import Data.Aeson ((.=), (.:))
import Language.C.Data.Ident (Ident(..))
import Language.C.Data.Node (NodeInfo(..))
import Language.C.Data.Name (Name)
import Language.C.Data.Position
instance A.T... | null | https://raw.githubusercontent.com/evincarofautumn/Ward/a2ebe86cbcf05d98e59eafe0b9695cd0e10fec60/src/Orphans.hs | haskell | # LANGUAGE OverloadedStrings # | # OPTIONS_GHC -Wno - orphans #
module Orphans() where
import qualified Data.Aeson as A
import Data.Aeson ((.=), (.:))
import Language.C.Data.Ident (Ident(..))
import Language.C.Data.Node (NodeInfo(..))
import Language.C.Data.Name (Name)
import Language.C.Data.Position
instance A.ToJSONKey Ident
instance A.FromJSONK... |
ecde5a093a03da179203fd7e71dd1537f535503117e7131612af6c67f3a7bc47 | OCamlPro/alt-ergo | satml_frontend.ml | (******************************************************************************)
(* *)
Alt - Ergo : The SMT Solver For Software Verification
Copyright ( C ) 2013 - 2018
(* ... | null | https://raw.githubusercontent.com/OCamlPro/alt-ergo/4463ed0b3c70f7b2bc16baaa1eff93e594205e15/src/lib/reasoners/satml_frontend.ml | ocaml | ****************************************************************************
This file is distributed under the terms of the license indicated
in the ... | Alt - Ergo : The SMT Solver For Software Verification
Copyright ( C ) 2013 - 2018
module Make (Th : Theory.S) : Sat_solver_sig.S = struct
module SAT = Satml.Make(Th)
module Inst = Instances.Make(Th)
module Ex = Explanation
module E = Expr
mod... |
9ac0f593c5233678118fae3374eb420c21a717f95922eb907b80eed1f75c1b0c | informatimago/lisp | hw.lisp |
(defun main ()
(h:ello)
(w:ord))
| null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/driver/test-ll/hw.lisp | lisp |
(defun main ()
(h:ello)
(w:ord))
| |
28131870f6dc0b826a9804890111bcabc30ec4fa0d7e3d968f92427f4095011a | joearms/erlmediaserver | dir_walker.erl | %% Author: ua
Created : May 21 , 2010
Description : TODO : Add description to dir_walker
-module(dir_walker).
%%
%% Include files
%%
-include("../include/upnp.hrl").
-include_lib("eunit/include/eunit.hrl").
%%
%% Exported Functions
%%
-compile(export_all).
-record(state, {subDirs = []}).
%%
%% API Functions
%%
lo... | null | https://raw.githubusercontent.com/joearms/erlmediaserver/35ef0d8300c50a273ee0122ccce65973af4c3a73/src/dir_walker.erl | erlang | Author: ua
Include files
Exported Functions
API Functions
Local Functions
Test Functions
| Created : May 21 , 2010
Description : TODO : Add description to dir_walker
-module(dir_walker).
-include("../include/upnp.hrl").
-include_lib("eunit/include/eunit.hrl").
-compile(export_all).
-record(state, {subDirs = []}).
loadFolder(RootFolder) ->
io:format("/t1...~p~n", [RootFolder]),
case get_dirs(RootFolde... |
f169c2d71759b4183c685de9a6a5d5dc2ed1e9f71bb69a383126f77e8df26e25 | matthewhammer/ceal | hammer_util.ml | (* Some simple, commonly-used definitions that I want everywhere. *)
exception NYI
let ( <** ) f g = ( fun x -> f ( g ( x ) ) )
let ( **> ) f g = ( fun x -> g ( f ( x ) ) )
module type MONAD = sig
type 'a m
val bind : 'a m -> ('a -> 'b m) -> 'b m
val ret : 'a -> 'a m
end
module Monad_shorthands (M : MONAD)... | null | https://raw.githubusercontent.com/matthewhammer/ceal/cc67ef1ad336649b2362c39faaccdd08ba59d728/src/tv/hammer_util.ml | ocaml | Some simple, commonly-used definitions that I want everywhere. |
exception NYI
let ( <** ) f g = ( fun x -> f ( g ( x ) ) )
let ( **> ) f g = ( fun x -> g ( f ( x ) ) )
module type MONAD = sig
type 'a m
val bind : 'a m -> ('a -> 'b m) -> 'b m
val ret : 'a -> 'a m
end
module Monad_shorthands (M : MONAD) =
struct
let ( >>= ) = M.bind
let ( >> ) m f = M.bind m (f... |
9e2b74885a00a731c696d826525813b8ddf37179cece605db6c5cf712fb6b961 | dakk/caravand-fullnode | message.mli | open Blockchain
open Stdint
open Bitcoinml
type header = {
magic : int32;
command : string;
length : uint32;
checksum : string;
}
type invvect =
INV_ERROR
| INV_TX of Hash.t
| INV_BLOCK of Hash.t
| INV_FILTERED_BLOCK of Hash.t
type addr = {
services : uint64;
address : string;
port : uint16;
}
ty... | null | https://raw.githubusercontent.com/dakk/caravand-fullnode/72735bf380812aea32ba0d3d4aa671f741cdaecb/src/network/message.mli | ocaml | open Blockchain
open Stdint
open Bitcoinml
type header = {
magic : int32;
command : string;
length : uint32;
checksum : string;
}
type invvect =
INV_ERROR
| INV_TX of Hash.t
| INV_BLOCK of Hash.t
| INV_FILTERED_BLOCK of Hash.t
type addr = {
services : uint64;
address : string;
port : uint16;
}
ty... | |
b80df6ddc419d4be190fec91e4affc3ece6c1e274f6fe9170133f0d9c4a85f84 | fortytools/holumbus | Ranking.hs | -- ----------------------------------------------------------------------------
|
Module : Holumbus . Query . Ranking
Copyright : Copyright ( C ) 2007 , 2008
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.3
The rank... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/searchengine/source/Holumbus/Query/Ranking.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
* Ranking types
* Ranking
* Predefined document rankings
* Predefined word rankings
| The configuration of the ranking mechanism.
^ A function to determine th... |
|
Module : Holumbus . Query . Ranking
Copyright : Copyright ( C ) 2007 , 2008
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.3
The ranking mechanism for Holumbus .
Customized ranking functions for both docume... |
871b5f71b4f03a94dd1c9b267770ea041e7f6cef16379e046228950247cade85 | monadbobo/ocaml-core | bool.mli | type t = bool
open Interfaces
include Comparable with type t := t
include Hashable with type t := t
include Sexpable with type t := t
include Binable with type t := t
include Stringable with type t := t
module True_ : Default.S with type real = t
module False_ : Default.S with type real = t
| null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/bool.mli | ocaml | type t = bool
open Interfaces
include Comparable with type t := t
include Hashable with type t := t
include Sexpable with type t := t
include Binable with type t := t
include Stringable with type t := t
module True_ : Default.S with type real = t
module False_ : Default.S with type real = t
| |
a7d0820daa61bff744621774f98b29a1ca57eda64d2056bffb14227410b93205 | Popl7/Bamse | subs.cljs | (ns bamse.subs
(:require
[re-frame.core :as re-frame]
[bamse.users.subs]))
(defn register []
(bamse.users.subs/register)
(re-frame/reg-sub
::db
(fn [db _]
db))
(re-frame/reg-sub
::title
(fn [db _]
(:title db)))
(re-frame/reg-sub
::active-route
(fn [db _]
(:active-route db)))
(... | null | https://raw.githubusercontent.com/Popl7/Bamse/33f45df2f22ee35344671f11fd0db3dd50331c84/src/cljs/bamse/subs.cljs | clojure | _ (println "waiting for: " waits) | (ns bamse.subs
(:require
[re-frame.core :as re-frame]
[bamse.users.subs]))
(defn register []
(bamse.users.subs/register)
(re-frame/reg-sub
::db
(fn [db _]
db))
(re-frame/reg-sub
::title
(fn [db _]
(:title db)))
(re-frame/reg-sub
::active-route
(fn [db _]
(:active-route db)))
(... |
12038a25132d531af6afac7f387a99db511debebf33b476f3192e66caeb2585e | dongweiming/lisp-koans-answer | vectors.lsp | Copyright 2013 Google Inc.
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, software
... | null | https://raw.githubusercontent.com/dongweiming/lisp-koans-answer/33eb6e38c7179c677db0df0a31cadd49617ae8db/koans/vectors.lsp | lisp |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language g... | Copyright 2013 Google Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
"vectors are just like rank 1 arrays"
(define-test test-vector-types
" #(x y z) defines a vector literal containing x y z"
(true-or-false? t (typep #(1 11 111) 'vector))
(assert-equal 11 (aref #(1 11 111) 1))... |
06be2ac685a7831665716a67973176999f6eccb0f6ae7e77364f149f3aa28f50 | YoshikuniJujo/test_haskell | try-fill.hs | # LANGUAGE BlockArguments #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Main where
import Data.Maybe
import Data.Color
import Graphics.Cairo.Drawing.CairoT
import Graphics.Cairo.Drawing.CairoT.Setting
import Graphics.Cairo.Drawing.Paths
import MakePng
main :: IO ()
main = pngWith "pngs/try-fill.png" 768 896 \cr ... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/63999f710292c9c49e82fc2add844702726d9a3c/themes/gui/cairo/try-simple-cairo-new/app/try-fill.hs | haskell | # LANGUAGE BlockArguments #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Main where
import Data.Maybe
import Data.Color
import Graphics.Cairo.Drawing.CairoT
import Graphics.Cairo.Drawing.CairoT.Setting
import Graphics.Cairo.Drawing.Paths
import MakePng
main :: IO ()
main = pngWith "pngs/try-fill.png" 768 896 \cr ... | |
80953ad0c7f6c57ffb5741787b6c5fc31403325699928d1a2567e73a78236794 | snoyberg/photosorter | Settings.hs | -- | Settings are centralized, as much as possible, into this file. This
-- includes database connection settings, static file locations, etc.
In addition , you can configure a number of different aspects of Yesod
by overriding methods in the Yesod typeclass . That instance is
declared in the Foundation.hs file .... | null | https://raw.githubusercontent.com/snoyberg/photosorter/c02cf37094d24762ceca4c05fe89580a4be0bec1/Settings.hs | haskell | | Settings are centralized, as much as possible, into this file. This
includes database connection settings, static file locations, etc.
| Which Persistent backend this site is using.
Static setting below. Changing these requires a recompile
| The location of static files on your system. This is a file system
pat... | In addition , you can configure a number of different aspects of Yesod
by overriding methods in the Yesod typeclass . That instance is
declared in the Foundation.hs file .
module Settings where
import Prelude
import Text.Shakespeare.Text (st)
import Language.Haskell.TH.Syntax
import Database.Persist.Postgresql (... |
f703ad50fd6d0374d55fc4da19257af08c7634af4b995128de73ff2f147d980c | sjl/advent | day-04.lisp | (advent:defpackage* :advent/2017/04)
(in-package :advent/2017/04)
(defun valid-hash-table-test-p (test)
(member test `(eq eql equal equalp ,#'eq ,#'eql ,#'equal ,#'equalp)))
(defun ensure-boolean (value)
(if value t nil))
(defun contains-duplicates-p (sequence &key (test #'eql))
(ensure-boolean (if (valid-hash... | null | https://raw.githubusercontent.com/sjl/advent/dc3debda9bd1a0570a6ab06919b1af7b285413dc/src/2017/days/day-04.lisp | lisp | (advent:defpackage* :advent/2017/04)
(in-package :advent/2017/04)
(defun valid-hash-table-test-p (test)
(member test `(eq eql equal equalp ,#'eq ,#'eql ,#'equal ,#'equalp)))
(defun ensure-boolean (value)
(if value t nil))
(defun contains-duplicates-p (sequence &key (test #'eql))
(ensure-boolean (if (valid-hash... | |
c426a680212d56507509dc0326b5529e63eb12f476a7d3c1a4115d60e4c05a9d | koto-bank/lbge | material.lisp | (in-package :lbge.render.material)
(defclass material ()
((uniforms
:documentation
"A list of pairs, where car is a keyword, the uniform name, ~
and the cdr is the value to be passed to the shader.~
When cdr is a symbol, it is treated as the shader slot name"
:initform (list)
:acces... | null | https://raw.githubusercontent.com/koto-bank/lbge/6be4b3212ea87288b1ee2a655e9a1bb30a74dd27/src/render/material.lisp | lisp | (in-package :lbge.render.material)
(defclass material ()
((uniforms
:documentation
"A list of pairs, where car is a keyword, the uniform name, ~
and the cdr is the value to be passed to the shader.~
When cdr is a symbol, it is treated as the shader slot name"
:initform (list)
:acces... | |
f3a728b0894eb9ce472ce21c741348b1708b7a6fda24d6f7e229f225a76bc147 | grin-compiler/ghc-grin | Lint.hs | # LANGUAGE LambdaCase , RecordWildCards , OverloadedStrings #
module Lambda.Lint where
import Text.Printf
import Data.Monoid
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map (Map)
import qualified Data.Map as Map
import qualified Data.ByteString.Char8 as BS8
import Data.Functor.Foldable
import ... | null | https://raw.githubusercontent.com/grin-compiler/ghc-grin/ebc4dca2e1f5b3581d4b84726730564ce909d786/lambda-grin/src/Lambda/Lint.hs | haskell | use
def
err | # LANGUAGE LambdaCase , RecordWildCards , OverloadedStrings #
module Lambda.Lint where
import Text.Printf
import Data.Monoid
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map (Map)
import qualified Data.Map as Map
import qualified Data.ByteString.Char8 as BS8
import Data.Functor.Foldable
import ... |
0326463740d60c650cd4b77bf5069ed76a66b0915a3e4b467ebebf34ef666933 | rabbitmq/khepri | sigils.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright © 2022 - 2023 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(sigils).
-include_lib("eunit/include/eunit.h... | null | https://raw.githubusercontent.com/rabbitmq/khepri/3527362ad9f59cff36231eb4e7b34dc066aa0f50/test/sigils.erl | erlang |
The following functions explicitely break the
spec contract on purpose to generate an
exception. | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright © 2022 - 2023 VMware , Inc. or its affiliates . All rights reserved .
-module(sigils).
-include_lib("eunit/include/eunit.hrl").
... |
288576307ac1439a159e2f1163c807cc6cf56badaa5aa80a88b48b328aa15c9d | arademaker/qualis | to-rdf.lisp |
Este script converte um arquivo qualis-?.text ( CSV com separador | )
para RDF usando o Allegro Graph 4.X . Deve com o
Allegro Lisp da Franz no Amazon Server . O arquivo CSV deve ser
transferido para o servidor da amazon antes de rodar o script .
(ql:quickload :fare-csv)
(require :agraph "/usr/local/agr... | null | https://raw.githubusercontent.com/arademaker/qualis/983723d56cb8ea29497e8885e03e752efc767cc4/to-rdf.lisp | lisp | add :user and :password
ignore heading |
Este script converte um arquivo qualis-?.text ( CSV com separador | )
para RDF usando o Allegro Graph 4.X . Deve com o
Allegro Lisp da Franz no Amazon Server . O arquivo CSV deve ser
transferido para o servidor da amazon antes de rodar o script .
(ql:quickload :fare-csv)
(require :agraph "/usr/local/agr... |
4df76070619b2806892a3a08e1bce3c7e005d44dbf7be83750c7baea828e2023 | jablo/cablesim | device.erl | %%%-------------------------------------------------------------------
%%% File : device
Author :
%%% Description : a database of modem model signatures
%%%
Created : 08 March 2013 by < >
%%%-------------------------------------------------------------------
-module(device).
-export([cm_db/0, mta_db/0, c... | null | https://raw.githubusercontent.com/jablo/cablesim/da6628190f9ec5c426df73e921ff575470d1a078/src/device.erl | erlang | -------------------------------------------------------------------
File : device
Description : a database of modem model signatures
-------------------------------------------------------------------
@doc
Create a cable modem transient server process
@end
@doc
Create a dhcp client module server process for ... | Author :
Created : 08 March 2013 by < >
-module(device).
-export([cm_db/0, mta_db/0, cpe_db/0, cm_db/1, mta_db/1, cpe_db/1,
mk_device/4, mk_mac/2, mk_pname/2, mk_pname/3,
start_cablemodem/2]).
-include("dhcp.hrl").
-include("device.hrl").
@spec start_cm(Device , BehindDevs ) - > { ok ... |
548bbb310f94abbb456af66cddbbeea75402403b9def507396619f2ff4ae8c63 | joinr/spork | quadtree.clj | (ns spork.data.quadtree
(:require [spork.protocols.spatial :as spatial]
;[spork.data.bounds :refer :all]
))
;build a structure and operations to define a quadtree.
;for geometric primitives.
a quadtree is a hierarchical data structure that subdivides a 2 dimensional
space into 4 sub regions ... | null | https://raw.githubusercontent.com/joinr/spork/bb80eddadf90bf92745bf5315217e25a99fbf9d6/src/spork/data/quadtree.clj | clojure | [spork.data.bounds :refer :all]
build a structure and operations to define a quadtree.
for geometric primitives.
rectangular, depending on the bounds of the root.
changed the implementation....
this makes things more generic...
We could just as easily define a geohash function that spatially hashes our
2d plane, and i... | (ns spork.data.quadtree
(:require [spork.protocols.spatial :as spatial]
))
a quadtree is a hierarchical data structure that subdivides a 2 dimensional
space into 4 sub regions of equal area . Note , the regions may be square or
(defrecord spatial-tree [bounds capacity floor items children])
(defn ->s... |
edb2b880751171ea76127873925fb382d59b0ec8f6ffcbc5c6a7847a9f7a50de | CryptoKami/cryptokami-core | BListener.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE ScopedTypeVariables #
| Instance Blockchain Listener for WalletWebDB .
Guaranteed that state of GStateDB and is n't changed
-- during @onApplyBlocks@ and @onRollbackBlocks@ callbacks.
module Pos.Wallet.Web.Tracking.BListener
( MonadBListener(..)
, onA... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/wallet/src/Pos/Wallet/Web/Tracking/BListener.hs | haskell | # LANGUAGE DataKinds #
during @onApplyBlocks@ and @onRollbackBlocks@ callbacks.
Perform this action under block lock.
something a bit more reasonable.
Perform this action under block lock.
something a bit more reasonable.
REPORT:ERROR 'reportOrLogW' in wallet sync. | # LANGUAGE ScopedTypeVariables #
| Instance Blockchain Listener for WalletWebDB .
Guaranteed that state of GStateDB and is n't changed
module Pos.Wallet.Web.Tracking.BListener
( MonadBListener(..)
, onApplyBlocksWebWallet
, onRollbackBlocksWebWallet
) where
import Universum... |
be8267033cd307483a60354adb3e7f4a1da4cae84ebd5b6bf3c0642a79ee5458 | haskell/containers | intmap-properties.hs | # LANGUAGE CPP #
#ifdef STRICT
import Data.IntMap.Strict as Data.IntMap hiding (showTree)
import Data.IntMap.Strict.Internal (traverseMaybeWithKey)
import Data.IntMap.Merge.Strict
#else
import Data.IntMap.Lazy as Data.IntMap hiding (showTree)
import Data.IntMap.Internal (traverseMaybeWithKey)
import Data.IntMap.Merge.... | null | https://raw.githubusercontent.com/haskell/containers/fbafcf704f0febd9ddac84dbe00ae3787af43550/containers-tests/tests/intmap-properties.hs | haskell | -------------------------------------------------------------------
Arbitrary, reasonably balanced trees
-------------------------------------------------------------------
----------------------------------------------------------------------
--------------------------------------------------------------
Unit tests... | # LANGUAGE CPP #
#ifdef STRICT
import Data.IntMap.Strict as Data.IntMap hiding (showTree)
import Data.IntMap.Strict.Internal (traverseMaybeWithKey)
import Data.IntMap.Merge.Strict
#else
import Data.IntMap.Lazy as Data.IntMap hiding (showTree)
import Data.IntMap.Internal (traverseMaybeWithKey)
import Data.IntMap.Merge.... |
fc8e6195706ef15d0fae30e3dccbde9a037035564610f661b7dd92f0d531c163 | staples-sparx/kits | alert.clj | (ns ^{:doc "PagerDuty alerts"}
kits.alert
(:require
[clojure.core.async :as async]
[clj-http.client :as http]
[kits.logging.log-async :as log]
[kits.logging.log-generator :as log-gen]
[kits.json :as json]
[kits.map :refer [filter-map]]
[kits.runtime :as runtime]
[kits.timestamp :as t... | null | https://raw.githubusercontent.com/staples-sparx/kits/66ae99bce83e8fd1248cc5c0da1f23673f221073/src/clojure/kits/alert.clj | clojure | buffer n alerts (drop the rest)
Rate limit consumption of alerts (only applies to :pagerduty mode)
optional callback function that receives alert-info
wait for thread to complete | (ns ^{:doc "PagerDuty alerts"}
kits.alert
(:require
[clojure.core.async :as async]
[clj-http.client :as http]
[kits.logging.log-async :as log]
[kits.logging.log-generator :as log-gen]
[kits.json :as json]
[kits.map :refer [filter-map]]
[kits.runtime :as runtime]
[kits.timestamp :as t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.