_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 |
|---|---|---|---|---|---|---|---|---|
64acf82443b2ff7205eb64bce2fe8abf559ffcad1a23ea0640bc01f5cc3d37bd | davnils/spoty | Spoty.hs | # LANGUAGE NoMonomorphismRestriction , OverloadedStrings , ScopedTypeVariables #
module Utils.Spoty
(
module Utils.Spoty.Types,
getAlbum, getAlbumTracks,
getArtist, getArtistAlbums, CountryID, getArtistTop, getArtistRelated,
SearchCategory(..),
search, searchArtist, searchAlbum, searchTrack,
getTrack,
getUser,
fetchOn... | null | https://raw.githubusercontent.com/davnils/spoty/95a0ec3fa89f67c86ef0204f2345c5e2d73ca261/src/Utils/Spoty.hs | haskell | | Categories being used in a search.
^ Search for albums.
^ Search for artists.
^ Search for tracks.
| Construct a URL from an endpoint and an identifier.
| Retrieve an album.
| Retrieve the tracks of an album.
| Retrieve an artist.
| Retrieve the albums of an artist.
| Construct producer (source) from URL ge... | # LANGUAGE NoMonomorphismRestriction , OverloadedStrings , ScopedTypeVariables #
module Utils.Spoty
(
module Utils.Spoty.Types,
getAlbum, getAlbumTracks,
getArtist, getArtistAlbums, CountryID, getArtistTop, getArtistRelated,
SearchCategory(..),
search, searchArtist, searchAlbum, searchTrack,
getTrack,
getUser,
fetchOn... |
6e3718f50a7466d7aba2364048511cf71758ebd3f95c1ab945d9e419b9e0af91 | charlieg/Sparser | def-form.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1992 - 2005 -- all rights reserved
extensions copyright ( c ) 2007 - 2008 BBNT Solutions LLC . All Rights Reserved
$ Id:$
;;;
;;; File: "def form"
;;; Module: "objects;words:"
Version : 0.1 March 2005
broken out on ... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/objects/chart/words/def-form.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "def form"
Module: "objects;words:"
check that avoids duplicates. Required when nominalized form of
a verb had the same pname as another of its forms.
0.2 (1/23/07) Added *force-case-shift* and the routine to do it.
-----------------------... | copyright ( c ) 1992 - 2005 -- all rights reserved
extensions copyright ( c ) 2007 - 2008 BBNT Solutions LLC . All Rights Reserved
$ Id:$
Version : 0.1 March 2005
broken out on its own 1/92
( 5/24/93 v2.3 ) added a data - check
0.1 ( 3/31/05 ) Added optional to define - word / expr to override ... |
295727daf4187b579b0681475596038f58fac54bac2a004178a3056819b6d144 | ocaml-dune/fiber | fiber.mli | * Concurrency library
This module implements
{ { : } " structured
concurrency " } .
This module implements
{{:} "structured
concurrency"}. *)
open! Stdune
(** {1 Generals} *)
(** Type of fiber. A fiber represent a suspended computation. Note that using
the same fiber twice will e... | null | https://raw.githubusercontent.com/ocaml-dune/fiber/a7b5456b95a67099c5f8078d7098e565e4d5b9ea/fiber/src/fiber.mli | ocaml | * {1 Generals}
* Type of fiber. A fiber represent a suspended computation. Note that using
the same fiber twice will execute it twice, which is probably not what you
want. To share the result of a fiber, use an [Ivar.t].
* Create a fiber that has already terminated.
* Converts a thunk to a fiber, making sure... | * Concurrency library
This module implements
{ { : } " structured
concurrency " } .
This module implements
{{:} "structured
concurrency"}. *)
open! Stdune
type 'a t
type 'a fiber := 'a t
val return : 'a -> 'a t
val of_thunk : (unit -> 'a t) -> 'a t
val never : 'a t
module O : si... |
f355b8b24ba87071cb2f81c65d0e2d49af231c84cf74c5ef4684af4e37fd0eba | keera-studios/keera-hails | Reactive.hs | -- |
--
Copyright : ( C ) Keera Studios Ltd , 2013
-- License : BSD3
Maintainer :
module Graphics.UI.Gtk.Reactive
(module Exported)
where
import Graphics.UI.Gtk.Reactive.Button as Exported
import Graphics.UI.Gtk.Reactive.Entry as Exported
import Graphics.UI.Gtk.Reac... | null | https://raw.githubusercontent.com/keera-studios/keera-hails/bf069e5aafc85a1f55fa119ae45a025a2bd4a3d0/keera-hails-reactive-gtk3/src/Graphics/UI/Gtk/Reactive.hs | haskell | |
License : BSD3 | Copyright : ( C ) Keera Studios Ltd , 2013
Maintainer :
module Graphics.UI.Gtk.Reactive
(module Exported)
where
import Graphics.UI.Gtk.Reactive.Button as Exported
import Graphics.UI.Gtk.Reactive.Entry as Exported
import Graphics.UI.Gtk.Reactive.CheckMenuItem as ... |
617b7d01b1b4befd81930313033688ef3a805f8bb8dc9c170e81a52304a31c50 | ghosthamlet/algorithm-data-structure | integer_partition.clj | (ns algorithm-data-structure.algorithms.math.integer-partition)
(defn run [number]
(let [ns (range (inc number))
partition-matrix (-> nil constantly (map ns) constantly (map ns))
partition-matrix (assoc partition-matrix
0 (-> 0 constantly (map ns) (assoc 0 nil)))
... | null | https://raw.githubusercontent.com/ghosthamlet/algorithm-data-structure/017f41a79d8b1d62ff5a6cceffa1b0f0ad3ead6b/src/algorithm_data_structure/algorithms/math/integer_partition.clj | clojure | (ns algorithm-data-structure.algorithms.math.integer-partition)
(defn run [number]
(let [ns (range (inc number))
partition-matrix (-> nil constantly (map ns) constantly (map ns))
partition-matrix (assoc partition-matrix
0 (-> 0 constantly (map ns) (assoc 0 nil)))
... | |
9c953d8cfe2d6f988a6e30c844c228a983399c4c566172670e6ded9d1a2f2ac0 | bobzhang/fan | backquoted_irrefutable_tuple.ml | EXTEND Gram
abc: [ [ `(x,y) -> x + y ] ];
END;
| null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/test/fixtures/backquoted_irrefutable_tuple.ml | ocaml | EXTEND Gram
abc: [ [ `(x,y) -> x + y ] ];
END;
| |
229b53da290d7bd3ea940298c8b94ad71551de2edd4e3f2ca8b2520294a523a4 | SGrondin/tdigest | tdigest.mli | open! Core
*
[ delta ] is the compression factor , the max fraction of mass that can be owned by one centroid ( bigger , up to 1.0 , means more compression ) .
[ ~delta : Discrete ] switches off TDigest behavior and treats the distribution as discrete , with no merging and exact values reported .
[delta... | null | https://raw.githubusercontent.com/SGrondin/tdigest/29c6f80b0b10918752f51eb944439a896be8dffa/src/tdigest.mli | ocaml | *
[Tdigest.is_empty td] returns [true] when the T-Digest does not contain any values.
* For internal use
* For internal use
* For internal use
* For internal use | open! Core
*
[ delta ] is the compression factor , the max fraction of mass that can be owned by one centroid ( bigger , up to 1.0 , means more compression ) .
[ ~delta : Discrete ] switches off TDigest behavior and treats the distribution as discrete , with no merging and exact values reported .
[delta... |
47ab8f76132b2a952c201873a21de7b3e02d309f949db6b1e43633283f60c3ea | keera-studios/haskellifi-trayicon | Objects.hs | # LANGUAGE TemplateHaskell #
-- | GUI loading and access to GUI elements from a glade builder
--
Copyright : ( C ) trading as Keera Studios , 2012
-- License : BSD3
Maintainer :
module View.Objects where
-- External imports
import Graphics.UI.Gtk
import Hails.Graphics.UI.Gtk.Builder
import Hails.Graph... | null | https://raw.githubusercontent.com/keera-studios/haskellifi-trayicon/d148387bb362f7cdc959c2a07e981675b7e6bc29/src/View/Objects.hs | haskell | | GUI loading and access to GUI elements from a glade builder
License : BSD3
External imports
Internal imports
gtkBuilderAccessor element name type name | # LANGUAGE TemplateHaskell #
Copyright : ( C ) trading as Keera Studios , 2012
Maintainer :
module View.Objects where
import Graphics.UI.Gtk
import Hails.Graphics.UI.Gtk.Builder
import Hails.Graphics.UI.Gtk.THBuilderAccessor
import Paths_haskellifi_trayicon
loadInterface :: IO Builder
loadInterface = lo... |
64de9a96ef1f87b6d2bb4b7752252ee52702588bc09c81c018dabeb627d6c1e4 | dolotech/erlang_server | data_jewel.erl | -module(data_jewel).
-export([get/1]).
get(ids) -> [1,2,3,4,5];
get(1) -> [{rate_next, 80}, {rate, 100}, {rate2, 0}, {money, 2}, {num, 5}, {money1, 1}, {num1, 3000}];
get(2) -> [{rate_next, 60}, {rate, 60}, {rate2, 100}, {money, 2}, {num, 25}, {money1, 1}, {num1, 8000}];
get(3) -> [{rate_next, 45}, {rate, 40}, {rate2, ... | null | https://raw.githubusercontent.com/dolotech/erlang_server/44ea3693317f60e18b19c9ddfa179307cbd646d7/src/data/data_jewel.erl | erlang | -module(data_jewel).
-export([get/1]).
get(ids) -> [1,2,3,4,5];
get(1) -> [{rate_next, 80}, {rate, 100}, {rate2, 0}, {money, 2}, {num, 5}, {money1, 1}, {num1, 3000}];
get(2) -> [{rate_next, 60}, {rate, 60}, {rate2, 100}, {money, 2}, {num, 25}, {money1, 1}, {num1, 8000}];
get(3) -> [{rate_next, 45}, {rate, 40}, {rate2, ... | |
04f31bcdb1cd32081d1e656e21b9e62aea831a9190d02f8651fd7ba5b75dea98 | yellowbean/clojucture | expense_test.clj | (ns clojucture.expense_test
(:require [clojure.test :refer :all]
[clojure.java.io :as io]
[clojure.edn :as edn]
[clojucture.builder :as br]
[java-time :as jt]
[clojucture.account :as acc]
[clojucture.expense :as exp]
[clojucture.local... | null | https://raw.githubusercontent.com/yellowbean/clojucture/3ad99e06ecd9e5c478f653df4afbd69991cd4964/test/clojucture/expense_test.clj | clojure | run-d (nw/run-deal test-deal nil)
(prn due-exp) | (ns clojucture.expense_test
(:require [clojure.test :refer :all]
[clojure.java.io :as io]
[clojure.edn :as edn]
[clojucture.builder :as br]
[java-time :as jt]
[clojucture.account :as acc]
[clojucture.expense :as exp]
[clojucture.local... |
0fd46461f0b730ed114c761bfd7d36be12ffe1514a204898c3fba799a9813eb1 | RefactoringTools/HaRe | MapDeclMPropStruct.hs | module MapDeclMPropStruct where
import MapDeclM
import HsPropStruct
import HsPropMaps
-- we assume only "expressions" & "declarations" may contain declarations
instance (MapDeclM pa ds,MapDeclM pp ds) => MapDeclM (PD i pa pp) ds where
mapDeclM f = seqPD . mapPD return m m
where m x = mapDeclM f x
instance ... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/tools/property/transforms/MapDeclMPropStruct.hs | haskell | we assume only "expressions" & "declarations" may contain declarations | module MapDeclMPropStruct where
import MapDeclM
import HsPropStruct
import HsPropMaps
instance (MapDeclM pa ds,MapDeclM pp ds) => MapDeclM (PD i pa pp) ds where
mapDeclM f = seqPD . mapPD return m m
where m x = mapDeclM f x
instance (MapDeclM e ds,MapDeclM pa ds,MapDeclM pp ds)
=> MapDeclM (PA i e t... |
7bdda6096af4d2799cbde061de5dd29aef02f44de377bcc63f335a287caf20b2 | typeclasses/assoc-list | Predicate.hs | | Functions on ' AssocList 's that involve ' Predicate 's on the keys .
module Data.AssocList.List.Predicate
(
-- * Related modules
$ relatedModules
-- * Lookup
lookupFirst
, lookupAll
-- * Removal
, removeFirst
, removeAll
-- * Mapping
-- $mapping
, mapFirst
,... | null | https://raw.githubusercontent.com/typeclasses/assoc-list/c22ff8ba2057545015bccf24d71a14358b01627e/assoc-list/src/Data/AssocList/List/Predicate.hs | haskell | * Related modules
* Lookup
* Removal
* Mapping
$mapping
* Grouping
base
contravariant
$setup
Some other modules that are a lot like this one:
use of an 'Eq' constraint on the type of the keys
predicate, if such a mapping is present.
The result is 'Nothing' if no key in the list satisfies the predicate... | | Functions on ' AssocList 's that involve ' Predicate 's on the keys .
module Data.AssocList.List.Predicate
(
$ relatedModules
lookupFirst
, lookupAll
, removeFirst
, removeAll
, mapFirst
, mapAll
, partition
, break
, breakPartition
) where
import Data.AssocLi... |
f2f223d19d1fd46cb3b6f2f3e4b00706320e89b0598b24f7cb71ee01b4efa1d1 | zshipko/yurt | yurt.ml | * The Yurt module provides a simple interface for building HTTP servers
module Route = Yurt_route
(** Routing *)
module Server = Yurt_server
module Client = Yurt_client
module Util = Yurt_util
module Form = Yurt_form
include Server
include Yurt_request_ctx
| null | https://raw.githubusercontent.com/zshipko/yurt/b0baac0bc55740a361ae94181d5c0bb313e96f88/src/yurt.ml | ocaml | * Routing | * The Yurt module provides a simple interface for building HTTP servers
module Route = Yurt_route
module Server = Yurt_server
module Client = Yurt_client
module Util = Yurt_util
module Form = Yurt_form
include Server
include Yurt_request_ctx
|
536afc2433d64e654d0905558f9dd9161b455220977af43ed8abb7e1428c0fa8 | charlieg/Sparser | logicals.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(CTI-source LISP) -*-
copyright ( c ) 1990,1991 Content Technologies Inc.
copyright ( c ) 1991 -- all rights reserved
;;;
;;; File: "logicals"
Module : " model;sl : whos news : tests : "
version : November 1991 system version 2.1
(in-packa... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/grammar/model/sl/Who's-News/tests/logicals.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(CTI-source LISP) -*-
File: "logicals"
flat file of articles now. | copyright ( c ) 1990,1991 Content Technologies Inc.
copyright ( c ) 1991 -- all rights reserved
Module : " model;sl : whos news : tests : "
version : November 1991 system version 2.1
(in-package :CTI-source)
" Who 's News ; " is defined in " corpus;logicals "
(def-logical-pathname "typ... |
2f2d3af464d64c2d4ebe3b2a6a9ff85859f08a183ae4058ce70217e4e1f55860 | haslab/HAAP | CodeWorld.hs |
HAAP : Haskell Automated Assessment Platform
This module provides the @CodeWorld@ plugin to compile _ CodeWorld _ animations ( < > ) to HTML webpages .
HAAP: Haskell Automated Assessment Platform
This module provides the @CodeWorld@ plugin to compile _CodeWorld_ animations (<>) to HTML webpages.
-}
# LANGUAG... | null | https://raw.githubusercontent.com/haslab/HAAP/5acf9efaf0e5f6cba1c2482e51bda703f405a86f/src/HAAP/Web/Graphics/CodeWorld.hs | haskell | import Codec.Picture.Metadata
import Codec.Picture
relative path to the project to store codeworld results
a list of html identifiers and respective local files for loading images
extra files to copy to the js folder
compile files with ghcjs
e <- runBaseIO $ readImageWithMetadata fp
case e of
w ... |
HAAP : Haskell Automated Assessment Platform
This module provides the @CodeWorld@ plugin to compile _ CodeWorld _ animations ( < > ) to HTML webpages .
HAAP: Haskell Automated Assessment Platform
This module provides the @CodeWorld@ plugin to compile _CodeWorld_ animations (<>) to HTML webpages.
-}
# LANGUAG... |
6e8713d13ab9c64860886b4e487fcac0150cf5826e3461e9edb63c2f706b9579 | nick8325/equinox | InjOnto.hs | module Infinox.InjOnto where
import qualified Data.Set as S
import System.Directory
import System.IO
import Form
import Output
import Infinox.Generate
import Infinox.Util
import Infinox.Conjecture
import Data.List
import System.Process (system)
import qualified Infinox.Symbols as Sym
import Infinox.Settings
import ... | null | https://raw.githubusercontent.com/nick8325/equinox/a70166e109df37a40b46dcd1c7388a09906c87bf/Haskell/Infinox/InjOnto.hs | haskell | after establishing reflexivity of a relation, relations with "X" and "Y"
variables will be generated.
collect subset-predicates depending on flag given
conj = form2conjecture ( noClash settings ) 0 ( conjPimpliesRef r p )
removeFile provefile
hPutStrLn h $ form2... | module Infinox.InjOnto where
import qualified Data.Set as S
import System.Directory
import System.IO
import Form
import Output
import Infinox.Generate
import Infinox.Util
import Infinox.Conjecture
import Data.List
import System.Process (system)
import qualified Infinox.Symbols as Sym
import Infinox.Settings
import ... |
1e868766ded77aa0add73424b0efbc96cfbe528dc1e75c8563acfd8aed38f911 | tcsprojects/pgsolver | localmodelchecker.ml | open Basics ;;
open Paritygame ;;
open Univsolve;;
open Tcslist;;
open Tcsarray;;
open Tcsset;;
open Tcsbasedata;;
let partially_solve (game: partial_paritygame) =
let msg_tagged v = message_autotagged v (fun _ -> "MODELCHECKER") in
let = message in
let (start, delta, data, fmtnode') = game in
let fmt... | null | https://raw.githubusercontent.com/tcsprojects/pgsolver/b0c31a8b367c405baed961385ad645d52f648325/src/solvers/localmodelchecker.ml | ocaml | open Basics ;;
open Paritygame ;;
open Univsolve;;
open Tcslist;;
open Tcsarray;;
open Tcsset;;
open Tcsbasedata;;
let partially_solve (game: partial_paritygame) =
let msg_tagged v = message_autotagged v (fun _ -> "MODELCHECKER") in
let = message in
let (start, delta, data, fmtnode') = game in
let fmt... | |
b459aebfa622e08c8729b91241d19284f73dee8d3a14f61ee700b82f5f6d1d63 | LexiFi/gen_js_api | arrays.ml | [@@@js.dummy "!! This code has been generated by gen_js_api !!"]
[@@@ocaml.warning "-7-32-39"]
module JsArray(E:Ojs.T) =
struct
type t = Ojs.t
let rec t_of_js : Ojs.t -> t = fun (x2 : Ojs.t) -> x2
and t_to_js : t -> Ojs.t = fun (x1 : Ojs.t) -> x1
let (create : unit -> t) =
fun () ->
t_of... | null | https://raw.githubusercontent.com/LexiFi/gen_js_api/9587818121be11593ed389bc87b85547b6ea402c/node-test/bindings/expected/arrays.ml | ocaml | [@@@js.dummy "!! This code has been generated by gen_js_api !!"]
[@@@ocaml.warning "-7-32-39"]
module JsArray(E:Ojs.T) =
struct
type t = Ojs.t
let rec t_of_js : Ojs.t -> t = fun (x2 : Ojs.t) -> x2
and t_to_js : t -> Ojs.t = fun (x1 : Ojs.t) -> x1
let (create : unit -> t) =
fun () ->
t_of... | |
3875bfb2b8d30ea92f181ecf48ed16deb74f097b831a30647c1a48634714a565 | schell/odin | EntityMain.hs | # LANGUAGE LambdaCase #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
import Gelatin.SDL2 hiding (move)
import SDL
import Gelatin.FreeType2
import Odin.GUI
import Odin.Core
import Control.Lens
import ... | null | https://raw.githubusercontent.com/schell/odin/97ae1610a7abd19aa150bc7dfc132082d88ca9ea/app/EntityMain.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE LambdaCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
import Gelatin.SDL2 hiding (move)
import SDL
import Gelatin.FreeType2
import Odin.GUI
import Odin.Core
import Control.Lens
import Halive.Utils
import qualified Dem... |
c79e2cfbd1030087fca4509b87c5ff14b5cc097b030b8ca7595b5c0de21cb720 | christoff-buerger/racr | syntax-tests.scm | ; This program and the accompanying materials are made available under the
terms of the MIT license ( X11 license ) which accompanies this distribution .
Author :
#!r6rs
(import (rnrs) (racr testing) (composed-petrinets user-interface) (composed-petrinets analyses))
(define (make-net-1)
(compose-petrinets: ... | null | https://raw.githubusercontent.com/christoff-buerger/racr/ecb2a9b8bf3f333550728cf45b97607a8298532f/examples/composed-petrinets/examples/syntax-tests.scm | scheme | This program and the accompanying materials are made available under the
Not glued: (in: c | out: c | in/out: a)
Not glued: (in: f | out: d | in/out: e)
Non-unique in-ports
Non-unique out-ports
Unknown in-port
Unknown out-port
Flat composition structure:
Non-unique subnets
Unknown in-port glueing
Unknown out... | terms of the MIT license ( X11 license ) which accompanies this distribution .
Author :
#!r6rs
(import (rnrs) (racr testing) (composed-petrinets user-interface) (composed-petrinets analyses))
(define (make-net-1)
(petrinet: a (in* in/out) (in/out) ((in*) (in/out)))
(compose-petrinets:
(petrinet: b (... |
7c65bb5358aba816d6dd4b70b086ab3dd573d13b6e85cadd41df24c10588a12b | theodormoroianu/SecondYearCourses | LambdaChurch_20210415170236.hs | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415170236.hs | haskell | alpha-equivalence
subst u x t defines [u/x]t, i.e., substituting u for x in t
This substitution avoids variable captures so it is safe to be used when
reducing terms with free variables (e.g., if evaluating inside lambda abstractions)
^ substitution term
^ variable to be substitutes
^ term in which the substit... | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... |
9f2b168f7d0c54159cd7fec8d0b45390f1867cc6873d3c1cb197f3df5db55471 | locusmath/locus | semiring_element.clj | (ns locus.additive.semiring.element.semiring-element
(:refer-clojure :exclude [+ - * /])
(:require [locus.set.logic.core.set :refer :all :exclude [add]]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.quiver.structu... | null | https://raw.githubusercontent.com/locusmath/locus/b232579217be4e39458410893827a84d744168e4/src/clojure/locus/additive/semiring/element/semiring_element.clj | clojure | General abstract class for semiring elements
Arithmetic methods for semiring elements | (ns locus.additive.semiring.element.semiring-element
(:refer-clojure :exclude [+ - * /])
(:require [locus.set.logic.core.set :refer :all :exclude [add]]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.quiver.structu... |
c82d426bd6ddb6e9f7f3c32be6b25d627dff60a471dcdf250e816538a0ed934d | gbwey/predicate-typed | Lifted.hs | # LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE TypeFamilies #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
{-# L... | null | https://raw.githubusercontent.com/gbwey/predicate-typed/51f8d51f662722e1109d2ff35644aea1e0371b42/src/Predicate/Data/Lifted.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
# LANGUAGE OverloadedStrings #
# LANGUAGE ConstraintKinds #
# LANGUAGE EmptyDataDeriving #
| lifted promoted functions
** functor
** applicative
** monad
** alternative
** bifunctor
** function application
** coerce
** error handling
** type families
$setup
>>> :se... | # LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE NoStarIsType #
mo... |
36e19688db4b66bc0793b9b4f3a32d9f7cc0007801a75e05e82c29a1b63a6b3b | metabase/metabase | application_test.clj | (ns metabase-enterprise.advanced-permissions.api.application-test
(:require
[clojure.test :refer :all]
[metabase.models :refer [PermissionsGroup]]
[metabase.models.permissions-group :as perms-group]
[metabase.public-settings.premium-features-test :as premium-features-test]
[metabase.test :as mt]))
(de... | null | https://raw.githubusercontent.com/metabase/metabase/1f809593c2298ccf9c4070df3fa39d718eddb5d6/enterprise/backend/test/metabase_enterprise/advanced_permissions/api/application_test.clj | clojure | (ns metabase-enterprise.advanced-permissions.api.application-test
(:require
[clojure.test :refer :all]
[metabase.models :refer [PermissionsGroup]]
[metabase.models.permissions-group :as perms-group]
[metabase.public-settings.premium-features-test :as premium-features-test]
[metabase.test :as mt]))
(de... | |
b9973007f0191b1228cfc5366974c04f4b54f695775a173a20f04344179b5427 | mcorbin/meuse | token_test.clj | (ns meuse.db.actions.token-test
(:require [meuse.auth.token :as auth-token]
[meuse.db :refer [database]]
[meuse.db.actions.token :as token-db]
[meuse.helpers.fixtures :refer :all]
[clj-time.core :as t]
[crypto.password.bcrypt :as bcrypt]
[clojure... | null | https://raw.githubusercontent.com/mcorbin/meuse/d2b74543fce37c8cde770ae6f6097cabb509a804/test/meuse/db/actions/token_test.clj | clojure | (ns meuse.db.actions.token-test
(:require [meuse.auth.token :as auth-token]
[meuse.db :refer [database]]
[meuse.db.actions.token :as token-db]
[meuse.helpers.fixtures :refer :all]
[clj-time.core :as t]
[crypto.password.bcrypt :as bcrypt]
[clojure... | |
7cf07bd65bdefcceb3119d822c7adb52a90622373905e6515158b17d2fdc6e7d | renanroberto/whatsyourquestion-bot | HTTP.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
module HTTP where
import Data.Aeson (ToJSON, encode)
import Data.ByteString.Lazy (ByteString)
import Data.Function ((&))
import Network.HTTP.Simple hiding (Response)
import Tracer
d... | null | https://raw.githubusercontent.com/renanroberto/whatsyourquestion-bot/4443c095e4a36be6fc94baf7886c181e06b030cc/src/HTTP.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE FlexibleInstances #
module HTTP where
import Data.Aeson (ToJSON, encode)
import Data.ByteString.Lazy (ByteString)
import Data.Function ((&))
import Network.HTTP.Simple hiding (Response)
import Tracer
data Response a = Response a
class... |
4277926c2dd4aad8909e47f6784f4ebe2a7d3287ee612c112dd7cb499aa385b0 | clash-lang/clash-compiler | T2046BType.hs | module T2046BType where
import Clash.Prelude
type T2046B =
( (Index 1, Index 2)
, (Unsigned 1, Unsigned 2)
, (Signed 1, Signed 2)
, (BitVector 1, BitVector 2)
, Bit
)
type T2046C =
( (Int, Int)
, (Int, Int)
, (Int, Int)
, (Int, Int)
, Int
)
| null | https://raw.githubusercontent.com/clash-lang/clash-compiler/a85df82b6a9454f36014f4e5a65277a49c866df6/tests/shouldwork/Issues/T2046BType.hs | haskell | module T2046BType where
import Clash.Prelude
type T2046B =
( (Index 1, Index 2)
, (Unsigned 1, Unsigned 2)
, (Signed 1, Signed 2)
, (BitVector 1, BitVector 2)
, Bit
)
type T2046C =
( (Int, Int)
, (Int, Int)
, (Int, Int)
, (Int, Int)
, Int
)
| |
f38c3e347eda88424cef4eb852847645314829e185abe72cec0f3209f856e7da | fujita-y/digamma | cpstak.scm | CPSTAK -- A continuation - passing version of the TAK benchmark .
A good test of first class procedures and tail recursion .
(define (cpstak x y z)
(define (tak x y z k)
(if (not (< y x))
(k z)
(tak (- x 1)
y
z
(lambda (v1)
(tak (- y 1)
... | null | https://raw.githubusercontent.com/fujita-y/digamma/5a31f9fd67737fd857ada643d5548155a2ed0e76/bench/gambit-benchmarks/cpstak.scm | scheme | CPSTAK -- A continuation - passing version of the TAK benchmark .
A good test of first class procedures and tail recursion .
(define (cpstak x y z)
(define (tak x y z k)
(if (not (< y x))
(k z)
(tak (- x 1)
y
z
(lambda (v1)
(tak (- y 1)
... | |
600bfbf846227f2cdc1cf9c8e6371a2b555f6453a43832914fdd7dc6c5ae56a5 | ConsumerDataStandardsAustralia/validation-prototype | EmailAddress.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeOperators #-}
module Web.ConsumerData.Au.Api.Types.Common.Customer.Data.EmailAddress
( module Web.ConsumerData.Au.Api.Types.Common.... | null | https://raw.githubusercontent.com/ConsumerDataStandardsAustralia/validation-prototype/ff63338b77339ee49fa3e0be5bb9d7f74e50c28b/consumer-data-au-api-types/src/Web/ConsumerData/Au/Api/Types/Common/Customer/Data/EmailAddress.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE TypeOperators #
TODO Do we need to restict formatting on email address as per standard?
^ "WORK"
^ "HOME"
^ "OTHER"
^ "UNSPECIFIED" | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
module Web.ConsumerData.Au.Api.Types.Common.Customer.Data.EmailAddress
( module Web.ConsumerData.Au.Api.Types.Common.Customer.Data.EmailAddress
) where
import Control.Lens (Prism', prism, ( # ))
... |
0c0f9f023bc83a32fd91f7f17a6fc43ea113a429ecc4c9bfaf22662d942fbf2f | eugenehr/erlyconv | file_tests.erl | coding : utf-8
-module(file_tests).
-author("Eugene Khrustalev <>").
-compile([export_all]).
-include_lib("eunit/include/eunit.hrl").
text() ->
<<"съешь же ещё этих мягких французских булок, да выпей чаю\n"/utf8>>.
latin_text() ->
<<"A Unicode latin 1 text"/utf8>>.
filename(FName) ->
Dir = code:lib_dir... | null | https://raw.githubusercontent.com/eugenehr/erlyconv/ecdcd7db8f785c9638cd1ebad37ccd426c050cdf/test/file_tests.erl | erlang | ?debugFmt("~w~n", [Unicode]),
?debugFmt("~w~n", [Unicode]),
?debugFmt("~w~n", [Unicode]), | coding : utf-8
-module(file_tests).
-author("Eugene Khrustalev <>").
-compile([export_all]).
-include_lib("eunit/include/eunit.hrl").
text() ->
<<"съешь же ещё этих мягких французских булок, да выпей чаю\n"/utf8>>.
latin_text() ->
<<"A Unicode latin 1 text"/utf8>>.
filename(FName) ->
Dir = code:lib_dir... |
23240824ef56dcd6e67e258e088dcc3593682690829563657a410075ebd0a538 | chordify/HarmTrace-Base | Time.hs |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DeriveFunctor #-}
# LANGUAGE GeneralizedNewtypeDeriving #
------------------------... | null | https://raw.githubusercontent.com/chordify/HarmTrace-Base/cd1a0651ec29f08b1d8328f20e8569cb358587d8/src/HarmTrace/Base/Time.hs | haskell | # LANGUAGE DeriveGeneric #
# LANGUAGE TypeSynonymInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE DeriveFunctor #
------------------------------------------------------------------------------
|
Maintainer :
Stability : experimental
Portab... |
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
Module : HarmTrace . Base . MusicTime
Copyright : ( c ) 2012 - -2016 , Chordify BV
License : LGPL-3
module HarmTrace.Base.Time (
Timed
, DTimed
, Timed' (..)
, Beat (..)
, BeatTime (..... |
9c8590c7bac701716f452470d87599001e767f86edc47ccb5152a07fea5d2add | ssor/erlangDemos | sc_sup.erl | -module(sc_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
init([]) ->
ElementSup = {sc_element_sup, {sc_element_sup, start_link, []},
... | null | https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/erlware-Erlang-and-OTP-in-Action-Source/chapter_11/simple_cache/src/sc_sup.erl | erlang | API
Supervisor callbacks | -module(sc_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
init([]) ->
ElementSup = {sc_element_sup, {sc_element_sup, start_link, []},
permanent, 2000, supervisor, [s... |
02b8db0bde11cd54474027d098c32f1e553646c6fcf0814453a405e5843cff3a | cryptosense/pkcs11 | p11_flags.mli | type t = Unsigned.ULong.t [@@deriving eq, ord, show, yojson]
type domain =
| Info_domain
| Slot_info_domain
| Token_info_domain
| Session_info_domain
| Mechanism_info_domain
| Initialize_domain
| Wait_for_slot_domain
| OTP_signature_info_domain
| Any_domain
val empty : t
val logical_or : t -> t -> ... | null | https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/lib/p11_flags.mli | ocaml | type t = Unsigned.ULong.t [@@deriving eq, ord, show, yojson]
type domain =
| Info_domain
| Slot_info_domain
| Token_info_domain
| Session_info_domain
| Mechanism_info_domain
| Initialize_domain
| Wait_for_slot_domain
| OTP_signature_info_domain
| Any_domain
val empty : t
val logical_or : t -> t -> ... | |
650e34850cdfe8f0a970f9d4dc19bf28583a150abac22be02ebf6193bdbf5730 | scalaris-team/scalaris | yaws_dynopts.erl | -module(yaws_dynopts).
-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-export([
have_ssl_honor_cipher_order/0,
have_ssl_client_renegotiation/0,
have_ssl_sni/0,
have_ssl_log_alert/0,
have_erlang_sendfile/0,
have_crypto_strong_rand_bytes/0,
... | null | https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/contrib/yaws/src/yaws_dynopts.erl | erlang | For last digit ignore everything after the "-", if any
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | -module(yaws_dynopts).
-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-export([
have_ssl_honor_cipher_order/0,
have_ssl_client_renegotiation/0,
have_ssl_sni/0,
have_ssl_log_alert/0,
have_erlang_sendfile/0,
have_crypto_strong_rand_bytes/0,
... |
a8a9ea2a0e50231dd03d7894408881517e37e55250ab8c6936e1309aad72a263 | arcadia-unity/catcon | camera.clj | (ns catcon.camera
(:use arcadia.core
catcon.linear)
(:import [UnityEngine Debug Input Vector3 Space]))
(defcomponent Camera [^float speed
^Vector3 target
^Vector3 focus]
(Update [this]
(let [towards-target (v* 0.1 (v- target focus))]
(set! (.focus th... | null | https://raw.githubusercontent.com/arcadia-unity/catcon/6c69f424d3c14639ff11a3ea7d9da6aa81328f8a/Arcadia/Scripts/catcon/camera.clj | clojure | (ns catcon.camera
(:use arcadia.core
catcon.linear)
(:import [UnityEngine Debug Input Vector3 Space]))
(defcomponent Camera [^float speed
^Vector3 target
^Vector3 focus]
(Update [this]
(let [towards-target (v* 0.1 (v- target focus))]
(set! (.focus th... | |
0b439aedd567af2a39c9a3dd284a3726a3ca7c59f8b5e9cf140aeec9052e0e4d | karamellpelle/grid | SoundLevelPuzzle.hs | grid is a game written in Haskell
Copyright ( C ) 2018
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your optio... | null | https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/source/Game/LevelPuzzle/LevelPuzzleData/Fancy/SoundLevelPuzzle.hs | haskell |
This file is part of grid.
grid is free software: you can redistribute it and/or modify
(at your option) any later version.
grid 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
GN... | grid is a game written in Haskell
Copyright ( C ) 2018
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
module Game.LevelPuzzle.LevelPuzzleData.Fancy.Sound... |
b8c1643a1f404a5ad76c71f197b6edd9ff79158260687aa1b8d38804dcb85abb | chrovis/cljam | sequence.clj | (ns cljam.util.sequence
(:require [clojure.string :as cstr])
(:import [java.nio Buffer CharBuffer]))
(def ^:private revcomp-table
(let [ba (byte-array 128)]
(dotimes [i 128] (aset-byte ba i (byte \N)))
(doseq [s ["AT" "GC" "NN"]
[a b] [(cstr/upper-case s) (cstr/lower-case s)]]
(aset-byt... | null | https://raw.githubusercontent.com/chrovis/cljam/2b8e7386765be8efdbbbb4f18dbc52447f4a08af/src/cljam/util/sequence.clj | clojure | (ns cljam.util.sequence
(:require [clojure.string :as cstr])
(:import [java.nio Buffer CharBuffer]))
(def ^:private revcomp-table
(let [ba (byte-array 128)]
(dotimes [i 128] (aset-byte ba i (byte \N)))
(doseq [s ["AT" "GC" "NN"]
[a b] [(cstr/upper-case s) (cstr/lower-case s)]]
(aset-byt... | |
09d4033ebc8a82daa167e048b344a6a010c7ccf1d5ba5ac2d3b297285a986475 | ktakashi/sagittarius-scheme | fn.scm | -*- mode : scheme ; coding : utf-8 -*-
(import (rnrs)
(text xml dom)
(text xml dom writer)
(text xml errors)
(text xml xpath fn)
(text xml schema)
(util hashtables)
(sagittarius timezone)
(sagittarius calendar)
(srfi :1)
(srfi :19)
(srfi :39)
(srfi :64))
(test-begin "XPath functions and operators")
(def... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/3971b131d463696297c320dbe595dffd08867dac/test/tests/text/xml/xpath/fn.scm | scheme | coding : utf-8 -*-
TODO error cases
TODO should we support fortran at least?
bah
for now
not working yet
TODO add element and others...
)
can't do it yet
(let ((doc (xpath-fn:parse-xml-fragment
should be xs:int...
Local Variables:
End: | (import (rnrs)
(text xml dom)
(text xml dom writer)
(text xml errors)
(text xml xpath fn)
(text xml schema)
(util hashtables)
(sagittarius timezone)
(sagittarius calendar)
(srfi :1)
(srfi :19)
(srfi :39)
(srfi :64))
(test-begin "XPath functions and operators")
(define xml-file (string-append (current-dire... |
ad959bda1ab9f6063142fb5fa1c426a61bb8b51f576dd08af17c4d481fc15081 | kelamg/HtDP2e-workthrough | ex375.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex375) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Intertwined-Data/ex375.rkt | racket | about the language level of this file in a form that our tools can easily process.
Q - Why are you confident that your change works?
A - All the tests passed after making changes so I am confident
that it works
Q - Which version do you prefer?
A - I prefer wrapping bulletize around the branch because branchi... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex375) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
evaluates to only one statement , leaving the sa... |
613857c8df07d37054499e2aba566bc5da016a4e27a5695742e58c716437772a | reenberg/xmonad | Stack.hs | # LANGUAGE ScopedTypeVariables #
module Properties.Stack where
import Test.QuickCheck
import Instances
import XMonad.StackSet hiding (filter)
import qualified XMonad.StackSet as S (filter)
import Data.Maybe
-- The list returned by index should be the same length as the actual
-- windows kept in the zipper
prop_ind... | null | https://raw.githubusercontent.com/reenberg/xmonad/c4f471bfb6ffe70741fe76c3b154f6bae920da7f/tests/Properties/Stack.hs | haskell | The list returned by index should be the same length as the actual
windows kept in the zipper
correct workspace
which is a key component in this test (together with member).
preserve order
differentiate should return Nothing if the list is empty or Just stack, with | # LANGUAGE ScopedTypeVariables #
module Properties.Stack where
import Test.QuickCheck
import Instances
import XMonad.StackSet hiding (filter)
import qualified XMonad.StackSet as S (filter)
import Data.Maybe
prop_index_length (x :: T) =
case stack . workspace . current $ x of
Nothing -> length (index ... |
d6aa50ca275972791b7ffd4be2eba3599769c5f4379acf48abb12754e68f481e | day8/re-com | validate.clj | (ns re-com.validate)
(defmacro validate-args-macro
"if goog.DEBUG is true then validate the args, otherwise replace the validation code with nil"
[args-desc args]
`(if-not ~(vary-meta 'js/goog.DEBUG assoc :tag 'boolean)
nil
(re-com.validate/validate-args (re-com.validate/extract-arg-data ~args-desc) ~a... | null | https://raw.githubusercontent.com/day8/re-com/07451b1d19c59eb185548efe93e2d00b5d3eab89/src/re_com/validate.clj | clojure | (ns re-com.validate)
(defmacro validate-args-macro
"if goog.DEBUG is true then validate the args, otherwise replace the validation code with nil"
[args-desc args]
`(if-not ~(vary-meta 'js/goog.DEBUG assoc :tag 'boolean)
nil
(re-com.validate/validate-args (re-com.validate/extract-arg-data ~args-desc) ~a... | |
b256bb7f72afe23ec9ed49a5fa6cbb8a36cfc0a60a7f03747b24e01e0d7ff762 | SIDANWhatever/plutus-cborhex-automation | TreasuryValidator.hs | # LANGUAGE DataKinds #
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE T... | null | https://raw.githubusercontent.com/SIDANWhatever/plutus-cborhex-automation/35c9eaf92c51ba9aabad41971eac9f308348e57f/example/src/GBTE/TreasuryValidator.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric #
# LANGUAGE OverloadedStrings #
are all of these necessary?
case action -> Manage:
case action -> Commit:
Check that the Value sent to Contract UTXO matches what is specified in the Redeemer
Values of each | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE NoImplicitPrelude #
module GBTE.TreasuryValidator (validator) where
... |
ebd7ce86b7620989d21c79b4d36dd8797eb78c39da07c462689e488bf28ab2a7 | potatosalad/erlang-jose | jose.erl | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
%% vim: ts=4 sw=4 ft=erlang noet
%%%-------------------------------------------------------------------
@author < >
2014 - 2022 ,
%%% @doc
%%%
%%% @end
Created : 20 Jul 2015 by < >
%%%---------------------------... | null | https://raw.githubusercontent.com/potatosalad/erlang-jose/dbc4074066080692246afe613345ef6becc2a3fe/src/jose.erl | erlang | vim: ts=4 sw=4 ft=erlang noet
-------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
Private API
====================================================================
API functions
======================================... | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
@author < >
2014 - 2022 ,
Created : 20 Jul 2015 by < >
-module(jose).
-export([chacha20_poly1305_module/0]).
-export([chacha20_poly1305_module/1]).
-export([crypto_fallback/0]).
-export([crypto_fallback/1]).
-e... |
5aaa51c76c316001199d898243b27d1e877ad341fb973403ca92b08270031b6b | RefactoringTools/HaRe | M4_TokOut.hs | module M4 where
--Any type/data constructor name declared in this module can be renamed.
--Any type variable can be renamed.
Rename type Constructor ' BTree ' to ' MyBTree '
data BTree a = Empty | T a (BTree a) (BTree a)
deriving Show
buildtree :: Ord a => [a] -> (BTree a)
buildtree [] = Empty
build... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/testing/unfoldAsPatterns/M4_TokOut.hs | haskell | Any type/data constructor name declared in this module can be renamed.
Any type variable can be renamed. | module M4 where
Rename type Constructor ' BTree ' to ' MyBTree '
data BTree a = Empty | T a (BTree a) (BTree a)
deriving Show
buildtree :: Ord a => [a] -> (BTree a)
buildtree [] = Empty
buildtree (x:xs) = insert x (buildtree xs)
insert :: Ord a => a -> BTree a -> BTree a
insert val v2 = do
... |
89dddd7c1981d393c8034cede4b8ce7d5a6ff2b1640c54d6dd2fe2b7c42a773b | backtracking/ocamlgraph | test_topsort.ml |
(* Test file for topological sort *)
open Format
open Graph
open Pack.Digraph
let test ?(check=true) iter n edges =
let v = Array.init n V.create in
let g = create () in
let () = Array.iter (add_vertex g) v in
let build (s,t) = add_edge g v.(s) v.(t) in
List.iter build edges;
(* run top sort *)
let num... | null | https://raw.githubusercontent.com/backtracking/ocamlgraph/6eee6ab5ad2fd0170149efe791d7d8e0f7aa8982/tests/test_topsort.ml | ocaml | Test file for topological sort
run top sort
if check then for v = 0 to n-1 do printf "%d " r.(v) done; printf "@.";
check
linear graph |
open Format
open Graph
open Pack.Digraph
let test ?(check=true) iter n edges =
let v = Array.init n V.create in
let g = create () in
let () = Array.iter (add_vertex g) v in
let build (s,t) = add_edge g v.(s) v.(t) in
List.iter build edges;
let num = Array.make n 0 in
let i = ref 0 in
iter (fun v -> i... |
4bea8dd2a138ccac40029d702d93a02b3f227860cfb3f0a73028315f3fb4237a | lucian303/corenlpd | home.clj | (ns corenlpd.routes.home
(:require [compojure.core :refer [defroutes GET]]))
(defroutes home-routes
(GET "/" []
"corenlpd HTTP REST Server"))
| null | https://raw.githubusercontent.com/lucian303/corenlpd/51454aaa0cbed40f0bea7d9be47aac5d224e31ef/src/corenlpd/routes/home.clj | clojure | (ns corenlpd.routes.home
(:require [compojure.core :refer [defroutes GET]]))
(defroutes home-routes
(GET "/" []
"corenlpd HTTP REST Server"))
| |
20ba3e9d45a7aa238f82544a7c4e1e0eb92b577056feb64c6cfeabbad93f8720 | returntocorp/semgrep | Visitor_python.ml |
*
* Copyright ( C ) 2019 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file license.txt... | null | https://raw.githubusercontent.com/returntocorp/semgrep/45b19ec232b88e770c54ede1a9103508e0ac3827/languages/python/menhir/Visitor_python.ml | ocaml | Disable warnings against unused variables
***************************************************************************
Prelude
***************************************************************************
hooks
start of auto generation
let arg = Parse_info.v_pinfo v_pinfox in
let arg = v_unit v_comments i... |
*
* Copyright ( C ) 2019 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file license.txt... |
80794c4fc5dd32294cf7f2c4ec2199851874eaeab9423842fd7e51318100beaa | dbuenzli/stdlib-utf | examples.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* ... | null | https://raw.githubusercontent.com/dbuenzli/stdlib-utf/77b0ece6ae0c798781fa20c7d1babedeb36d7f8d/examples.ml | ocaml | ************************************************************************
OCaml
The... | Copyright 2021 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Utf_x_adhoc
type utf_decode = [ `Malformed of string | `Uchar of Uchar.t ]
type 'a folder = 'a -> int -> utf_decode -> 'a
let fold_utf_8 : 'a folder -> 'a -> stri... |
15d081e9c10d3c3168982099c58328b3346e28c9cc9f98379d1e3a305799f207 | MyDataFlow/ttalk-server | lager_sup.erl | Copyright ( c ) 2011 - 2012 Basho Technologies , Inc. All Rights Reserved .
%%
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
%%
%% -2.0
%%
%% Unless required... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/lager/src/lager_sup.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 and limitations
under the License.
@doc Lager's top level supervi... | Copyright ( c ) 2011 - 2012 Basho Technologies , Inc. All Rights Reserved .
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
... |
9d1c93f749c0f6e6e7f0103918e8e0cfdab85e3817f1901c3a46c8a28c03df73 | gusbicalho/haskell-todo | ItemSpec.hs | HLINT ignore " Redundant do "
module HaskellTodo.Adapters.ItemSpec (spec) where
import Test.Hspec
import Test.Hspec.QuickCheck
import Test.QuickCheck
import qualified HaskellTodo.Adapters.Item as A.Item
import qualified HaskellTodo.Models.Item as M.Item
import qualified HaskellTodo.WireTypes.Item as Wire.Item
spec ... | null | https://raw.githubusercontent.com/gusbicalho/haskell-todo/f28b0d05ddb72764cf01d29fa978457ac455ac81/test/HaskellTodo/Adapters/ItemSpec.hs | haskell | HLINT ignore " Redundant do "
module HaskellTodo.Adapters.ItemSpec (spec) where
import Test.Hspec
import Test.Hspec.QuickCheck
import Test.QuickCheck
import qualified HaskellTodo.Adapters.Item as A.Item
import qualified HaskellTodo.Models.Item as M.Item
import qualified HaskellTodo.WireTypes.Item as Wire.Item
spec ... | |
96a4ca9341fcfc152f525d4ee6f0bace46c280863a684bcd9535730ee8ab03c7 | patzy/glaw | package.lisp | (defpackage :glaw
(:use #:cl)
(:export
;; utils
#:random-between #:random-nth #:nshuffle #:shuffle #:key-value
;; math
#:deg->rad #:rad->deg #:coords-overlap-p
#:make-vector-2d #:make-vector-2d-from-list #:make-vector-2d-from-coords
#:vector-2d-x #:vector-2d-y
#:vector-2d-slope #:vector-2d-dot-... | null | https://raw.githubusercontent.com/patzy/glaw/e678fc0c107ce4b1e3ff9921a6de7e32fd39bc37/src/package.lisp | lisp | utils
math
timing
resources management
assets management
graphics
text rendering
stats
general view
2d view
isometric view
3d view
shapes
sprites
animation
pathfinding
particles
input management
game screens
sound
gui
gui widgets | (defpackage :glaw
(:use #:cl)
(:export
#:random-between #:random-nth #:nshuffle #:shuffle #:key-value
#:deg->rad #:rad->deg #:coords-overlap-p
#:make-vector-2d #:make-vector-2d-from-list #:make-vector-2d-from-coords
#:vector-2d-x #:vector-2d-y
#:vector-2d-slope #:vector-2d-dot-product
#:vector-2d-... |
cceddc9ae9abe5887d583f6a3ffcd0c5499fbdc879a5f2a72310e56e6f7e0f81 | synrc/nitro | element_menu.erl | -module(element_menu).
-author('Vladimir Galunshchikov').
-include_lib("nitro/include/nitro.hrl").
-compile(export_all).
render_element(Record) when Record#menu.show_if==false -> [<<>>];
render_element(Record) ->
List = [
%global
{<<"accesskey">>, Record#menu.accesskey},
{<<"class">>, Record#menu... | null | https://raw.githubusercontent.com/synrc/nitro/753b543626add2c014584546ec50870808a2eb90/src/elements/interactive/element_menu.erl | erlang | global
spec | -module(element_menu).
-author('Vladimir Galunshchikov').
-include_lib("nitro/include/nitro.hrl").
-compile(export_all).
render_element(Record) when Record#menu.show_if==false -> [<<>>];
render_element(Record) ->
List = [
{<<"accesskey">>, Record#menu.accesskey},
{<<"class">>, Record#menu.class},
... |
ed3bc5d8a0618a9f5ed191deb370df9ff7c7050c70b599c3d5578677507fc1eb | rizo/snowflake-os | camlinternalMod.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet Cri... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/libraries/stdlib/camlinternalMod.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2004 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
$ I d : camlinternalMod.ml , v 1.5 20... |
7a126ac9ecb10001cc61c96e5541f4a4e388f0c6214a05cea466975fa47b4229 | simplegeo/erlang | ssh_connection_controler.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public Lic... | null | https://raw.githubusercontent.com/simplegeo/erlang/15eda8de27ba73d176c7eeb3a70a64167f50e2c4/lib/ssh/src/ssh_connection_controler.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(ssh_connection_controler).
-behaviour(ge... |
51a6e555234dd34c7584ff93c6f0040c20a4b8c18e59af5690c0b28d122d4c67 | patrickgombert/erlang-koans | about_processes.erl | -module(about_processes).
-export([writing_messages_to_yourself/0,
writing_messages_to_your_friends/0,
keeping_an_eye_on_your_friends/0
]).
writing_messages_to_yourself() ->
self() ! __,
receive
Message ->
Message =:= "Hello Self!"
end.
writing_messages_to_your_... | null | https://raw.githubusercontent.com/patrickgombert/erlang-koans/d80032d99b6ee3537e585ea02b743fe681fad8cf/src/about_processes.erl | erlang | -module(about_processes).
-export([writing_messages_to_yourself/0,
writing_messages_to_your_friends/0,
keeping_an_eye_on_your_friends/0
]).
writing_messages_to_yourself() ->
self() ! __,
receive
Message ->
Message =:= "Hello Self!"
end.
writing_messages_to_your_... | |
3d28b8f887c582bc73fff37e8e3dfc96140e54524927b2ae502f6214a1d1ad02 | fadbadml-dev/FADBADml | test_cases.ml | (**************************************************************************)
(* *)
(* FADBADml *)
(* *)
... | null | https://raw.githubusercontent.com/fadbadml-dev/FADBADml/bd5668433b8ad297aa70e91a032953d55923b533/test/unit/test_cases.ml | ocaml | ************************************************************************
FADBADml
... | OCaml port by and
Based on FADBAD++ , written by and
Copyright 2019 - 2020
This file is distributed under the terms of the CeCILL - C license .
let non_zero_float : float QCheck.arbitrary =
QCheck.make
~print:... |
612bdf038c73e159c193a42f01eb01ffffbc24ff11ac0e022276633d1ecd9007 | pgj/mirage-kfreebsd | int32.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/pgj/mirage-kfreebsd/0ff5b2cd7ab0975e3f2ee1bd89f8e5dbf028b102/packages/mirage-stdlib/src/int32.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : int32.ml 7818 2007 - 01 - 30 ... |
72fa7cd811f84a83e3fc62e0bed6d6d25bb9010ab3e1a6af216f87e3a3207101 | uw-unsat/leanette-popl22-artifact | parse.rkt | #lang racket
(provide (all-defined-out))
(struct litmus-file (name cpu content pre globals insns post) #:transparent)
(define (string-index str chr)
(for/first ([c str][i (in-naturals)] #:when (eq? c chr)) i))
(define (ssplit s [sep #px"\\s+"])
(map string-trim (string-split s sep)))
a .litmus file into a... | null | https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-4/memsynth/litmus/herd/parse.rkt | racket | Does not model the actual assembly semantics -- that's a job
for the compiler.
find the title
find the initialization
))
find number of processors
)])
find instructions
))
find postcondition | #lang racket
(provide (all-defined-out))
(struct litmus-file (name cpu content pre globals insns post) #:transparent)
(define (string-index str chr)
(for/first ([c str][i (in-naturals)] #:when (eq? c chr)) i))
(define (ssplit s [sep #px"\\s+"])
(map string-trim (string-split s sep)))
a .litmus file into a... |
640866fa3098b80dc10abf9eee267e41284f9ae49372e8766352e0e522c36dba | nomeata/free-theorems-static-webui | FrontendTypeExpressionsTests.hs |
module FrontendTypeExpressionsTests (tests) where
import Data.Generics (everything, something, somewhere, mkQ, gcount, mkM)
import Data.Map as Map (elems, keysSet, singleton, insert, fromList)
import Data.Set as Set
( isSubsetOf, union, member, null, intersection, fromList, difference
, empty, size, singl... | null | https://raw.githubusercontent.com/nomeata/free-theorems-static-webui/44149706c2b809734ab3848047e314359bc59ccb/free-theorems/src/FrontendTypeExpressionsTests.hs | haskell | | Runs all tests.
----- Test properties -------------------------------------------------------
| Property: Free variables of a type expression are a subset of all
type variables occurring in a type expression.
| Property: Every type variable occurring in a type expression is free or
bound.
| Property: Given ... |
module FrontendTypeExpressionsTests (tests) where
import Data.Generics (everything, something, somewhere, mkQ, gcount, mkM)
import Data.Map as Map (elems, keysSet, singleton, insert, fromList)
import Data.Set as Set
( isSubsetOf, union, member, null, intersection, fromList, difference
, empty, size, singl... |
7fdab39ac042e79201e680ec274773d3b88269177799fb2be499bc9a04d5338f | getsentry/sentry-clj | core_test.clj | (ns sentry-clj.core-test
(:require
[cheshire.core :as json]
[expectations.clojure.test :refer [defexpect expect expecting]]
[sentry-clj.core :as sut])
(:import
[io.sentry Breadcrumb JsonSerializer SentryLevel SentryOptions]
[io.sentry.protocol Request User]
[java.io StringWriter]
[java.util Dat... | null | https://raw.githubusercontent.com/getsentry/sentry-clj/3268ea3062384584c07b31526e8a5aa2db4ae546/test/sentry_clj/core_test.clj | clojure | (ns sentry-clj.core-test
(:require
[cheshire.core :as json]
[expectations.clojure.test :refer [defexpect expect expecting]]
[sentry-clj.core :as sut])
(:import
[io.sentry Breadcrumb JsonSerializer SentryLevel SentryOptions]
[io.sentry.protocol Request User]
[java.io StringWriter]
[java.util Dat... | |
5f7d16ee567fad5149b9fe6b4c9c07891ed4d1b3906b72fb4b5ca377cc0b2048 | samrocketman/home | melcher-make-bw.scm | ;
; The GIMP -- an image manipulation program
Copyright ( C ) 1995 and
;
bw - photoscript for GIMP 2.4
Original author : ( )
At xMedia , The Netherlands
;
Tags : photo , b&w
;
; Author statement:
;
; Creates a black & white photograph style image
;
; --------------------------------------------------... | null | https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/melcher-make-bw.scm | scheme |
The GIMP -- an image manipulation program
Author statement:
Creates a black & white photograph style image
--------------------------------------------------------------------
--------------------------------------------------------------------
- Changelog -
---------------------------------------------... | Copyright ( C ) 1995 and
bw - photoscript for GIMP 2.4
Original author : ( )
At xMedia , The Netherlands
Tags : photo , b&w
Distributed by Gimp FX Foundry project
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the Li... |
53292b3bc77b525b085ff762a87b5f8a9fc9cade1dda2db32bb4e6f30f2d809a | clojure-lsp/clojure-lsp | clj_depend_test.clj | (ns clojure-lsp.clj-depend-test
(:require
[clojure-lsp.clj-depend :as clj-depend]
[clojure.test :refer [deftest is testing]]))
(deftest config-with-source-paths-filled-test
(testing "Should add source-paths to config when it is nil"
(is (= {:source-paths #{"src" "test"}}
(clj-depend/config-wit... | null | https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/4373d50e1b43914c0c5e9616f495badabb7aa68c/lib/test/clojure_lsp/clj_depend_test.clj | clojure | (ns clojure-lsp.clj-depend-test
(:require
[clojure-lsp.clj-depend :as clj-depend]
[clojure.test :refer [deftest is testing]]))
(deftest config-with-source-paths-filled-test
(testing "Should add source-paths to config when it is nil"
(is (= {:source-paths #{"src" "test"}}
(clj-depend/config-wit... | |
369cedbf59024bb577151e08943e89c9042d341a776aef63386747937c05f651 | facebookarchive/pfff | lexing.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/external/stdlib/lexing.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : lexing.ml 11156 2011 - 07 - 2... |
01b3ffbf38645dc7c8bb94302c169ceaea6691476b7611732b9a33c381cf828f | re-path/studio | select.cljs |
(ns repath.studio.tools.select
(:require [repath.studio.tools.base :as tools]
[repath.studio.elements.handlers :as elements]
[repath.studio.elements.views :as element-views]
[repath.studio.styles :as styles]
[repath.studio.bounds :as bounds]
[clojure.core.m... | null | https://raw.githubusercontent.com/re-path/studio/21003ae1408feca9d2ef7772c595731edf9b3880/src/repath/studio/tools/select.cljs | clojure |
(ns repath.studio.tools.select
(:require [repath.studio.tools.base :as tools]
[repath.studio.elements.handlers :as elements]
[repath.studio.elements.views :as element-views]
[repath.studio.styles :as styles]
[repath.studio.bounds :as bounds]
[clojure.core.m... | |
5d8136dc0bbf4494c3f8601628bc3f718513a55cdee3e126a9f2103754a7e8bc | input-output-hk/nix-tools | Cache.hs | module Stack2nix.Cache
( readCache
, appendCache
, cacheHits
) where
import Control.DeepSeq ((<$!!>))
import Control.Exception (catch, SomeException(..))
readCache :: FilePath
-> IO [( String -- url
, String -- rev
subdir
, String -- sha256
, Stri... | null | https://raw.githubusercontent.com/input-output-hk/nix-tools/15d2e4b61cb63ff351f3c490c12c4d89eafd31a1/lib/Stack2nix/Cache.hs | haskell | url
rev
sha256
pkgname | module Stack2nix.Cache
( readCache
, appendCache
, cacheHits
) where
import Control.DeepSeq ((<$!!>))
import Control.Exception (catch, SomeException(..))
readCache :: FilePath
subdir
nixexpr - path
)]
readCache f = fmap (toTuple . words) . lines <$!!> readFile f
where toTuple [ url, rev... |
cd17fc81f1d19b1a40c05b1dd72d5efe0453855977f1939377fba4ce85bbb0e7 | babashka/bbin | dev.clj | (ns babashka.bbin.dev
(:require [babashka.process :refer [sh]]
[clojure.core.async :refer [<!] :as async]
[clojure.string :as str]
[pod.babashka.fswatcher :as fw]
[taoensso.timbre :as log]))
(def watch-paths ["deps.edn" "bb.edn" "src" "dev"])
(defn- build-event? [{:ke... | null | https://raw.githubusercontent.com/babashka/bbin/1f40f7137a0957531332b7d4847393d53bbb46d7/dev/babashka/bbin/dev.clj | clojure | (ns babashka.bbin.dev
(:require [babashka.process :refer [sh]]
[clojure.core.async :refer [<!] :as async]
[clojure.string :as str]
[pod.babashka.fswatcher :as fw]
[taoensso.timbre :as log]))
(def watch-paths ["deps.edn" "bb.edn" "src" "dev"])
(defn- build-event? [{:ke... | |
389130802b2102caa863044c2f42e550ddc3050c381ceed0141365d139239a3f | danoctavian/bit-smuggler | IntegrationSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module IntegrationSpec (main, spec) where
import Test.Hspec
import Test.QuickCheck
import Prelude as P
import Data.Torrent
import Data.Maybe
import Data.Text as T
import Data.ByteString as BS
import Data.ByteString.Lazy as BSL
import System.FilePath.Posix
import Crypto.Random.AESCtr... | null | https://raw.githubusercontent.com/danoctavian/bit-smuggler/4385ed67f1fec4ed441832fc9a119de632b796aa/BitSmuggler/test/integration/IntegrationSpec.hs | haskell | # LANGUAGE OverloadedStrings #
launch the tracker
UTORRENT based client and server
were are configuring the proxies to redirect the bittorrent traffic
to the reverse proxy port
so that we don't need to play with iptables
TODO: reabilitate those to use the new connData
port on which it's receiving commands
host... | module IntegrationSpec (main, spec) where
import Test.Hspec
import Test.QuickCheck
import Prelude as P
import Data.Torrent
import Data.Maybe
import Data.Text as T
import Data.ByteString as BS
import Data.ByteString.Lazy as BSL
import System.FilePath.Posix
import Crypto.Random.AESCtr as AESCtr
import Data.IP
import Da... |
44ff726ba1be5a99111c4953b685f218bd809d2a844629b962df2f94c1e418db | dschrempf/mcmc | Environment.hs | -- |
Module : Mcmc . Environment
-- Description : Runtime environment
Copyright : 2021
License : GPL-3.0 - or - later
--
-- Maintainer :
-- Stability : unstable
-- Portability : portable
--
Creation date : Tue Nov 17 11:00:09 2020 .
module Mcmc.Environment
( Environment (..),
... | null | https://raw.githubusercontent.com/dschrempf/mcmc/881bd8dffdbcb07da23db9b0b3d09b27b191907e/mcmc/src/Mcmc/Environment.hs | haskell | |
Description : Runtime environment
Maintainer :
Stability : unstable
Portability : portable
| Use a polymorphic settings variable, because we have 'Settings', but
| List will be empty if using 'Quiet'. If 'LogStdOutAndFile' is used
file.
| MVar blocking output.
| Initialize the environment.
Open ... | Module : Mcmc . Environment
Copyright : 2021
License : GPL-3.0 - or - later
Creation date : Tue Nov 17 11:00:09 2020 .
module Mcmc.Environment
( Environment (..),
initializeEnvironment,
closeEnvironment,
)
where
import Control.Concurrent.MVar
import Control.Monad
import Data.T... |
bacc13093ac8cbf12ed3f83c8753588acd47e16be6148e2d5d475764b46384ec | dgiot/dgiot | dgiot_http_worker.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy... | null | https://raw.githubusercontent.com/dgiot/dgiot/a6b816a094b1c9bd024ce40b8142375a0f0289d8/apps/dgiot_bridge/src/channel/dgiot_http_worker.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(dgiot_http_worker).
-include("dgiot_bridge.hrl").
-include_lib("dgiot/include/logger.h... |
9b178a4189a1b1132303a52ebefcda549515312d0b95b21b895cbf40c2b4d3d0 | ericfinster/minitt | ErrM.hs | -- BNF Converter: Error Monad
Copyright ( C ) 2004 Author :
-- This file comes with NO WARRANTY and may be used FOR ANY PURPOSE.
module Core.ErrM where
the Error monad : like Maybe type with error msgs
import Control.Monad (MonadPlus(..), liftM)
data Err a = Ok a | Bad String
deriving (Read... | null | https://raw.githubusercontent.com/ericfinster/minitt/19ac0bfa4d1742efb06627f6a9590f601d6f9ecb/src/main/haskell/Core/ErrM.hs | haskell | BNF Converter: Error Monad
This file comes with NO WARRANTY and may be used FOR ANY PURPOSE.
| Copyright ( C ) 2004 Author :
module Core.ErrM where
the Error monad : like Maybe type with error msgs
import Control.Monad (MonadPlus(..), liftM)
data Err a = Ok a | Bad String
deriving (Read, Show, Eq, Ord)
instance Monad Err where
return = Ok
fail = Bad
Ok a >>= f ... |
1254933f34f4460f5f9b009950d16619a0869b8812d01d73f562e1250de65be5 | smimram/funk | ide.ml | *
* Functions for handling the ide bus and its devices .
*
* @author
*
* Functions for handling the ide bus and its devices.
*
* @author Samuel Mimram
**)
(** Data register (read/write). *)
let offs_ata_data = 0x00
(** Error register (read).*)
let offs_ata_error = 0x01
(** Number of cylinde... | null | https://raw.githubusercontent.com/smimram/funk/88328dd9087c9097b1bfe2cf5394ba99fa631934/src/drivers/ide.ml | ocaml | * Data register (read/write).
* Error register (read).
* Number of cylinders lsb (write).
* Drive register (write).
* Bits that must be set.
* Use LBA.
* Use master.
* Use slave.
* Status register (read).
* Get a drive status.
* Command register (write).
* Device control register (write).
* Disable interrupt... | *
* Functions for handling the ide bus and its devices .
*
* @author
*
* Functions for handling the ide bus and its devices.
*
* @author Samuel Mimram
**)
let offs_ata_data = 0x00
let offs_ata_error = 0x01
let offs_ata_cyl_lsb = 0x04
* Number of cylinders ( write ) .
let offs_ata_cyl_msb ... |
2a97294d00d975b051ea85f2e0cb858a0b069deb75639e594bc5339ed0d6f3fc | hemmi/coq2scala | eterm.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2-old/plugins/subtac/eterm.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
env, id, evars, number of function ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Environ
open Tacmach
ope... |
a9c521528f49d22cda167ef0a4e71d41478fc05630fc72fbad568fe0923f7a48 | PacktWorkshops/The-Clojure-Workshop | exercise_12_03_test.clj | (ns packt-clj.chapter-12-tests.exercise-12-03-test
(:require [clojure.test :as t :refer [deftest is testing]]))
(deftest buy-acme-corp-shares-step-3
(let [client-account (ref 2100)
broker-account (ref 10000)
acme-corp-share-price (ref 22)
broker-stocks (ref {:acme-corp 50})
client-... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter12/tests/packt-clj.chapter-12-tests/test/packt_clj/chapter_12_tests/exercise_12_03_test.clj | clojure | (ns packt-clj.chapter-12-tests.exercise-12-03-test
(:require [clojure.test :as t :refer [deftest is testing]]))
(deftest buy-acme-corp-shares-step-3
(let [client-account (ref 2100)
broker-account (ref 10000)
acme-corp-share-price (ref 22)
broker-stocks (ref {:acme-corp 50})
client-... | |
15a2d63009a23aa5cd55d4a858be607412037a50c9d80b4e5988fbf9f9ad61bb | steshaw/PLAR | tableaux.ml | (* ========================================================================= *)
Tableaux , seen as an optimized version of a Prawitz - like procedure .
(* *)
Copyright ( c ) 2003 - 2007 , . ( See " LICENSE.txt " for details . )
(* ... | null | https://raw.githubusercontent.com/steshaw/PLAR/c143b097d1028963f4c1d24f45a1a56c8b65b838/tableaux.ml | ocaml | =========================================================================
=========================================================================
-------------------------------------------------------------------------
Unify literals ... | Tableaux , seen as an optimized version of a Prawitz - like procedure .
Copyright ( c ) 2003 - 2007 , . ( See " LICENSE.txt " for details . )
let rec unify_literals env tmp =
match tmp with
Atom(R(p1,a1)),Atom(R(p2,a2)) -> unify env [Fn(p1,a1),Fn(p2,a2)]
| Not(p),Not(q) -> unify_literals env (p... |
aee73b592c4418868fa93eb96109f7fbd3043e7781178288d2f075f235cec469 | mclumd/Meta-AQUA | meta-aqua-interface.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Package : Meta - aqua ; Base : 10 -*-
(defpackage Meta-AQUA
(:nicknames MetaAQUA)
(:use cl
Misc Frames Representations
Nonlin
)
)
(in-package :metaaqua)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;
;;;... | null | https://raw.githubusercontent.com/mclumd/Meta-AQUA/e4d4f83330fd07d1354aec245a49bde9e246c618/meta-aqua-interface.lisp | lisp | Syntax : Common - lisp ; Package : Meta - aqua ; Base : 10 -*-
The Meta-AQUA Introspective Multistrategy Learning System
Version 6
File: meta-aqua-interface.lisp
*******************************************************
This program is free software; you can redistribute i... | (defpackage Meta-AQUA
(:nicknames MetaAQUA)
(:use cl
Misc Frames Representations
Nonlin
)
)
(in-package :metaaqua)
Copyright ( C ) 1996 ( )
under the terms of the GNU General Public License as published by the Free
You should have received a copy of the GNU... |
688fa68953da2e3323b0eff6881b9253209b3c63ebeeeefc8026cd08982382dc | semilin/layoup | nstr-sym.lisp |
(MAKE-LAYOUT :NAME "nstr-sym" :MATRIX
(APPLY #'KEY-MATRIX '("vgdlqzuoyb" "nstr,.aeih" "pcmw/'kjxf"))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/nstr-sym.lisp | lisp |
(MAKE-LAYOUT :NAME "nstr-sym" :MATRIX
(APPLY #'KEY-MATRIX '("vgdlqzuoyb" "nstr,.aeih" "pcmw/'kjxf"))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | |
01c78224b1b267f95dc0fe0d39f4dfd44ab6b620e0aab0ac6b692293cfc42884 | ayamada/copy-of-svn.tir.jp | server.scm | ;;; coding: euc-jp
;;; -*- scheme -*-
;;; vim:set ft=scheme ts=8 sts=2 sw=2 et:
$ Id$
;;; 使い方:
: responderに以下のような手続きをセットし、setp - server : startするだけ 。
;;; - 引数として、requestとrequest-headersを取る。
;;; - 返り値として、以下のどちらかを返す。
;;; -- requestに対応するresponse
;;; -- requestに対応するresponseとresponse-headersの二値
ToDo :
;;; :responder... | null | https://raw.githubusercontent.com/ayamada/copy-of-svn.tir.jp/101cd00d595ee7bb96348df54f49707295e9e263/Gauche-tir/branches/Gauche-tir03/0.0.2/lib/tir03/setp/server.scm | scheme | coding: euc-jp
-*- scheme -*-
vim:set ft=scheme ts=8 sts=2 sw=2 et:
使い方:
- 引数として、requestとrequest-headersを取る。
- 返り値として、以下のどちらかを返す。
-- requestに対応するresponse
-- requestに対応するresponseとresponse-headersの二値
:responder内でエラーが発生した場合は、今のところ、
コネクションを維持したまま、エラーヘッダ付きでクライアントに応答を
自動的に返すが、この仕様は微妙だと思う。
あとでもっとマシな仕様を考えて、直す事。
... | $ Id$
: responderに以下のような手続きをセットし、setp - server : startするだけ 。
ToDo :
ToDo : client - disconnect - flagを操作するmethodを提供する事 !
(define-module tir03.setp.server
(use gauche.parameter)
(use srfi-1)
(use util.list)
(use tir03.socket.server)
(use tir03.setp.protocol)
(export
<setp-server>
s... |
43626121433f701aa5921e8f831524ed765bf7ba009f22fe1905b936a408a299 | huangz1990/SICP-answers | 3-length-and-width-of-rectangle.scm | ;;; 3-length-and-width-of-rectangle.scm
(load "3-rectangle-represent.scm")
(load "2-segment-selector.scm")
(define (length-of-rectangle r)
(let ((length (length-1-rectangle r)))
(let ((start (start-segment length))
(end (end-segment length)))
(- (x-point end)
(x-po... | null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/3-length-and-width-of-rectangle.scm | scheme | 3-length-and-width-of-rectangle.scm |
(load "3-rectangle-represent.scm")
(load "2-segment-selector.scm")
(define (length-of-rectangle r)
(let ((length (length-1-rectangle r)))
(let ((start (start-segment length))
(end (end-segment length)))
(- (x-point end)
(x-point start)))))
(define (width-of-rectan... |
578a9f74dc761bc83c01c12a2a247a09db31c1a842cae180e03fdccb2ac747c8 | camlspotter/ocamloscope.2 | t4_module_coerce.ml | module M = struct
type t = int
let x = 1 (* 0 : shadowed *)
1
2 : shadowed
3
4
end
| null | https://raw.githubusercontent.com/camlspotter/ocamloscope.2/49b5977a283cdd373021d41cb3620222351a2efe/tests/t4_module_coerce.ml | ocaml | 0 : shadowed | module M = struct
type t = int
1
2 : shadowed
3
4
end
|
d939270a436c1b60d2aa295a358e94a37f718c920565698e83efe7269208a9f9 | OCamlPro/drom | project.mli | (**************************************************************************)
(* *)
Copyright 2020 OCamlPro & Origin Labs
(* *)
(* All rights ... | null | https://raw.githubusercontent.com/OCamlPro/drom/dbbb5f9225df65c589e6f307ac28be4c408b9cae/src/drom_lib/project.mli | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2020 OCamlPro & Origin Labs
GNU Lesser General Public License version 2.1 , with the special
val lookup : unit -> (string * string) option
val find : ?display:bool -> unit -> (Types.project * string) option
val get : unit -> Types.project * string
val of_file ... |
585a9d3dca3f990068fec44deeb53ade1c5e73b90ccb5f20e693173d6d4bae74 | Relph1119/sicp-solutions-manual | p1-9-plus-1.scm | (load "src/practices/ch01/p1-9-inc.scm")
(load "src/practices/ch01/p1-9-dec.scm")
(define (plus a b)
(if (= a 0)
b
(inc (plus (dec a) b)))) | null | https://raw.githubusercontent.com/Relph1119/sicp-solutions-manual/f2ff309a6c898376209c198030c70d6adfac1fc1/src/practices/ch01/p1-9-plus-1.scm | scheme | (load "src/practices/ch01/p1-9-inc.scm")
(load "src/practices/ch01/p1-9-dec.scm")
(define (plus a b)
(if (= a 0)
b
(inc (plus (dec a) b)))) | |
14f5dc16aaa8d70584d919c5e9fa94118b48bf600ef702d26b20964b51c03b73 | lisp/de.setf.xml | namespace.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*-
(in-package :xml-query-data-model)
(setq xml-query-data-model:*namespace*
(xml-query-data-model:defnamespace "#"
(:use)
(:ni... | null | https://raw.githubusercontent.com/lisp/de.setf.xml/827681c969342096c3b95735d84b447befa69fa6/namespaces/www-ksl-stanford-edu/projects/DAML/UNSPSC-daml/namespace.lisp | lisp | Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*-
(xqdm:find-namespace "#" :if-does-not-exist :load) |
(in-package :xml-query-data-model)
(setq xml-query-data-model:*namespace*
(xml-query-data-model:defnamespace "#"
(:use)
(:nicknames)
(:export)
(:docu... |
477bf3acbf7b976482afd7059477b774a153e74c9507ae3c5e59a97d19a9f0c1 | melange-re/melange | caml_parser.mli | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/melange-re/melange/13edf6108d884e64cd510bce077ef2ce73de6a97/jscomp/runtime/caml_parser.mli | ocaml | *
Parsing.parser_input
parser_output | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... |
a02a9c03f3311be62db38b5348cd4807105452a3a3d8a9f413f799ce60857141 | dgtized/shimmers | memory.cljc | (ns shimmers.automata.memory
(:require [shimmers.math.probability :as p]))
(defrecord Allocation [id base size])
(defn overlaps? [allocations position]
(some (fn [{:keys [base size] :as alloc}]
(when (and (<= base position)
(< position (+ base size)))
alloc))
all... | null | https://raw.githubusercontent.com/dgtized/shimmers/f096c20d7ebcb9796c7830efcd7e3f24767a46db/src/shimmers/automata/memory.cljc | clojure | allocation failed
add concept of allocation chunk ordering?
throw a dart and scan forward for next free
scan for largest free space? | (ns shimmers.automata.memory
(:require [shimmers.math.probability :as p]))
(defrecord Allocation [id base size])
(defn overlaps? [allocations position]
(some (fn [{:keys [base size] :as alloc}]
(when (and (<= base position)
(< position (+ base size)))
alloc))
all... |
b067a196250ab6e7efd0ad07da1699c791b331d0a9b56a23e7292663ea0562af | processone/tsung | ts_client_proxy_sup.erl | This code was developed by IDEALX ( / ) and
%%% contributors (their names can be found in the CONTRIBUTORS file).
Copyright ( C ) 2000 - 2001 IDEALX
%%%
%%% This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free So... | null | https://raw.githubusercontent.com/processone/tsung/b0ed22981b534ee3becefb2124a6e168c664d434/src/tsung_recorder/ts_client_proxy_sup.erl | erlang | contributors (their names can be found in the CONTRIBUTORS file).
This program is free software; you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANT... | This code was developed by IDEALX ( / ) and
Copyright ( C ) 2000 - 2001 IDEALX
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
You should have received a copy of the GNU General Public License
Foundation , Inc. , ... |
efa465d01ec90160658e0051c4c9ee3597c9c949c1d586739eaf47365f4633e7 | ghcjs/ghcjs-dom | ChildNode.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.ChildNode
(js_before, before, js_after, after, js_replaceWith, replaceWith,
js_... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/ChildNode.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.ChildNode
(js_before, before, js_after, after, js_replaceWith, replaceWith,
js_remove, remove, ChildNode(..), gTypeChildNode, IsChildNode,
toChildNode)
where
impor... |
3feaa54c5c2f75157d73aa3a11784751b462ca1cc2ec0efbd086361e3ff9ee46 | project-fifo/vmwebadm | list.cljs | (ns server.keys.list
(:use [server.utils :only [clj->js prn-js clj->json transform-keys]])
(:require [server.storage :as storage]
[server.http :as http]))
(defn handle [resource request response account]
(http/ret response
{"keys" (get-in @storage/data [:users account :keys])})) | null | https://raw.githubusercontent.com/project-fifo/vmwebadm/55d83bbc0ac6db8ea1d784c73d91bf4f228fa04a/src/server/keys/list.cljs | clojure | (ns server.keys.list
(:use [server.utils :only [clj->js prn-js clj->json transform-keys]])
(:require [server.storage :as storage]
[server.http :as http]))
(defn handle [resource request response account]
(http/ret response
{"keys" (get-in @storage/data [:users account :keys])})) | |
edfbca19daeeb4c28fff2eee690dd0280a62d68128c6675b7d813fa0f09dd8fa | UnixJunkie/consent | mol_get.ml | extract molecules with given names from a MOL2 , SDF or SMILES file
molecules order is preserved and follows the one of provided names
molecules order is preserved and follows the one of provided names *)
open Printf
open Lbvs_consent
module CLI = Minicli.CLI
module DB = Dokeysto.Db.RW
module Log = Dolog.Lo... | null | https://raw.githubusercontent.com/UnixJunkie/consent/8772eb3ee682e6897d4d743e9e0e3a3a519e08c6/src/mol_get.ml | ocaml | is there a DB already? | extract molecules with given names from a MOL2 , SDF or SMILES file
molecules order is preserved and follows the one of provided names
molecules order is preserved and follows the one of provided names *)
open Printf
open Lbvs_consent
module CLI = Minicli.CLI
module DB = Dokeysto.Db.RW
module Log = Dolog.Lo... |
586b7d8c681f166e3c62cc3ae7bd3072eddd927ed91b99b6f5622b2b1c7281b7 | Lovesan/bike | callbacks.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
Copyright ( C ) 2019 , < lovesan.ru at gmail.com >
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
;;; restriction, inclu... | null | https://raw.githubusercontent.com/Lovesan/bike/3f43b6c503f6fb3d40d02c75b99e8525253a6bb5/src/callbacks.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
furnished to do... |
Copyright ( C ) 2019 , < lovesan.ru at gmail.com >
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KI... |
7eefb0ce2ddb07342653d7a8d0bb3f2d8f287b6ee1b0a2344b6e5150620b260c | skynet-gh/skylobby | download.clj | (ns skylobby.fx.download
(:require
[cljfx.api :as fx]
[cljfx.ext.node :as fx.ext.node]
[clojure.java.io :as io]
[clojure.string :as string]
[skylobby.fs :as fs]
skylobby.fx
[skylobby.fx.ext :refer [ext-table-column-auto-size]]
[skylobby.fx.font-icon :as font-icon]
[skylobby.fx.tool... | null | https://raw.githubusercontent.com/skynet-gh/skylobby/125c3e7542356220f8fc1032f4cc37f189571afe/src/clj/skylobby/fx/download.clj | clojure | (ns skylobby.fx.download
(:require
[cljfx.api :as fx]
[cljfx.ext.node :as fx.ext.node]
[clojure.java.io :as io]
[clojure.string :as string]
[skylobby.fs :as fs]
skylobby.fx
[skylobby.fx.ext :refer [ext-table-column-auto-size]]
[skylobby.fx.font-icon :as font-icon]
[skylobby.fx.tool... | |
ed366ca02c714599d6e936edce7689cdf46f10f07e2d3bae564f629c9f48d54b | lehins/primal | Endianness.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MagicHash #
# LANGUAGE PatternSynonyms #
# LANGUAGE TypeFamilies #
-- |
-- Module : Primal.Memory.Endianness
Copyright : ( c ) 2021
-- License : BSD3
Maintainer : < >
-- Stability : experimental
-... | null | https://raw.githubusercontent.com/lehins/primal/c620bfd4f2a6475f1c12183fbe8138cf29ab1dad/primal-memory/src/Primal/Memory/Endianness.hs | haskell | |
Module : Primal.Memory.Endianness
License : BSD3
Stability : experimental
Portability : non-portable
| Size of the machine word in number of bits.
# COMPLETE ForeignEndian #
# COMPLETE NativeEndian #
# COMPLETE ForeignEndian #
# COMPLETE NativeEndian #
Wrappers or isomorphisms
Foreign byte order | # LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MagicHash #
# LANGUAGE PatternSynonyms #
# LANGUAGE TypeFamilies #
Copyright : ( c ) 2021
Maintainer : < >
module Primal.Memory.Endianness
( ByteOrder(..)
, homeEndian
, foreignEndian
, wordSizeInBit... |
59283befab5050f13cb8555bd0491b8943ad782b4e37cb4104b9db6f4c26c3ea | RKlompUU/FPSheet | SheetAbstr.hs | # LANGUAGE MultiParamTypeClasses , FunctionalDependencies , RankNTypes ,
ConstraintKinds , FlexibleContexts #
ConstraintKinds, FlexibleContexts #-}
module Sheet.Backend.SheetAbstr
( module Sheet.Backend.SheetAbstr
, module Control.Monad
, module Control.Monad.State
, module Data.Func... | null | https://raw.githubusercontent.com/RKlompUU/FPSheet/fb382ea209e81a49e4c2079f8a17a2dbcaba35a7/lib/Sheet/Backend/SheetAbstr.hs | haskell | Annotated text (with for example explicit information about cells that are referred to)
| The Spreadsheet API interface supplies toplevel functions.
| 'getSetCells' returns the list of thus far set cells
If a 'Cell' at the given 'Pos' was already present, it is overwritten.
| 'reval' reevalutes all Cells
| 'impor... | # LANGUAGE MultiParamTypeClasses , FunctionalDependencies , RankNTypes ,
ConstraintKinds , FlexibleContexts #
ConstraintKinds, FlexibleContexts #-}
module Sheet.Backend.SheetAbstr
( module Sheet.Backend.SheetAbstr
, module Control.Monad
, module Control.Monad.State
, module Data.Func... |
0359d9fb18085253260080f655d39b217bb13c364a347e502ac92635e68729a9 | cmiles74/clojure-hl7-messaging-2-parser | message.clj | ;;
;; Functions to make it easier to work with parsed HL7 messages.
;;
(ns com.nervestaple.hl7-parser.message
(:use
[com.nervestaple.hl7-parser.parser]
[com.nervestaple.hl7-parser.util]
[com.nervestaple.hl7-parser.dump]
[com.nervestaple.hl7-parser.message])
(:import
(java.util Date)))
(d... | null | https://raw.githubusercontent.com/cmiles74/clojure-hl7-messaging-2-parser/50e69c2596789c131f5608f4acea8c797217c199/src/com/nervestaple/hl7_parser/message.clj | clojure |
Functions to make it easier to work with parsed HL7 messages.
correct our index and return the field
correct our index and return the field
correct our index and value (put an atom in a collection)
throw an error if we have an illegal HL7 index
create a whole new message
map over our segments looking f... | (ns com.nervestaple.hl7-parser.message
(:use
[com.nervestaple.hl7-parser.parser]
[com.nervestaple.hl7-parser.util]
[com.nervestaple.hl7-parser.dump]
[com.nervestaple.hl7-parser.message])
(:import
(java.util Date)))
(def REGEX-MESSAGE-ID
#"MSH\|[^\|]*\|[^\|]*\|[^\|]*\|[^\|]*\|[^\|]*\|[... |
eae759a363b3cd9e52e32b5a7ba1ef8bec385678977de561689af0b806d999a3 | jafingerhut/clojure-benchmarks | speed07.clj |
;;
April 1 , 2009
;; -04/22e5cbfda1c844d7?rnum=81&_done=%2Fgroup%2Fclojure%2Fbrowse_frm%2Fmonth%2F2009-04%3F#doc_1c065703afa83dd1
(defn check-bounds [x y]
(let [px (float x) py (float y)]
(loop [zx (float 0.0)
zy (float 0.0)
zx2 (float 0.0)
zy2 (float 0.0)
value (in... | null | https://raw.githubusercontent.com/jafingerhut/clojure-benchmarks/474a8a4823727dd371f1baa9809517f9e0b508d4/mandelbrot/other-code/speed07.clj | clojure |
-04/22e5cbfda1c844d7?rnum=81&_done=%2Fgroup%2Fclojure%2Fbrowse_frm%2Fmonth%2F2009-04%3F#doc_1c065703afa83dd1 |
April 1 , 2009
(defn check-bounds [x y]
(let [px (float x) py (float y)]
(loop [zx (float 0.0)
zy (float 0.0)
zx2 (float 0.0)
zy2 (float 0.0)
value (int 0)]
(if (and (< value *max-steps*) (< (+ zx2 zy2) 4.0))
(let [new-zy (float (+ (* 2.0 zx zy) py))... |
8372f64b21da43b32892f8af71d91ef086ef99f5408c8b5eb565c6df78b155e5 | ff-notes/ron | StructSet.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
module StructSet (prop_structSet) where
import RON.Prelude
import qualified Data.ByteString.Lazy.Char8 as BSLC
import Data.Default (def)
import qualified Data.Map.Strict as Map
im... | null | https://raw.githubusercontent.com/ff-notes/ron/0df2b7985996ecc498808ea7247d0d8de471da4f/ron-test/StructSet.hs | haskell | # LANGUAGE OverloadedStrings #
| "r3pl1c4"
create an object
parse newly created object
decode newly created object
apply operations to the object (frame)
plain field
nothing changes
decode object after modification
serialize object after modification | # LANGUAGE FlexibleContexts #
# LANGUAGE NamedFieldPuns #
# LANGUAGE QuasiQuotes #
module StructSet (prop_structSet) where
import RON.Prelude
import qualified Data.ByteString.Lazy.Char8 as BSLC
import Data.Default (def)
import qualified Data.Map.Strict as Map
import Hedgehog (MonadTest,... |
6c8a5bcf6910fb0a65eb4174d18ade600dda8ce01f005abf42b430f07b09c62d | emqx/emqx | emqx_config_logger.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/3587c4c04aaf681f32e80ed2ebe6aef60549bd4c/apps/emqx/src/config/emqx_config_logger.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_config_logger).
-behaviour(emqx_config_handler).
-export([tr_handlers/1, tr_level/... |
68c922835b0043f846e0b90e9aeb4c3feb76d1b299f022e6a3c1767ff2029f0c | pithyless/pathom-demo | api.cljs | (ns demo.connect.spacex.api
(:require [com.wsscode.common.async-cljs :refer [<? go-catch]]
[demo.connect.spacex.util :as util]))
(defn adapt-launch [launch]
(util/adapt-recursive launch "spacex.launch"))
(defn single-fetch-launch [env input]
(let [{:keys [:spacex.launch/id]} input]
(go-catch
... | null | https://raw.githubusercontent.com/pithyless/pathom-demo/7385e292bb88f5823f9b49e0c32a0d46794a5190/src/demo/connect/spacex/api.cljs | clojure | (ns demo.connect.spacex.api
(:require [com.wsscode.common.async-cljs :refer [<? go-catch]]
[demo.connect.spacex.util :as util]))
(defn adapt-launch [launch]
(util/adapt-recursive launch "spacex.launch"))
(defn single-fetch-launch [env input]
(let [{:keys [:spacex.launch/id]} input]
(go-catch
... | |
2c472ec730151882b800cc1bfe42947d498567d1a9c100a8c835590abb48c770 | zwizwa/rai | ai-array-c.rkt | #lang racket/base
(require "tools.rkt"
"type.rkt"
"ai-array.rkt")
(provide (all-defined-out))
(define (c-initializer dims val)
(cond
((null? dims) val)
prevents all - zero initializers to get too large
(else
(c-initializer
(cdr dims)
(format "{~a}"
(c-list
... | null | https://raw.githubusercontent.com/zwizwa/rai/6bcacb7da4172971816027fd88a0209adbd60e30/ai-array-c.rkt | racket | Generate C types and code from generic imperative block processing
program.
TODO: It might be interesting to generate a function with implicit
state for single-shot or inifinite processes (e.g. threads). This
allows defining all state variables as local variables in the loop,
giving more opportunity for optimiza... | #lang racket/base
(require "tools.rkt"
"type.rkt"
"ai-array.rkt")
(provide (all-defined-out))
(define (c-initializer dims val)
(cond
((null? dims) val)
prevents all - zero initializers to get too large
(else
(c-initializer
(cdr dims)
(format "{~a}"
(c-list
... |
a60fd279533a248ba7f3e6c73cba5c48f42b82e2f5d84281dbd026e0a9576c2a | reborg/clojure-essential-reference | 8.clj | = = example data pattern = = ; < 1 >
Wireless MXD CXP ; header : kind & codes
ClassA 34.97 34.5 ; metric : name & measures
ClassT 11.7 11.4 ; metric : name & measures
ClassH 0.7 0.4 ; metric : name & measures
< 2 >
[["Communication services version 2"]
["Radio controlled:" "Enabled"]
["Ack ... | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/Sequences/SequentialCollections/seqandsequence/8.clj | clojure | < 1 >
header : kind & codes
metric : name & measures
metric : name & measures
metric : name & measures |
< 2 >
[["Communication services version 2"]
["Radio controlled:" "Enabled"]
["Ack on transmission" "Enabled" ""]
["TypeA"]
["East" "North" "South" "West"]
["10.0" "11.0" "12.0" "13.0"]
["Wireless" "MXD" ""]
["ClassA" "34.97" "" "34.5"]
["ClassB" "11.7" "11.4"]
["Unreadable line"]
["No... |
6964a0aa215a5896388b6834ac3aeeb710be5673b3d56322d54e83682237e4fb | mbj/stratosphere | EncryptionAtRestProperty.hs | module Stratosphere.MSK.Cluster.EncryptionAtRestProperty (
EncryptionAtRestProperty(..), mkEncryptionAtRestProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/msk/gen/Stratosphere/MSK/Cluster/EncryptionAtRestProperty.hs | haskell | module Stratosphere.MSK.Cluster.EncryptionAtRestProperty (
EncryptionAtRestProperty(..), mkEncryptionAtRestProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.