_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 |
|---|---|---|---|---|---|---|---|---|
09d5381d63ae3e3745e874fd509172d57ff3c618a77b344c5ef18aa7465556db | wireapp/wire-server | ConversationList.hs | -- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License... | null | https://raw.githubusercontent.com/wireapp/wire-server/c27541d7456e3ea07ce5c8991585d0ffc4fac226/services/galley/src/Galley/Cassandra/ConversationList.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module Galley.Cassandra.Conversa... |
95834a123bc97d18205fe9c68fc499fdc90a0c97a4ed8ae4581395a34159affe | heroku/logplex | live_upgrade.erl | f(UpgradeNode).
UpgradeNode = fun () ->
case logplex_app:config(git_branch) of
"v69.8" ->
io:format(whereis(user), "at=upgrade_start cur_vsn=69.8~n", []);
"v69.9" ->
io:format(whereis(user),
"at=upgrade type=retry cur_vsn=69.8 old_vsn=69.9~n", []);
Else ->
... | null | https://raw.githubusercontent.com/heroku/logplex/fc520c44cf4687726d5d51464d3264ddc6abb0ba/upgrades/v69.8_v69.9/live_upgrade.erl | erlang | stateless
Stateful changes to HTTP drains -- gotta suspend, reload, and then
resume all drains before going for the stateless drain buffer update
stateless
Stateful changes to HTTP drains -- gotta suspend, reload, and then
resume all drains before going for the stateless drain buffer update | f(UpgradeNode).
UpgradeNode = fun () ->
case logplex_app:config(git_branch) of
"v69.8" ->
io:format(whereis(user), "at=upgrade_start cur_vsn=69.8~n", []);
"v69.9" ->
io:format(whereis(user),
"at=upgrade type=retry cur_vsn=69.8 old_vsn=69.9~n", []);
Else ->
... |
2cf0667a27634b34eaeb4848b2db30f69cfd77e0e150ac2a7055b49d2bcd1457 | soegaard/sketching | translate.rkt | #lang sketching
; -docs/blob/master/content/examples/Basics/Transform/Translate/Translate.pde
Translate .
The translate function moves the position of ( 0,0 ) .
; If you draw an object (in this example a rectangle) relative
to ( 0,0 ) , you can use translate to move the position of the object .
(define x ... | null | https://raw.githubusercontent.com/soegaard/sketching/94e114ac6e92ede3b85481df755b673be24b226e/sketching-doc/sketching-doc/manual-examples/basics/transform/translate.rkt | racket | -docs/blob/master/content/examples/Basics/Transform/Translate/Translate.pde
If you draw an object (in this example a rectangle) relative
Transforms accumulate. Notice how this rect moves
twice as fast as the other, but it has the same
argument for the x-axis value | #lang sketching
Translate .
The translate function moves the position of ( 0,0 ) .
to ( 0,0 ) , you can use translate to move the position of the object .
(define x 0.0)
(define y 0.0)
(define dim 80.0)
(define (setup)
(size 640 360)
(frame-rate 60)
(rect-mode 'center))
(define (draw)
(backgr... |
33a6adf34a0ace4526647463c66f8e04f6f05b6036c7fd19d5b8ab2a31381ad5 | candera/aws-stats | lifecycle.clj | (ns aws-stats.lifecycle
"Lifecycle management protocol, used to coordinate startup/shutdown
of all components in the system.")
(defprotocol Lifecycle
(start [this]
"Begin operation of a component. Returns a promise on which the
caller can block to wait until the component is started.")
(stop [this]
"... | null | https://raw.githubusercontent.com/candera/aws-stats/6f9189b997c0e7eda03130a0551202f9efa9e2c9/src/aws_stats/lifecycle.clj | clojure | (ns aws-stats.lifecycle
"Lifecycle management protocol, used to coordinate startup/shutdown
of all components in the system.")
(defprotocol Lifecycle
(start [this]
"Begin operation of a component. Returns a promise on which the
caller can block to wait until the component is started.")
(stop [this]
"... | |
486dcca5ed30c4aeb56faa304befe35492ac6450d06831900aebcee80f2cafa4 | SimulaVR/godot-haskell | PathFollow.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.PathFollow
(Godot.Core.PathFollow._ROTATION_ORIENTED... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/PathFollow.hs | haskell | | The node's offset along the curve.
| The node's offset along the curve.
# NOINLINE bindPathFollow_get_rotation_mode #
# NOINLINE bindPathFollow_get_v_offset #
| The node's offset perpendicular to the curve.
| The node's offset perpendicular to the curve.
# NOINLINE bindPathFollow_has_loop #
| The node's offset a... | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.PathFollow
(Godot.Core.PathFollow._ROTATION_ORIENTED... |
05f70b33238afdb193f69665143f5e2d062329e284554e582284bed0020aa00a | himura/twitter-conduit | Lens.hs | {-# LANGUAGE RankNTypes #-}
module Web.Twitter.Conduit.Lens (
-- * 'TT.Response'
TT.Response,
responseStatus,
responseBody,
responseHeaders,
-- * 'TT.TwitterErrorMessage'
TT.TwitterErrorMessage,
twitterErrorMessage,
twitterErrorCode,
-- * 'TT.WithCursor'
TT.WithCursor,
... | null | https://raw.githubusercontent.com/himura/twitter-conduit/a327d7727faf2fb38f54f48ef0a61cbc5537b5d2/src/Web/Twitter/Conduit/Lens.hs | haskell | # LANGUAGE RankNTypes #
* 'TT.Response'
* 'TT.TwitterErrorMessage'
* 'TT.WithCursor'
* Re-exports
* Lenses for 'TT.Response'
* Lenses for 'TT.TwitterErrorMessage'
* Lenses for 'TT.WithCursor' |
module Web.Twitter.Conduit.Lens (
TT.Response,
responseStatus,
responseBody,
responseHeaders,
TT.TwitterErrorMessage,
twitterErrorMessage,
twitterErrorCode,
TT.WithCursor,
previousCursor,
nextCursor,
contents,
TT.TwitterError (..),
) where
import Control.Lens
import ... |
a750f0aec942fe46e8959c1aec7d326eaf8c365e2565e004ff4dd0caa94d62a9 | binsec/binsec | array_utils.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/base/array_utils.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
82123936dc6483eb417e18477e4cba7a5d9025758be8eaddbd688fcc513552ee | vvvvalvalval/datofu | migration.clj | (ns datofu.migration
(:require [datofu.schema.dsl :as sch]
[datomic.api :as d]))
TODO test ( , 02 Apr 2017 )
(defn schema-tx
[]
[(sch/part :datofu.parts/migration)
(sch/attr :datofu.migration.impl/id :keyword :identity
"the migration with this name has been run.")
(sch/db-clj-fn :datofu... | null | https://raw.githubusercontent.com/vvvvalvalval/datofu/c596c3beca92309135d88e338f233163c0e9cf5f/src/datofu/migration.clj | clojure | (ns datofu.migration
(:require [datofu.schema.dsl :as sch]
[datomic.api :as d]))
TODO test ( , 02 Apr 2017 )
(defn schema-tx
[]
[(sch/part :datofu.parts/migration)
(sch/attr :datofu.migration.impl/id :keyword :identity
"the migration with this name has been run.")
(sch/db-clj-fn :datofu... | |
60482285bf5c8070655aea51bbc2199aefde41f38cb02de24e560784a71d2328 | jeapostrophe/lux | key.rkt | #lang racket/base
(require (for-syntax racket/base
racket/syntax)
racket/match
racket/class
racket/gui/base
racket/contract/base)
(struct key-state
(keys
shift? control? meta? alt?
mod3? mod4? mod5?)
#:mutable)
(define-syntax (set-key-state stx)
(sy... | null | https://raw.githubusercontent.com/jeapostrophe/lux/f5d7c1276072f9ea4107b3f8a2d049e0b174c7ba/chaos/gui/key.rkt | racket | #lang racket/base
(require (for-syntax racket/base
racket/syntax)
racket/match
racket/class
racket/gui/base
racket/contract/base)
(struct key-state
(keys
shift? control? meta? alt?
mod3? mod4? mod5?)
#:mutable)
(define-syntax (set-key-state stx)
(sy... | |
e7f7ebdea27e1c137ccd140db6566d9e6d847ae8185a98b352469c8d743cd246 | pstephens/kingjames.bible | testpages.cljs | Copyright 2016 . 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 applicable law o... | null | https://raw.githubusercontent.com/pstephens/kingjames.bible/a2c2a7324176a829df6ebf50976d81c65c35eb02/src/test/asset/testpages.cljs | clojure |
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 permissions and
limitations under the License.... | Copyright 2016 . All Rights Reserved .
you may not use this file except in compliance with the License .
distributed under the License is distributed on an " AS IS " BASIS ,
(ns test.asset.testpages
(:require-macros [hiccups.core :as hiccups :refer [html]])
(:require
[common.bible.resou... |
7b38c4315a3f68434fca944d93c56fa1711d13302fd705e7af0c4ebfe8258918 | AndrasKovacs/ELTE-func-lang | Notes02.hs |
ADT - k , , feladatok
--------------------------------------------------------------------------------
köv + - feladat : konkrétan az itteni Tree típusra egy egyszerű
-- függvény
--------------------------------------------------------------------------------
nyelvi feature - öket
# language InstanceSig... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/21d7144a90661e26451c2d1869ef8340ba21eda4/2022-23-1/gyak1/Notes02.hs | haskell | ------------------------------------------------------------------------------
függvény
------------------------------------------------------------------------------
gh/ghci-nek opciót átadni
hiding (Eq) magát az "Eq" osztályt rejti el
hiding (Eq(..)) az "Eq" osztály + a metódusait rejti el
hason... |
ADT - k , , feladatok
köv + - feladat : konkrétan az itteni Tree típusra egy egyszerű
nyelvi feature - öket
# language InstanceSigs #
GHC language flag reference
# options_ghc -Wincomplete - patterns #
warning , ha
alapból a Prelude van importálva , viszont
" import Prelude hiding"-al lehet ... |
326c8c1909b50399b76e30be4140911647c62bce2323652505a97d5877bb664b | futurice/haskell-mega-repo | Select2.hs | # LANGUAGE DataKinds #
# LANGUAGE DerivingVia #
# LANGUAGE DeriveGeneric #
# LANGUAGE InstanceSigs #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
# LANGUAGE StandaloneDeriving ... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/95fe8e33ad6426eb6e52a9c23db4aeffd443b3e5/futurice-foundation/src/Futurice/Lucid/Select2.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
| See <-sources/formats>.
| See <-sources/formats>.
| TODO: incorrect | # LANGUAGE DataKinds #
# LANGUAGE DerivingVia #
# LANGUAGE DeriveGeneric #
# LANGUAGE InstanceSigs #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE StandaloneDeriving #
module Futurice.Lucid.Select2 (
Select2Data (..),
Select2Result (..),
) where
import Data.... |
99c955cd97c1431b4bc8202007b9b2cbbdd3ca7a04cb4e49619d7142dcabd9ae | facebook/flow | subst.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/6cf8e4c7bfe29858aa9e67d35a1a9148986ea484/src/typing/subst.ml | ocaml | ***************
substitutions
***************
Free vars in type
* Substitute bound type variables with associated types in a type. *
Objects store a list of reachable targs and their polarity so that we
* can do any-propagation without exploring the full structure of the
* type.
When substitution resul... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
4d368511a893722ff803ad4d0e12532dcabe2e521df6c61f238b50e6a474d9b3 | conjure-cp/conjure | Lexer.hs | # LANGUAGE DeriveGeneric #
module Conjure.Language.Lexer
( Lexeme(..)
, LexemePos(..)
, runLexer
, textToLexeme
, lexemeText
, lexemeFace
) where
import Conjure.Prelude
import Data.Char ( isAlpha, isAlphaNum )
import qualified Data.HashMap.Strict as M
import qualified Data.Text as T
impor... | null | https://raw.githubusercontent.com/conjure-cp/conjure/dd5a27df138af2ccbbb970274c2b8f22ac6b26a0/src/Conjure/Language/Lexer.hs | haskell | source position, the beginning of this lexeme
general
type: boolean
type: integer
creating a new type
type tuple
type record
type variant
type: matrix
type set
type: function
type: sequence
type: relation
type: partition
global constraints
matrix only operators
in the rule language
| L_lambda
| L_qua... | # LANGUAGE DeriveGeneric #
module Conjure.Language.Lexer
( Lexeme(..)
, LexemePos(..)
, runLexer
, textToLexeme
, lexemeText
, lexemeFace
) where
import Conjure.Prelude
import Data.Char ( isAlpha, isAlphaNum )
import qualified Data.HashMap.Strict as M
import qualified Data.Text as T
impor... |
55b5f296b0d8134ca9286332ee198e8e6a1389f1aeba31971fb78e09eb98e57b | nuttycom/aftok | Types.hs | # LANGUAGE DerivingVia #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
module Aftok.Currency.Zcash.Types where
import Control.Lens (makePrisms)
coin :: Word64
coin = 100000000
maxMoney :: Word64
maxMoney = 21000000 * coin
newtype IVK = IVK {ivkText :: Text}
... | null | https://raw.githubusercontent.com/nuttycom/aftok/54e7812859054a4b59fb802a1996ffb4de6c9bed/lib/Aftok/Currency/Zcash/Types.hs | haskell | # LANGUAGE DerivingVia #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
module Aftok.Currency.Zcash.Types where
import Control.Lens (makePrisms)
coin :: Word64
coin = 100000000
maxMoney :: Word64
maxMoney = 21000000 * coin
newtype IVK = IVK {ivkText :: Text}
... | |
64e17bbf9b67122131cf13a2c95b69eb79f06698566eec5909a5620bf8f002d2 | clojure-quant/infra-guix | guix-publish.scm |
(service guix-publish-service-type
(guix-publish-configuration
(host "0.0.0.0")
(port 3000))) | null | https://raw.githubusercontent.com/clojure-quant/infra-guix/54783cba5333fad5cc105f5279f6b94285f980c7/modules/awb99/config/guix-publish.scm | scheme |
(service guix-publish-service-type
(guix-publish-configuration
(host "0.0.0.0")
(port 3000))) | |
aa279cb9164b39ca05137836d5a7b3728a29ff7ec5e2221602f51589d195243e | subttle/regular | Common.hs | {-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DerivingVia #-}
# LANGUAGE FunctionalDependencies #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE RankNTypes #-}
module Common wher... | null | https://raw.githubusercontent.com/subttle/regular/7236288038ee84a2507cb0f8ae3016597820b818/src/Common.hs | haskell | # OPTIONS_GHC -Wall #
# LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE DerivingVia #
# LANGUAGE RankNTypes #
Tau: the true circle constant :]
τ = C∕r
type level flip
Anamorphism
Paramorphism
Apomorphism
Metamorphis... | # LANGUAGE FunctionalDependencies #
# LANGUAGE GeneralizedNewtypeDeriving #
module Common where
import Control.Applicative (Applicative (..), ZipList (..), liftA3)
import Control.Arrow ((|||), (&&&))
import Control.Monad ((>=>), (<=<))
import Data.Bifunctor (Bifunctor (..)... |
ccb8f0c8c82c8f4fa9f6ff143c308cbca90a0240d039fa4d63fd34b45c2c40a3 | fbellomi/crossclj | java.clj | Copyright ( c ) . 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
; ... | null | https://raw.githubusercontent.com/fbellomi/crossclj/7630270ebe9ea3df89fe3d877b2571e6eae1062b/src/cloned/clojure/reflect/java.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 ) . All rights reserved .
Java - specific parts of clojure.reflect
(in-ns 'cloned.clojure.reflect)
(require '[clojure.set :as set]
'[clojure.string :as str])
(import '[clojure.asm ClassReader ClassVisitor Type Opcodes]
'[java.lang.reflect Modifier]
java.io.InputStream)... |
783a177c291178dc53602b56c6852ce138e15a9869fb95930c6af6a537abefc5 | elaforge/karya | Z1_test.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
module User.Elaforge.Instrument.Z1_test where
import qualified Data.ByteString as B
import Util.Test
import qualified User.Elaforge.Instrument.Z1 as Z1
test_enkorg :: Test
test_enkorg ... | null | https://raw.githubusercontent.com/elaforge/karya/8ea15e6a5fb57e2f15f8c19836751e315f9c09f2/User/Elaforge/Instrument/Z1_test.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt | Copyright 2013
module User.Elaforge.Instrument.Z1_test where
import qualified Data.ByteString as B
import Util.Test
import qualified User.Elaforge.Instrument.Z1 as Z1
test_enkorg :: Test
test_enkorg = do
let f bs = (Z1.dekorg (Z1.enkorg (B.pack bs)), B.pack bs)
uncurry equal (f (0x7f : replicate 7 0))
... |
13acfdd9c8d8dc3bab7d11b285595b22763f77f9a9af2c1e40675b20022aa830 | esl/MongooseIM | mod_offline_backend.erl | %% Just a proxy interface module between the main mod_offline module and
%% the backend modules (i.e. mod_offline_riak, mod_offline_rdbms...).
-module(mod_offline_backend).
-export([init/2,
pop_messages/2,
fetch_messages/2,
write_messages/4,
count_offline_messages/4,
remove... | null | https://raw.githubusercontent.com/esl/MongooseIM/64d10a08d8e4700027734ec49ce4c4014b41b34b/src/offline/mod_offline_backend.erl | erlang | Just a proxy interface module between the main mod_offline module and
the backend modules (i.e. mod_offline_riak, mod_offline_rdbms...). | -module(mod_offline_backend).
-export([init/2,
pop_messages/2,
fetch_messages/2,
write_messages/4,
count_offline_messages/4,
remove_expired_messages/2,
remove_old_messages/3,
remove_user/3,
remove_domain/2]).
-define(MAIN_MODULE, mod_offline).
-... |
fef12eeea3d916c42495424fd3895464d30ef545893dfa039d54650d821c112b | erlang/rebar3 | r3_hex_api_release.erl | %% Vendored from hex_core v0.7.1, do not edit manually
-module(r3_hex_api_release).
-export([
delete/3,
get/3,
publish/2,
publish/3,
retire/4,
unretire/3
]).
-export_type([publish_params/0, retirement_params/0, retirement_reason/0]).
-type publish_params() :: [{replace, boolean()}].
-type re... | null | https://raw.githubusercontent.com/erlang/rebar3/048412ed4593e19097f4fa91747593aac6706afb/apps/rebar/src/vendored/r3_hex_api_release.erl | erlang | Vendored from hex_core v0.7.1, do not edit manually
@doc
Gets a package release.
Examples:
```
> r3_hex_api_release:get(r3_hex_core:default_config(), <<"package">>, <<"1.0.0">>).
<<"docs_html_url">> => <<"/">>,
<<"downloads">> => 740,<<"has_docs">> => true,
<<"html_url">> => <<"">>,
<<"m... |
-module(r3_hex_api_release).
-export([
delete/3,
get/3,
publish/2,
publish/3,
retire/4,
unretire/3
]).
-export_type([publish_params/0, retirement_params/0, retirement_reason/0]).
-type publish_params() :: [{replace, boolean()}].
-type retirement_reason() :: other | invalid | security | depre... |
d3d002214fbe3fb412db20a2b283737dcee50ad00780b906f1b3a95809b8267a | Z572/guile-wlroots | utils.scm | (define-module (wlroots utils)
#:use-module ((system foreign) #:select (pointer-address make-pointer pointer->procedure))
#:use-module (util572 color)
#:use-module (util572 ffi-helpers)
#:use-module (wlroots config)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-9)
#:use-module (srfi srfi-26)
#:use-... | null | https://raw.githubusercontent.com/Z572/guile-wlroots/dc6cd05d5c46f811d75cbc30d1464820b19b1de8/wlroots/utils.scm | scheme | copy define from (system vm dwarf) module | (define-module (wlroots utils)
#:use-module ((system foreign) #:select (pointer-address make-pointer pointer->procedure))
#:use-module (util572 color)
#:use-module (util572 ffi-helpers)
#:use-module (wlroots config)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-9)
#:use-module (srfi srfi-26)
#:use-... |
cd2199bf0630c4e2aa756a6084a95135dfa2235105f29f022ce7b49dea9fdc35 | IronScheme/IronScheme | unicode.sps | #!r6rs
(import (tests r6rs unicode)
(tests r6rs test)
(rnrs io simple))
(display "Running tests for (rnrs unicode)\n")
(run-unicode-tests)
(report-test-results)
| null | https://raw.githubusercontent.com/IronScheme/IronScheme/687cde5d4e463a119e4ba28296f2af42a5c4a9df/IronScheme/IronScheme.Console/tests/r6rs/run/unicode.sps | scheme | #!r6rs
(import (tests r6rs unicode)
(tests r6rs test)
(rnrs io simple))
(display "Running tests for (rnrs unicode)\n")
(run-unicode-tests)
(report-test-results)
| |
448d54105d0aa2d6ac26b510c75d02d49667783b20c7f5c2b331cefd7568468a | minio/minio-hs | GetConfig.hs | #!/usr/bin/env stack
-- stack --resolver lts-14.11 runghc --package minio-hs
--
MinIO Haskell SDK , ( C ) 2017 , 2018 MinIO , Inc.
--
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
... | null | https://raw.githubusercontent.com/minio/minio-hs/d59f45fec4481313cfb5fafd635558ce385e7422/examples/GetConfig.hs | haskell | stack --resolver lts-14.11 runghc --package minio-hs
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.
S... | #!/usr/bin/env stack
MinIO Haskell SDK , ( C ) 2017 , 2018 MinIO , Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
import Network.Minio
import Network.Minio.AdminAPI
import Prelude
main :: IO ()
main = do
res <-
... |
0656af87c51ecf6f97a2592da473b9644c9cc859f6ad970cb686128fd77eb4de | manu291/dypgen | calc.ml | open Calc_parser
open Calc_lexer
let () = Printf.printf "
Simple calculator example
Priorities: pi<p*<p+
Grammar :
S -> E
E(pi) -> int
E(pi) -> - E(<=pi)
E(pi) -> ( E )
E(p+) -> E(<=p+) + E(<p+)
E(p+) -> E(<=p+) - E(<p+)
E(p*) -> E(<=p*) * E(<p*)
E(p*) -> E(<=p*) / E(<p*)
'q' to quit
"
let () = flush stdout
let l... | null | https://raw.githubusercontent.com/manu291/dypgen/59d11b4c70b8d0971348ca6913839ff1fb4f9b5f/demos/calc_ocamllex/calc.ml | ocaml | let o = (fst (List.hd (Dyp.parse parser "main" Calc_lexer.token lexbuf))) in
let i = match o with `Integer i -> i | _ -> assert false in
Printf.printf "= %d\n\n" i | open Calc_parser
open Calc_lexer
let () = Printf.printf "
Simple calculator example
Priorities: pi<p*<p+
Grammar :
S -> E
E(pi) -> int
E(pi) -> - E(<=pi)
E(pi) -> ( E )
E(p+) -> E(<=p+) + E(<p+)
E(p+) -> E(<=p+) - E(<p+)
E(p*) -> E(<=p*) * E(<p*)
E(p*) -> E(<=p*) / E(<p*)
'q' to quit
"
let () = flush stdout
let l... |
b90bb47d8b7a353e1c860ae52c0a1c92589c2bacbc4a0aade44be03ef711517a | dakk/caravand-fullnode | conv.ml | let byten_to_string b = match b with
| b' when b < 1024 -> Printf.sprintf "%dB" b'
| b' when b < 1024 * 1024 -> Printf.sprintf "%dKB" (b' / 1024)
| b' -> Printf.sprintf "%dMB" (b' / 1024 / 1024)
;;
| null | https://raw.githubusercontent.com/dakk/caravand-fullnode/72735bf380812aea32ba0d3d4aa671f741cdaecb/src/utils/conv.ml | ocaml | let byten_to_string b = match b with
| b' when b < 1024 -> Printf.sprintf "%dB" b'
| b' when b < 1024 * 1024 -> Printf.sprintf "%dKB" (b' / 1024)
| b' -> Printf.sprintf "%dMB" (b' / 1024 / 1024)
;;
| |
4cf1bb41a5b59f8696c1ea0e0e6999a5fc561acb275bfd46f417e089f33cd42d | colis-anr/colis-language | file_system.ml | open Common
open Inode
DEPRICATED
let get_vBigSet ( ) =
let ll = VarMap.bindings ! var_map in
let rec helper ll =
match ll with
| [ ] - > [ ]
|(v,_)::t - > v::(helper t )
in helper ll
let get_unreachable ( ) =
let vBigSet = ref ( get_vBigSet ( ) ) in
let ll = Va... | null | https://raw.githubusercontent.com/colis-anr/colis-language/c97094746537b4481ed148ffc26b9ed9d7a62c92/src/constraints/model/file_system.ml | ocaml | FOR PC USE BELOW
FOR DOCKER USE BELOW | open Common
open Inode
DEPRICATED
let get_vBigSet ( ) =
let ll = VarMap.bindings ! var_map in
let rec helper ll =
match ll with
| [ ] - > [ ]
|(v,_)::t - > v::(helper t )
in helper ll
let get_unreachable ( ) =
let vBigSet = ref ( get_vBigSet ( ) ) in
let ll = Va... |
0eed50596939d6cefaef08546baf684b74d210ffbc8698885736de3db68de0ca | AbstractMachinesLab/caramel | core_ast.ml | open Sexplib.Std
type atom = string [@@deriving sexp]
type var_name = string [@@deriving sexp]
type literal =
| Lit_integer of int
| Lit_float of float
| Lit_char of char
| Lit_string of string
| Lit_atom of atom
| Lit_nil
| Lit_cons of literal list * literal (* improper lists are a thing! *)
| Lit_t... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/690f1097f87923e193d4bf0c1cc31cccb6eae76a/erlang/src/core_ast.ml | ocaml | improper lists are a thing!
In the specification these are called "InterModuleCalls" | open Sexplib.Std
type atom = string [@@deriving sexp]
type var_name = string [@@deriving sexp]
type literal =
| Lit_integer of int
| Lit_float of float
| Lit_char of char
| Lit_string of string
| Lit_atom of atom
| Lit_nil
| Lit_tuple of literal list
| Lit_list of literal list
[@@deriving sexp]
and ... |
8228b3d3e324276c836b6b18a935648f266879370aa3c896f644305f587bc8b7 | jeffshrager/biobike | errors.lisp | ;;; -*- mode: Lisp; Syntax: Common-Lisp; Package: nvpl; -*-
(in-package :nvpl)
;;; +=========================================================================+
| Copyright ( c ) 2006 JP Massar , |
;;; | |
;;; | ... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/vplcode/errors.lisp | lisp | -*- mode: Lisp; Syntax: Common-Lisp; Package: nvpl; -*-
+=========================================================================+
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software and a... |
(in-package :nvpl)
| Copyright ( c ) 2006 JP Massar , |
| " Software " ) , to deal in the Software without restriction , including |
| distribute , sublicense , and/or sell copies of the Software , and to |
| permit persons to whom the Software is furnished to do s... |
9b56ddf9c85d0fb030a8d9f5a6216ffc76a6e126dce10bf841915d94e906a2b2 | johnlawrenceaspden/hobby-code | heron2.clj | We 've so far implemented Heron 's method for finding the square root of
the number 10 . The program looks like this :
(defn average [a b]
(/ (+ a b) 2))
(defn improve-guess [guess]
(average guess (/ 10 guess)))
(defn abs[x]
(if (< x 0) (- x) x))
(defn good-enough? [guess]
(< (abs (- 10 (* guess gues... | null | https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/heron2.clj | clojure | At this point, it might be a good idea to put the functions in a file.
Then we can carry on our conversational style of development.
iterative-improve function. This function should take a guess, a function to improve guesses,
and a function to tell when guesses are good enough, and return an answer which is good... | We 've so far implemented Heron 's method for finding the square root of
the number 10 . The program looks like this :
(defn average [a b]
(/ (+ a b) 2))
(defn improve-guess [guess]
(average guess (/ 10 guess)))
(defn abs[x]
(if (< x 0) (- x) x))
(defn good-enough? [guess]
(< (abs (- 10 (* guess gues... |
c6c1c7151ca7f464f8482f76a21af4a65793ff459ebd6a5dc4f6551e71083126 | ocharles/digestive-functors-aeson | Aeson.hs | # LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
-- | Run digestive-functors forms against JSON.
module Text.Digestive.Aeson
( digestJSON
, jsonErrors
) where
import Control.Lens
import Control.Monad (join)
import Data.Aeson (ToJSON(toJSON), Value(..), o... | null | https://raw.githubusercontent.com/ocharles/digestive-functors-aeson/9d9ca414c8914e732257b33410fbff0e554be1dc/src/Text/Digestive/Aeson.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
| Run digestive-functors forms against JSON.
------------------------------------------------------------------------------
^ The form to evaluate.
^ The JSON document to use for validation. If you need to use
only part of this document, you need to transform t... | # LANGUAGE NoMonomorphismRestriction #
module Text.Digestive.Aeson
( digestJSON
, jsonErrors
) where
import Control.Lens
import Control.Monad (join)
import Data.Aeson (ToJSON(toJSON), Value(..), object)
import Data.Aeson.Lens
import Data.Maybe (fromMaybe)
import Data.Monoid (mempty)
import Safe (readMay)
i... |
c5c7ace61a706030bcace9dddd2d736069a2557004ee47ec9a720d5240b29831 | lispm/FRL | satisfy.lisp | (include declar)
#+franz
(eval-when (compile)
(load 'dhl//rule))
#+franz
(eval-when (load eval)
(load 'dhl//match))
(declare (special replace-list)
(localf replace-vars1))
(defun replace-vars (pattern)
(let ((replace-list nil))
(replace-vars1 pattern)))
(defun replace-vars1 (pattern)
(cond ((nul... | null | https://raw.githubusercontent.com/lispm/FRL/1a2aadf71062a89474b1164e4539911011b3b63e/dhl/satisfy.lisp | lisp |
A set of functions which searched the database for
a match to a given pattern (frame slot value),
and returns all possible bindings to satisfy it,
nil if none.
special variable to allow return patterns to include
frames that were considered but don't have the desired slot/value.
our rule interpretor.
| (include declar)
#+franz
(eval-when (compile)
(load 'dhl//rule))
#+franz
(eval-when (load eval)
(load 'dhl//match))
(declare (special replace-list)
(localf replace-vars1))
(defun replace-vars (pattern)
(let ((replace-list nil))
(replace-vars1 pattern)))
(defun replace-vars1 (pattern)
(cond ((nul... |
7f9a909bfe98552dd92481bdfd5c61b79ab575cb73fd1cfc3a8f9b767401e95f | folq/elm-syntax | Simplification.hs | {-# language OverloadedStrings #-}
# language ViewPatterns #
module Language.Elm.Simplification
( simplifyDefinition
, simplifyExpression
) where
import Bound
import qualified Bound.Scope as Scope
import Bound.Var (unvar)
import Data.Bifunctor
import Data.Foldable (fold)
import Data.Text (Text)
import qualified ... | null | https://raw.githubusercontent.com/folq/elm-syntax/a38ac159c7c0eb7028e06c2982237bd2930623ac/src/Language/Elm/Simplification.hs | haskell | # language OverloadedStrings #
'Definition'.
| Run the following simplifications on the given expression:
* @(f >> g) x = g (f x)@
* @f >> identity = f@
* @identity >> f = f@
* @(f << g) x = f (g x)@
* @f << identity = f@
* @identity << f= f@
* @x :: [y, z, ...] = [x, y, z, ...]@
* Calls to @String.join@, @S... | # language ViewPatterns #
module Language.Elm.Simplification
( simplifyDefinition
, simplifyExpression
) where
import Bound
import qualified Bound.Scope as Scope
import Bound.Var (unvar)
import Data.Bifunctor
import Data.Foldable (fold)
import Data.Text (Text)
import qualified Data.Text as Text
import Language.... |
d3ae6110e04999d58b95423879fcf1e85686a3f474205396bb958737d2297e55 | rodrigosetti/stamps | adjustment-saturation-2.rkt | #lang s-exp stamps/lang
; Stamps Tutorial
; Adjustment - Saturation 2
; Just like in the previous example, but this time we reduce the
; saturation from full towards no color.
(define-shape ramp-down
(circle)
30 % less saturation
80 % smaller
[translate 1 0 ]))
; So the outer shape must have f... | null | https://raw.githubusercontent.com/rodrigosetti/stamps/958938dd71fdaa64041ea13f1b491bda628bda9c/tutorial/adjustment-saturation-2.rkt | racket | Stamps Tutorial
Adjustment - Saturation 2
Just like in the previous example, but this time we reduce the
saturation from full towards no color.
So the outer shape must have full saturation.
full saturation
red | #lang s-exp stamps/lang
(define-shape ramp-down
(circle)
30 % less saturation
80 % smaller
[translate 1 0 ]))
(define-shape outer
[brightness 1]))
Only draw a few render cycles , this gives 5 shapes
(maximum-render-cycles 10)
(start-shape outer) |
373f2bf9d85c99351985fb6ff158650a956011ac7e88ff26384ee596cb6a6e83 | Drezil/pioneers | Types.hs | { - # LANGUAGE ExistentialQuantification , RankNTypes , CPP , BangPatterns # - }
-- | Word32 or Word64 - depending on implementation. Format just specifies "uint".
4 - Byte in the documentation indicates - but not specified !
module Importer.IQM.Types where
import Control.Monad.Trans.State.Lazy (StateT)
import ... | null | https://raw.githubusercontent.com/Drezil/pioneers/2a9de00213144cfa870e9b71255a92a905dec3a9/src/Importer/IQM/Types.hs | haskell | | Word32 or Word64 - depending on implementation. Format just specifies "uint".
| Mesh-Indices to distinguish the meshes referenced
| State-Wrapped Parser-Monad which is capable of counting the
Bytes read for offset-gap reasons
^ Pointer for Data
| Header of IQM-Format.
ofs_* fields are relative to the begi... | { - # LANGUAGE ExistentialQuantification , RankNTypes , CPP , BangPatterns # - }
4 - Byte in the documentation indicates - but not specified !
module Importer.IQM.Types where
import Control.Monad.Trans.State.Lazy (StateT)
import Data.Int
import Data.Word
import Data.ByteString
import Data.Attoparsec.ByteString.... |
44bdca0ea0a7c299de111f70c0d5a6cea96e950feec60d871e80f8252829a253 | wingo/fibers | fan-out.scm | #!/usr/bin/env guile
# -*- scheme -*-
!#
(use-modules (ice-9 match)
(fibers)
(fibers channels))
(define (make-fan-out degree make-head make-tail)
(let ((ch (make-head)))
(let lp ((degree degree))
(when (positive? degree)
(make-tail ch)
(lp (1- degree))))))
(defin... | null | https://raw.githubusercontent.com/wingo/fibers/44d17e64e581fb281bae1390f74c762ecf089b58/benchmarks/fan-out.scm | scheme | #!/usr/bin/env guile
# -*- scheme -*-
!#
(use-modules (ice-9 match)
(fibers)
(fibers channels))
(define (make-fan-out degree make-head make-tail)
(let ((ch (make-head)))
(let lp ((degree degree))
(when (positive? degree)
(make-tail ch)
(lp (1- degree))))))
(defin... | |
f10005313cb3d7817caaaee33fa738f8b48157a8baf207777a2c1cbb373c1f10 | khotyn/4clojure-answer | 110-sequence-of-pronunciations.clj | (fn seq-of-pronunciations [coll]
(lazy-seq
(let [next-coll (apply concat (map #(vec [(count %) (first %)]) (partition-by #(if true %) coll)))]
(cons next-coll (seq-of-pronunciations next-coll))))) | null | https://raw.githubusercontent.com/khotyn/4clojure-answer/3de82d732faedceafac4f1585a72d0712fe5d3c6/110-sequence-of-pronunciations.clj | clojure | (fn seq-of-pronunciations [coll]
(lazy-seq
(let [next-coll (apply concat (map #(vec [(count %) (first %)]) (partition-by #(if true %) coll)))]
(cons next-coll (seq-of-pronunciations next-coll))))) | |
ae21c5a104ef9e5c1a4c82a37da8778c5da4f67ee0cb7376f93cbb5b482a41bf | ghc/nofib | Asb_routs.hs |
Some subroutines
XZ , 24/10/91
Some subroutines
XZ, 24/10/91
-}
Modified to employ S_array .
XZ , 7/2/92
Modified to employ S_array.
XZ, 7/2/92
-}
module Asb_routs
( get_asb_table, get_val, list_inner_prod, list_match_prod, add_mat, add_u, mult )
where
import Defs
import S_Array -- not need... | null | https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/real/fluid/Asb_routs.hs | haskell | not needed w/ proper module handling
ditto
---------------------------------------------------------
Generating a lookup table for assembling a system --
matrix using a corresponging steering vector. --
The result is an array of tuple list. --
The ith entry of the array contains all el... |
Some subroutines
XZ , 24/10/91
Some subroutines
XZ, 24/10/91
-}
Modified to employ S_array .
XZ , 7/2/92
Modified to employ S_array.
XZ, 7/2/92
-}
module Asb_routs
( get_asb_table, get_val, list_inner_prod, list_match_prod, add_mat, add_u, mult )
where
import Defs
import Data.Ix
get_asb_t... |
c0452a03558b21cde856a5ede286b89b53c530387f568a1f202df512fb13cf71 | padsproj/pads-haskell | VCard.hs | # LANGUAGE TypeFamilies , TemplateHaskell , QuasiQuotes , MultiParamTypeClasses , FlexibleInstances , DeriveDataTypeable , ScopedTypeVariables , TypeSynonymInstances #
module VCard
( -- $doc
VCard(..)
, CommonName
, IndividualNames(..)
, VCardProperty(..)
, AddrType(..)
, TelType(..)
... | null | https://raw.githubusercontent.com/padsproj/pads-haskell/8dce6b2b28bf7d98028e67f6faa2be753a6ad691/examples/VCard.hs | haskell | $doc
Lines are delimited with carriage return/line-feed (control-M, newline) \r\n
guaranteed to be in a particular order.
| Version number of VCard file format
| Formated name of the represented person
| A list of nicknames belonging to the VCard entity. E.g.,
| A photo of the VCard entity. E.g.,
> Pho... | # LANGUAGE TypeFamilies , TemplateHaskell , QuasiQuotes , MultiParamTypeClasses , FlexibleInstances , DeriveDataTypeable , ScopedTypeVariables , TypeSynonymInstances #
module VCard
VCard(..)
, CommonName
, IndividualNames(..)
, VCardProperty(..)
, AddrType(..)
, TelType(..)
, EmailType(..... |
0ec32d2632664f512a4ce3ce5f7c7d776e1b3bbc812514e3856498b255905a10 | saleyn/util | pmap.erl | %%%------------------------------------------------------------------------
%%% File: $Id$
%%%------------------------------------------------------------------------
@doc Parallel map and multicall .
%%%
@author < > ( )
( ) ( pmap )
%%% @version $Rev$
$ Date : 2008/07/02 03:29:58 $
%... | null | https://raw.githubusercontent.com/saleyn/util/fbf5e3d5f985507863fe76a4b32abb48a69e352d/src/pmap.erl | erlang | ------------------------------------------------------------------------
File: $Id$
------------------------------------------------------------------------
@version $Rev$
@end
------------------------------------------------------------------------
-----------------------------------------------------------------... | @doc Parallel map and multicall .
@author < > ( )
( ) ( pmap )
$ Date : 2008/07/02 03:29:58 $
Created : 2008/02/11 10:07:15
-module(pmap).
-author('').
-id ("$Id$").
-export([pmap/2, pmap/3, multicall/2, reply/2]).
-ifdef(DEBUG).
-export([test/0, test1/0, test2/0, test3/0]).
-e... |
a57ce08ca24679a645ebebef495bc2e8b5f4af462193ae0012b973ef631de558 | UU-ComputerScience/uhc | HigherRankImpred1.hs | ----------------------------------------------------------------------------------------
what : ( im)predicativity & higher rank types
expected : all ok
note : these appear on as well
----------------------------------------------------------------------------------------
what : (im)pr... | null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/99/HigherRankImpred1.hs | haskell | --------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------- -}
should be: [forall a. a->a], but is forall a.[a->a]
t... | what : ( im)predicativity & higher rank types
expected : all ok
note : these appear on as well
what : (im)predicativity & higher rank types
expected: all ok
note : these appear on as well
module Main where
apply :: forall a . forall b . (a -> b) -> a -> b
apply f x = f x
revap... |
24d092a367e96844f83493bd3a0fbed72708c1ba48ceba127441e29efcfa9f1b | hopv/MoCHi | CSIsatInterface.ml | open Util
open Combinator
open Term
(** @todo elim unit first
@todo add theories for true, false, nil, cons, len *)
* { 6 Functions for CSIsat formulas }
let csisat_unit = CsisatAst.Application("unit", [])
let csisat_true = CsisatAst.Application("true", [])
let csisat_false = CsisatAst.Application("false", [])
l... | null | https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/fpat/CSIsatInterface.ml | ocaml | * @todo elim unit first
@todo add theories for true, false, nil, cons, len
this encoding is not OK
input1: x = tuple(true(), true(), true())
input2: x = tuple(y, z, false())
has an interpolant but cannot be found
apply this to only atoms
@todo
assert false
this may cause a stack overflow error
*@tod... | open Util
open Combinator
open Term
* { 6 Functions for CSIsat formulas }
let csisat_unit = CsisatAst.Application("unit", [])
let csisat_true = CsisatAst.Application("true", [])
let csisat_false = CsisatAst.Application("false", [])
let csisat_tuple ts = CsisatAst.Application("tuple", ts)
let list_conj = function
... |
61359740842ac77e56bd8777deada33f80286f2f49e8155194f041d033b88264 | christian-marie/oauth2-server | App.hs | --
Copyright © 2013 - 2015 Anchor Systems , Pty Ltd and Others
--
-- The code in this file, and the program it is a part of, is
-- made available to you by its authors as open source software:
-- you can redistribute it and/or modify it under the terms of
the 3 - clause BSD licence .
--
{-# LANGUAGE DataKinds ... | null | https://raw.githubusercontent.com/christian-marie/oauth2-server/ebb75be9d05dd52d478a6e069d32461d4e54544e/lib/Network/OAuth2/Server/App.hs | haskell |
The code in this file, and the program it is a part of, is
made available to you by its authors as open source software:
you can redistribute it and/or modify it under the terms of
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE QuasiQuotes #
# LANGUAGE RankNTypes ... | Copyright © 2013 - 2015 Anchor Systems , Pty Ltd and Others
the 3 - clause BSD licence .
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE ... |
54c91bd8b60435b404b109d4f82046fda4a3c8a43a5a4eb6326776ec44abecb1 | elastic/eui-cljs | search_box.cljs | (ns eui.search-box
(:require ["@elastic/eui/lib/components/search_bar/search_box.js" :as eui]))
(def EuiSearchBox eui/EuiSearchBox)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/search_box.cljs | clojure | (ns eui.search-box
(:require ["@elastic/eui/lib/components/search_bar/search_box.js" :as eui]))
(def EuiSearchBox eui/EuiSearchBox)
| |
a113fee4c3dec7c39fb19b8819cca96c5f757881850bae067361e72eb7c17ca5 | fdopen/ppx_cstubs | namelib.c.ml | let%c () = header "#include <glib.h>"
external real_name : void -> string_opt = "g_get_real_name"
| null | https://raw.githubusercontent.com/fdopen/ppx_cstubs/5d5ce9b7cf45d87bb71c046a76d30c17ec6075e5/examples/dune-project/src/lib/namelib.c.ml | ocaml | let%c () = header "#include <glib.h>"
external real_name : void -> string_opt = "g_get_real_name"
| |
c41b18746a508bf029c18c15e9f38c093b9c3023af12aef2346303c1ee207f98 | jacquev6/General | Number.ml | module Operators = struct
module type S0 = sig
type t
include Identifiable.Operators.S0 with type t := t
include Traits.Ringoid.Operators.S0 with type t := t
end
end
module type S0 = sig
type t
module O: Operators.S0 with type t := t
include Identifiable.S0 with type t := t and module O := O
in... | null | https://raw.githubusercontent.com/jacquev6/General/5237123668e939c0cb83aa3e1c4756473336bc7e/src/Generated/Concepts/Number.ml | ocaml | module Operators = struct
module type S0 = sig
type t
include Identifiable.Operators.S0 with type t := t
include Traits.Ringoid.Operators.S0 with type t := t
end
end
module type S0 = sig
type t
module O: Operators.S0 with type t := t
include Identifiable.S0 with type t := t and module O := O
in... | |
454ba8dff1989aa84d872c024ec6d24e6179199a1ff7fb9f139227356984f88e | chanshunli/clojurescript-study | project.clj | (defproject wordcloud2-cljs "0.1.0-SNAPSHOT"
:description "FIXME: write this!"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:min-lein-version "2.7.1"
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.229"]
[org.cl... | null | https://raw.githubusercontent.com/chanshunli/clojurescript-study/60f72e0a9198189d8a5a8f80e455909b5368b19f/reagent-use-plugin/wordcloud2-cljs/project.clj | clojure | the presence of a :figwheel configuration here
will cause figwheel to inject the figwheel client
into your build
:open-urls will pop open your application
started and complied your application.
Comment this out once it no longer serves you.
-devtools
This next build is an compressed minified build for
producti... | (defproject wordcloud2-cljs "0.1.0-SNAPSHOT"
:description "FIXME: write this!"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:min-lein-version "2.7.1"
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.229"]
[org.cl... |
58e5657a7bdd15801c8649d3d7568107b9964d53d78caca9f5c1db5acdaf681d | reflex-frp/reflex-dom-contrib | Geoposition.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE GADTs #
module Reflex.Dom.Contrib.Geoposition where
------------------------------------------------------------------------------
import Control.Concurrent (forkIO)
import Control.Monad.Catch (catch, throwM)
import Contr... | null | https://raw.githubusercontent.com/reflex-frp/reflex-dom-contrib/09d1223a3eadda768a6701410b4532fda8c7033d/src/Reflex/Dom/Contrib/Geoposition.hs | haskell | # LANGUAGE FlexibleContexts #
----------------------------------------------------------------------------
---------------------------------------------------------------------------- | # LANGUAGE GADTs #
module Reflex.Dom.Contrib.Geoposition where
import Control.Concurrent (forkIO)
import Control.Monad.Catch (catch, throwM)
import Control.Monad.IO.Class (liftIO)
import Data.Typeable
import GHCJS.DOM (currentWindow)
import ... |
79ef387aa6332fb5acb21e42e1a84c5bb1acb3b792488d8993e795e97d7f3ac9 | snmsts/cl-langserver | thread-list.lisp | (in-package :ls-base)
;;;; Thread listing
(defvar *thread-list* ()
"List of threads displayed in Emacs. We don't care a about
synchronization issues (yet). There can only be one thread listing at
a time.")
(defslyfun list-threads ()
"Return a list (LABELS (ID NAME STATUS ATTRS ...) ...).
LABELS is a list of att... | null | https://raw.githubusercontent.com/snmsts/cl-langserver/3b1246a5d0bd58459e7a64708f820bf718cf7175/src/helitage/thread-list.lisp | lisp | Thread listing
FIXME: hardcoded thread name | (in-package :ls-base)
(defvar *thread-list* ()
"List of threads displayed in Emacs. We don't care a about
synchronization issues (yet). There can only be one thread listing at
a time.")
(defslyfun list-threads ()
"Return a list (LABELS (ID NAME STATUS ATTRS ...) ...).
LABELS is a list of attribute names and the... |
d950f323b371f1d08f9a7e88b1cc77a49be8bb12e92015ab2aed61fb655ee7be | racket/gui | info.rkt | #lang info
(define deps '("base"))
(define collection "mrlib")
(define pkg-desc "Table of TeX-style abbreviations")
(define pkg-authors '(robby))
(define license
'(Apache-2.0 OR MIT))
| null | https://raw.githubusercontent.com/racket/gui/87d0b616523acd94e0f9d6835cb64e966688cbb8/tex-table/info.rkt | racket | #lang info
(define deps '("base"))
(define collection "mrlib")
(define pkg-desc "Table of TeX-style abbreviations")
(define pkg-authors '(robby))
(define license
'(Apache-2.0 OR MIT))
| |
1447827abc2422acaa6a3b73ad59e15a8a316537a3b701eb3d38d89bf5dd1776 | tiensonqin/lymchat-exp | language.cljs | (ns lymchat.shared.scene.language
(:require [reagent.core :as r]
[re-frame.core :refer [subscribe dispatch]]
[lymchat.styles :refer [styles pl-style]]
[lymchat.shared.ui :refer [react-native list-view view text input touchable-opacity colors]]
[lymchat.locales :refer [l... | null | https://raw.githubusercontent.com/tiensonqin/lymchat-exp/425a0738b11632119be08b5a59f12244f5df1575/src/lymchat/shared/scene/language.cljs | clojure | (ns lymchat.shared.scene.language
(:require [reagent.core :as r]
[re-frame.core :refer [subscribe dispatch]]
[lymchat.styles :refer [styles pl-style]]
[lymchat.shared.ui :refer [react-native list-view view text input touchable-opacity colors]]
[lymchat.locales :refer [l... | |
7062ebbea5da19c8cfaa344a8ce6bd46173e284982c4ddccd413f1e97b3bc025 | yannick-cw/notion-ocr | UpdaterSpec.hs | # LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE LambdaCase #
module UpdaterSpec where
import Test.Hspec
import Updater
import Control.Monad.Except
import Control.Monad.State
import Control.Monad.Writer
import Control.Mon... | null | https://raw.githubusercontent.com/yannick-cw/notion-ocr/e67af0fa5db08e4b28cb90549b524b73ed53b6c1/test/UpdaterSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
module UpdaterSpec where
import Test.Hspec
import Updater
import Control.Monad.Except
import Control.Monad.State
import Control.Monad.Writer
import Control.Monad.Reader ( MonadReader )... |
ef2447bdc9bd334085ec064177c669f04ab9dfe5ab25ead3c18ccd06241aea4c | haskell/ghcide | HoverDefinition.hs | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
-- | Display information on hover.
module Development.IDE.LSP.HoverDefinition
( setHandlersHover
, setHandlersDefinition
, setHandlersTypeDefinition
, setHandlersDocHighlight
-- * For haskell... | null | https://raw.githubusercontent.com/haskell/ghcide/3ef4ef99c4b9cde867d29180c32586947df64b9e/src/Development/IDE/LSP/HoverDefinition.hs | haskell | | Display information on hover.
* For haskell-language-server
| Respond to and log a hover or go-to-definition request | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
module Development.IDE.LSP.HoverDefinition
( setHandlersHover
, setHandlersDefinition
, setHandlersTypeDefinition
, setHandlersDocHighlight
, hover
, gotoDefinition
, gotoTypeDefiniti... |
59f4af8e4a0838d1ca62d3fe6b604d39b6262c13b5219316da2b395493c9f725 | pallet/ritz | swank-backend.lisp | ;;; -*- Mode: lisp; indent-tabs-mode: nil; outline-regexp: ";;;;;*" -*-
;;;
;;; slime-backend.lisp --- SLIME backend interface.
;;;
Created by in 2003 . Released into the public domain .
;;;
;;;; Frontmatter
;;;
;;; This file defines the functions that must be implemented
;;; separately for each Lisp. Each is decla... | null | https://raw.githubusercontent.com/pallet/ritz/4003fdaa5657d4ed1eeb0e244c46658cbb981667/slime/swank-backend.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil; outline-regexp: ";;;;;*" -*-
slime-backend.lisp --- SLIME backend interface.
Frontmatter
This file defines the functions that must be implemented
separately for each Lisp. Each is declared as a generic function
for which swank-<implementation>.lisp provides methods.
int... | Created by in 2003 . Released into the public domain .
(defpackage :swank-backend
(:use :common-lisp)
(:export #:*debug-swank-backend*
#:sldb-condition
#:compiler-condition
#:original-condition
#:message
#:source-context
#:condition
#... |
f7d52ff2eb988ada4f827abc2ccd5f25c172e8eda3e8c1da5dc1ea85c7d5c1c7 | magnars/optimus | digest_test.clj | (ns optimus.digest-test
(:use optimus.digest
midje.sweet)
(:require [clojure.java.io :as io]))
(fact (sha-1 "abc") => "a9993e364706816aba3e25717850c26c9cd0d89d")
(fact (sha-1 "def") => "589c22335a381f122d129225f5c0ba3056ed5811")
(def blank-gif (slurp (io/resource "blank.gif") :encoding "UTF-8"))
(fact (b... | null | https://raw.githubusercontent.com/magnars/optimus/ac5df602726d255312dfd48cf7ae2e00d99069bd/test/optimus/digest_test.clj | clojure | (ns optimus.digest-test
(:use optimus.digest
midje.sweet)
(:require [clojure.java.io :as io]))
(fact (sha-1 "abc") => "a9993e364706816aba3e25717850c26c9cd0d89d")
(fact (sha-1 "def") => "589c22335a381f122d129225f5c0ba3056ed5811")
(def blank-gif (slurp (io/resource "blank.gif") :encoding "UTF-8"))
(fact (b... | |
3dfb8c499b10e3a245135ab1adb97f211c387ecf0b417bcbf7d38c8dba2a0471 | aryx/xix | lexing.mli | (*s: stdlib/lexing.mli *)
(*s: copyright ocamllex *)
(***********************************************************************)
(* *)
(* Objective Caml *)
(* ... | null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/lib_parsing/orig/lexing.mli | ocaml | s: stdlib/lexing.mli
s: copyright ocamllex
*********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
* * buffers
The run - time library for lexers generated by ocamllex
type lexbuf =
{ refill_buff : lexbuf -... |
0cb5f4cd88f64d57c7ef222c90489229363bd81f595a8e06fe0ec20d6820d27b | lopec/LoPEC | io_module_SUITE.erl | -module(io_module_SUITE).
% easier than exporting by name
-compile(export_all).
% required for common_test to work
-include_lib("common_test/include/ct.hrl").
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% common test callbacks %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
all() ->
[fs_io_test].
init_per_suite(Config) ->
error_logger:tt... | null | https://raw.githubusercontent.com/lopec/LoPEC/29a3989c48a60e5990615dea17bad9d24d770f7b/trunk/lib/common/test/io_module_SUITE.erl | erlang | easier than exporting by name
required for common_test to work
common test callbacks %%
test cases %%
| -module(io_module_SUITE).
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
all() ->
[fs_io_test].
init_per_suite(Config) ->
error_logger:tty(false),
Config.
end_per_suite(_Config) ->
ok.
init_per_testcase(fs_io_test, Config) ->
io_module:start_link(fs_io_module, []),
Conf... |
ba8e8428130fcaacd367d892ced7ddde1a849fa0493fcc5ff1011024aeb997ee | chunsj/TH | operator.lisp | (declaim (optimize (speed 3) (debug 1) (safety 0)))
(in-package :th)
(defun broadcast-number (c m)
(node ($mul! ($one m) ($data c))
:name :broadcast
:link (link (to c ($dot ($one m) gv)))))
(defun broadcast-1x1 (c m)
(node ($mul! ($one m) ($data c))
:name :broadcast
:link (link (t... | null | https://raw.githubusercontent.com/chunsj/TH/890f05ab81148d9fe558be3979c30c303b448480/bp/operator.lisp | lisp | (declaim (optimize (speed 3) (debug 1) (safety 0)))
(in-package :th)
(defun broadcast-number (c m)
(node ($mul! ($one m) ($data c))
:name :broadcast
:link (link (to c ($dot ($one m) gv)))))
(defun broadcast-1x1 (c m)
(node ($mul! ($one m) ($data c))
:name :broadcast
:link (link (t... | |
47d6413595edd3a8e9b803065fff0d4c1e7d7b64ea6ca0d00c44cee43852347b | ddmcdonald/sparser | ns-undef-items-covid-comm-pmc-501-1000.lisp |
(in-package :sp)
(defparameter *ns-undef-covid-comm-pmc-501-1000*
'("198A" "198AA" "198C" "198CC" "2+M-5" "2+M-5+M6" "2+M-6" "323A" "3×FLAG" "577C" "<20-10,000"
"<4,000" "<k>−1" ">40" ">400,000" "A-2058" "A-375" "A-DNA" "A-H1N1" "A-H5N1" "A-HA" "A-MID"
"A-SAA" "A-T-G" "A-Tailing" "A-form" "A-to-G" "A1-2" "A1... | null | https://raw.githubusercontent.com/ddmcdonald/sparser/304bd02d0cf7337ca25c8f1d44b1d7912759460f/Sparser/code/s/tools/ns-stuff/ns-undef-items-covid-comm-pmc-501-1000.lisp | lisp |
(in-package :sp)
(defparameter *ns-undef-covid-comm-pmc-501-1000*
'("198A" "198AA" "198C" "198CC" "2+M-5" "2+M-5+M6" "2+M-6" "323A" "3×FLAG" "577C" "<20-10,000"
"<4,000" "<k>−1" ">40" ">400,000" "A-2058" "A-375" "A-DNA" "A-H1N1" "A-H5N1" "A-HA" "A-MID"
"A-SAA" "A-T-G" "A-Tailing" "A-form" "A-to-G" "A1-2" "A1... | |
9f8dca4394c011066796044e4b095213f52d27e1ed6b25404d3db6f7e0edf35d | tatut/clj-chrome-devtools | events.clj | (ns clj-chrome-devtools.events
"Listening to events coming from Chrome."
(:require [clj-chrome-devtools.impl.connection :as connection]))
(def default-wait-ms 30000)
(defn listen
"Subscribe to listen to given domain event. Both domain and event are keywords.
Returns a 0-arity function that removes the listene... | null | https://raw.githubusercontent.com/tatut/clj-chrome-devtools/e5b816f5f2f9bb7411af6f1bd1edf175c955ec9c/src/clj_chrome_devtools/events.clj | clojure | (ns clj-chrome-devtools.events
"Listening to events coming from Chrome."
(:require [clj-chrome-devtools.impl.connection :as connection]))
(def default-wait-ms 30000)
(defn listen
"Subscribe to listen to given domain event. Both domain and event are keywords.
Returns a 0-arity function that removes the listene... | |
67bc719c4d5e4270de906e17707627bb08acac74286fc8cea6432ed9954de460 | unisonweb/unison | Convert2.hs | | Description : Converts V2 types to the V2 hashing types
module Unison.Hashing.V2.Convert2
( v2ToH2Type,
v2ToH2TypeD,
h2ToV2Reference,
)
where
import qualified U.Codebase.Kind as V2
import qualified U.Codebase.Reference as V2
import qualified U.Codebase.Term as V2 (TypeRef)
import qualified U.Codebase.T... | null | https://raw.githubusercontent.com/unisonweb/unison/cf278f9fb66ccb9436bf8a2eb4ab03fc7a92021d/codebase2/codebase-sqlite-hashing-v2/src/Unison/Hashing/V2/Convert2.hs | haskell | | Description : Converts V2 types to the V2 hashing types
module Unison.Hashing.V2.Convert2
( v2ToH2Type,
v2ToH2TypeD,
h2ToV2Reference,
)
where
import qualified U.Codebase.Kind as V2
import qualified U.Codebase.Reference as V2
import qualified U.Codebase.Term as V2 (TypeRef)
import qualified U.Codebase.T... | |
4dc10f342b1f927b3ebfaf14981c09bc6eafa8e64476df48458f81f1ac62cc82 | google/proto-lens | Prism.hs | -- Copyright 2016 Google Inc. All Rights Reserved.
--
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file or at
-- -source/licenses/bsd
-- | This module defines the 'Prism' type and combinators. Used for building
-- 'Prism's for oneof fields.
{-# LANGUAGE RankNTypes... | null | https://raw.githubusercontent.com/google/proto-lens/081815877430afc1db669ca5e4edde1558b5fd9d/proto-lens/src/Data/ProtoLens/Prism.hs | haskell | Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file or at
-source/licenses/bsd
| This module defines the 'Prism' type and combinators. Used for building
'Prism's for oneof fields.
# LANGUAGE RankNTypes #
--------------... |
module Data.ProtoLens.Prism
( Prism
, Prism'
, AReview
, (#)
, prism
, prism'
, _Left
, _Right
, _Just
, _Nothing
) where
import Data.Tagged (Tagged (..))
import Data.Functor.Identity (Identity (..))
import Data.Profunctor (dimap)
import Data.Profunctor.Choice
import ... |
e8f81f8b0d06b52c40348500ab39abf033ab01925a5e657600554bf296a0463d | alavrik/piqi | piqi_command.ml |
Copyright 2009 , 2010 , 2011 , 2012 , 2013 , 2014 , 2015 , 2017
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... | null | https://raw.githubusercontent.com/alavrik/piqi/bcea4d44997966198dc295df0609591fa787b1d2/piqilib/piqi_command.ml | ocaml | command-line parameters
close previously opened output channel
close previously opened input channel
remove temporary files
delete output file
init various stuff related to --debug <level> |
Copyright 2009 , 2010 , 2011 , 2012 , 2013 , 2014 , 2015 , 2017
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... |
f30038ce97ffc43c3d1b3952acb3b63372adc6a92d4f08d63ba18a594bb6e7e6 | tolysz/ghcjs-stack | Fetch.hs | -----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Fetch
Copyright : ( c ) 2005
2011
-- License : BSD-like
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
-- The cabal fetch comma... | null | https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal-next/cabal-install/Distribution/Client/Fetch.hs | haskell | ---------------------------------------------------------------------------
|
Module : Distribution.Client.Fetch
License : BSD-like
Maintainer :
Stability : provisional
Portability : portable
The cabal fetch command
---------------------------------------------------------------------------
... | Copyright : ( c ) 2005
2011
module Distribution.Client.Fetch (
fetch,
) where
import Distribution.Client.Types
import Distribution.Client.Targets
import Distribution.Client.FetchUtils hiding (fetchPackage)
import Distribution.Client.Dependency
import Distribution.Client.IndexUtils... |
299b18f17974ff4808ec3854ab9a93d23506a681b311f3118e90eac5c5086b9c | digital-asset/ghc | tc269.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE PolyKinds #
module Tc269 where
import GHC.Types
-- We 'd like this to kind check , but it does n't today ,
-- see Note [ Missed opportunity to retain higher - rank kinds ]
-- TSyn is in an SCC of its own , so we can read off the
-- kind directly .
data T ( p : : foral... | null | https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/typecheck/should_compile/tc269.hs | haskell | # LANGUAGE RankNTypes #
We 'd like this to kind check , but it does n't today ,
see Note [ Missed opportunity to retain higher - rank kinds ]
TSyn is in an SCC of its own , so we can read off the
kind directly .
We'd like this to kind check, but it doesn't today,
see Note [Missed opportunity to retain higher-... | # LANGUAGE PolyKinds #
module Tc269 where
import GHC.Types
data T ( p : : forall Type ) = T
type TSyn = T
data T (p :: forall k. k -> Type) = T
type TSyn = T
-}
S and SSyn are in an SCC , so we do kind inference for
data K (a :: k) = K
data S (p :: forall k. k -> Type) = S (SSyn K)
type SSyn = (S :: (f... |
5c0ac56290da890d99693d1e2f914aac408f3fd62e2be374659daafe618e3242 | simmone/racket-simple-xlsx | fills.rkt | #lang racket
(require "../../style/fill-style.rkt")
(provide (contract-out
[to-fills (-> (listof FILL-STYLE?) list?)]
[from-fills (-> hash? void?)]
))
(define (to-fills fill_list)
(append
(list "fills" (cons "count" (number->string (+ 2 (length fill_list)))))
'(("fill" ("pattern... | null | https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/xl/styles/fills.rkt | racket | #lang racket
(require "../../style/fill-style.rkt")
(provide (contract-out
[to-fills (-> (listof FILL-STYLE?) list?)]
[from-fills (-> hash? void?)]
))
(define (to-fills fill_list)
(append
(list "fills" (cons "count" (number->string (+ 2 (length fill_list)))))
'(("fill" ("pattern... | |
d90fa8e8a8b544a52b3988ca1be33b07cf89feb98cbced2b9b86695dc4939f5c | jpverkamp/ios-backup | utils.rkt | #lang racket/base
(provide (all-defined-out))
(require db
file/sha1
racket/list
racket/file
racket/format
racket/match
racket/string
racket/system
racket/port
xml/plist)
; Process a phone number or email address into a common format
(de... | null | https://raw.githubusercontent.com/jpverkamp/ios-backup/f25415d378db13ec475c81cbc1d0f1b5217b2287/utils.rkt | racket | Process a phone number or email address into a common format
Standard phone numbers
TODO: Figure out international numbers
Email addresses
Short phone numbers
No idea...
Convert a plist into a JSON expression
Should we special case these?
Ditto
Read a plist file as a JSON expression from a file
Read a plist... | #lang racket/base
(provide (all-defined-out))
(require db
file/sha1
racket/list
racket/file
racket/format
racket/match
racket/string
racket/system
racket/port
xml/plist)
(define (normalize-contact value)
(cond
[(sql-null? value)
... |
105710bfaf8f5f590a383604577edd1ea1c978e4ab45b2c29d117a0b743a684b | arne-schroppe/dash | CodeGen.hs | module Language.Dash.CodeGen.CodeGen (
compile
) where
import Control.Monad
import Control.Monad.Except (runExceptT,
throwError)
import Control.Monad.Identity (runIdentity)
import ... | null | https://raw.githubusercontent.com/arne-schroppe/dash/82df755edc6555cba808539970ab6ff225c18b35/src/Language/Dash/CodeGen/CodeGen.hs | haskell | TODO explain what the code generator does and how it does it !
Don't add func header for wrapping function
we're using some fake param names here because that's what beginFunction expects
Have to re-add to outer scope
we add the name already here for recursion
Have to re-add to outer scope
TODO codeConstant?
fr... | module Language.Dash.CodeGen.CodeGen (
compile
) where
import Control.Monad
import Control.Monad.Except (runExceptT,
throwError)
import Control.Monad.Identity (runIdentity)
import ... |
e89d147108b4640afd2ace9e1472a20069f949c6effd2564b0a97d4234fc9f16 | SquidDev/urn | set.lisp | "This module implements hash sets as backed by hash maps, optionally
with a custom hash function."
(import data/struct ())
(defstruct (set make-set set?)
"Create a new, empty set with the given HASH-FUNCTION. If no
hash function is given, [[make-set]] defaults to using object
identity, that is, [[id]].
*... | null | https://raw.githubusercontent.com/SquidDev/urn/6e6717cf1376b0950e569e3771cb7e287aed291d/lib/data/set.lisp | lisp | "This module implements hash sets as backed by hash maps, optionally
with a custom hash function."
(import data/struct ())
(defstruct (set make-set set?)
"Create a new, empty set with the given HASH-FUNCTION. If no
hash function is given, [[make-set]] defaults to using object
identity, that is, [[id]].
*... | |
85aab81b5a82e9a5339529f529fc6fc2c192c92aa07f824644e2c24916cd1361 | number571/Haskell | all.hs | module Main where
all' :: (a -> Bool) -> [a] -> Bool
all' _ [] = True
all' f (x:xs)
| f x = all' f xs
| otherwise = False
main :: IO()
main = print $ all' (<10) [1,2,3,4,5]
| null | https://raw.githubusercontent.com/number571/Haskell/7da2676c2604706d43791dc89c0ca8c9842aea48/Templates/all.hs | haskell | module Main where
all' :: (a -> Bool) -> [a] -> Bool
all' _ [] = True
all' f (x:xs)
| f x = all' f xs
| otherwise = False
main :: IO()
main = print $ all' (<10) [1,2,3,4,5]
| |
e3167251065d18db09b3cf8b91e36774b84e0f8d674c1112f527bb4dc44f3ae1 | JKTKops/cspim | Flags.hs | # LANGUAGE TypeFamilies #
module Compiler.Flags where
import Data.Data
import qualified Data.Set as S
import Data.Char
import Control.Lens
data Flag
= Verbose
| E -- stop after preprocessing
| FDeferOutOfScopeErrors
| DumpTac
| DumpSimpl
| DumpToFile
deriving (Eq, Ord, Show, Enum, Bo... | null | https://raw.githubusercontent.com/JKTKops/cspim/0218d88ee774023eecef2c4a0733c3cf1184f443/src/Compiler/Flags.hs | haskell | stop after preprocessing | # LANGUAGE TypeFamilies #
module Compiler.Flags where
import Data.Data
import qualified Data.Set as S
import Data.Char
import Control.Lens
data Flag
= Verbose
| FDeferOutOfScopeErrors
| DumpTac
| DumpSimpl
| DumpToFile
deriving (Eq, Ord, Show, Enum, Bounded)
newtype Flags = Flags { getFl... |
8e6865be77972f02392e39eead88148d6e4e34a6ea595fc92ca1bc698dec2943 | RichiH/git-repair | Process.hs | System . Process enhancements , including additional ways of running
- processes , and logging .
-
- Copyright 2012 - 2015 < >
-
- License : BSD-2 - clause
- processes, and logging.
-
- Copyright 2012-2015 Joey Hess <>
-
- License: BSD-2-clause
-}
# LANGUAGE CPP , Rank2Types #
# OPTIONS_GH... | null | https://raw.githubusercontent.com/RichiH/git-repair/c61b677e7a67a286df34c0629c52aeae9be9299a/Utility/Process.hs | haskell | | Normally, when reading from a process, it does not need to be fed any
standard input.
returns its output, and also allows specifying the environment.
fork off a thread to start consuming the output
now write and flush any input
wait on the output
wait on the process
did not exit successfully.
Note that using... | System . Process enhancements , including additional ways of running
- processes , and logging .
-
- Copyright 2012 - 2015 < >
-
- License : BSD-2 - clause
- processes, and logging.
-
- Copyright 2012-2015 Joey Hess <>
-
- License: BSD-2-clause
-}
# LANGUAGE CPP , Rank2Types #
# OPTIONS_GH... |
2cd4d23b2a96856eaa6c58df84416c7922c6c1df0a549d82ac70daf839cd9669 | facebook/infer | CReplaceDynamicDispatch.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/fea5b712537ed22711dd3b95d2a4d45776d68061/infer/src/clang/CReplaceDynamicDispatch.ml | ocaml | Accumulate dynamic dispatch context in the node
e.g., n$2 = _fun_NSString.stringWithUTF8String:("dispatch_1":char* const ) |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
b9f94754b8f2fb911793522e32f6ee6126e5963b9664934966d7d24d54920688 | sofuture/rogueunlike | ru_util.erl | %% ============================================================================
Rogueunlike 0.30.0
%%
Copyright 2010
%%
%% This software is provided with absolutely no assurances, guarantees,
%% promises or assertions whatsoever.
%%
%% Do what thou wilt shall be the whole of the law.
%% ==========================... | null | https://raw.githubusercontent.com/sofuture/rogueunlike/67b29414ff13fd9e6711c04cfdc462c7985ded18/src/ru_util.erl | erlang | ============================================================================
This software is provided with absolutely no assurances, guarantees,
promises or assertions whatsoever.
Do what thou wilt shall be the whole of the law.
============================================================================
====... | Rogueunlike 0.30.0
Copyright 2010
-module(ru_util).
-author("Jeff Zellner <>").
-include("ru.hrl").
-export([get_window_dimensions/0, centering_coords/2, direction_coords/2]).
-export([coordinate_delta_direction/1]).
get_window_dimensions() ->
encurses:getmaxxy().
centering_coords(Width, Height) ->
... |
9f58fabced4a601542043ed142ee6e40cb299a9c0c8daa3d555726d4a35ca51b | mirage/mirage-profile | mProf_trace_without_tracing.ml | Copyright ( C ) 2014 ,
type hiatus_reason =
| Wait_for_work
| Suspend
| Hibernate
let note_hiatus _reason = ()
let note_resume () = ()
let label _label = ()
let named_wait _label = Lwt.wait ()
let named_task _label = Lwt.task ()
let named_condition _label = Lwt_condition.create ()
let named_mvar _label v =... | null | https://raw.githubusercontent.com/mirage/mirage-profile/e6da34d492839d10de28678a3ee352e9c3fa7e65/lib/mProf_trace_without_tracing.ml | ocaml | Copyright ( C ) 2014 ,
type hiatus_reason =
| Wait_for_work
| Suspend
| Hibernate
let note_hiatus _reason = ()
let note_resume () = ()
let label _label = ()
let named_wait _label = Lwt.wait ()
let named_task _label = Lwt.task ()
let named_condition _label = Lwt_condition.create ()
let named_mvar _label v =... | |
5ab9efa09ceff5e7b428909e1e7a24570c48e88c74e29c52aff58a600b23d400 | IvanRublev/year_progress_bot | formatter.erl | -module(formatter).
-export([year_progress_bar/1, gun_response_printable/1, gun_request_body_printable/1]).
year_progress_bar(Date) ->
StartDays = calendar:date_to_gregorian_days(date:start_of_year_date()),
{DT, _} = Date,
TodayDays = calendar:date_to_gregorian_days(DT),
EndDays = calendar:date_to_greg... | null | https://raw.githubusercontent.com/IvanRublev/year_progress_bot/c3e85a5598d768933d5fb676c74d92fa8033cf60/apps/year_progress_bot/src/infra/formatter.erl | erlang | -module(formatter).
-export([year_progress_bar/1, gun_response_printable/1, gun_request_body_printable/1]).
year_progress_bar(Date) ->
StartDays = calendar:date_to_gregorian_days(date:start_of_year_date()),
{DT, _} = Date,
TodayDays = calendar:date_to_gregorian_days(DT),
EndDays = calendar:date_to_greg... | |
b2b9e80bd25c1b5fbf54013092bded60df1532c615af50d1431f71716f20568d | haskell-opengl/OpenGLRaw | QueryResource.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.NV.QueryResource
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
-------------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/NV/QueryResource.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.NV.QueryResource
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enums
* Functions | # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.NV.QueryResource (
glGetNVQueryResource,
gl_NV_query_resource,
pattern GL_QUERY_RESOURCE_BUFFEROBJECT_NV,
pattern GL_QUERY_RESOURCE_MEMTYPE_VIDMEM_NV,
pattern GL_QUERY_RESOURCE_RENDERBUFFER_NV,
pattern... |
e5c8a16ecac46ce076c9d92d850e5d59d0e3e443fcfde06a0bbdd97631cd767d | pikatchu/LinearML | estOfIst.ml |
Copyright ( c ) 2011 ,
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are
met :
1 . Redistributions of source code must retain the above copyright
notice , this list of conditions and the foll... | null | https://raw.githubusercontent.com/pikatchu/LinearML/76da04134b9eb3a9ca4252e9cb41d412b50a072a/compiler/estOfIst.ml | ocaml | If you understand this code, good for you ! because I don't ...
| Elet ([l], e1, e2) when simpl_pat l ->
let t, idl = tuple t e1 in
tuple t e2 |
Copyright ( c ) 2011 ,
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are
met :
1 . Redistributions of source code must retain the above copyright
notice , this list of conditions and the foll... |
a68f56d989e9ad17a5bed324908172661a6b3f46fd158b75aad599f6b3f76c92 | aantron/hyper | http1.ml | This file is part of Hyper , released under the MIT license . See LICENSE.md
for details , or visit .
Copyright 2022
for details, or visit .
Copyright 2022 Anton Bachin *)
let () =
Test_expect.Helpers.last_port := 8079
let test request =
Hyper__http.Connect.no_pool ~transport:`HTTP1 reque... | null | https://raw.githubusercontent.com/aantron/hyper/e27d9cdbf43209ae6415ef69b5c8fe32f38b9352/test/expect/http/http1/http1.ml | ocaml | Malformed response.
Invalid Content-Length. | This file is part of Hyper , released under the MIT license . See LICENSE.md
for details , or visit .
Copyright 2022
for details, or visit .
Copyright 2022 Anton Bachin *)
let () =
Test_expect.Helpers.last_port := 8079
let test request =
Hyper__http.Connect.no_pool ~transport:`HTTP1 reque... |
7d3b539f9cd0c22533180240029b54944e0af281c1aeb956ff5abb4d15b79c4e | xapi-project/message-switch | syslog.mli |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/message-switch/1d0d1aa45c01eba144ac2826d0d88bb663e33101/xapi-idl/lib/syslog.mli | ocaml | * [is_masked ~threshold level] Return true if [level] is below [threshold] and
should therefore not be logged. |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... |
c2c4c4766f4c67fe914ac661ebc6defe354442b6b6157af41121cd4e2e7f4bd2 | shriram/smol | compat.rkt | #lang racket/base
(require smol/fun/semantics)
(provide [except-out (all-from-out smol/fun/semantics)
#%module-begin #%top-interaction
#%datum #%app #%top])
| null | https://raw.githubusercontent.com/shriram/smol/248dcca3e287537d29d455e93b562beedc7132d1/fun/compat.rkt | racket | #lang racket/base
(require smol/fun/semantics)
(provide [except-out (all-from-out smol/fun/semantics)
#%module-begin #%top-interaction
#%datum #%app #%top])
| |
36854b560a726d0ee58df477dbabf00770653a189cda6cd4f7d932491fa41b48 | clojure-interop/google-cloud-clients | CloudRedisClient$ListInstancesPage.clj | (ns com.google.cloud.redis.v1beta1.CloudRedisClient$ListInstancesPage
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.redis.v1beta1 CloudRedisClient$ListInstancesPage]))
(defn create-page-async
"context - `com.google.api.gax.rpc.PageContext`
future-response - `com.google.api.core.Ap... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.redis/src/com/google/cloud/redis/v1beta1/CloudRedisClient%24ListInstancesPage.clj | clojure | (ns com.google.cloud.redis.v1beta1.CloudRedisClient$ListInstancesPage
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.redis.v1beta1 CloudRedisClient$ListInstancesPage]))
(defn create-page-async
"context - `com.google.api.gax.rpc.PageContext`
future-response - `com.google.api.core.Ap... | |
257b52043b01ce69be04a0f4ae377339a7cc02ea849c504efa549c1520f618bb | coreyhaines/handbook-of-neuroevolution | exoself.erl | -module(exoself).
-compile(export_all).
-include("records.hrl").
map() ->
map(ffnn).
map(FileName) ->
{ok, Genotype} = file:consult(FileName),
spawn(exoself, map, [FileName, Genotype]).
map(FileName, Genotype) ->
IdsNPIds = ets:new(idsNpids, [set, private]),
[Cx|CerebralUnits] = Genotype,
Sensor_Ids = Cx... | null | https://raw.githubusercontent.com/coreyhaines/handbook-of-neuroevolution/8d2f230d9a461af142e6d7e74035e90a476d45e7/erlang/exoself.erl | erlang | -module(exoself).
-compile(export_all).
-include("records.hrl").
map() ->
map(ffnn).
map(FileName) ->
{ok, Genotype} = file:consult(FileName),
spawn(exoself, map, [FileName, Genotype]).
map(FileName, Genotype) ->
IdsNPIds = ets:new(idsNpids, [set, private]),
[Cx|CerebralUnits] = Genotype,
Sensor_Ids = Cx... | |
dadc623bd0d089985d64c88262d2f16239bf58dc096114df184c64d117a5d90d | zotonic/zotonic | l10n_country2iso.erl | -*- coding : utf-8 ; Mode : erlang ; tab - width : 4 ; c - basic - offset : 4 ; indent - tabs - mode : nil -*-
ex : set softtabstop=4 tabstop=4 shiftwidth=4 expandtab fileencoding = utf-8 :
coding : utf-8
@author < >
@doc Mapping English country name to iso code
2012 - 2022
-module(l10n_country2iso)... | null | https://raw.githubusercontent.com/zotonic/zotonic/eb2e61a83e11aea79f2cf20fcbd6fd998ddfd4b0/apps/zotonic_mod_l10n/src/support/l10n_country2iso.erl | erlang | -*- coding : utf-8 ; Mode : erlang ; tab - width : 4 ; c - basic - offset : 4 ; indent - tabs - mode : nil -*-
ex : set softtabstop=4 tabstop=4 shiftwidth=4 expandtab fileencoding = utf-8 :
coding : utf-8
@author < >
@doc Mapping English country name to iso code
2012 - 2022
-module(l10n_country2iso)... | |
aa992db05a561c068373a8558940583a9002c11298fd95b85942e30c9193048a | plow-technologies/servant-ghcjs-router | Render.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeOperators #-}
module Servant.GHCJS.Render where
import Data.Proxy ... | null | https://raw.githubusercontent.com/plow-technologies/servant-ghcjs-router/08b082a539bd1a2652aa104adc934b207f7c8266/src/Servant/GHCJS/Render.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators #
| Build combinators for each route to redirect the client
| Class to handle rendering and changing the current
client side url
required parameter
| A query param optionally sets a par... | # LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Servant.GHCJS.Render where
import Data.Proxy (Proxy (..))
import GHC.TypeLits (KnownSymbol, symbolVal)
import Servant.API ((:<|>) (..), (:>... |
6f0c02bb19f1c26098897070a3f412cdf5b7a459938611bc90e2d39d6ea8b823 | yallop/ocaml-ctypes | test_cstdlib.ml |
* Copyright ( c ) 2013 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2013 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
open OUnit2
open Ctypes
open ... | null | https://raw.githubusercontent.com/yallop/ocaml-ctypes/52ff621f47dbc1ee5a90c30af0ae0474549946b4/tests/test-cstdlib/test_cstdlib.ml | ocaml |
Call the functions
int isisalnum(int)
int isisalpha(int)
int isiscntrl(int)
int isisdigit(int)
int isisgraph(int)
int isislower(int)
int isisprint(int)
int isispunct(int)
int isisspace(int)
int isisupper(int)
int isisxdigit(int)
non-... |
* Copyright ( c ) 2013 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2013 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
open OUnit2
open Ctypes
open ... |
da708e5bd5b6edf2bc5ca92b430ad6b14328ced2f3ec7b5fc4b41483aba623e5 | susam/susam.net | slugs.lisp | (("iant" "Introduction to Analytic Number Theory")
("mastering-emacs" "Mastering Emacs"))
| null | https://raw.githubusercontent.com/susam/susam.net/8e8182fffca171e17b8b3e118cf1e1dd990aa044/content/maze/slugs.lisp | lisp | (("iant" "Introduction to Analytic Number Theory")
("mastering-emacs" "Mastering Emacs"))
| |
5db345592e6b9dbe8288fe0d95703cee770063e8ec61666f8b66c398c7b90251 | facebook/infer | ErlangTypes.mli |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/fbf40c8bd6fdf492df48ade70b270ad04aad7be0/infer/src/erlang/ErlangTypes.mli | ocaml | * Given an argument, its type (and a list of constraints), returns a condition that is true if the
arguments has the specified type. Also returns a block for intermediate computations.
* Given a function spec and a list of identifiers corresponding to function arguments, returns a
block that prunes based on th... |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
77aa447afbd73721ff06865628a6972113a135410447f04e79d7e1d3ef9b6140 | Martoon-00/toy-compiler | BaseSpec.hs | # LANGUAGE OverloadedLists #
# LANGUAGE TemplateHaskell #
module Test.Examples.BaseSpec
( spec
) where
import Test.Hspec (Spec, describe, it)
import Test.QuickCheck (Large (..), Property, conjoin, property)
import Universum
import Test.Arbitrary ()
import ... | null | https://raw.githubusercontent.com/Martoon-00/toy-compiler/a325d56c367bbb673608d283197fcd51cf5960fa/test/Test/Examples/BaseSpec.hs | haskell | >), (~*~))
> X | # LANGUAGE OverloadedLists #
# LANGUAGE TemplateHaskell #
module Test.Examples.BaseSpec
( spec
) where
import Test.Hspec (Spec, describe, it)
import Test.QuickCheck (Large (..), Property, conjoin, property)
import Universum
import Test.Arbitrary ()
import ... |
90bcb73605ca53773806e660c9887c983b1217f305e6ab6902f40a36335d3241 | janegca/htdp2e | EX-Representing Numbers.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname |EX-Representing Numbers|) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t co... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/04-Intermezzo-Numbers/EX-Representing%20Numbers.rkt | racket | about the language level of this file in a form that our tools can easily process.
Example - Representing Numbers
An Inex is a structure:
Inex -> Number
convert an inex into its numeric equivalent
-- Example numbers
how they look
how they compare
delimiting the range of numbers that can be represented
value... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname |EX-Representing Numbers|) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
(define-struct inex [mantissa sign ex... |
c174d1272c9e5a384e7d1cbb7bb54a7a730e615d7f2d7daecabbef54ec3a1fd7 | stevenvar/OMicroB | timer.ml | let l = PIN13
let _ =
pin_mode l OUTPUT;
Timer0.set_period 3000;
Timer0.set_callback (fun () ->
digital_write l HIGH;
delay 500;
digital_write l LOW
)
| null | https://raw.githubusercontent.com/stevenvar/OMicroB/004cfa06e92e7fd14a4778bc9aa05226c7a2e952/targets/avr/tests/callback_timer/timer.ml | ocaml | let l = PIN13
let _ =
pin_mode l OUTPUT;
Timer0.set_period 3000;
Timer0.set_callback (fun () ->
digital_write l HIGH;
delay 500;
digital_write l LOW
)
| |
42be5a66ba77bf89aeb4f2712edb5fbb67d39ce4443b5e92a0efcaa5e4606e56 | sdiehl/pairing | BN254B.hs | {-# OPTIONS -fno-warn-orphans #-}
module Data.Pairing.BN254B
( module Data.Pairing
, module Data.Pairing.Ate
* curve
, BN254B
, parameterBin
, parameterHex
-- ** Fields
, Fq
, Fq2
, Fq6
, Fq12
, Fr
-- ** Groups
, G1'
, G2'
, GT'
-- ** Roots of unity
, getRootOfUnity
) where
impo... | null | https://raw.githubusercontent.com/sdiehl/pairing/9e3fd026fb43fd64917a3b267d0d8d351eba77cc/src/Data/Pairing/BN254B.hs | haskell | # OPTIONS -fno-warn-orphans #
** Fields
** Groups
** Roots of unity
-----------------------------------------------------------------------------
Fields
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Curves... |
module Data.Pairing.BN254B
( module Data.Pairing
, module Data.Pairing.Ate
* curve
, BN254B
, parameterBin
, parameterHex
, Fq
, Fq2
, Fq6
, Fq12
, Fr
, G1'
, G2'
, GT'
, getRootOfUnity
) where
import Protolude
import Data.Curve.Weierstrass.BN254B as G1
import Data.Curve.Weierstrass.... |
567594fd17f03378daf396d9978a590eaf168b8638a003d2827927b214c94523 | callum-oakley/advent-of-code | 24.clj | (ns aoc.2020.24
(:require
[aoc.vector :refer [+v]]
[clojure.test :refer [deftest is]]))
(defn parse [s]
(re-seq #"\w+" s))
(def dirs
{"e" [1 0] "se" [0 1] "sw" [-1 1] "w" [-1 0] "nw" [0 -1] "ne" [1 -1]})
;; Reads an instruction to an axial coordinate
;; /#coordinates-axial
(defn read-instruction [instruc... | null | https://raw.githubusercontent.com/callum-oakley/advent-of-code/e24c126fdfa4852c1380f5d1b1fda96da1ebe553/src/aoc/2020/24.clj | clojure | Reads an instruction to an axial coordinate
/#coordinates-axial | (ns aoc.2020.24
(:require
[aoc.vector :refer [+v]]
[clojure.test :refer [deftest is]]))
(defn parse [s]
(re-seq #"\w+" s))
(def dirs
{"e" [1 0] "se" [0 1] "sw" [-1 1] "w" [-1 0] "nw" [0 -1] "ne" [1 -1]})
(defn read-instruction [instruction]
(->> (re-seq #"e|se|sw|w|nw|ne" instruction)
(map dirs)... |
db7a99f15fbb8204437aac50e8a0226b1d07677b63328f9b9c3d07ca3a8caaa1 | paurkedal/ocaml-prime | prime_string.ml | Copyright ( C ) 2013 - -2022 Petter A. Urkedal < >
*
* 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 3 of the License , or ( at your
* option ) any la... | null | https://raw.githubusercontent.com/paurkedal/ocaml-prime/14d27f45bed83a323a07de32cfd9d3327fe33643/lib/prime_string.ml | ocaml | Copyright ( C ) 2013 - -2022 Petter A. Urkedal < >
*
* 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 3 of the License , or ( at your
* option ) any la... | |
e47f68321b3c6174187a627cbdfe1ed3eb67dcf5f9871ed555e45b1c18006a08 | cyclone-scheme/winds | update-wiki-index.scm | (define *default-wiki-directory* "wiki")
(define *default-wiki-home-file* (->path *default-wiki-directory* "Home.md"))
(define *default-wiki-url* "-scheme/winds/wiki/")
(define home-header
"# Welcome to the Cyclone Winds wiki!\n
If you want to **contribute**, please take a look at the [Roadmap](roadmap).\n
Packages ... | null | https://raw.githubusercontent.com/cyclone-scheme/winds/7ba381628d7dd9faa03a592bdc0647d4f31e6827/sys/update-wiki-index.scm | scheme | (define *default-wiki-directory* "wiki")
(define *default-wiki-home-file* (->path *default-wiki-directory* "Home.md"))
(define *default-wiki-url* "-scheme/winds/wiki/")
(define home-header
"# Welcome to the Cyclone Winds wiki!\n
If you want to **contribute**, please take a look at the [Roadmap](roadmap).\n
Packages ... | |
87ae76b6179a4ea7b359506fd8c4f336ce0a4c79e5779e8c8434b73142170c05 | lehins/primal | Boxed.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE MagicHash #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE UnboxedTuples #
-- |
-- Module : Primal.Ref.Boxed
Copyright : ( c ) 2020 - 2021
-- License : BSD3
Maintainer : < >
-- Stability... | null | https://raw.githubusercontent.com/lehins/primal/c620bfd4f2a6475f1c12183fbe8138cf29ab1dad/primal/src/Primal/Ref/Boxed.hs | haskell | # LANGUAGE BangPatterns #
|
Module : Primal.Ref.Boxed
License : BSD3
Stability : experimental
Portability : non-portable
* Create
* Read/write
* Modify
** Pure
* Conversion
** STBRef
** IORef
* Weak Pointer
| Mutable variable that can hold any value. This is just like `Data.STRef.STRef`, but
... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE MagicHash #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE UnboxedTuples #
Copyright : ( c ) 2020 - 2021
Maintainer : < >
module Primal.Ref.Boxed
( BRef(..)
, newBRef
, newDeepBRef
, newLazyBRef
, isSameBRef
, rea... |
1be3da7ecc7325892c3e2a35a5d049059b811515f46391011275cadaad5ac77c | deepmarker/xxh | test.ml | open Alcotest
open Stdint
open Xxh
let of_hex32 str =
let hx = Hex.to_string (`Hex str) in
Uint32.of_bytes_big_endian (Bytes.unsafe_of_string hx) 0
let of_hex64 str =
let hx = Hex.to_string (`Hex str) in
Uint64.of_bytes_big_endian (Bytes.unsafe_of_string hx) 0
let of_hex128 str =
let hx = Hex.to_string (`H... | null | https://raw.githubusercontent.com/deepmarker/xxh/2d66ed30ce712e94502271585a8c23841ae22327/test/test.ml | ocaml | open Alcotest
open Stdint
open Xxh
let of_hex32 str =
let hx = Hex.to_string (`Hex str) in
Uint32.of_bytes_big_endian (Bytes.unsafe_of_string hx) 0
let of_hex64 str =
let hx = Hex.to_string (`Hex str) in
Uint64.of_bytes_big_endian (Bytes.unsafe_of_string hx) 0
let of_hex128 str =
let hx = Hex.to_string (`H... | |
1fbffb39ca6a802e454af930b5055226c52d23b2e02435bc5b66391397836dbe | TDacik/Deadlock | CFA_analysis.ml | Implementation of analysis similar to classic Data Flow Analysis with generic function summaries ,
* support for multi - threaded programs and refinement of functions ' analysis -- if some user - defined
* condition holds after analysis , the analysis of function can be refined with less general
* preconditi... | null | https://raw.githubusercontent.com/TDacik/Deadlock/9e1b954deb5ab62d0d422dbe4d2d9138eeee5477/src/cfa_analysis/CFA_analysis.ml | ocaml | Statistics
Set of states with automatic joining of joinable states
* Partition of cache to joinable and non-joinable states *
* Initialisation of debug functor *
For each vertex contains set of states that reached the vertex
* - implemented as stack simulating nesting of function calls
Precondition: cache is... | Implementation of analysis similar to classic Data Flow Analysis with generic function summaries ,
* support for multi - threaded programs and refinement of functions ' analysis -- if some user - defined
* condition holds after analysis , the analysis of function can be refined with less general
* preconditi... |
ec69d534331cb86fbed82c456c78180ef1b6798736c70af2a15dae3a8a96c766 | talex5/wayland-proxy-virtwl | relay.ml | Relay Wayland messages between a client and a virtio_gpu host compositor .
When sending a file descriptor , we create a virtio_gpu descriptor of the appropriate type and send that instead .
For streams , we copy the data .
For buffers we copy the contents when the surface is committed ( todo : copy jus... | null | https://raw.githubusercontent.com/talex5/wayland-proxy-virtwl/5940346db2a4427f21c7b30a2593b179af36a935/relay.ml | ocaml | Since we're just relaying messages, we mostly don't care about checking version compatibility.
e.g. if a client sends us a v5 message, then we can assume the corresponding server object
supports v5 too (otherwise the client shouldn't have sent it).
So we just cast away version contraints using [cv].
Data at... | Relay Wayland messages between a client and a virtio_gpu host compositor .
When sending a file descriptor , we create a virtio_gpu descriptor of the appropriate type and send that instead .
For streams , we copy the data .
For buffers we copy the contents when the surface is committed ( todo : copy jus... |
a4747b8e5acf2984f0548b59fe236e23a546165c98d58ad412d6d63380afd7fa | arenadotio/pgx | pgx_aux.ml | module String = struct
include String
let implode xs =
let buf = Buffer.create (List.length xs) in
List.iter (Buffer.add_char buf) xs;
Buffer.contents buf
;;
let fold_left f init str =
let len = length str in
let rec loop i accum = if i = len then accum else loop (i + 1) (f accum str.[i]) ... | null | https://raw.githubusercontent.com/arenadotio/pgx/8d5ca02213faa69e692c5d0dc3e81408db3774a1/pgx/src/pgx_aux.ml | ocaml | module String = struct
include String
let implode xs =
let buf = Buffer.create (List.length xs) in
List.iter (Buffer.add_char buf) xs;
Buffer.contents buf
;;
let fold_left f init str =
let len = length str in
let rec loop i accum = if i = len then accum else loop (i + 1) (f accum str.[i]) ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.