_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 |
|---|---|---|---|---|---|---|---|---|
8bd7d78b319ce15b78b0ce527f4eaf8e96f2f0513471fa769c8872ba07a6f926 | jcclinton/wow-emulator | player_rcv.erl | This is a World of Warcraft emulator written in erlang , supporting
client 1.12.x
%%
Copyright ( C ) 2014 < jamieclinton.com >
%%
%% 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 Software Found... | null | https://raw.githubusercontent.com/jcclinton/wow-emulator/21bc67bfc9eea131c447c67f7f889ba040dcdd79/src/player_rcv.erl | erlang |
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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU G... | This is a World of Warcraft emulator written in erlang , supporting
client 1.12.x
Copyright ( C ) 2014 < jamieclinton.com >
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... |
ac215c26ae0f084e67ca8d469df00dd324d4a7d59ab44793cdd757605d6ef9f5 | robert-strandh/SICL | setf-generic-function-name.lisp | (cl:in-package #:sicl-clos)
;;; For the specification of this generic function, see
;;; -MOP/setf-generic-function-name.html
(defgeneric (setf generic-function-name) (new-name generic-function))
(defmethod (setf generic-function-name)
(new-name (generic-function generic-function))
(reinitialize-instance generic... | null | https://raw.githubusercontent.com/robert-strandh/SICL/1c93380897fe3c7b7b1ae14d5771971759d065fd/Code/CLOS/setf-generic-function-name.lisp | lisp | For the specification of this generic function, see
-MOP/setf-generic-function-name.html | (cl:in-package #:sicl-clos)
(defgeneric (setf generic-function-name) (new-name generic-function))
(defmethod (setf generic-function-name)
(new-name (generic-function generic-function))
(reinitialize-instance generic-function :name new-name))
|
e139f088bc5bfdc0a07b02d428e6e2f51e402110b12e9528cc11e35a76fddb31 | GlideAngle/flare-timing | Path.hs | # OPTIONS_GHC -fno - warn - partial - type - signatures #
module Flight.Zone.Path (costSegment, distancePointToPoint) where
import Prelude hiding (sum, span)
import Data.List (foldl')
import Data.UnitsOfMeasure ((+:), (-:), u, abs', zero)
import Data.UnitsOfMeasure.Internal (Quantity(..))
import Flight.LatLng (LatLn... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/zone/library/Flight/Zone/Path.hs | haskell | | One way of measuring task distance is going point-to-point through each
control zone's center along the course from start to goal. This is not used
The speed section usually goes from start exit cylinder to goal cylinder or
to goal line. The optimal way to fly this in a zig-zagging course will avoid
zone cente... | # OPTIONS_GHC -fno - warn - partial - type - signatures #
module Flight.Zone.Path (costSegment, distancePointToPoint) where
import Prelude hiding (sum, span)
import Data.List (foldl')
import Data.UnitsOfMeasure ((+:), (-:), u, abs', zero)
import Data.UnitsOfMeasure.Internal (Quantity(..))
import Flight.LatLng (LatLn... |
328bcf9d9f942e011f3218dab7a26172023d367ce9c532378b94241dece11631 | Vaguery/klapaucius | core_test.clj | (ns push.core-test
(:require [push.interpreter.core :as i]
[push.core :as p])
(:use midje.sweet))
(fact "I can produce a generic interpreter"
(class (p/interpreter)) => push.interpreter.definitions.Interpreter )
(fact "I can set input values"
(keys (:bindings (p/interpreter :bindings [7 2 3]))) ... | null | https://raw.githubusercontent.com/Vaguery/klapaucius/17b55eb76feaa520a85d4df93597cccffe6bdba4/test/push/core_test.clj | clojure | a fixture | (ns push.core-test
(:require [push.interpreter.core :as i]
[push.core :as p])
(:use midje.sweet))
(fact "I can produce a generic interpreter"
(class (p/interpreter)) => push.interpreter.definitions.Interpreter )
(fact "I can set input values"
(keys (:bindings (p/interpreter :bindings [7 2 3]))) ... |
2efba7f11594a68203f46836cf8b4a1183f2d80bf78c80083485bc7e55b79458 | Frama-C/Frama-C-snapshot | offsm_value.mli | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/value/values/offsm_value.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
94f0be21f0abe82c3a3b1710f43f790a6b01fbd17d32fc003c633a17da172efb | input-output-hk/plutus-apps | Vesting.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE NamedFieldPuns #-}
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGU... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/8949ce26588166d9961205aa61edd66e4f83d4f5/plutus-use-cases/src/Plutus/Contracts/Vesting.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
$vesting
| Tranche of a vesting scheme.
(POSIX time) after ... | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - ignore - interface - pragmas #
# OPTIONS_GHC -fno - specialise #
module Plutus.Contracts.Vesting (
VestingParams(..),
VestingSc... |
0034abc5519aafc2b5a3df51aa2002226789d4ead3be139e4b6b4b2703525ae6 | anmonteiro/graphql-sdl | graphql_schema_printer.ml | open Easy_format
type break_criterion =
| Never
| IfNeed
| Always
| Always_rec
let easyLabel ?(break = `Auto) ?(space = false) ?(indent = 0) labelTerm term =
let settings =
{ label_break = break
; space_after_label = space
; indent_after_label = indent
; label_style = Some "label"
}
in... | null | https://raw.githubusercontent.com/anmonteiro/graphql-sdl/ac3b90a24928f0a7b1ca7e242004250bba8b8f98/lib/graphql_schema_printer.ml | ocaml | open Easy_format
type break_criterion =
| Never
| IfNeed
| Always
| Always_rec
let easyLabel ?(break = `Auto) ?(space = false) ?(indent = 0) labelTerm term =
let settings =
{ label_break = break
; space_after_label = space
; indent_after_label = indent
; label_style = Some "label"
}
in... | |
474cd8ba44f023574b0d4efe6f62e6fd86a356c1c4fb6425efa06196ba2620ce | input-output-hk/cardano-sl | Types.hs | # LANGUAGE CPP #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE ExplicitNamespaces #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase ... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/wallet/src/Cardano/Wallet/API/V1/Types.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE ExplicitNamespaces #
# LANGUAGE OverloadedStrings #
# LANGUAGE PolyKinds #
# LANGUAGE TemplateHaskell #
The hlint parser fails on the `pattern`... | # LANGUAGE CPP #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
# LANGUAGE StandaloneDeriving #
# LANGUAGE StrictData #
# LANGUAGE NamedFieldPuns #
Needed for the ` Buildable ` , ... |
7f08d991194b1fe0872379aaa3bef3f5e9f9de930662188fb27aa1d2857d8ae7 | samrushing/irken-compiler | t_rx.scm | ;; -*- Mode: Irken -*-
(include "lib/basis.scm")
(include "lib/map.scm")
(include "lib/counter.scm")
(include "lib/dfa/charset.scm")
(include "lib/dfa/rx.scm")
(printf (rx-repr (parse-rx "[A-Z]+")) "\n")
(printf (rx-repr (parse-rx "(ab+)?")) "\n")
(printf (rx-repr (parse-rx "a*bca*")) "\n")
(printf (rx-repr (parse-rx... | null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/dfa/t_rx.scm | scheme | -*- Mode: Irken -*- |
(include "lib/basis.scm")
(include "lib/map.scm")
(include "lib/counter.scm")
(include "lib/dfa/charset.scm")
(include "lib/dfa/rx.scm")
(printf (rx-repr (parse-rx "[A-Z]+")) "\n")
(printf (rx-repr (parse-rx "(ab+)?")) "\n")
(printf (rx-repr (parse-rx "a*bca*")) "\n")
(printf (rx-repr (parse-rx "([abc]~)?[de]+")) "\n... |
efd456c42d078e95f743b7efae1731e872e004a19ed4a4e1f279011151f65c84 | fulcrologic/fulcro | mock_server_remote.cljs | (ns com.fulcrologic.fulcro.networking.mock-server-remote
"Simple adapter code that allows you to use a generic parser 'as if' it were a client remote in CLJS."
(:require
[com.fulcrologic.fulcro.algorithms.tx-processing :as txn]
[taoensso.timbre :as log]
[edn-query-language.core :as eql]
[cljs.core.a... | null | https://raw.githubusercontent.com/fulcrologic/fulcro/71ed79c650222567ac4a566513365a95f12657e3/src/main/com/fulcrologic/fulcro/networking/mock_server_remote.cljs | clojure | (ns com.fulcrologic.fulcro.networking.mock-server-remote
"Simple adapter code that allows you to use a generic parser 'as if' it were a client remote in CLJS."
(:require
[com.fulcrologic.fulcro.algorithms.tx-processing :as txn]
[taoensso.timbre :as log]
[edn-query-language.core :as eql]
[cljs.core.a... | |
16f570e841378709faf239d7bcc8e575e2250356084f87cbb766edda45ef3ef9 | scicloj/tablecloth | project.clj | (defproject scicloj/tablecloth "7.000-beta-27"
:description "Dataset manipulation library built on the top of tech.ml.dataset."
:url ""
:license {:name "The MIT Licence"
:url ""}
:plugins [[lein-tools-deps "0.4.5"]]
:middleware [lein-tools-deps.plugin/resolve-dependencies-with-deps-edn]
:lein-to... | null | https://raw.githubusercontent.com/scicloj/tablecloth/1e9c8d88c46cdf4492f8fd0e219b4f6af94886a9/project.clj | clojure | (defproject scicloj/tablecloth "7.000-beta-27"
:description "Dataset manipulation library built on the top of tech.ml.dataset."
:url ""
:license {:name "The MIT Licence"
:url ""}
:plugins [[lein-tools-deps "0.4.5"]]
:middleware [lein-tools-deps.plugin/resolve-dependencies-with-deps-edn]
:lein-to... | |
ad109118774f672f0bc4f67eff8d902c4c8708d80546b2139f88c3a0bd487c59 | inhabitedtype/ocaml-aws | describeMaintenanceWindowExecutions.mli | open Types
type input = DescribeMaintenanceWindowExecutionsRequest.t
type output = DescribeMaintenanceWindowExecutionsResult.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/3bc554af7ae7ef9e2dcea44a1b72c9e687435fa9/libraries/ssm/lib/describeMaintenanceWindowExecutions.mli | ocaml | open Types
type input = DescribeMaintenanceWindowExecutionsRequest.t
type output = DescribeMaintenanceWindowExecutionsResult.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| |
353fba1fc8229b712fc58222f05681388f6f1b971ec01e306e16de013f2312d8 | papers-we-love/seattle | slides.rkt | #lang slideshow
(slide
#:title "Papers We Love 2017"
(para #:align 'center "The Styx Architecture for Distributed Systems")
(para #:align 'center "Rob Pike and Dennis M. Ritchie, 1999"))
(slide
#:title "Definitions"
(item "Plan 9 (from Bell Labs)")
(subitem "a distributed operating system")
(item "9P")
... | null | https://raw.githubusercontent.com/papers-we-love/seattle/9b5e847058c96292e377f763ba4cf9740e26de75/styx-architecture/slides.rkt | racket | (item "Mail reader!") | #lang slideshow
(slide
#:title "Papers We Love 2017"
(para #:align 'center "The Styx Architecture for Distributed Systems")
(para #:align 'center "Rob Pike and Dennis M. Ritchie, 1999"))
(slide
#:title "Definitions"
(item "Plan 9 (from Bell Labs)")
(subitem "a distributed operating system")
(item "9P")
... |
39d3c5d75d25d36395a4e998e0609d1691b65c5b23af7ead36f5f778ea46dfc7 | FlowerWrong/mblog | lib_misc.erl | %% ---
Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
%% Copyrights apply to this code. It may not be used to create training material,
%% courses, books, articles, and the like. Contact us if you are in doubt.
%% We make no guarantees that this code is fit for... | null | https://raw.githubusercontent.com/FlowerWrong/mblog/3233ede938d2019a7b57391405197ac19c805b27/categories/erlang/demo/jaerlang2_code/lib_misc.erl | erlang | ---
Copyrights apply to this code. It may not be used to create training material,
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
---
commonly used routines
is_prefix(A, B) -> bool()
... | Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
-module(lib_misc).
-export([consult/1,
dump/2,
first/1,
for/3,
is_prefix/2,
deliberate_error/1,
deliberate_error1/1,
duplicates/1,
downcase_char/1,
downcase_str/1,
extract_attribute/2,
eval_fi... |
d689f554a9237808b52ae621d0265b70ff5d04d19871d40215080a5de6fda866 | cocreature/lrucaching | IO.hs | |
Module : Data . LruCache . IO
Copyright : ( c ) , 2016
( c ) , 2015
License : :
Convenience module for the common case of caching results of IO actions .
See ' Data . LruCache . IO.Finalizer ' if you want to run finalizers
automatically when cache entries are evic... | null | https://raw.githubusercontent.com/cocreature/lrucaching/b722777185d9df6145c8efc6ddc6057983dec5db/src/Data/LruCache/IO.hs | haskell | | Return the cached result of the action or, in the case of a cache
miss, execute the action and insert it in the cache.
| Using a stripe of multiple handles can improve the performance in
the case of concurrent accesses since several handles can be
accessed in parallel.
| Create a new 'StripedHandle' with the gi... | |
Module : Data . LruCache . IO
Copyright : ( c ) , 2016
( c ) , 2015
License : :
Convenience module for the common case of caching results of IO actions .
See ' Data . LruCache . IO.Finalizer ' if you want to run finalizers
automatically when cache entries are evic... |
f0cfd0c66a944cbc02b992bac1c475b2a0af9f1a1fd78db64fdd6906e8108cd2 | bef/poc-apps | ast_ami_sup.erl | %%%
%%% This library 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 2.1 of the License , or ( at your option ) any later version .
%%%
%%% This library is distributed in the hope th... | null | https://raw.githubusercontent.com/bef/poc-apps/754c308f0f170a3dd766f828fff7081122867f8b/lib/erlast/lib/ast_man/src/ast_ami_sup.erl | erlang |
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU... | License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA
Author : < >
Created : ... |
4ce77667b1221572355174ece6b17b97c49db1cf120eff7fcca36bdd54ba6ecb | pfdietz/ansi-test | tan.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Mon Feb 9 20:55:40 2004
Contains : Tests of
(deftest tan.1
(loop for i from -1000 to 1000
for rlist = (multiple-value-list (tan i))
for y = (car rlist)
always (and (null (cdr rlist))
(or (rationalp y) (typep y 's... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/numbers/tan.lsp | lisp | -*- Mode: Lisp -*-
More accuracy tests here
Error tests | Author :
Created : Mon Feb 9 20:55:40 2004
Contains : Tests of
(deftest tan.1
(loop for i from -1000 to 1000
for rlist = (multiple-value-list (tan i))
for y = (car rlist)
always (and (null (cdr rlist))
(or (rationalp y) (typep y 'single-float))))
t)
(d... |
2017fdbf5f7bed858270917c922eb66232463bb30617cc37f12e41dbb5b61822 | gildor478/ounit | oUnitPlugin.ml | (**************************************************************************)
The OUnit library
(* *)
Copyright ( C ) 2002 - 2008 Maas - Maarten Zeeman .
Copyright... | null | https://raw.githubusercontent.com/gildor478/ounit/faf4936b17507406c7592186dcaa3f25c6fc138a/src/lib/ounit2/advanced/oUnitPlugin.ml | ocaml | ************************************************************************
Permission is hereby grante... | The OUnit library
Copyright ( C ) 2002 - 2008 Maas - Maarten Zeeman .
Copyright ( C ) 2010 OCamlCore SARL
Copyright ( C ) 2013
The package OUnit is cop... |
5a9d148131bcc44446d00579a7d8470bfb40914106eb958f54fa467a0eb17d6f | kupl/LearnML | original.ml | type nat = ZERO | SUCC of nat
let rec natadd (n1 : nat) (n2 : nat) : nat =
match n1 with ZERO -> n2 | SUCC nat -> natadd nat (SUCC n2)
let rec natmul (n1 : nat) (n2 : nat) : nat =
match n1 with
| ZERO -> ZERO
| SUCC nat -> if nat = ZERO then n2 else natmul nat (natadd n2 n2)
| null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/nat/sub6/original.ml | ocaml | type nat = ZERO | SUCC of nat
let rec natadd (n1 : nat) (n2 : nat) : nat =
match n1 with ZERO -> n2 | SUCC nat -> natadd nat (SUCC n2)
let rec natmul (n1 : nat) (n2 : nat) : nat =
match n1 with
| ZERO -> ZERO
| SUCC nat -> if nat = ZERO then n2 else natmul nat (natadd n2 n2)
| |
8cf1b241fd75234dd4e5c765805e2c111601d2ac1b1dfb6a8fe09656b6672cef | tweag/haskell-training | Basics.hs | # LANGUAGE InstanceSigs #
module Basics where
-- QuickCheck
import Test.QuickCheck
x :: String
x = "hello"
f :: Bool -> Bool
f x = x && x
data Person = MkPerson
{ name :: String
, age :: Int
}
personDetails :: Person -> String
personDetails (MkPerson name age) = name ++ " is " ++ show age ++ " years old"
... | null | https://raw.githubusercontent.com/tweag/haskell-training/89d930f7854075d692dfb127d2c54e953dbf1519/src/Basics.hs | haskell | QuickCheck
| Perimeter of a shape
| # LANGUAGE InstanceSigs #
module Basics where
import Test.QuickCheck
x :: String
x = "hello"
f :: Bool -> Bool
f x = x && x
data Person = MkPerson
{ name :: String
, age :: Int
}
personDetails :: Person -> String
personDetails (MkPerson name age) = name ++ " is " ++ show age ++ " years old"
data Person1 =... |
8a98807da9f3a31f8fe10742b4a11ad78cf7ed5e41b704d85b8f5722385d6f82 | mmottl/gsl-ocaml | interp.mli | gsl - ocaml - OCaml interface to GSL
Copyright ( © ) 2002 - 2012 - Olivier Andrieu
Distributed under the terms of the GPL version 3
(** Interpolation *)
type t
type accel
type interp_type =
| LINEAR
| POLYNOMIAL
| CSPLINE
| CSPLINE_PERIODIC
| AKIMA
| A... | null | https://raw.githubusercontent.com/mmottl/gsl-ocaml/76f8d93cccc1f23084f4a33d3e0a8f1289450580/src/interp.mli | ocaml | * Interpolation | gsl - ocaml - OCaml interface to GSL
Copyright ( © ) 2002 - 2012 - Olivier Andrieu
Distributed under the terms of the GPL version 3
type t
type accel
type interp_type =
| LINEAR
| POLYNOMIAL
| CSPLINE
| CSPLINE_PERIODIC
| AKIMA
| AKIMA_PERIODIC
val ma... |
8fa07a0ffc13b14aa58720dc1d8602b1f37d061e8773ade635d08e6ef927d662 | sjl/caves | core.clj | (ns caves.world.core
(:use [caves.coords :only [neighbors radial-distance]]))
; Constants -------------------------------------------------------------------
(def world-size [120 50])
; Data structures -------------------------------------------------------------
(defrecord World [tiles entities])
(defrecord Tile ... | null | https://raw.githubusercontent.com/sjl/caves/d39ee73eb5c54877d9706b16193b6cb044b2aaf6/src/caves/world/core.clj | clojure | Constants -------------------------------------------------------------------
Data structures -------------------------------------------------------------
Convenience functions -------------------------------------------------------
Querying a world ------------------------------------------------------------ | (ns caves.world.core
(:use [caves.coords :only [neighbors radial-distance]]))
(def world-size [120 50])
(defrecord World [tiles entities])
(defrecord Tile [kind glyph color])
(def tiles
{:floor (->Tile :floor "." :white)
:wall (->Tile :wall "#" :white)
:up (->Tile :up "<" :white)
:down (->Tile... |
1eb56577839570b240efa0e2ca9f8ad1c4c59b20f10e0ca15df6cec33af27f9c | omelkonian/AlgoRhythm | Music.hs | module Music
( module Music.Constants
, module Music.Operators
, module Music.Transformations
, module Music.Types
, module Music.Utilities
) where
import Music.Constants
import Music.Operators
import Music.Transformations
import Music.Types
import Music.Utilities
| null | https://raw.githubusercontent.com/omelkonian/AlgoRhythm/fdc1ccbae0b3d8a7635b24d37716123aba2d6c11/AlgoRhythm/src/Music.hs | haskell | module Music
( module Music.Constants
, module Music.Operators
, module Music.Transformations
, module Music.Types
, module Music.Utilities
) where
import Music.Constants
import Music.Operators
import Music.Transformations
import Music.Types
import Music.Utilities
| |
e55cb5f22207bcc9d327d48312347c409f792399eb4b03e13c8d777b15b05b61 | sinistersnare/aams | aceskt-star.rkt | #lang racket
(require (only-in racket/hash hash-union))
; An aCESKt* machine!
implements a k - CFA - like machine . defined by the AAM paper
; This is a k-cfa, so this to the k you want.
; is it really that easy? Seems like `k` is only used in the `tick` function.
; nice!
(define k-value 0)
; make a state of the ... | null | https://raw.githubusercontent.com/sinistersnare/aams/367b43f4241f3cbfc5907970693157f0487cdd40/src/racket/basic_machines/aceskt-star.rkt | racket | An aCESKt* machine!
This is a k-cfa, so this to the k you want.
is it really that easy? Seems like `k` is only used in the `tick` function.
nice!
make a state of the machine.
a timestamp is a label and a contour
an address is a (label or variable) and a contour
like `take` in the stdlib, but will return the
ta... | #lang racket
(require (only-in racket/hash hash-union))
implements a k - CFA - like machine . defined by the AAM paper
(define k-value 0)
(define (state expr env env-store k-store k-addr timestamp)
(list 'state expr env env-store k-store k-addr timestamp))
(define (timestamp label contour)
(list 'timestamp l... |
41a3139501259911a58a101d393950e0bd2acb10dfd04b3dda8afb65373e2723 | motoshira/lib_for_competitive_programming | uf-closure.lisp | ;;;
;;; Beginning of inserted contents
;;;
(defmacro make-uf (size)
(let ((parents (gensym)))
`(let ((,parents (make-array ,size :element-type 'fixnum :adjustable nil :initial-element -1)))
(labels ((%find (x)
(declare (fixnum x))
(the fixnum
(if... | null | https://raw.githubusercontent.com/motoshira/lib_for_competitive_programming/33fd81102f5d1067904e0aca9b3f9ba3c3c2ca73/experimental/uf-closure.lisp | lisp |
Beginning of inserted contents
End of inserted contents
|
(defmacro make-uf (size)
(let ((parents (gensym)))
`(let ((,parents (make-array ,size :element-type 'fixnum :adjustable nil :initial-element -1)))
(labels ((%find (x)
(declare (fixnum x))
(the fixnum
(if (minusp (aref ,parents x))
... |
a3938a5aa681f1ddc3c71ccb4d187a1310c9bb955e68b3aa58271e5d4f72d073 | hakaru-dev/hakaru | Datum.hs | # LANGUAGE CPP
, , PolyKinds
, GADTs
, TypeOperators
, TypeFamilies
, ExistentialQuantification
#
, DataKinds
, PolyKinds
, GADTs
, TypeOperators
, TypeFamilies
, Existential... | null | https://raw.githubusercontent.com/hakaru-dev/hakaru/94157c89ea136c3b654a85cce51f19351245a490/haskell/Language/Hakaru/Syntax/Datum.hs | haskell | # OPTIONS_GHC -Wall -fwarn-tabs #
--------------------------------------------------------------
2016.05.24
|
License : BSD3
Maintainer :
Stability : experimental
At present we only support regular-recursive polynomial data
types. Reduction of case a... | # LANGUAGE CPP
, , PolyKinds
, GADTs
, TypeOperators
, TypeFamilies
, ExistentialQuantification
#
, DataKinds
, PolyKinds
, GADTs
, TypeOperators
, TypeFamilies
, Existential... |
aff5227a4b7c13384bf919eb68531808bee2cde7ad3300d2561414fff6d49d98 | lambdaisland/harvest | jdbc.clj | (ns scratch.jdbc)
(ns lambdaisland.harvest.jdbc
(:require [clojure.string :as str]
[lambdaisland.harvest :as harvest]
[lambdaisland.harvest.kernel :as hk])
(:import (java.sql DriverManager Statement)))
(defn get-connection [url]
(DriverManager/getConnection url))
(defn sql-ident [s]
(... | null | https://raw.githubusercontent.com/lambdaisland/harvest/17e601ee9718ef2c915e469ed62ea963c43db17e/scratch/jdbc.clj | clojure | (ns scratch.jdbc)
(ns lambdaisland.harvest.jdbc
(:require [clojure.string :as str]
[lambdaisland.harvest :as harvest]
[lambdaisland.harvest.kernel :as hk])
(:import (java.sql DriverManager Statement)))
(defn get-connection [url]
(DriverManager/getConnection url))
(defn sql-ident [s]
(... | |
490378d836399395cffd23ec784ce93f66525734f0e2b1e69e9814435e322baf | cmars/sks-keyserver | sksdump.ml | (***********************************************************************)
sksdump.ml - takes content of SKS keyserver and creates key dump
(* from that *)
(* *)
Copyright ( C ) 2002 , 20... | null | https://raw.githubusercontent.com/cmars/sks-keyserver/d848c4852cb15585525772b6378670f8724a8f39/sksdump.ml | ocaml | *********************************************************************
from that
redistribute it and/or modify it under ... | sksdump.ml - takes content of SKS keyserver and creates key dump
Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 ,
2011 , 2012 , 2013 and Contributors
This file is part of SKS . SKS is free software ; you can
Public License as published b... |
ac3f32552a88d1ba03c12d73de32d82a61b7b07cc8a35cb4c1749be3914af7fc | alavrik/piqi-erlang | piqic_erlang_types.erl | Copyright 2009 , 2010 , 2011 , 2012 , 2013 , 2014
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, ... | null | https://raw.githubusercontent.com/alavrik/piqi-erlang/063ecc4f8fd54543acf01953b0a63b2b7ebf17a9/src/piqic_erlang_types.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2009 , 2010 , 2011 , 2012 , 2013 , 2014
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
generation of -type ... and -record ( ... ) Erlang forms
-module(piqic_erlang_types).
-compile([export_all, nowarn_expor... |
2050f25632f6759a5e9aeb04da9fa512363935d025f01d08c126cd59c59dfd7b | stchang/macrotypes | lin2-tests.rkt | #lang s-exp turnstile/examples/linear/lin2
(require rackunit/turnstile)
;; very basic tests -------------------------------------------------
1 ) unused : err
(typecheck-fail (λ ([x : Bool]) #t) #:with-msg "linear vars unused: \\(x\\)")
2 ) used once : ok
(check-type (λ ([x : Bool]) x) : (→ Bool Bool))
3 ) us... | null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-test/tests/turnstile/linear/lin2-tests.rkt | racket | very basic tests -------------------------------------------------
other examples from atapl ----------------------------------------
but actual example from book demonstrates subtlety of allowing mixed
restricted/unrestricted vals:
- unrestricted data structures may not contain restricted vals
function should no... | #lang s-exp turnstile/examples/linear/lin2
(require rackunit/turnstile)
1 ) unused : err
(typecheck-fail (λ ([x : Bool]) #t) #:with-msg "linear vars unused: \\(x\\)")
2 ) used once : ok
(check-type (λ ([x : Bool]) x) : (→ Bool Bool))
3 ) used twice : err
(typecheck-fail (λ ([x : Bool]) (pair x x))
#:with-msg... |
d926e37436aacf84787777f176214278c147320bf228a66cd0fbd9b89dcb7d24 | tisnik/clojure-examples | dependencies.clj | {[clojure-complete "0.2.5" :exclusions [[org.clojure/clojure]]] nil,
[nrepl "0.7.0" :exclusions [[org.clojure/clojure]]] nil,
[org.clojure/clojure "1.10.1"]
{[org.clojure/core.specs.alpha "0.2.44"] nil,
[org.clojure/spec.alpha "0.2.176"] nil},
[rhizome "0.2.9"] nil,
[venantius/ultra "0.6.0"]
{[grimradical/clj-s... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/33a53a85eb1d381eeb2697d76e6ed2fc06eee6ec/rhizome-1/doc/dependencies.clj | clojure | {[clojure-complete "0.2.5" :exclusions [[org.clojure/clojure]]] nil,
[nrepl "0.7.0" :exclusions [[org.clojure/clojure]]] nil,
[org.clojure/clojure "1.10.1"]
{[org.clojure/core.specs.alpha "0.2.44"] nil,
[org.clojure/spec.alpha "0.2.176"] nil},
[rhizome "0.2.9"] nil,
[venantius/ultra "0.6.0"]
{[grimradical/clj-s... | |
328a7e06f9e107aba069177f181792cf3c4092cc5b072ef930fe8bd30dd40b1d | greggigon/my-personal-kanban-server | core.clj | (ns mpk.core
(:gen-class)
(:use ring.middleware.params
ring.util.response
ring.adapter.jetty
ring.middleware.session
mpk.configuration)
(:require [mpk.action-handlers :as handlers :refer :all]
[clj-time.core :as t]
[clj-time.format :as f]))
(def mpk-formatt... | null | https://raw.githubusercontent.com/greggigon/my-personal-kanban-server/1e6b8f293ca4541d4defff57b492152b4a9f6f0f/src/mpk/core.clj | clojure | (ns mpk.core
(:gen-class)
(:use ring.middleware.params
ring.util.response
ring.adapter.jetty
ring.middleware.session
mpk.configuration)
(:require [mpk.action-handlers :as handlers :refer :all]
[clj-time.core :as t]
[clj-time.format :as f]))
(def mpk-formatt... | |
ec69088f3637cfafab91e4aa33c307bcda42662aa65b5e01ec7ac7fea68d450c | replikativ/datahike-server | core.clj | (ns datahike-server.core
(:gen-class)
(:require [mount.core :as mount]
[taoensso.timbre :as log]
[datahike-server.config :as config]
[datahike-server.database]
[datahike-server.server]))
(defn -main [& args]
(mount/start)
(log/info "Successfully loaded configurat... | null | https://raw.githubusercontent.com/replikativ/datahike-server/ec87469832e017bfaff98e86046de85f8e365817/src/clj/datahike_server/core.clj | clojure | (ns datahike-server.core
(:gen-class)
(:require [mount.core :as mount]
[taoensso.timbre :as log]
[datahike-server.config :as config]
[datahike-server.database]
[datahike-server.server]))
(defn -main [& args]
(mount/start)
(log/info "Successfully loaded configurat... | |
b3ce37ee22b6d581a7f7d0b0bbdbb7337ec7ea64f1499ee675b0729989e30f8a | willijar/LENS | signals.lisp | ;; Signals and Listeners
Copyright ( C ) 2013 Dr.
Author : Dr. < >
;; Keywords:
;;; Copying:
;; This file is part of LENS
;; 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 Software Foundation , either ... | null | https://raw.githubusercontent.com/willijar/LENS/646bc4ca5d4add3fa7e0728f14128e96240a9f36/core/signals.lisp | lisp | Signals and Listeners
Keywords:
Copying:
This file is part of LENS
This program is free software: you can redistribute it and/or
License, or (at your option) any later version.
LENS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
... | Copyright ( C ) 2013 Dr.
Author : Dr. < >
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation , either version 3 of the
You should have received a copy of the GNU General Public License
(in-package :lens)
(defconstant +SIGNAL-CACHE-SIZE+ 6... |
6195abaeaa87adc38cdea12599b881e896fb37d66d8d0295ebc80f7ad77fd230 | ninenines/cowboy | cowboy_sup.erl | Copyright ( c ) 2011 - 2017 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC... | null | https://raw.githubusercontent.com/ninenines/cowboy/8795233c57f1f472781a22ffbf186ce38cc5b049/src/cowboy_sup.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2011 - 2017 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(cowboy_sup).
-behaviour(supervisor).
-export... |
489ce43ed8942214f84f6a609853b5d1172446d7bf89f6256a6c8414d5e306cd | racket/macro-debugger | debug.rkt | #lang racket/base
(require racket/pretty
racket/class
racket/class/iop
"interfaces.rkt"
macro-debugger/view/debug-format
"view.rkt")
(provide debug-file)
(define (make-stepper)
(define director (new macro-stepper-director%))
(send director new-stepper))
(define (debug-... | null | https://raw.githubusercontent.com/racket/macro-debugger/d4e2325e6d8eced81badf315048ff54f515110d5/macro-debugger/macro-debugger/view/debug.rkt | racket | #lang racket/base
(require racket/pretty
racket/class
racket/class/iop
"interfaces.rkt"
macro-debugger/view/debug-format
"view.rkt")
(provide debug-file)
(define (make-stepper)
(define director (new macro-stepper-director%))
(send director new-stepper))
(define (debug-... | |
d9e7da07e1bb7526bdde27fe71af3639ba0e7c1d9ffa403c05bd404a29948397 | slegrand45/mysql_protocol | bench_config.ml | let host = " 192.168.1.20 "
let addr = Unix.inet_addr_of_string host
let port = 3306
let addr = Unix.inet_addr_of_string host
let port = 3306 *)
let sockaddr = "/usr/jails/mariadb/var/run/mysql/mysql.sock"
let db_user = "user_ocaml_ocmp"
let db_password = "ocmp"
let db_name = "test_ocaml_ocmp_utf8"
| null | https://raw.githubusercontent.com/slegrand45/mysql_protocol/92905707c72b49bb0c22467e6cf1d862336c3e48/benchmarks/bench_config.ml | ocaml | let host = " 192.168.1.20 "
let addr = Unix.inet_addr_of_string host
let port = 3306
let addr = Unix.inet_addr_of_string host
let port = 3306 *)
let sockaddr = "/usr/jails/mariadb/var/run/mysql/mysql.sock"
let db_user = "user_ocaml_ocmp"
let db_password = "ocmp"
let db_name = "test_ocaml_ocmp_utf8"
| |
1041f9f7234a2d466807f6c000d8887469c4ab72262ec6fca29f59db040509c3 | tmfg/mmtis-national-access-point | project.clj | (defproject napote-dashboard "0.1-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.9.0"]
[org.clojure/clojurescript "1.9.946"]
[http-kit "2.2.0"]
[compojure "1.6.0"]
[cheshire "5.8.0"]
[amazonica "0.3.118"]
[reagent... | null | https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/a86cc890ffa1fe4f773083be5d2556e87a93d975/tools/dashboard/project.clj | clojure | (defproject napote-dashboard "0.1-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.9.0"]
[org.clojure/clojurescript "1.9.946"]
[http-kit "2.2.0"]
[compojure "1.6.0"]
[cheshire "5.8.0"]
[amazonica "0.3.118"]
[reagent... | |
ac45107a47ea068b33d07f90b68b808ad4aa22f13f78021a339eec84315dbd0e | fmi-lab/fp-elective-2017 | sum-divisors.scm | (require rackunit rackunit/text-ui)
(define (sum-divisors n)
(define (helper counter result)
(if (= counter 0)
result
(helper (- counter 1)
(if (= (remainder n counter) 0)
(+ result counter)
result))))
(helper n 0))
(define sum-divisors-t... | null | https://raw.githubusercontent.com/fmi-lab/fp-elective-2017/e88d5c0319b6d03c0ecd8a12a2856fb1bf5dcbf3/exercises/02/sum-divisors.scm | scheme | 1 2 3 4 6 12
1 3 5 15
1 2 3 6 7 14 21 42
1 5 13103 65515 | (require rackunit rackunit/text-ui)
(define (sum-divisors n)
(define (helper counter result)
(if (= counter 0)
result
(helper (- counter 1)
(if (= (remainder n counter) 0)
(+ result counter)
result))))
(helper n 0))
(define sum-divisors-t... |
b918b961900ed8a54ef10abe60f90d1cd72445baf1ca82636a6b8d7661818fe1 | codingteam/Hyperspace | network.clj | (ns hyperspace.test.client.network
(:import [java.io BufferedReader
InputStreamReader
PrintWriter])
(:use [clojure.test]
[hyperspace.client.network])
(:require [clojure.contrib.server-socket :as socket]
[clojure.data.json :as json]
[clojure.j... | null | https://raw.githubusercontent.com/codingteam/Hyperspace/b04ec588968f3a9c94b2992010a3a737afbe7eb5/client/src/test/clojure/hyperspace/test/client/network.clj | clojure | (ns hyperspace.test.client.network
(:import [java.io BufferedReader
InputStreamReader
PrintWriter])
(:use [clojure.test]
[hyperspace.client.network])
(:require [clojure.contrib.server-socket :as socket]
[clojure.data.json :as json]
[clojure.j... | |
d44c770113ee88cc997ff74cafd7d9b50ca3f7ae9d21f9200a7dcb24d0015ee9 | fragnix/fragnix | Network.Wai.Middleware.Gzip.hs | {-# LANGUAGE Haskell2010, OverloadedStrings #-}
# LINE 1 " Network / Wai / Middleware / Gzip.hs " #
{-# LANGUAGE Rank2Types, ScopedTypeVariables #-}
---------------------------------------------------------
-- |
Module : Network . Wai . Middleware .
Copyright :
-- License : BSD3
--
Maintaine... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/application/Network.Wai.Middleware.Gzip.hs | haskell | # LANGUAGE Haskell2010, OverloadedStrings #
# LANGUAGE Rank2Types, ScopedTypeVariables #
-------------------------------------------------------
|
License : BSD3
Stability : Unstable
Portability : portable
Automatic gzip compression of responses.
-----------------------------------------------------... | # LINE 1 " Network / Wai / Middleware / Gzip.hs " #
Module : Network . Wai . Middleware .
Copyright :
Maintainer : < >
module Network.Wai.Middleware.Gzip
( gzip
, GzipSettings
, gzipFiles
, GzipFiles (..)
, gzipCheckMime
, def
, defaultCheckMime
) where
impo... |
27a5c648c923264e933ae214b099f5b09f3de3ea2edfe92d698692d3c32fea1f | penpot/penpot | tmp.clj | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.storage.tmp
"Temporal files service all created files will be tried to clean after
1 hour after cr... | null | https://raw.githubusercontent.com/penpot/penpot/1c2a4621246e2a890ba9bae8176c32a6937c7c4d/backend/src/app/storage/tmp.clj | clojure |
Copyright (c) KALEIDOS INC
API
| This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.storage.tmp
"Temporal files service all created files will be tried to clean after
1 hour after creation. This is a best effort, if... |
eb4bd0bd78958ad893145f539c497cb0336ca19bccbc3c77a987401fb87e64f8 | amatus/foofs | fuse.clj | Copyright ( C ) 2012 < >
;
; foofs 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 option) any later version.
;
; foofs is distributed in the hope that it... | null | https://raw.githubusercontent.com/amatus/foofs/1d3754e72e09e5f395d5ace1b6bf91e4c7293a54/src/clojure/foofs/fuse/fuse.clj | clojure |
foofs is free software: you can redistribute it and/or modify it
(at your option) any later version.
foofs is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License fo... | Copyright ( C ) 2012 < >
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 along
(ns foofs.fuse.fuse
(:use (foofs.fuse jna protocol))
(:import com.sun.jna... |
e3d2f4767fb9d8c96ab728e27fd2c9e70d82ab549d4ccf8169d814993e10c5f1 | NetComposer/nkmedia | nkmedia_kms_callbacks.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2016 . 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... | null | https://raw.githubusercontent.com/NetComposer/nkmedia/24480866a523bfd6490abfe90ea46c6130ffe51f/src/kms_backend/nkmedia_kms_callbacks.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 permissio... | Copyright ( c ) 2016 . 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
@doc Plugin implementig th... |
333f0c64e9617f6b206b02b94714d5ca5f851ee7540a6a5e798d8918061ffb2c | bitc/omegagb | CpuExecution.hs | OmegaGB Copyright 2007 Bit
This program is distributed under the terms of the GNU General Public License
-----------------------------------------------------------------------------
-- |
Module : CpuExecution
Copyright : ( c ) Bit Connor 2007 < >
-- License : GPL
-- Maintainer :
-- Stabi... | null | https://raw.githubusercontent.com/bitc/omegagb/5ab9c3a22f5fc283906b8af53717d81fef96db7f/src/CpuExecution.hs | haskell | ---------------------------------------------------------------------------
|
License : GPL
Maintainer :
Stability : in-progress
OmegaGB
Game Boy Emulator
This module defines an abstract syntax tree CPU execution monad
---------------------------------------------------------------------------
# OP... | OmegaGB Copyright 2007 Bit
This program is distributed under the terms of the GNU General Public License
Module : CpuExecution
Copyright : ( c ) Bit Connor 2007 < >
module CpuExecution where
import Data.Word
import Data.Bits
data M_Register =
M_A |
M_B |
M_C |
M_D |
M_E |
M_F |
... |
ec6abeaf3c8c8bb5935cdbecb430636c1b595e6ce9e6486673057c97fd11c77a | jtdaugherty/dbmigrations | InMemoryStore.hs | module InMemoryStore (inMemoryStore) where
import Data.Text ( Text )
import Data.String.Conversions ( cs )
import Control.Concurrent.MVar
import Database.Schema.Migrations.Migration
import Database.Schema.Migrations.Store
type InMemoryData = [(Text, Migration)]
|Builds simple in - me... | null | https://raw.githubusercontent.com/jtdaugherty/dbmigrations/80336a736ac394a2d38c65661b249b2fae142b64/test/InMemoryStore.hs | haskell | migrations. | module InMemoryStore (inMemoryStore) where
import Data.Text ( Text )
import Data.String.Conversions ( cs )
import Control.Concurrent.MVar
import Database.Schema.Migrations.Migration
import Database.Schema.Migrations.Store
type InMemoryData = [(Text, Migration)]
|Builds simple in - me... |
595a3b3d6aec6f0219df6c74be0a744011c8d91dd17d92a1b4b0c599d9964f11 | Clojure2D/clojure2d-examples | camera.clj | (ns rt4.in-one-weekend.ch08c.camera
(:require [rt4.in-one-weekend.ch08c.ray :as ray]
[fastmath.vector :as v]
[fastmath.core :as m]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(def ^:const ^double aspect-ratio (/ 16.0 9.0))
(defpro... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/in_one_weekend/ch08c/camera.clj | clojure | (ns rt4.in-one-weekend.ch08c.camera
(:require [rt4.in-one-weekend.ch08c.ray :as ray]
[fastmath.vector :as v]
[fastmath.core :as m]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(def ^:const ^double aspect-ratio (/ 16.0 9.0))
(defpro... | |
62939f61ad723dacf428ef3c9b6deaa15adb3729f052f0ff947d0f5c71882720 | jserot/caph | caphmake.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/ * * /
/ * This file is part of the CAPH... | null | https://raw.githubusercontent.com/jserot/caph/2b3b241f0c32aa4fcaf60d4b8529956cca8aa6b1/tools/caphmake.ml | ocaml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/ * * /
/ * This file is part of the CAPH... | |
a6c03039ba5c2c643292379a4040c6e9ed4394238d720e606bdfda756b0685fe | ghc/packages-dph | Vectorised.hs | {-# LANGUAGE ParallelArrays #-}
{-# OPTIONS -fvectorise #-}
module Vectorised (treeReversePA) where
import Data.Array.Parallel
import Data.Array.Parallel.Prelude.Int as I
import Data.Array.Parallel.Prelude.Bool
import qualified Prelude as P
treeReversePA :: PArray Int -> PArray Int
# NOINLINE treeReversePA #
treeRev... | null | https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-examples/examples/smoke/sharing/Reverse/Vectorised.hs | haskell | # LANGUAGE ParallelArrays #
# OPTIONS -fvectorise #
| Reverse the elements in an array using a tree. | module Vectorised (treeReversePA) where
import Data.Array.Parallel
import Data.Array.Parallel.Prelude.Int as I
import Data.Array.Parallel.Prelude.Bool
import qualified Prelude as P
treeReversePA :: PArray Int -> PArray Int
# NOINLINE treeReversePA #
treeReversePA ps
= toPArrayP (treeReverse (fromPArrayP ps))... |
4a63f8a7d6e649f041aec46e2aeb998ac91e277b0d9148d3b44e6fc132c46476 | static-analysis-engineering/codehawk | jCHInstruction.mli | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Copy... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchlib/jCHInstruction.mli | ocaml | jchlib | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Copy... |
bcf4632b78b2e3c287a9d43a95ddf7b06c6d4af07fa3fe0cb01b8cbdd1d46d82 | fumieval/witherable | tests.hs | # LANGUAGE CPP #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Main (main) where
import Control.Arrow (first)
import Control.Monad ((<=<))
import Control.Monad.Trans.State (State, runState, state)
import Data.Hashable (H... | null | https://raw.githubusercontent.com/fumieval/witherable/b2d475a5f9c2dd2c498350b50c20b0170ba32d3a/witherable/tests/tests.hs | haskell | # LANGUAGE DeriveTraversable #
traverse @IntMap is broken
, witherableLaws (Proxy @Wicked)
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-----------------------------------------------------------------------... | # LANGUAGE CPP #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Main (main) where
import Control.Arrow (first)
import Control.Monad ((<=<))
import Control.Monad.Trans.State (State, runState, state)
import Data.Hashable (Hashable)
import Data.Coerce (coerce... |
1e8fe42c851d09f590ff50bfb73c15ffbba80f074b4a842d9cf397480ed89145 | mzp/coq-ruby | g_natsyntax.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/parsing/g_natsyntax.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Nice syntax for naturals. | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : g_natsyntax.mli 1... |
14dd51878dddd79a829d201e7349d3cb7a0efce31d40b36814547fe49d138037 | clj-commons/seesaw | style.clj | Copyright ( c ) , 2011 . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this
; distribution.
; By using this software in any fashion, you are agreeing to be b... | null | https://raw.githubusercontent.com/clj-commons/seesaw/4ca89d0dcdf0557d99d5fa84202b7cc6e2e92263/test/seesaw/test/style.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this
distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remo... | Copyright ( c ) , 2011 . All rights reserved .
(ns seesaw.test.style
(:use seesaw.style
[seesaw.core :only [border-panel label button config text]]
[seesaw.color :only [to-color]])
(:use [lazytest.describe :only (describe it testing)]
[lazytest.expect :only (expect)]))
(describe appl... |
19a3c6d89f181a1d51e2664768e78d981aa2ab46d7c16ffd5a701b9dce29dbea | Perry961002/SICP | exe4.11-new-frame.scm | ;将框架表示为约束的表,每个约束是一个名字-值序对
(define (first-binding frame)
(car frame))
(define (rest-binding frame)
(cdr frame))
(define (add-binding-to-frame! var val frame)
(cons (cons var val frame)))
;因为是序对的表,所以名字和值一定是对应的,添加新框架的话直接添加即可
(define (extend-environment new-frame base-env)
(cons new-frame base-env))
在环境... | null | https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap4/exercise/exe4.11-new-frame.scm | scheme | 将框架表示为约束的表,每个约束是一个名字-值序对
因为是序对的表,所以名字和值一定是对应的,添加新框架的话直接添加即可
设置一个新值
定义一个变量 | (define (first-binding frame)
(car frame))
(define (rest-binding frame)
(cdr frame))
(define (add-binding-to-frame! var val frame)
(cons (cons var val frame)))
(define (extend-environment new-frame base-env)
(cons new-frame base-env))
在环境中查找变量
(define (lookup-variable-value var env)
(define (env... |
cc4132a418d57810ba4eac43d091404fef12210dc964729cedd48ac7b67ada4a | na4zagin3/satyrographos | command_lockdown_save__invalid_opam_response.ml | module StdList = List
open Satyrographos_testlib
open TestLib
open Shexp_process
let files =
Command_lockdown_save__opam.files
let opam_response = {
PrepareBin.list_result = {|***invalid,response,!!!|}
}
let env ~dest_dir:_ ~temp_dir : Satyrographos.Environment.t t =
let open Shexp_process.Infix in
let pkg... | null | https://raw.githubusercontent.com/na4zagin3/satyrographos/9dbccf05138510c977a67c859bbbb48755470c7f/test/testcases/command_lockdown_save__invalid_opam_response.ml | ocaml | module StdList = List
open Satyrographos_testlib
open TestLib
open Shexp_process
let files =
Command_lockdown_save__opam.files
let opam_response = {
PrepareBin.list_result = {|***invalid,response,!!!|}
}
let env ~dest_dir:_ ~temp_dir : Satyrographos.Environment.t t =
let open Shexp_process.Infix in
let pkg... | |
a0d62eb98e5a07e2af1d53a2a807947f03a6c91e4b3bafb3120d85f82509ac93 | haskell-tools/haskell-tools | StandaloneData.hs | # LANGUAGE DeriveDataTypeable ,
DeriveFunctor ,
DeriveFoldable ,
,
DeriveGeneric ,
DeriveLift ,
DeriveAnyClass ,
StandaloneDeriving
#
DeriveFunctor,
DeriveFoldable,
... | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/test/ExtensionOrganizerTest/DerivingsTest/StandaloneData.hs | haskell | * StandaloneDeriving *
* StandaloneDeriving *
* StandaloneDeriving *
* StandaloneDeriving *
* StandaloneDeriving *
* StandaloneDeriving *
* StandaloneDeriving *
* StandaloneDeriving, DeriveDataTypeable *
* StandaloneDeriving, DeriveDataTypeable *
* StandaloneDeriving, DeriveGeneric *
* StandaloneDeriving, DeriveLift *
... | # LANGUAGE DeriveDataTypeable ,
DeriveFunctor ,
DeriveFoldable ,
,
DeriveGeneric ,
DeriveLift ,
DeriveAnyClass ,
StandaloneDeriving
#
DeriveFunctor,
DeriveFoldable,
... |
5b4ce48e8abc800ab3da434ff5dd8cc7eebaa0c878685b6877b3aa7b6916cfa7 | DrearyLisper/aoc-2021 | Day06.hs | module Day06 where
import qualified Data.Map as Map
import qualified Data.List as List
wordsWhen :: (Char -> Bool) -> String -> [String]
wordsWhen p s = case dropWhile p s of
"" -> []
s' -> w : wordsWhen p s''
where (w, s'') = break p s'
pa... | null | https://raw.githubusercontent.com/DrearyLisper/aoc-2021/e6e593750ccdfe920342d0216f7c7efc711b5396/06/Day06.hs | haskell | module Day06 where
import qualified Data.Map as Map
import qualified Data.List as List
wordsWhen :: (Char -> Bool) -> String -> [String]
wordsWhen p s = case dropWhile p s of
"" -> []
s' -> w : wordsWhen p s''
where (w, s'') = break p s'
pa... | |
5c1c9dd902d6b6c6922b6039b13b023df8aef93d227464fac35e43e8d0a94141 | Datomic/day-of-datomic | component_attributes.clj | Copyright ( c ) Cognitect , Inc. All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be... | null | https://raw.githubusercontent.com/Datomic/day-of-datomic/20c02d26fd2a12481903dd5347589456c74f8eeb/tutorial/component_attributes.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) Cognitect , Inc. All rights reserved .
(require
'[datomic.api :as d]
'[datomic.samples.repl :as repl])
(def conn (repl/scratch-conn))
(repl/transact-all conn (repl/resource "day-of-datomic/social-news.edn"))
(let [[story comment-1 comment-2] (repeatedly #(d/tempid :db.part/user))
{:keys... |
aafbd4a4231e61ff3918ece1522c708e2d2d139e83c050ab9afd12fb47df41f4 | kmi/irs | basic.lisp | Mode : Lisp ; Package :
The Open University
(in-package "OCML")
(in-ontology akt-support-ontology2)
;;;Here we introduce a number of definitions, which provide
;;;the basic representational layer to define entities in the ontology.
;;;Here we include basic data types, such
;;;as strings, lists, sets and numbe... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/akt-support-ontology2/basic.lisp | lisp | Package :
Here we introduce a number of definitions, which provide
the basic representational layer to define entities in the ontology.
Here we include basic data types, such
as strings, lists, sets and numbers, as well as basic logical concepts, such
as FUNCTION and RELATION. It also provides equality constructs ... |
The Open University
(in-package "OCML")
(in-ontology akt-support-ontology2)
relation HOLDS , which takes a rel , say ? rel , and a number of args , say ? args
for the set of AKT ontologies is that these become completely self - contained :
(def-relation = (?x ?y)
"True if ?x and ?y do unify"
:lisp-fun #'... |
cd7599599f493be8b6def0ef3ce73ee67eeb9f4a89eefd5a724ca2b2352e863f | melange-re/melange | config2_test.mli |
class type v = object
method hey : int -> int -> int
end [@bs]
class type v2 = object
method hey : int -> int -> int
end [@bs]
type vv =
<
hey : int -> int -> int [@bs]
> Js.t
type vv2 =
<
hey : int -> int -> int [@bs]
> Js.t
val test_v : v Js.t -> int
val test_vv : vv -> int
| null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/config2_test.mli | ocaml |
class type v = object
method hey : int -> int -> int
end [@bs]
class type v2 = object
method hey : int -> int -> int
end [@bs]
type vv =
<
hey : int -> int -> int [@bs]
> Js.t
type vv2 =
<
hey : int -> int -> int [@bs]
> Js.t
val test_v : v Js.t -> int
val test_vv : vv -> int
| |
b03c251ab14fda4b927966bba3e46b59fd87bdd8a661117b45df500a8e9af9fe | McCLIM/McCLIM | tooltips.lisp | Copyright ( C ) 1993 - 2004 by SRI International . All rights reserved .
;;;
Permission granted by SRI for use in McClim under the license .
;;;
$ I d : utils.lisp , v 1.8 2007/07/14 02:14:21 Exp $
;;;
(defpackage #:mcclim-tooltips
(:use #:clim :clim-lisp)
(:export #:*tooltip-color*
#:*toolt... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/47677157d2b12dbcad35f06847221b49fbd1eedb/Extensions/tooltips/tooltips.lisp | lisp |
#:*tooltip-wrap-slop*
#:*tooltip-max-height*
#:*tooltip-enforce-max-height-p*
============================= CLIM Tooltips ===============================
paley:Jun-19-2007
:highlight, the method should call draw-tooltip. When the state argument is
At some point, we may want to extend the tooltip functionali... | Copyright ( C ) 1993 - 2004 by SRI International . All rights reserved .
Permission granted by SRI for use in McClim under the license .
$ I d : utils.lisp , v 1.8 2007/07/14 02:14:21 Exp $
(defpackage #:mcclim-tooltips
(:use #:clim :clim-lisp)
(:export #:*tooltip-color*
#:*tooltip-ink*
... |
70f60e989b1a0d160959bfd8f320869ab006c2185e55674e5bc31128a4c67e00 | VisionsGlobalEmpowerment/webchange | views.cljs | (ns webchange.login.views
(:require
[re-frame.core :as re-frame]
[reagent.core :as r]
[webchange.login.header.views :refer [header]]
[webchange.login.routes :as routes]
[webchange.login.sign-in.views :refer [sign-in-form]]
[webchange.login.pages.views :refer [registration-success]]
[webcha... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/7eb09b19832693c4c1f3ee6efbaf587474bf9af8/src/cljs/webchange/login/views.cljs | clojure | (ns webchange.login.views
(:require
[re-frame.core :as re-frame]
[reagent.core :as r]
[webchange.login.header.views :refer [header]]
[webchange.login.routes :as routes]
[webchange.login.sign-in.views :refer [sign-in-form]]
[webchange.login.pages.views :refer [registration-success]]
[webcha... | |
d12d0364913c733e7bb4fbfdaa16137a494aca9ec5d1e96837f264f7eeae1240 | spawnfest/eep49ers | wxGridCellFloatRenderer.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2009 - 2020 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxGridCellFloatRenderer.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2009 - 2020 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(wxGridCellFloatRenderer).
-include("wxe.hrl").
-export([destroy/1,getPrecision/1,getWidth/1,new/0,new/1,setP... |
d0c4ab0d884d5d2bde3444af7dda77970ff323c035470e7d2dc2aaa5951a1f93 | typeable/compaREST | TraceTree.hs | module Spec.Golden.TraceTree
( tests,
)
where
import Control.Category
import Control.Exception
import qualified Data.ByteString.Lazy as BSL
import Data.Default
import Data.OpenApi.Compare.Run
import Data.OpenApi.Compare.Validate.OpenApi ()
import Data.Text (Text)
import qualified Data.Text.Encoding as T
import qua... | null | https://raw.githubusercontent.com/typeable/compaREST/db716ee5b2d6e5649042fa32f4cff4d211d92064/test/Spec/Golden/TraceTree.hs | haskell | module Spec.Golden.TraceTree
( tests,
)
where
import Control.Category
import Control.Exception
import qualified Data.ByteString.Lazy as BSL
import Data.Default
import Data.OpenApi.Compare.Run
import Data.OpenApi.Compare.Validate.OpenApi ()
import Data.Text (Text)
import qualified Data.Text.Encoding as T
import qua... | |
492ef07adec15ec4a72b9a95edac10fe99b285601baef8b6557d030823746e9d | sgbj/MaximaSharp | nummod.lisp | Maxima functions for floor , ceiling , and friends
Copyright ( C ) 2004 , 2005 , 2007
Barton Willis
Department of Mathematics
University of Nebraska at Kearney
;; Kearney NE 68847
;;
;; This source code is licensed under the terms of the Lisp Lesser
GNU Public License ( LLGPL ) . The LLGPL consists of ... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/nummod.lisp | lisp | Kearney NE 68847
This source code is licensed under the terms of the Lisp Lesser
any later version. When the preamble conflicts with the LGPL,
the preamble takes precedence.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTA... | Maxima functions for floor , ceiling , and friends
Copyright ( C ) 2004 , 2005 , 2007
Barton Willis
Department of Mathematics
University of Nebraska at Kearney
GNU Public License ( LLGPL ) . The LLGPL consists of a preamble , published
by Franz Inc. ( ) , and the GNU
Library General Public License ... |
fb8d39fb6059ba102a385d30a9f201f49989849851defe89798eeec4139cc6cb | FlowerWrong/mblog | attrs.erl | %% ---
Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
%% Copyrights apply to this code. It may not be used to create training material,
%% courses, books, articles, and the like. Contact us if you are in doubt.
%% We make no guarantees that this code is fit for... | null | https://raw.githubusercontent.com/FlowerWrong/mblog/3233ede938d2019a7b57391405197ac19c805b27/categories/erlang/demo/jaerlang2_code/attrs.erl | erlang | ---
Copyrights apply to this code. It may not be used to create training material,
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
--- | Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
-module(attrs).
-vsn(1234).
-author({joe,armstrong}).
-purpose("example of attributes").
-export([fac/1]).
fac(1) -> 1;
fac(N) -> N * fac(N-1).
|
1215aeb37503b2395331c93d9d2b18ff18bf1e71387062454218e12d5146e173 | iand675/hs-opentelemetry | Cloudflare.hs | {-# LANGUAGE OverloadedStrings #-}
module OpenTelemetry.Instrumentation.Cloudflare where
import Control.Monad (forM_)
import qualified Data.CaseInsensitive as CI
import qualified Data.List
import Data.Maybe
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import Network.Wai
import OpenTelemetr... | null | https://raw.githubusercontent.com/iand675/hs-opentelemetry/b08550db292ca0d8b9ce9156988e6d08dd6a2e61/instrumentation/cloudflare/src/OpenTelemetry/Instrumentation/Cloudflare.hs | haskell | # LANGUAGE OverloadedStrings #
CDN-Loop |
module OpenTelemetry.Instrumentation.Cloudflare where
import Control.Monad (forM_)
import qualified Data.CaseInsensitive as CI
import qualified Data.List
import Data.Maybe
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import Network.Wai
import OpenTelemetry.Attributes (PrimitiveAttribute (.... |
a37f75de77c0682631c37d3688e97566ed29143272fa9fafd05f4d480d4f8b95 | gfngfn/toy-macro-ml | richPrinting.ml |
open Syntax
let show_mono_type ty =
let rec aux isdom (_, tymain) =
match tymain with
| BaseType(IntType) -> "int"
| BaseType(BoolType) -> "bool"
| CodeType(ty1) ->
let s = aux true ty1 in
"@" ^ s
| FuncType(ty1, ty2) ->
let s1 = aux true ty1 in
let s2 = aux fa... | null | https://raw.githubusercontent.com/gfngfn/toy-macro-ml/7a5eecfc53691adbd91ceba78f8dac3ef8790054/src/richPrinting.ml | ocaml |
open Syntax
let show_mono_type ty =
let rec aux isdom (_, tymain) =
match tymain with
| BaseType(IntType) -> "int"
| BaseType(BoolType) -> "bool"
| CodeType(ty1) ->
let s = aux true ty1 in
"@" ^ s
| FuncType(ty1, ty2) ->
let s1 = aux true ty1 in
let s2 = aux fa... | |
ca9893dffae48c277ad6c8ba07cbe568058a078c8cc4495d5fae0072e7b0e131 | yogthos/yuggoth | auth.clj | (ns yuggoth.routes.services.auth
(:require [yuggoth.db.core :as db]
[yuggoth.config :refer [text]]
[noir.session :as session]
[noir.util.crypt :as crypt])
(:import org.apache.commons.codec.binary.Base64
java.nio.charset.Charset))
(defn auth [req]
(get-in req [:heade... | null | https://raw.githubusercontent.com/yogthos/yuggoth/901541c5809fb1e77c249f26a3aa5df894c88242/src/yuggoth/routes/services/auth.clj | clojure | (ns yuggoth.routes.services.auth
(:require [yuggoth.db.core :as db]
[yuggoth.config :refer [text]]
[noir.session :as session]
[noir.util.crypt :as crypt])
(:import org.apache.commons.codec.binary.Base64
java.nio.charset.Charset))
(defn auth [req]
(get-in req [:heade... | |
db3fe1d3c7b6b03621f69bcf67825a9998ff4382fbaa83ced5584c45984f0204 | bmeurer/ocaml-arm | camlinternalMod.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Cri... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/stdlib/camlinternalMod.mli | ocaml | *********************************************************************
OCaml
... | , 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
$ Id$
type shape =
| Function
|... |
1a2a00bce79b24132d200673548fffe099b29baf66ee6cb04ef51df4827ea1a5 | data61/Mirza | Users.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE MultiParamTypeClasses #
module Mirza.OrgRegistry.Handlers.Users
(
addUserAuth
, addUser
, addUserOnlyId
, addUserQuery
, getUserByIdQuery
) where
import qualified Mirza.OrgRegistry.Database.Schema as Schema... | null | https://raw.githubusercontent.com/data61/Mirza/24e5ccddfc307cceebcc5ce26d35e91020b8ee10/projects/or_scs/src/Mirza/OrgRegistry/Handlers/Users.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
Nothing needs to be done by this endpoint, because by the time that this
function is called the user will already be added to the users table (this
and adds the user to the database if not present). This could be achieved by
calling any of the ot... | # LANGUAGE MultiParamTypeClasses #
module Mirza.OrgRegistry.Handlers.Users
(
addUserAuth
, addUser
, addUserOnlyId
, addUserQuery
, getUserByIdQuery
) where
import qualified Mirza.OrgRegistry.Database.Schema as Schema
import Mirza.OrgRegistry.Types as ORT
import ... |
9c815dbd397eccaf66d2c489f10d652d8fe0af64b20d28a2caa93d0beb57a8a5 | babashka/pod-registry | filewatcher.clj | #!/usr/bin/env bb
(require '[babashka.pods :as pods])
(pods/load-pod 'org.babashka/filewatcher "0.0.1")
(require '[pod.babashka.filewatcher :as fw])
(fw/watch "." (fn [event] (prn event)) {:delay-ms 5000})
@(promise)
| null | https://raw.githubusercontent.com/babashka/pod-registry/73a6ae926647cf22d10ff507be54a53b864b4a3b/examples/filewatcher.clj | clojure | #!/usr/bin/env bb
(require '[babashka.pods :as pods])
(pods/load-pod 'org.babashka/filewatcher "0.0.1")
(require '[pod.babashka.filewatcher :as fw])
(fw/watch "." (fn [event] (prn event)) {:delay-ms 5000})
@(promise)
| |
68980685082eefdcd7bdd4449053b6638d3d14ca78b10aef580ddf636c4bfeb9 | clojure/test.check | random.clj | Copyright ( c ) , , and contributors .
; All rights reserved.
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are a... | null | https://raw.githubusercontent.com/clojure/test.check/c05034f911fa140913958b79aa51017d3f2f4426/src/main/clojure/clojure/test/check/random.clj | clojure | All rights reserved.
The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.... | Copyright ( c ) , , and contributors .
(ns ^{:author "Gary Fredericks"
:doc "Purely functional and splittable pseudo-random number generators."}
clojure.test.check.random
(:refer-clojure :exclude [unsigned-bit-shift-right]))
(defprotocol IRandom
(rand-long [rng]
"Returns a random long based on ... |
096d89f9790713dcaaf534e241fe1b68332cd0c08dca4d878337373b654cac8b | mokus0/junkbox | BananaUtils.hs | module FRP.BananaUtils where
import Control.Arrow
import Data.Either
import Reactive.Banana
-- interesting combinators reactive-banana could easily be extended with...
-- (presumably using some more-efficient implementations)
partitionE :: (a -> Bool) -> Event t a -> (Event t a, Event t a)
partitionE p = filterE p &&... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/FRP/BananaUtils.hs | haskell | interesting combinators reactive-banana could easily be extended with...
(presumably using some more-efficient implementations) | module FRP.BananaUtils where
import Control.Arrow
import Data.Either
import Reactive.Banana
partitionE :: (a -> Bool) -> Event t a -> (Event t a, Event t a)
partitionE p = filterE p &&& filterE (not . p)
partitionEithersE :: Event t (Either a b) -> (Event t a, Event t b)
partitionEithersE = (filterJust . fmap (eithe... |
0cb979385cb474a60cd409bedc3c14caa7f01321faa38bcd5adba76a3681b740 | haskell-works/hw-koans | Ord.hs | module Koan.Ord where
import Prelude hiding (max, maximum, min, minimum)
enrolled :: Bool
enrolled = True
-- Introduction to generics
max :: Ord a => a -> a -> a
max a b = if a > b then a else b
min :: Ord a => a -> a -> a
min a b = if a < b then a else b
maximum :: Ord a => [a] -> a
maximum (x:y:xs) = x `max` ma... | null | https://raw.githubusercontent.com/haskell-works/hw-koans/a807e72513d91ddf1c8aa445371b94bb169f22fd/solution/Koan/Ord.hs | haskell | Introduction to generics | module Koan.Ord where
import Prelude hiding (max, maximum, min, minimum)
enrolled :: Bool
enrolled = True
max :: Ord a => a -> a -> a
max a b = if a > b then a else b
min :: Ord a => a -> a -> a
min a b = if a < b then a else b
maximum :: Ord a => [a] -> a
maximum (x:y:xs) = x `max` maximum (y:xs)
maximum [x] ... |
55e1a09d7e66a909935aa00b25dfcda8e485707b18ade4dada5f60c0fbe49bf2 | samrushing/irken-compiler | t_fficonst.scm | ;; -*- Mode: Irken -*-
(include "lib/basis.scm")
(include "lib/map.scm")
(require-ffi 'posix)
(%backend bytecode (update-sizeoff-table))
(%backend bytecode (printf "lookup O_TRUNC: " (int (lookup-constant 'O_TRUNC)) "\n"))
(printf " O_TRUNC = " (int O_TRUNC) "\n")
| null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t_fficonst.scm | scheme | -*- Mode: Irken -*- |
(include "lib/basis.scm")
(include "lib/map.scm")
(require-ffi 'posix)
(%backend bytecode (update-sizeoff-table))
(%backend bytecode (printf "lookup O_TRUNC: " (int (lookup-constant 'O_TRUNC)) "\n"))
(printf " O_TRUNC = " (int O_TRUNC) "\n")
|
e98928cbba673cc56a2f0e68b3048f311061a6d5388b6fbbe2b127a1d9dedbd1 | metawilm/cl-python | function-test.lisp | ;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CLPYTHON.TEST -*-
;;
This software is Copyright ( c ) Franz Inc. and .
Franz Inc. and grant you the rights to
;; distribute and use this software as governed by the terms
of the Lisp Lesser GNU Public License
;; (),
;; known as the LLGPL.
;;;; Python function ... | null | https://raw.githubusercontent.com/metawilm/cl-python/bce7f80b0c67d3c9f514556f2d14d098efecdde8/test/function-test.lisp | lisp | -*- Mode: LISP; Syntax: COMMON-LISP; Package: CLPYTHON.TEST -*-
distribute and use this software as governed by the terms
(),
known as the LLGPL.
Python function test | This software is Copyright ( c ) Franz Inc. and .
Franz Inc. and grant you the rights to
of the Lisp Lesser GNU Public License
(in-package :clpython.test)
(defun run-function-test ()
(run-no-error "
def a(): pass
c = a.func_code
assert c.co_argcount == 0
assert c.co_cellvars == ()
assert c.co_flags & 0x0... |
154a1b78ddeb56ff1effe6d849a7a72fb80c0347209ab246ee77e53cda252c61 | digital-dj-tools/dj-data-converter | cli_profile.cljc | (ns converter.cli-profile
(:require
[clojure.data.xml :as xml]
#?(:clj [clojure.java.io :as io] :cljs [cljs-node-io.core :as io :refer [slurp spit]])
#?(:clj [clojure.spec.alpha :as s] :cljs [cljs.spec.alpha :as s])
#?(:clj [clojure.spec.gen.alpha :as gen] :cljs [cljs.spec.gen.alpha :as gen])
[converte... | null | https://raw.githubusercontent.com/digital-dj-tools/dj-data-converter/de1ae5cda60bc64ee3cca1a09b11e1808dd4738a/test/converter/cli_profile.cljc | clojure | (ns converter.cli-profile
(:require
[clojure.data.xml :as xml]
#?(:clj [clojure.java.io :as io] :cljs [cljs-node-io.core :as io :refer [slurp spit]])
#?(:clj [clojure.spec.alpha :as s] :cljs [cljs.spec.alpha :as s])
#?(:clj [clojure.spec.gen.alpha :as gen] :cljs [cljs.spec.gen.alpha :as gen])
[converte... | |
c2d441814593accb9b699ced2fa4bdc089eb278a55e9e77f41bd52298034c713 | mentat-collective/MathBox.cljs | time.cljs | (ns mathbox.primitives.time
(:require ["mathbox-react" :as box]
[mathbox.macros :refer [defprim]]))
(defprim box/Clock
"*Relative clock that starts from zero.*
- `:classes`: `[]` (string array) - Custom classes, e.g. `[\"big\"]`
- `:delay`: `0` (number) - Play delay
- `:from`: `0` (number) - Pla... | null | https://raw.githubusercontent.com/mentat-collective/MathBox.cljs/281fc373ca2e2e05de7b789f0c1764ab5a66ea05/src/mathbox/primitives/time.cljs | clojure | (ns mathbox.primitives.time
(:require ["mathbox-react" :as box]
[mathbox.macros :refer [defprim]]))
(defprim box/Clock
"*Relative clock that starts from zero.*
- `:classes`: `[]` (string array) - Custom classes, e.g. `[\"big\"]`
- `:delay`: `0` (number) - Play delay
- `:from`: `0` (number) - Pla... | |
d42f0efb2d5668d35f794a5f78d5433fdcb3fa4d6f69d8259e964b5fca7a2ee1 | nathell/clj-tagsoup | project.clj | (defproject clj-tagsoup "0.3.0"
:description "A HTML parser for Clojure."
:dependencies [[org.clojure/clojure "1.2.0"]
[org.clojure/data.xml "0.0.8"]
[org.clojars.nathell/tagsoup "1.2.1"]
[net.java.dev.stax-utils/stax-utils "20040917"]])
| null | https://raw.githubusercontent.com/nathell/clj-tagsoup/358358493f8c96b41e8fd30ad70becf146a310aa/project.clj | clojure | (defproject clj-tagsoup "0.3.0"
:description "A HTML parser for Clojure."
:dependencies [[org.clojure/clojure "1.2.0"]
[org.clojure/data.xml "0.0.8"]
[org.clojars.nathell/tagsoup "1.2.1"]
[net.java.dev.stax-utils/stax-utils "20040917"]])
| |
3670cebfd345c4921c9f85addf59297c116b3a79b21e448a306fdb5678735ee9 | GaloisInc/cereal | MemBench.hs | # LANGUAGE ForeignFunctionInterface , BangPatterns #
module MemBench (memBench) where
import Foreign
import Foreign.C
import Control.Exception
import System.CPUTime
import Numeric
memBench :: Int -> IO ()
memBench mb = do
let bytes = mb * 2^20
allocaBytes bytes $ \ptr -> do
let bench label test = do
... | null | https://raw.githubusercontent.com/GaloisInc/cereal/b4fff04dc2fb28eb0ec5e6c63b53248a63eb4ca5/tests/MemBench.hs | haskell | # LANGUAGE ForeignFunctionInterface , BangPatterns #
module MemBench (memBench) where
import Foreign
import Foreign.C
import Control.Exception
import System.CPUTime
import Numeric
memBench :: Int -> IO ()
memBench mb = do
let bytes = mb * 2^20
allocaBytes bytes $ \ptr -> do
let bench label test = do
... | |
45eabc8b72dde78c929ea30e8346e3693df73260faf6595023eb6df8db5c8c93 | potatosalad/erlang-jose | jose_curve448_unsupported.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 : 02 Jan 2016 by < >
%%%---------------------------... | null | https://raw.githubusercontent.com/potatosalad/erlang-jose/dbc4074066080692246afe613345ef6becc2a3fe/src/jwa/curve448/jose_curve448_unsupported.erl | erlang | vim: ts=4 sw=4 ft=erlang noet
-------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
====================================================================
====================================================================
E... | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
@author < >
2014 - 2022 ,
Created : 02 Jan 2016 by < >
-module(jose_curve448_unsupported).
-behaviour(jose_curve448).
jose_curve448 callbacks
-export([eddsa_keypair/0]).
-export([eddsa_keypair/1]).
-export([... |
dbddafc0d1ed68eb60171f4c3c5fd52e425a3ee6b8a97c920595b38df12ae8fe | fulcro-legacy/fulcro-css | suite.cljs | (ns fulcro-css.suite
(:require
fulcro-css.tests-to-run
[fulcro-spec.selectors :as sel]
[fulcro-spec.suite :as suite]))
(enable-console-print!)
(suite/def-test-suite on-load {:ns-regex #"fulcro.css.*-spec"}
{:default #{::sel/none :focused}
:available #{:focused}})
| null | https://raw.githubusercontent.com/fulcro-legacy/fulcro-css/fd5526b95d6dfdd2aa6d8fac2218b66709c0ca99/test/fulcro_css/suite.cljs | clojure | (ns fulcro-css.suite
(:require
fulcro-css.tests-to-run
[fulcro-spec.selectors :as sel]
[fulcro-spec.suite :as suite]))
(enable-console-print!)
(suite/def-test-suite on-load {:ns-regex #"fulcro.css.*-spec"}
{:default #{::sel/none :focused}
:available #{:focused}})
| |
3fafe024978f3e17fbf3546ab4f27364a125793a8b2342b0ec2aaf8f4f2f59f8 | jellelicht/guix | wordnet.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the Lice... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/wordnet.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages wordnet)
#:use-module (guix packages)
#:use-module (guix build-system gnu)
#:us... |
b6d067fc4532e9e86f461e2db3c9d3290dabfa471339d1346b8435d5a58dda98 | nebogeo/weavingcodes | seq.scm | ; lz/nz
(synth-init 50 22050)
(define (lz pat)
(vector pat 0))
;; . . . . .
;; . . . . .
;; . . . .
;; . . . . .
;;
(define (lz-pat l) (vector-ref l 0))
(define (lz-pos l) (vector-ref l 1))
(define (lz-inc-pos! l)
(vector-set! l 1 (+ (lz-pos l) 1)))
(define (lz-set-pat! l v) (vector-set! ... | null | https://raw.githubusercontent.com/nebogeo/weavingcodes/e305a28a38ef745ca31de3074c8aec3953a72aa2/pattern-matrix/sound/seq.scm | scheme | lz/nz
. . . . .
. . . . .
. . . .
. . . . .
nz
--
| (synth-init 50 22050)
(define (lz pat)
(vector pat 0))
(define (lz-pat l) (vector-ref l 0))
(define (lz-pos l) (vector-ref l 1))
(define (lz-inc-pos! l)
(vector-set! l 1 (+ (lz-pos l) 1)))
(define (lz-set-pat! l v) (vector-set! l 0 v))
(define (safe-ref l i)
(cond
((< i 0) #\.)
((>= i (length l)) #\.)
... |
54587388a78da7b998923da25ada667c7f8ac6caa43b040d505c0f6b8266a838 | zcaudate-me/lein-repack | common_test.clj | (ns leiningen.repack.manifest.common-test
(:use midje.sweet)
(:require [leiningen.repack.manifest.common :refer :all]
[leiningen.repack.analyser [java]]))
^{:refer leiningen.repack.manifest.common/build-filemap :added "0.1.5"}
(fact "builds manifest for resources and java folder"
(build-filemap "exa... | null | https://raw.githubusercontent.com/zcaudate-me/lein-repack/1eb542d66a77f55c4b5625783027c31fd2dddfe5/test/leiningen/repack/manifest/common_test.clj | clojure | {resources/stuff/y.edn resources/stuff/x.edn},
{resources/web/a.html resources/web/b.html}
{java/im/chit/repack/common/Hello.java},
{java/im/chit/repack/native/Utils.java},
{java/im/chit/repack/web/Client.java} | (ns leiningen.repack.manifest.common-test
(:use midje.sweet)
(:require [leiningen.repack.manifest.common :refer :all]
[leiningen.repack.analyser [java]]))
^{:refer leiningen.repack.manifest.common/build-filemap :added "0.1.5"}
(fact "builds manifest for resources and java folder"
(build-filemap "exa... |
72019c13a0b0ab148817de1033ac8abffc7d4518975032e4ffb07f608ada99bd | silkapp/rest | Main.hs | {-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Control.Concurrent (forkIO, killThread)
import Control.Monad.Trans (liftIO)
import Happstack.Server.SimpleHTTP
import Rest.Driver.Happstack (apiToHandler')
import Api (api)
import ApiTypes (ServerData (..), runBlogApi)
import Example (exampleBlog)
-... | null | https://raw.githubusercontent.com/silkapp/rest/f0462fc36709407f236f57064d8e37c77bdf8a79/rest-example/happstack/Main.hs | haskell | # LANGUAGE OverloadedStrings #
| Run the server
Set up the server state
Start happstack
Exit gracefully
| Request handler | module Main (main) where
import Control.Concurrent (forkIO, killThread)
import Control.Monad.Trans (liftIO)
import Happstack.Server.SimpleHTTP
import Rest.Driver.Happstack (apiToHandler')
import Api (api)
import ApiTypes (ServerData (..), runBlogApi)
import Example (exampleBlog)
main :: IO ()
main = do
serverData... |
55bfcb1fee9c66b3025705ba6ecdbc71c794861f8e32b912348f61082a86b572 | ianmbloom/gudni | DeviceQuery.hs | {-# LANGUAGE TypeOperators #-}
# LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE LambdaCase #
# LANGUAGE TemplateHaskell #
-----------------------------------------------------------------------------
-- |
Module : Graphics... | null | https://raw.githubusercontent.com/ianmbloom/gudni/fa69f1bf08c194effca05753afe5455ebae51234/src/Graphics/Gudni/OpenCL/DeviceQuery.hs | haskell | # LANGUAGE TypeOperators #
# LANGUAGE FlexibleContexts #
---------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/base/LICENSE)
Stability : experimental
Portability : portable
, clDeviceHalfFPConfig
| Show a title line
| Pad a li... | # LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE LambdaCase #
# LANGUAGE TemplateHaskell #
Module : Graphics . Gudni . OpenCL.CallKernel
Copyright : ( c ) 2019
Maintainer :
Boilerplate galore for querying OpenCL device specifications .
module Gr... |
940b3a1ef63cc052cdfbfdff27eb2c6752ad0fdfcfdbc1d1d7fec15896c134b7 | master/ejabberd | mod_vcard.erl | %%%----------------------------------------------------------------------
%%% File : mod_vcard.erl
Author : < >
Purpose : Vcard management in
Created : 2 Jan 2003 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2012 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/... | null | https://raw.githubusercontent.com/master/ejabberd/9c31874d5a9d1852ece1b8ae70dd4b7e5eef7cf7/src/mod_vcard.erl | erlang | ----------------------------------------------------------------------
File : mod_vcard.erl
This program is free software; you can redistribute it and/or
License, or (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... | Author : < >
Purpose : Vcard management in
Created : 2 Jan 2003 by < >
ejabberd , Copyright ( C ) 2002 - 2012 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the G... |
efc5e2becc19991276eda338241ecd1099fd6ad974fdc11aaf3ad5f0a0614a4d | lwhjp/racket-jni | env.rkt | #lang racket/base
(require racket/class
ffi/unsafe
"error.rkt"
"jni.rkt")
(provide (all-defined-out)
get-jni-env)
(define local-jni-env (make-thread-cell #f #f))
(define current-jni-env
(case-lambda
[()
(thread-cell-ref local-jni-env)]
[(env)
(unless (or (not ... | null | https://raw.githubusercontent.com/lwhjp/racket-jni/ad76ef596d9e1702bffc9ab2141616b628f72b4d/private/env.rkt | racket | scope
references | #lang racket/base
(require racket/class
ffi/unsafe
"error.rkt"
"jni.rkt")
(provide (all-defined-out)
get-jni-env)
(define local-jni-env (make-thread-cell #f #f))
(define current-jni-env
(case-lambda
[()
(thread-cell-ref local-jni-env)]
[(env)
(unless (or (not ... |
bbc535ed01128e5b81a357e2fe410f53fe6d9801a0b57dfcabbe868e4385cb54 | massung/r-cade | derby.rkt | #lang racket
(require r-cade)
(require racket/random)
;; ----------------------------------------------------
(define horse-sprite
#((#x001c #x003e #x007e #x7ff0 #x8fe0 #x0fe0 #x1ff8 #x2836 #xc809 #x1008 #x2000)
(#x000c #x001e #x003f #x3ff2 #xcfe0 #x0fe0 #x1fe0 #x1820 #x2850 #xc890 #x1110)
(#x0006 #x000f #... | null | https://raw.githubusercontent.com/massung/r-cade/0cce22885aad28234d3f6e1d88568cdc16daf3e6/examples/derby.rkt | racket | ----------------------------------------------------
----------------------------------------------------
----------------------------------------------------
----------------------------------------------------
----------------------------------------------------
-------------------------------------------------... | #lang racket
(require r-cade)
(require racket/random)
(define horse-sprite
#((#x001c #x003e #x007e #x7ff0 #x8fe0 #x0fe0 #x1ff8 #x2836 #xc809 #x1008 #x2000)
(#x000c #x001e #x003f #x3ff2 #xcfe0 #x0fe0 #x1fe0 #x1820 #x2850 #xc890 #x1110)
(#x0006 #x000f #x001f #x1ff8 #xeff0 #x0fe0 #x1fe0 #x2860 #x1850 #x0de0 #... |
be90df97e40fa1dee30c70f388a96df1d946d200c03e90f5fce349ed4c8f9c5d | Kappa-Dev/KappaTools | counters_domain_type.mli | type comparison_op = LTEQ | LT | GT | GTEQ | EQ
type restriction =
{
tests: (Occu1.trans * comparison_op * int) list ;
invertible_assignments : (Occu1.trans * int) list ;
non_invertible_assignments : (Occu1.trans * int) list ;
}
val empty_restriction: restriction
type static =
{
counters: Ckapp... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/KaSa_rep/abstract_domains/numerical_domains/counters_domain_type.mli | ocaml | type comparison_op = LTEQ | LT | GT | GTEQ | EQ
type restriction =
{
tests: (Occu1.trans * comparison_op * int) list ;
invertible_assignments : (Occu1.trans * int) list ;
non_invertible_assignments : (Occu1.trans * int) list ;
}
val empty_restriction: restriction
type static =
{
counters: Ckapp... | |
9bab23a6269f26ab544efd9f4497829ce2ce395ee7b7fa44c357be1591068d9b | 1Jajen1/Brokkr | Handler.hs | module Network.Handler (
handleConnection
) where
import Data.IORef
import Chunk.Position
import IO.Chunkloading
import Control.Concurrent (threadDelay)
import Control.Concurrent.MVar
import Control.Exception
import qualified Chronos
import qualified Control.Concurrent.Async as Async
import Control.Monad
import Cont... | null | https://raw.githubusercontent.com/1Jajen1/Brokkr/5c128a47c7123e576b4e415048d58c2ab3f4a0aa/src/Network/Handler.hs | haskell |
TODO Label these threads
If any of the linked threads crash, we must also crash since the connection will no longer work
Actually create the player entity, from that point on the connection is visible globally
TODO Log
packet loop
The packet loop in the bracket already diverges, but if for whatever reason we end... | module Network.Handler (
handleConnection
) where
import Data.IORef
import Chunk.Position
import IO.Chunkloading
import Control.Concurrent (threadDelay)
import Control.Concurrent.MVar
import Control.Exception
import qualified Chronos
import qualified Control.Concurrent.Async as Async
import Control.Monad
import Cont... |
74c6a3b6cdf20af1843565a5263f7b44dc1cc63752adbe4880f35260a6bff5bb | inhabitedtype/ocaml-aws | deleteCacheSecurityGroup.mli | open Types
type input = DeleteCacheSecurityGroupMessage.t
type output = unit
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/elasticache/lib/deleteCacheSecurityGroup.mli | ocaml | open Types
type input = DeleteCacheSecurityGroupMessage.t
type output = unit
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| |
6cb14f6ac75b8270425422fc5342db16fec96fbc0d427f237d1e913fbdb98e90 | zwizwa/staapl | picstamp_new.rkt | #lang racket/base
(require staapl/pic18)
Code for the USBPicStamp by .
;; -j/1350651639/
;; staaplc -u -d pk2 picstamp.f
(words-org-flat
(#x300000 ;; Address of configuration bits in code space.
;; FIXME: this is code, and not a data table -- add sugar.
#x21 |,| #x02 |,| #x3A |,| #x1E |,|
#x00 |,| #x8... | null | https://raw.githubusercontent.com/zwizwa/staapl/e30e6ae6ac45de7141b97ad3cebf9b5a51bcda52/app/picstamp_new.rkt | racket | -j/1350651639/
staaplc -u -d pk2 picstamp.f
Address of configuration bits in code space.
FIXME: this is code, and not a data table -- add sugar.
extended instruction set disabled
target code and macros
4 clock cycles per instruction cycle gives 12 MIPS .
load monitor-serial.f \ boot block + serial monitor code... | #lang racket/base
(require staapl/pic18)
Code for the USBPicStamp by .
(words-org-flat
#x21 |,| #x02 |,| #x3A |,| #x1E |,|
#x0F |,| #xC0 |,| #x0F |,| #xE0 |,|
#x0F |,| #x40 |,| ))
(require
staapl/pic18/shift
/ pic18 / interpreter
staapl/pic18/route
staapl/pic18/ramblock
staapl/pic18/template
)
... |
38f455d2a22ce3f658a8f34bb74a7e904e765b0c7658abb1e0fc36f0946dca40 | elastic/eui-cljs | split_panel.cljs | (ns eui.split-panel
(:require ["@elastic/eui/lib/components/panel/split_panel/split_panel.js" :as eui]))
(def _EuiSplitPanelInner eui/_EuiSplitPanelInner)
(def _EuiSplitPanelOuter eui/_EuiSplitPanelOuter)
(def EuiSplitPanel eui/EuiSplitPanel)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/split_panel.cljs | clojure | (ns eui.split-panel
(:require ["@elastic/eui/lib/components/panel/split_panel/split_panel.js" :as eui]))
(def _EuiSplitPanelInner eui/_EuiSplitPanelInner)
(def _EuiSplitPanelOuter eui/_EuiSplitPanelOuter)
(def EuiSplitPanel eui/EuiSplitPanel)
| |
5ad2bb1b6c897eb71c87b2cc570949f73322b4c54b0e826bdb490b77110b8b0d | LaurentMazare/tensorflow-ocaml | wrapper.mli | type data_type =
| TF_FLOAT
| TF_DOUBLE
| TF_INT32
| TF_UINT8
| TF_INT16
| TF_INT8
| TF_STRING
| TF_COMPLEX
| TF_INT64
| TF_BOOL
| TF_QINT8
| TF_QUINT8
| TF_QINT32
| TF_BFLOAT16
| TF_QINT16
| TF_QUINT16
| TF_UINT16
| Unknown of int
module Session_options : sig
type t
val create... | null | https://raw.githubusercontent.com/LaurentMazare/tensorflow-ocaml/52c5f1dec1a8b7dc9bc6ef06abbc07da6cd90d39/src/wrapper/wrapper.mli | ocaml | type data_type =
| TF_FLOAT
| TF_DOUBLE
| TF_INT32
| TF_UINT8
| TF_INT16
| TF_INT8
| TF_STRING
| TF_COMPLEX
| TF_INT64
| TF_BOOL
| TF_QINT8
| TF_QUINT8
| TF_QINT32
| TF_BFLOAT16
| TF_QINT16
| TF_QUINT16
| TF_UINT16
| Unknown of int
module Session_options : sig
type t
val create... | |
2a70c5a75e81715bb19b297bb7d77424d4a678f1978cf7d3c214854a0cb85257 | cljdoc/cljdoc | ns_tree_test.clj | (ns cljdoc.util.ns-tree-test
(:require [cljdoc.util.ns-tree :as ns-tree]
[clojure.test :as t]))
(t/deftest replant-ns-test
(t/is (= "my.app.routes" (ns-tree/replant-ns "my.app.core" "routes")))
(t/is (= "my.app.api.routes" (ns-tree/replant-ns "my.app.core" "api.routes")))
(t/is (= "my.app.api.handl... | null | https://raw.githubusercontent.com/cljdoc/cljdoc/266153cac0df618df1ad6e1d946f0bc466bc8f6c/test/cljdoc/util/ns_tree_test.clj | clojure | (ns cljdoc.util.ns-tree-test
(:require [cljdoc.util.ns-tree :as ns-tree]
[clojure.test :as t]))
(t/deftest replant-ns-test
(t/is (= "my.app.routes" (ns-tree/replant-ns "my.app.core" "routes")))
(t/is (= "my.app.api.routes" (ns-tree/replant-ns "my.app.core" "api.routes")))
(t/is (= "my.app.api.handl... | |
b033438bc858a1a07d32e9bcf873b542a9fd58c6220fcadfd33961f4007ea5bc | ian-ross/hnetcdf | test-put.hs | # LANGUAGE ScopedTypeVariables #
import qualified Data.Map as M
import Data.Maybe
import qualified Data.Vector.Storable as SV
import Control.Error
import Control.Monad
import Foreign.C
import Data.NetCDF
import Data.NetCDF.Vector
main :: IO ()
main = do
let xdim = NcDim "x" 10 False
ydim = NcDim "y" 10 False... | null | https://raw.githubusercontent.com/ian-ross/hnetcdf/d334efc0b0b4f39a1ed4f45a8b75663c2171af6a/test/test-put.hs | haskell | # LANGUAGE ScopedTypeVariables #
import qualified Data.Map as M
import Data.Maybe
import qualified Data.Vector.Storable as SV
import Control.Error
import Control.Monad
import Foreign.C
import Data.NetCDF
import Data.NetCDF.Vector
main :: IO ()
main = do
let xdim = NcDim "x" 10 False
ydim = NcDim "y" 10 False... | |
a1902cc089acda5ee970bc44c56358a16b8f0629e206f5f9e079a3a2e4b00b4a | helium/blockchain-http | bh_pool_watcher.erl | -module(bh_pool_watcher).
-behaviour(gen_server).
-export([start_link/1]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2]).
start_link(Pools) ->
gen_server:start_link(?MODULE, Pools, []).
init(Pools) ->
Monitors = maps:from_list([
{erlang:monitor(process, get_name(PoolName)), PoolNam... | null | https://raw.githubusercontent.com/helium/blockchain-http/96f66286eb05a4607a3a11f602ec3d65732244a9/src/bh_pool_watcher.erl | erlang | it's back, update the persistent term
likely things have not finished restarting, try again shortly
noproc means the process wasn't alive when we tried to monitor it
we should probably wait a bit and retry | -module(bh_pool_watcher).
-behaviour(gen_server).
-export([start_link/1]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2]).
start_link(Pools) ->
gen_server:start_link(?MODULE, Pools, []).
init(Pools) ->
Monitors = maps:from_list([
{erlang:monitor(process, get_name(PoolName)), PoolNam... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.