_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 |
|---|---|---|---|---|---|---|---|---|
b007b607201095f509ead44c990831f0d323aafffae01bc628f20d60eda0da1d | bigmlcom/sampling | mergeable.clj | Copyright 2013 BigML
Licensed under the Apache License , Version 2.0
;; -2.0
(ns bigml.sampling.reservoir.mergeable
"Provides the definition for mergeable reservoirs.")
(defprotocol MergeableReservoir
(mergeReservoir [a b]))
| null | https://raw.githubusercontent.com/bigmlcom/sampling/8242cac714ac45cb4ef93255c4b5ee5135a07389/src/bigml/sampling/reservoir/mergeable.clj | clojure | -2.0 | Copyright 2013 BigML
Licensed under the Apache License , Version 2.0
(ns bigml.sampling.reservoir.mergeable
"Provides the definition for mergeable reservoirs.")
(defprotocol MergeableReservoir
(mergeReservoir [a b]))
|
2d9b3a92e4dbd4dc77dadd1c14b2773e7b93dce536d8a57188d19f56c3521034 | GaloisInc/saw-script | Rewriter.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE CPP #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveFoldable #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE ImplicitParams #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternGuards #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LA... | null | https://raw.githubusercontent.com/GaloisInc/saw-script/9acd534ab65dcc38132675bb412db63a41745932/saw-core/src/Verifier/SAW/Rewriter.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE DeriveTraversable #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
* Rewrite rules
* Simplification sets
* Term rewriting
* Matching
--------------------------------------------------------------------
Matching
| Equivalent to @(lookup k t, insert k x t)@.
that instan... | # LANGUAGE CPP #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveFoldable #
# LANGUAGE ImplicitParams #
# LANGUAGE NamedFieldPuns #
# LANGUAGE PatternGuards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE ViewPatterns #
|
Module : Verifier . SAW.Rewriter
Copyright : Galois , Inc. 2012 - 2015
License : ... |
a1a964502e35b04d1d73d05b74782bd580546033488ab5c939c0c8ba21e58395 | mvoidex/hsdev | ModuleTwo.hs | module ModuleTwo (
untypedFoo,
twice,
overloadedStrings
) where
import ModuleOne (untypedFoo)
import Data.String
-- | Apply function twice
twice :: (a -> a) -> a -> a
twice f = f . f
data MyString = MyString String
instance IsString MyString where
fromString = MyString
overloadedStrings :: MyString
overloade... | null | https://raw.githubusercontent.com/mvoidex/hsdev/016646080a6859e4d9b4a1935fc1d732e388db1a/tests/test-package/ModuleTwo.hs | haskell | | Apply function twice | module ModuleTwo (
untypedFoo,
twice,
overloadedStrings
) where
import ModuleOne (untypedFoo)
import Data.String
twice :: (a -> a) -> a -> a
twice f = f . f
data MyString = MyString String
instance IsString MyString where
fromString = MyString
overloadedStrings :: MyString
overloadedStrings = "Hello"
|
45a9e3e842877b06cc2e30050563d6af2e99ff5c737f6550afa221e4041016ab | awslabs/s2n-bignum | bignum_montmul.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/arm/proofs/bignum_montmul.ml | ocaml | =========================================================================
=========================================================================
*** print_literal_from_elf "arm/generic/bignum_montmul.o";;
***
arm_MUL X13 X9 X14
arm_ADDS X12 X12 X13
arm_MUL X13 X9 X14
arm_ADDS X12 X12 X13
arm_MUL X13 X9... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
Montgomery multiplication of arbitrary bignums . ... |
60862ead8257f9a265df0d14183284786b7aca7dcc18755885b8882390961a0d | NorfairKing/smos | TypesSpec.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Smos.Data.TypesSpec
( spec,
)
where
import Control.Monad
import Data.Aeson as JSON
import Data.Data
import Data.Either
import Data.Time
import Smos.Data
import Smos.Data.Gen
im... | null | https://raw.githubusercontent.com/NorfairKing/smos/fa3b373e772778b4ed05666e0c2df0c9af309e19/smos-data-gen/test/Smos/Data/TypesSpec.hs | haskell | # LANGUAGE OverloadedStrings #
If you remove this, the tests for json for sorters, filters and projections will fail in smos-report-gen
If you remove this, the tests for json for sorters, filters and projections will fail in smos-report-gen | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Smos.Data.TypesSpec
( spec,
)
where
import Control.Monad
import Data.Aeson as JSON
import Data.Data
import Data.Either
import Data.Time
import Smos.Data
import Smos.Data.Gen
import Test.QuickCheck
import Test.Sy... |
0052f91724a8aa1993fb724ba486326b47e93e095a8a2c9be387786d79d30cce | jaspervdj/planet-wars-haskell | PlanetWars.hs | -- | Library for the Planet Wars google ai contest. More information can be
-- found on -contest.com.
--
# LANGUAGE FlexibleInstances #
module PlanetWars
(
-- * Data structures
Resource (..)
, Planet (..)
, Fleet (..)
, Order (..)
, GameState (..)
-- * Utility functions
, isA... | null | https://raw.githubusercontent.com/jaspervdj/planet-wars-haskell/83a3e9150a4ee11b5ef13be085191a4ebadf3ba7/PlanetWars.hs | haskell | | Library for the Planet Wars google ai contest. More information can be
found on -contest.com.
* Data structures
* Utility functions
* Step the state
* Simulation
* Communication with the game engine
* Bots
* Debugging
| Class for values that are owned by a player
| Class for physical entities
| Represe... | # LANGUAGE FlexibleInstances #
module PlanetWars
(
Resource (..)
, Planet (..)
, Fleet (..)
, Order (..)
, GameState (..)
, isAllied
, isHostile
, isNeutral
, addShips
, engageAll
, fleetIsArrived
, getPlanetById
, distanceBetween
, centroid
, isArrive... |
4c7b8889bbac9ae5d76ced2d52d341003fff7bdb452d52c3bc7ff43880434f22 | Nike-Inc/hal | Internal.hs | {-# LANGUAGE OverloadedStrings #-}
|
Module : AWS.Lambda . Internal
Description : Internal hal helper methods .
Copyright : ( c ) Nike , Inc. , 2018
License : : ,
Stability : unstable
Module : AWS.Lambda.Internal
Description : Internal hal helper methods.
Copyright : (c) Nike... | null | https://raw.githubusercontent.com/Nike-Inc/hal/fc5318d57bf7bcee1b552b6e0e7ab0e71abeab4a/src/AWS/Lambda/Internal.hs | haskell | # LANGUAGE OverloadedStrings # |
|
Module : AWS.Lambda . Internal
Description : Internal hal helper methods .
Copyright : ( c ) Nike , Inc. , 2018
License : : ,
Stability : unstable
Module : AWS.Lambda.Internal
Description : Internal hal helper methods.
Copyright : (c) Nike, Inc., 2018
License : BSD3
Mai... |
f828b03d87135d7c8ea1909b710cbdcbc4c6bc7c4a8ebf5ce0dc574788358d4f | avik-das/garlic | many-exports-2.scm | (define (g0) "g0")
(define (g1) "g1")
(define (g2) "g2")
(module-export
g0
g1
g2)
| null | https://raw.githubusercontent.com/avik-das/garlic/5545f5a70f33c2ff9ec449ef66e6acc7881419dc/test/aux/many-exports-2.scm | scheme | (define (g0) "g0")
(define (g1) "g1")
(define (g2) "g2")
(module-export
g0
g1
g2)
| |
7c0b8476d05b4ce6c4bf039173019a0a7243cd5b3959930488c0fcb7ee78e2b5 | dotemacs/clojure-webapp | db.clj | (ns webapp.db
(:require [com.stuartsierra.component :as component]
[clojure.java.jdbc :as jdbc]
[hugsql.core :as hugsql]
[hikari-cp.core :as hikari]
[camel-snake-kebab.extras :refer [transform-keys]]
[camel-snake-kebab.core :refer [->kebab-case-keyword]]
... | null | https://raw.githubusercontent.com/dotemacs/clojure-webapp/a6d8b6427603d6d216dd61da25e0b4399c1668dc/src/webapp/db.clj | clojure | (ns webapp.db
(:require [com.stuartsierra.component :as component]
[clojure.java.jdbc :as jdbc]
[hugsql.core :as hugsql]
[hikari-cp.core :as hikari]
[camel-snake-kebab.extras :refer [transform-keys]]
[camel-snake-kebab.core :refer [->kebab-case-keyword]]
... | |
f5e542daeba84e5ee26629d151a6caeb40b828088bab102a0c60602ddc6a8fc8 | williamyaoh/named-read-macros | readtables.lisp | Copyright ( c ) 2017 - 2021 ,
;; All rights reserved.
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions are met:
;; * Redistributions of source code must retain the above copyright notice,
;; this list of conditions and ... | null | https://raw.githubusercontent.com/williamyaoh/named-read-macros/560e7d2b85b3cb672621fd327db677ea79f4e5ab/readtables.lisp | lisp | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions ... | Copyright ( c ) 2017 - 2021 ,
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR
LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEM... |
5a87f4f73bd10b19a96d011c05e96cb31b77c6c136d4d8ccf920500fcda0f04c | phoe/quicklisp-stats | quicklisp-stats.lisp | ;;;; quicklisp-stats.lisp
(defpackage #:quicklisp-stats
(:use #:cl)
(:local-nicknames (#:a #:alexandria)
(#:d #:drakma)
(#:s #:split-sequence))
(:export
;; Variables
#:*cache*
;; Conditions
#:no-data-yet #:no-data-yet-month #:no-data-yet-year
;; API
#:mon... | null | https://raw.githubusercontent.com/phoe/quicklisp-stats/953b45c2212ae513d48a611d3dd09c846a6102cd/quicklisp-stats.lisp | lisp | quicklisp-stats.lisp
Variables
Conditions
API
Variables
Conditions
API
Skip the CSV header. |
(defpackage #:quicklisp-stats
(:use #:cl)
(:local-nicknames (#:a #:alexandria)
(#:d #:drakma)
(#:s #:split-sequence))
(:export
#:*cache*
#:no-data-yet #:no-data-yet-month #:no-data-yet-year
#:month #:all #:system-downloads))
(in-package #:quicklisp-stats)
(defv... |
c7a33565f3c7adee283d0744282ae8ea0a044c6178ae1dde5a61d75584d2c1e1 | cblp/crdt | LwwElementSet.hs | # LANGUAGE FlexibleInstances #
module CRDT.Cv.LwwElementSet
( LwwElementSet (..)
, add
, initial
, lookup
, remove
) where
import Prelude hiding (lookup)
import Data.Foldable (for_)
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import ... | null | https://raw.githubusercontent.com/cblp/crdt/175d7ee7df66de1f013ee167ac31719752e0c20b/crdt/lib/CRDT/Cv/LwwElementSet.hs | haskell | # LANGUAGE FlexibleInstances #
module CRDT.Cv.LwwElementSet
( LwwElementSet (..)
, add
, initial
, lookup
, remove
) where
import Prelude hiding (lookup)
import Data.Foldable (for_)
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import ... | |
f17bc30e4b7a0640de742c55a8ab75a037f2eaf4088ee2f9c2fa4e58c870e565 | cedlemo/OCaml-GI-ctypes-bindings-generator | Color_selection.mli | open Ctypes
type t
val t_typ : t typ
val create :
unit -> Widget.t ptr
(*Not implemented gtk_color_selection_palette_from_string type C Array type for Types.Array tag not implemented*)
(*Not implemented gtk_color_selection_palette_to_string type C Array type for Types.Array tag not implemented*)
val get_current_alp... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Color_selection.mli | ocaml | Not implemented gtk_color_selection_palette_from_string type C Array type for Types.Array tag not implemented
Not implemented gtk_color_selection_palette_to_string type C Array type for Types.Array tag not implemented | open Ctypes
type t
val t_typ : t typ
val create :
unit -> Widget.t ptr
val get_current_alpha :
t -> Unsigned.uint16
val get_current_color :
t -> (Color.t structure)
val get_current_rgba :
t -> (RGBA.t structure)
val get_has_opacity_control :
t -> bool
val get_has_palette :
t -> bool
val get_previous_alpha... |
ed91333ae7c2f5d45ac91633ec5765154d30ec68a950dbc3b98554c6b0019e85 | eeng/mercurius | socket.cljs | (ns mercurius.core.presentation.socket
"Handles the communication with the backend via Web Sockets."
(:require [taoensso.sente :as sente]
[clojure.core.async :refer [go-loop <!]]
[cljs.core.match :refer-macros [match]]
[mercurius.core.presentation.util.meta :refer [csrf-token]]))... | null | https://raw.githubusercontent.com/eeng/mercurius/f83778ddde99aa13692e4fe2e70b2e9dc2fd70e9/src/mercurius/core/presentation/socket.cljs | clojure | the frontend callback that will be called everytime a message is pushed from the server. | (ns mercurius.core.presentation.socket
"Handles the communication with the backend via Web Sockets."
(:require [taoensso.sente :as sente]
[clojure.core.async :refer [go-loop <!]]
[cljs.core.match :refer-macros [match]]
[mercurius.core.presentation.util.meta :refer [csrf-token]]))... |
d1e91c42b3f31b86cad0c12a083c126241cfcea7bc87ec4f2345e7f48f2874a1 | higherkindness/mu-haskell | Server.hs | # language DataKinds #
# language FlexibleContexts #
# language OverloadedStrings #
{-# language PartialTypeSignatures #-}
# language TypeApplications #
# language TypeFamilies #
# OPTIONS_GHC -fno - warn - partial - type - signatures #
module Main where
import Contro... | null | https://raw.githubusercontent.com/higherkindness/mu-haskell/e41ba786f556cfac962e0f183b36bf9ae81d69e4/examples/with-persistent/src/Server.hs | haskell | # language PartialTypeSignatures # | # language DataKinds #
# language FlexibleContexts #
# language OverloadedStrings #
# language TypeApplications #
# language TypeFamilies #
# OPTIONS_GHC -fno - warn - partial - type - signatures #
module Main where
import Control.Monad.IO.Class (liftIO)
import ... |
dff6f1852653d091d5e58d615e2ba739303977ad682e0f3304925c1c018b7777 | gethop-dev/hydrogen.duct-template | project.clj | (defproject dev.gethop/hydrogen.duct-template "0.5.18-SNAPSHOT"
:description "Hydrogen duct template"
:min-lein-version "2.9.8"
:url "-dev/hydrogen.duct-template"
:license {:name "Mozilla Public License 2.0"
:url "-US/MPL/2.0/"}
:dependencies [[org.clojure/clojure "1.11.0"]]
:deploy-repositories... | null | https://raw.githubusercontent.com/gethop-dev/hydrogen.duct-template/6747ea48946bc0dcc4e8b5b4a20f5288cd7476ca/project.clj | clojure | (defproject dev.gethop/hydrogen.duct-template "0.5.18-SNAPSHOT"
:description "Hydrogen duct template"
:min-lein-version "2.9.8"
:url "-dev/hydrogen.duct-template"
:license {:name "Mozilla Public License 2.0"
:url "-US/MPL/2.0/"}
:dependencies [[org.clojure/clojure "1.11.0"]]
:deploy-repositories... | |
5102c874dd15181c25027a5ef93495c3b3a0f00ca86a94ae2e4a18363fdc7ce6 | kazu-yamamoto/quic | Utils.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Network.QUIC.Recovery.Utils (
retransmit
, sendPing
, mergeLostCandidates
, mergeLostCandidatesAndClear
, peerCompletedAddressValidation
, countAckEli
, inCongestionRecovery
, delay
) where
import Data.Sequence (Seq, (<|), View... | null | https://raw.githubusercontent.com/kazu-yamamoto/quic/cecf4de6aef18d73ea03e7f0881a60d5206a5c03/Network/QUIC/Recovery/Utils.hs | haskell | # LANGUAGE OverloadedStrings #
--------------------------------------------------------------
--------------------------------------------------------------
--------------------------------------------------------------
--------------------------------------------------------------
Sec 6.2.1. Computing PTO
receiving... | # LANGUAGE RecordWildCards #
module Network.QUIC.Recovery.Utils (
retransmit
, sendPing
, mergeLostCandidates
, mergeLostCandidatesAndClear
, peerCompletedAddressValidation
, countAckEli
, inCongestionRecovery
, delay
) where
import Data.Sequence (Seq, (<|), ViewL(..))
import qualified Data.Sequen... |
f982e723e57b21623624a6df5c94a4e8eec4d599de1ad4e1d143c2d4e726aa02 | facebook/flow | type_annotation_sig.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/1d9c71bf05f95bef9bd70644b2b2b4cdac60bc45/src/typing/type_annotation_sig.ml | ocaml | * services for producing types from annotations,
called during AST traversal.
|
* 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... |
f893f2becbb87af1ffc8ea060c1f07f4f73e2cbe6525af8b7f6ac684d3cddfa4 | jfeser/castor | implang.mli | open Core
open Collections
type unop =
[ `Int2Fl
| `Int2Date
| `Date2Int
| `ExtractY
| `ExtractM
| `ExtractD
| `Not
| `StrLen
| `LoadBool ]
[@@deriving compare, sexp]
type binop =
[ `IntAdd
| `IntSub
| `IntMul
| `IntDiv
| `Lsr
| `Mod
| `FlAdd
| `FlSub
| `FlMul
| `FlDiv
| `IntLt... | null | https://raw.githubusercontent.com/jfeser/castor/39005df41a094fee816e85c4c673bfdb223139f7/lib/implang.mli | ocaml | * Create a fresh variable.
* Create a fresh definition.
* Create a fresh default initialized variable. | open Core
open Collections
type unop =
[ `Int2Fl
| `Int2Date
| `Date2Int
| `ExtractY
| `ExtractM
| `ExtractD
| `Not
| `StrLen
| `LoadBool ]
[@@deriving compare, sexp]
type binop =
[ `IntAdd
| `IntSub
| `IntMul
| `IntDiv
| `Lsr
| `Mod
| `FlAdd
| `FlSub
| `FlMul
| `FlDiv
| `IntLt... |
7d6f84303ecabb0c298f1f74088f5e13e8a5649592e9fc2aaeccae7b5cef8d74 | diagrams/diagrams-svg | TextScaling.hs | import Diagrams.Prelude
import Diagrams.Backend.SVG
import Diagrams.Backend.SVG.CmdLine
eff1 :: Diagram SVG R2
eff1 = text "F" # fc black <> square 1 # lw 0
ts = [ scale (1/2), id, scale 2, scaleX 2, scaleY 2
, scale (-1), scaleX (-1), scaleY (-1)
]
example1 = hcat . map (eff1 #) $ ts
eff2 :: ... | null | https://raw.githubusercontent.com/diagrams/diagrams-svg/67fff83112b25a27460dd9bff95b69292d0f9fd8/examples/TextScaling.hs | haskell | import Diagrams.Prelude
import Diagrams.Backend.SVG
import Diagrams.Backend.SVG.CmdLine
eff1 :: Diagram SVG R2
eff1 = text "F" # fc black <> square 1 # lw 0
ts = [ scale (1/2), id, scale 2, scaleX 2, scaleY 2
, scale (-1), scaleX (-1), scaleY (-1)
]
example1 = hcat . map (eff1 #) $ ts
eff2 :: ... | |
42105d0d3c8955ac6d1e8df329d601ca65df5f02b101d7e25aa99a4c06703918 | truqu/cut | cut.erl | %% This file is a copy of erl_id_trans.erl from the R14B02 Erlang/OTP
%% distribution, with modifications to make it implement Scheme
%% Notation for Specializing Parameters without Currying
%% (-26/srfi-26.html).
All modifications are ( C ) 2011 - 2013 VMware , Inc.
%%
` ` The contents of this file are subject t... | null | https://raw.githubusercontent.com/truqu/cut/df35bf5f6999bdb16ce548073b284ca06b6bcb18/src/cut.erl | erlang | This file is a copy of erl_id_trans.erl from the R14B02 Erlang/OTP
distribution, with modifications to make it implement Scheme
Notation for Specializing Parameters without Currying
(-26/srfi-26.html).
compliance with the License. You should have received a copy of the
Erlang Public License along with this softw... |
All modifications are ( C ) 2011 - 2013 VMware , Inc.
` ` The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
The Initial Developer of the Original C... |
f017d18c4ad4eeb073c509edd80168572df79c4d85eac3f40a90a2d3d15a1942 | fogfish/datum | htree.erl | %%
Copyright 2012 - 2013 , 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 or agreed to in ... | null | https://raw.githubusercontent.com/fogfish/datum/f5e8f0b5deb8b74d6febe046333dbb4f38b086d8/src/maplike/htree.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language g... | Copyright 2012 - 2013 , All Rights Reserved
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(htree).
-export([
new/0,
build/1,
insert/3,
lookup/2,
remove/2,
foldl/3,
foldr/3,
foreach/... |
4aac12857eeaef37498dad1030a0c30881f5fd8b975d0a80c54a3e9ff9fabcd2 | reflectionalist/S9fES | prolog-test.scm | Sample PROLOG program
By , 1998 - 2009
; Placed in the Public Domain
;
; To load this program, run
;
; (load-from-library "prolog-test.scm")
;
; Then try some queries like
;
; (? (female ?who)) ; Which females are there?
( ? ( _ ? who ) ) ; Which relatives does have ?
( ? ( ? relation ... | null | https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/contrib/prolog-test.scm | scheme | Placed in the Public Domain
To load this program, run
(load-from-library "prolog-test.scm")
Then try some queries like
(? (female ?who)) ; Which females are there?
Which relatives does have ?
is related to whom in which way ?
set up fresh database
add some facts
define some predicates | Sample PROLOG program
By , 1998 - 2009
(load-from-library "prolog.scm")
(! (female denise))
(! (female fanny))
(! (male anthony))
(! (male bertram))
(! (male eric))
(! (parent bertram eric))
(! (parent cathy eric))
(! (parent anthony cathy))
(! (parent eric denise))
(! (parent anthony fanny))
(! (wife cathy... |
50c74f56757b61ba90cd110b0accc0c23ee3eb624130c4b9664d588a052f5fe4 | ucsd-progsys/nate | mylist.ml |
let cons h t = h :: t
let iter = List.iter
let map = List.map
let fold = List.fold_left
| null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/easyocaml-additional/easyocaml-sample-lib/lang-levels/lang-minimal/mylist.ml | ocaml |
let cons h t = h :: t
let iter = List.iter
let map = List.map
let fold = List.fold_left
| |
286f3c34bbfcaea59e9ac96cdb1db0af6b39f2c93d3d58375ad8160c7de3d677 | ublubu/shapes | Benchmark.hs | # LANGUAGE MagicHash #
module Physics.Contact.GJK.Benchmark where
import Physics.Linear
import Physics.Contact.GJK
import Physics.Contact.ConvexHull
import Physics.Contact.Benchmark (makeOptBox)
testSimplex1 =
closestSimplex (makeOptBox 0 0 1.9 1.9) (P2 $ V2 1.0## 1.0##)
testSimplex2 =
closestSimplex (makeOptBo... | null | https://raw.githubusercontent.com/ublubu/shapes/fa5d959c17224a851d517826deeae097f1583392/shapes/bench/Physics/Contact/GJK/Benchmark.hs | haskell | # LANGUAGE MagicHash #
module Physics.Contact.GJK.Benchmark where
import Physics.Linear
import Physics.Contact.GJK
import Physics.Contact.ConvexHull
import Physics.Contact.Benchmark (makeOptBox)
testSimplex1 =
closestSimplex (makeOptBox 0 0 1.9 1.9) (P2 $ V2 1.0## 1.0##)
testSimplex2 =
closestSimplex (makeOptBo... | |
a5ab1258e402bb4157324d6ec41c6ce26a71026d1cb036dd455701a628810e0e | jedimahdi/soltan | User.hs | module Hokm.Api.Network.Server.Api.User
( server
) where
import Control.Lens ( (^.) )
import Hokm.Api.Data.Session ( Session )
import qualified Hokm.Api.Data.Session as Session
import qualified Hokm.Api.Data.User as User
import qua... | null | https://raw.githubusercontent.com/jedimahdi/soltan/50a97213ec83c81f5ec79898e2855d0c5e78f06c/backend/hokm-api/src/Hokm/Api/Network/Server/Api/User.hs | haskell | module Hokm.Api.Network.Server.Api.User
( server
) where
import Control.Lens ( (^.) )
import Hokm.Api.Data.Session ( Session )
import qualified Hokm.Api.Data.Session as Session
import qualified Hokm.Api.Data.User as User
import qua... | |
2856aa790ee60fd8e4f196ca42c9aa5b8f422be39550ff4238ac38c490d17639 | furkan3ayraktar/clojure-polylith-realworld-example-app | interface.clj | (ns clojure.realworld.tag.interface
(:require [clojure.realworld.tag.core :as core]))
(defn all-tags []
(core/all-tags))
| null | https://raw.githubusercontent.com/furkan3ayraktar/clojure-polylith-realworld-example-app/2f16552fb4e9a56e24e21795cbb038433085453c/components/tag/src/clojure/realworld/tag/interface.clj | clojure | (ns clojure.realworld.tag.interface
(:require [clojure.realworld.tag.core :as core]))
(defn all-tags []
(core/all-tags))
| |
ef22d2741f2ab591f2873d54d5e3764b378ff2c936951b878dfdcad7f8ca600b | hanshuebner/bknr-web | album.lisp | (in-package :bknr-user)
(enable-interpol-syntax)
(define-bknr-tag album (&key username album)
(let* ((user (find-user username))
(images (when user
(remove-if-not #'(lambda (image)
(eq user (owned-object-owner image)))
(get-keyword-store-images
(make-keyword-from-string album))))))
... | null | https://raw.githubusercontent.com/hanshuebner/bknr-web/5c30b61818a2f02f6f2e5dc69fd77396ec3afc51/modules/album/album.lisp | lisp | (in-package :bknr-user)
(enable-interpol-syntax)
(define-bknr-tag album (&key username album)
(let* ((user (find-user username))
(images (when user
(remove-if-not #'(lambda (image)
(eq user (owned-object-owner image)))
(get-keyword-store-images
(make-keyword-from-string album))))))
... | |
26bf45a97629714b035a2ac9fdeb74a71839ebdd5fe4955993160ed39e513a64 | facebook/infer | Pp.ml |
* Copyright ( c ) 2009 - 2013 , Monoidics ltd .
* 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) 2009-2013, Monoidics ltd.
* Copyright (c) Facebook, In... | null | https://raw.githubusercontent.com/facebook/infer/ba66d4782d6938530966e006036e58f649068369/infer/src/istd/Pp.ml | ocaml | * Pretty Printing
* Kind of simple printing: default or with full types
* Kind of printing
* Colors supported in printing
* map subexpressions (as Obj.t element compared by physical equality) to colors
* Print environment threaded through all the printing functions
* Current option for simple printing
* Current ... |
* Copyright ( c ) 2009 - 2013 , Monoidics ltd .
* 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) 2009-2013, Monoidics ltd.
* Copyright (c) Facebook, In... |
b310d4733e42678eb19f185dd6dd5f4c148622afa20a9ae2b8f005c067947e5f | dparis/gen-phzr | retro_font.cljs | (ns phzr.impl.accessors.retro-font)
(def retro-font-constants
{:align-center "ALIGN_CENTER"
:align-left "ALIGN_LEFT"
:align-right "ALIGN_RIGHT"
:text-set-1 "TEXT_SET1"
:text-set-10 "TEXT_SET10"
:text-set-11 "TEXT_SET11"
:text-set-2 "TEXT_SET2"
:text-set-3 "TEXT_SET3"
:text-set-4 "TEXT_SET4"
... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/impl/accessors/retro_font.cljs | clojure | (ns phzr.impl.accessors.retro-font)
(def retro-font-constants
{:align-center "ALIGN_CENTER"
:align-left "ALIGN_LEFT"
:align-right "ALIGN_RIGHT"
:text-set-1 "TEXT_SET1"
:text-set-10 "TEXT_SET10"
:text-set-11 "TEXT_SET11"
:text-set-2 "TEXT_SET2"
:text-set-3 "TEXT_SET3"
:text-set-4 "TEXT_SET4"
... | |
b560806b1bedd2cea39bfa84762f38f8d9c45991a14d03a4d4553dac79d35cf1 | informatimago/lisp | html.lisp | -*- coding : utf-8 -*-
;;;;****************************************************************************
;;;;FILE: html.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
;;;; Generating HTML pages.
;;;;
;;;; See also:
HT... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/common-lisp/html-generator/html.lisp | lisp | ****************************************************************************
FILE: html.lisp
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
Generating HTML pages.
See also:
-from-sexpr
LEGAL
This program is free software: you can redistribute it and/or mod... | -*- coding : utf-8 -*-
USER - INTERFACE :
HTML from sexpr
< PJB > < >
MODIFICATIONS
2007 - 05 - 17 < PJB > New implementation .
2004 - 08 - 23 < PJB > Added BUILD - QUERY .
2003 - 05 - 16 < PJB > Extracted from vacation.lisp .
AGPL3
Copyright 2003 - 2016
it unde... |
cc20f4e0013d4b569cf5de89d2959adc2a55724e3568e5598b38b4200dd6861e | swaywm/cl-wlroots | error.lisp | (in-package #:wlr/error)
(export '(initialization-error))
(define-condition initialization-error (error)
((new-object-type :initarg :wlr-type :reader new-object-type
:type symbol
:documentation "The type of the object that could not be initialized"))
(:default-initargs
:type (error "You must specify a type... | null | https://raw.githubusercontent.com/swaywm/cl-wlroots/f8a33979e45086ecd5c7deefd5ee067b941e0998/wlr/error.lisp | lisp | (in-package #:wlr/error)
(export '(initialization-error))
(define-condition initialization-error (error)
((new-object-type :initarg :wlr-type :reader new-object-type
:type symbol
:documentation "The type of the object that could not be initialized"))
(:default-initargs
:type (error "You must specify a type... | |
c215386a50e4d571e6a33d8a3f1ca8d536106e66623b68e8af7e91516d441ce1 | bdeket/rktsicm | fft.rkt | #lang racket/base
(provide (all-defined-out))
(require (only-in "../../../rkt/glue.rkt" if
fix:= fix:< fix:<= fix:>= fix:+ fix:- fix:lsh
flo:= flo:< flo:+ flo:- flo:* flo:/ flo:cos flo:sin flo:atan flo:atan2 flo:log flo:zero?
int:->flonum)
(only-in "../..... | null | https://raw.githubusercontent.com/bdeket/rktsicm/225a43bc3d9953f9dbbdbfb2fa4a50028a7a41ce/rktsicm/sicm/numerics/signals/cph-dsp/fft.rkt | racket | ; start original file
Fast-Fourier Transform | #lang racket/base
(provide (all-defined-out))
(require (only-in "../../../rkt/glue.rkt" if
fix:= fix:< fix:<= fix:>= fix:+ fix:- fix:lsh
flo:= flo:< flo:+ flo:- flo:* flo:/ flo:cos flo:sin flo:atan flo:atan2 flo:log flo:zero?
int:->flonum)
(only-in "../..... |
0da11d5992eddd0d78cd853c3d83f0265a660b25d23373c4dbe326d06e051437 | gwkkwg/metatilities | searching.lisp | ;;;; -*- Mode: Lisp; Syntax: Common-Lisp -*-
(in-package #:metatilities)
(defun binary-search (predicate min max
&key (tolerance *samep-tolerance*)
(verbose? nil)
(trust-me? nil)
(min-bias ... | null | https://raw.githubusercontent.com/gwkkwg/metatilities/82e13df0545d0e47ae535ea35c5c99dd3a44e69e/dev/utilities/searching.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp -*-
---------------------------------------------------------------------------
---------------------------------------------------------------------------
with minor modifications
---------------------------------------------------------------------------
---------------------... |
(in-package #:metatilities)
(defun binary-search (predicate min max
&key (tolerance *samep-tolerance*)
(verbose? nil)
(trust-me? nil)
(min-bias 0.5)
(max-bia... |
4b1ba95b0565ced521d4f7c2bdc0033a19f678d1cb8c00a53d9bc44a2714ac53 | heraldry/heraldicon | core.cljs | (ns heraldicon.frontend.component.core
(:require
[heraldicon.interface :as interface]
[taoensso.timbre :as log]))
(defmulti node interface/effective-component-type)
(defmethod node nil [context]
(log/warn :not-implemented "node" context)
{:title (str "unknown")})
(defmulti form interface/effective-compon... | null | https://raw.githubusercontent.com/heraldry/heraldicon/f742958ce1e85f47c8222f99c6c594792ac5a793/src/heraldicon/frontend/component/core.cljs | clojure | (ns heraldicon.frontend.component.core
(:require
[heraldicon.interface :as interface]
[taoensso.timbre :as log]))
(defmulti node interface/effective-component-type)
(defmethod node nil [context]
(log/warn :not-implemented "node" context)
{:title (str "unknown")})
(defmulti form interface/effective-compon... | |
6647944ea4a462c40ed8125947c7bd425b9f10a069ae16f86402dccfdac90f0f | CmdrDats/igoki | projector.clj | (ns igoki.projector
(:require
[igoki.util :as util]
[igoki.game :as game]
[igoki.sgf :as sgf]
[igoki.litequil :as lq]
[igoki.camera :as camera]
[seesaw.core :as s])
(:import
(org.opencv.calib3d Calib3d)
(org.opencv.imgproc Imgproc)
(org.opencv.core Mat Size MatOfPoint2f TermCrite... | null | https://raw.githubusercontent.com/CmdrDats/igoki/73ac9af5cf118b8c4c220be32c30a5bbfe00808b/src/igoki/projector.clj | clojure | Highlight differences between constructed and camera board (visual syncing)
Draw entire current board state
Draw screen intersection points
There's no way this should be happening in the draw call.
Draw the found checkerboard for acceptance.. | (ns igoki.projector
(:require
[igoki.util :as util]
[igoki.game :as game]
[igoki.sgf :as sgf]
[igoki.litequil :as lq]
[igoki.camera :as camera]
[seesaw.core :as s])
(:import
(org.opencv.calib3d Calib3d)
(org.opencv.imgproc Imgproc)
(org.opencv.core Mat Size MatOfPoint2f TermCrite... |
065c9ff1c5dcbca84024e274ff910e991a5d60542c376f76ff1afdec15da11c4 | manuel-serrano/bigloo | pdgevent.scm | ;*=====================================================================*/
;* .../prgm/project/bigloo/api/phidget/src/Llib/pdgevent.scm */
;* ------------------------------------------------------------- */
* Author : * /
* Creation : Tue Sep 21... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/api/phidget/src/Llib/pdgevent.scm | scheme | *=====================================================================*/
* .../prgm/project/bigloo/api/phidget/src/Llib/pdgevent.scm */
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* Phidget listener machin... | * Author : * /
* Creation : Tue Sep 21 15:52:42 2010 * /
* Last change : Sun Nov 18 15:07:31 2012 ( serrano ) * /
* Copyright : 2010 - 12 * /
(module __phidget_event
(l... |
f7149fb95d71005dcbca462706ad09fd2ef23982cecf48b4ea25597e39141817 | bsaleil/lc | etape2-stringlt.scm | (define a "a")
(define b "b")
(define c "ab")
(define (try p1 p2) (println (string<? p1 p2)))
(try a a)
(try a b)
(try a c)
(try b a)
(try b b)
(try b c)
(try c a)
(try c b)
(try c c)
;#f
;#t
;#t
;#f
;#f
;#f
;#f
;#t
;#f
| null | https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/unit-tests/IFT3065/2/etape2-stringlt.scm | scheme | #f
#t
#t
#f
#f
#f
#f
#t
#f | (define a "a")
(define b "b")
(define c "ab")
(define (try p1 p2) (println (string<? p1 p2)))
(try a a)
(try a b)
(try a c)
(try b a)
(try b b)
(try b c)
(try c a)
(try c b)
(try c c)
|
b1a01ad6654ebf2823000c3f358fad9c19555755c7a1bb23d708857341f14110 | reflectionalist/S9fES | string-tools.scm | Scheme 9 from Empty Space , Function Library
By , 2010
; Placed in the Public Domain
;
; Convenience file to load additional string procedures.
(load-from-library "format.scm")
(load-from-library "read-from-string.scm")
(load-from-library "string-case.scm")
(load-from-library "string-digest.scm")
(load-from-lib... | null | https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/lib/string-tools.scm | scheme | Placed in the Public Domain
Convenience file to load additional string procedures. | Scheme 9 from Empty Space , Function Library
By , 2010
(load-from-library "format.scm")
(load-from-library "read-from-string.scm")
(load-from-library "string-case.scm")
(load-from-library "string-digest.scm")
(load-from-library "string-expand.scm")
(load-from-library "string-find.scm")
(load-from-library "strin... |
7a19e9a39caf28d5b7e1d60606505d8fbe84599b996bd1adb2b18b956a6edeb5 | vollmerm/racket-ga | population.rkt | #lang racket
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; population.rkt
, 2013
;
Tested in Racket 5.3.4 x84_64 .
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; ... | null | https://raw.githubusercontent.com/vollmerm/racket-ga/00722449976563a42c10e774b9e74b55b1f717a0/population.rkt | racket |
population.rkt
This file is intended to be used as a module. Include it using (require "population.rkt").
You can run the genetic algorithm with the 'run-population function. It takes keyword parameters, some of which
are optional and have default values. For a more complete explanation of the parameters, ei... | #lang racket
, 2013
Tested in Racket 5.3.4 x84_64 .
(require racket/flonum)
(provide run-population flip (struct-out individual) (struct-out population))
(define (flip prob) (if (< (random) prob) 1 0))
(define (random-flip-list n)
(cond ((= n 0) '())
(else (cons (flip 0.5) (random-flip-list (- n... |
ff6c09643970db1cbc3bc334b7dda351a2bc0742647c089df96e162279b7fa39 | emanjavacas/cosycat | corpora.cljs | (ns cosycat.backend.handlers.corpora
(:require [re-frame.core :as re-frame]
[reagent.core :as reagent]
[cosycat.backend.middleware :refer [standard-middleware]]
[cosycat.app-utils :refer [update-coll]]
[taoensso.timbre :as timbre]))
(re-frame/register-handler
:set-cor... | null | https://raw.githubusercontent.com/emanjavacas/cosycat/a7186363d3c0bdc7b714af126feb565f98793a6e/src/cljs/cosycat/backend/handlers/corpora.cljs | clojure | (ns cosycat.backend.handlers.corpora
(:require [re-frame.core :as re-frame]
[reagent.core :as reagent]
[cosycat.backend.middleware :refer [standard-middleware]]
[cosycat.app-utils :refer [update-coll]]
[taoensso.timbre :as timbre]))
(re-frame/register-handler
:set-cor... | |
ba3484dc6948cde89f248fc75cabd389d9953964bf066a6594538df097dee8be | yuriy-chumak/ol | man_or_boy_test.scm | (define (box x) (list x))
(define (unbox x) (car x))
(define (copy x) (box (unbox x)))
(define (A k x1 x2 x3 x4 x5)
(define (B)
(set-car! k (- (unbox k) 1))
(A (copy k) B x1 x2 x3 x4))
(if (<= (unbox k) 0)
(+ (x4) (x5))
(B)))
(define (man-or-boy N)
(A (box N)
(lambda () 1)
... | null | https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/tests/rosettacode/man_or_boy_test.scm | scheme | (define (box x) (list x))
(define (unbox x) (car x))
(define (copy x) (box (unbox x)))
(define (A k x1 x2 x3 x4 x5)
(define (B)
(set-car! k (- (unbox k) 1))
(A (copy k) B x1 x2 x3 x4))
(if (<= (unbox k) 0)
(+ (x4) (x5))
(B)))
(define (man-or-boy N)
(A (box N)
(lambda () 1)
... | |
d30a9e18b18a5822d4ddb99a5ec1e99d577019458ec21450896824128fb570a5 | mikpe/pdp10-tools | sim_stack_tests.erl | -*- erlang - indent - level : 2 -*-
%%%
simulator for pdp10 - elf
Copyright ( C ) 2020
%%%
This file is part of pdp10 - tools .
%%%
pdp10 - tools is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ,... | null | https://raw.githubusercontent.com/mikpe/pdp10-tools/99216b63317fe5b5ac18f1a0d3c81b464f8b8f40/erlang/apps/sim/test/sim_stack_tests.erl | erlang |
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
=============================================================================
LEFT,,RIGHT in MACRO-10
... | -*- erlang - indent - level : 2 -*-
simulator for pdp10 - elf
Copyright ( C ) 2020
This file is part of pdp10 - tools .
pdp10 - tools is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either vers... |
02c1f48cf2e9370fc40c07ef445ad71eb71880e722063cc0cb045c65ea9d87bb | haskell-servant/example-servant-persistent | Models.hs | {-# LANGUAGE EmptyDataDecls #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateH... | null | https://raw.githubusercontent.com/haskell-servant/example-servant-persistent/168b7afce8be40678fed8f408d2da4f23e414014/src/Models.hs | haskell | # LANGUAGE EmptyDataDecls #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell # | # LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
module Models where
import Data.Aeson
import Data.Text
import Database.Persist.TH
share [mkPersist sqlSettings, mkMigrate "migrateAll"] [persistLowerCase... |
efdf86b1a1df64e618587819b47ca9b2856bacc52aea98b911bf3fe1dba016d3 | subttle/regular | NotEmpty.hs | {-# LANGUAGE ExplicitNamespaces #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE TypeSynonymInstances #-}
module NotEmpty where
import Control.Applicative (Const (Const))
import Data.Can (Can (Non))
import Data.Functor.Identity (Identity (Identity))
import Data.Set (Set)
i... | null | https://raw.githubusercontent.com/subttle/regular/1a9e71cb1c43cb3215b9331efa98d4dcf21fbf9c/src/NotEmpty.hs | haskell | # LANGUAGE ExplicitNamespaces #
# LANGUAGE TypeSynonymInstances #
A wrapper for some type `a` which is known to be not empty (the proof of
which is witnessed by `wit`). | # LANGUAGE FlexibleInstances #
module NotEmpty where
import Control.Applicative (Const (Const))
import Data.Can (Can (Non))
import Data.Functor.Identity (Identity (Identity))
import Data.Set (Set)
import qualified Data.Set.Ordered as OSet
import Data.Set.Ordered (... |
dba7f58fc4e03f1b9ecee5b15e49c4a684505444195fc86111d75066d2962630 | ku-fpg/blank-canvas | Main.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Main where
-- import Control.Concurrent
import Data.List (nub)
import qualified Data.Text as Text
import Graphics.Blank
import Prelude.Compat
data State = State
{ keys :: [Int] -- key *c... | null | https://raw.githubusercontent.com/ku-fpg/blank-canvas/39915c17561106ce06e1e3dcef85cc2e956626e6/examples/keyread/Main.hs | haskell | # LANGUAGE OverloadedStrings #
import Control.Concurrent
key *codes* for pressed keys
remove if writing a game
print state | # LANGUAGE NoImplicitPrelude #
module Main where
import Data.List (nub)
import qualified Data.Text as Text
import Graphics.Blank
import Prelude.Compat
data State = State
, step :: Int
}
deriving Show
main :: IO ()
main = blankCanvas 3000 { events = ["ke... |
d9fdaef41e21904b2cbed8cf5096da8eb0797b7d32e1bf3957fd99c508da4932 | andrenth/ocaml-mariadb | common.ml | open Util
module B = Binding_wrappers
module T = Ffi_bindings.Types(Ffi_generated_types)
module Row = Row
module Field = Field
type mode = [`Blocking | `Nonblocking]
type 'm t =
{ raw : B.mysql
; host : char Ctypes.ptr option
; port : int
; mutable user : char Ctypes.ptr ... | null | https://raw.githubusercontent.com/andrenth/ocaml-mariadb/3ae20e7d58b30b75e47ad3f34b94bb32df2666b1/lib/common.ml | ocaml | From -stmt-fetch.html | open Util
module B = Binding_wrappers
module T = Ffi_bindings.Types(Ffi_generated_types)
module Row = Row
module Field = Field
type mode = [`Blocking | `Nonblocking]
type 'm t =
{ raw : B.mysql
; host : char Ctypes.ptr option
; port : int
; mutable user : char Ctypes.ptr ... |
6cd94d17995f3b028322cea2a25baa8d30245c33433ae3dad40579acc787319b | OCamlPro/ollvm | ollvm.ml | module Ast = Ollvm_ast
module Lexer = Ollvm_lexer
module Printer = Ollvm_printer
module Ez = Ollvm_ez
| null | https://raw.githubusercontent.com/OCamlPro/ollvm/6d4ea098f9468f623a3b27b7689bfbac63d87674/src/ollvm/ollvm.ml | ocaml | module Ast = Ollvm_ast
module Lexer = Ollvm_lexer
module Printer = Ollvm_printer
module Ez = Ollvm_ez
| |
98ebbdc537b1eef8ed1693ad32479f2b5af606f6371fddfb08ee4333c06161a5 | rvl/flatris | BoardWidget.hs | module BoardWidget
( boardSvg
, floatSvg
, wellSvg
, squareSize
, pixelToBoardCoord
, boardCoordToPixel
) where
import Reflex
import Reflex.Dom
import Reflex.Dom.Contrib.Widgets.Svg
import Control.Monad (void)
import Data.Map (Map)
import Data.Text (Text, pack)
import Data.Array
import Data.Monoid ((<>)... | null | https://raw.githubusercontent.com/rvl/flatris/f5f099e5b67a6d745280bee869f2c76d9f101737/app-reflex/BoardWidget.hs | haskell | Creates an svg container of the given class with appropriate
mapping contents of square to css class
mapping contents of square to css class | module BoardWidget
( boardSvg
, floatSvg
, wellSvg
, squareSize
, pixelToBoardCoord
, boardCoordToPixel
) where
import Reflex
import Reflex.Dom
import Reflex.Dom.Contrib.Widgets.Svg
import Control.Monad (void)
import Data.Map (Map)
import Data.Text (Text, pack)
import Data.Array
import Data.Monoid ((<>)... |
5e51749336d33f10d196e5499ad016da8c704f3fa5ecdd63d3db5f69a67c20d5 | arclanguage/Clamp | clamp-experimental-suite.lisp | (defpackage :clamp-experimental-tests
(:use :clunit :clamp :clamp-experimental)
(:import-from :syntax :use-syntax)
(:nicknames :experimental-tests)
(:shadowing-import-from :clamp-experimental
:def :defmemo :defmethod :mac :fn :coerce))
(in-package :clamp-experimental-tests)
(defsuite clamp-experimental (... | null | https://raw.githubusercontent.com/arclanguage/Clamp/9f165b057a109564cd0e836cf611d1e81e43cb12/tests/clamp-experimental-suite.lisp | lisp | (defpackage :clamp-experimental-tests
(:use :clunit :clamp :clamp-experimental)
(:import-from :syntax :use-syntax)
(:nicknames :experimental-tests)
(:shadowing-import-from :clamp-experimental
:def :defmemo :defmethod :mac :fn :coerce))
(in-package :clamp-experimental-tests)
(defsuite clamp-experimental (... | |
be8a4dd089eabb376db4db6efee34cac432ccf15cb80651a09d473dc95aa914a | LambdaHack/LambdaHack | PickActorM.hs | | Picking the AI actor to move and refreshing leader and non - leader targets .
module Game.LambdaHack.Client.AI.PickActorM
( pickActorToMove, setTargetFromDoctrines
) where
import Prelude ()
import Game.LambdaHack.Core.Prelude
import qualified Data.EnumMap.Strict as EM
import Data.Ratio
import ... | null | https://raw.githubusercontent.com/LambdaHack/LambdaHack/974d25a2aed2ad45e9b5ab2653f17c30f484f8c0/engine-src/Game/LambdaHack/Client/AI/PickActorM.hs | haskell | | Pick a new leader from among the actors on the current level.
Refresh the target of the new leader, even if unchanged.
Find our actors on the current level only.
Faction discourages client leader change on level, because
non-leader actors have the same skills as leader, so no point.
Server is guaranteed to swit... | | Picking the AI actor to move and refreshing leader and non - leader targets .
module Game.LambdaHack.Client.AI.PickActorM
( pickActorToMove, setTargetFromDoctrines
) where
import Prelude ()
import Game.LambdaHack.Core.Prelude
import qualified Data.EnumMap.Strict as EM
import Data.Ratio
import ... |
feed03d6211932f7e062dce942c3d99a1f01ae090acc3cefde83a70b3008c766 | leptonyu/boots | Boots.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module: Boots
Copyright : 2019
License : MIT
Maintainer :
-- Stability: experimental
-- Portability: portable
--
-- A quick out-of-box factory using to build application with many useful builtin components,
-- based ... | null | https://raw.githubusercontent.com/leptonyu/boots/335d58baafb1e0700b1a7dbe595a7264bd4d83ba/boots-app/src/Boots.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE OverloadedStrings #
|
Module: Boots
Stability: experimental
Portability: portable
A quick out-of-box factory using to build application with many useful builtin components,
based on [boots]().
* Environment
* Monad App
* Factory Instances
* Components
* CLI... | Copyright : 2019
License : MIT
Maintainer :
1 . Builtin configuration , use [ salak]( / package / salak ) .
2 . Builtin logger functions , use [ fast - logger]( / package / fast - logger ) as backend .
3 . Builtin health check , support health check registration .
4 . Builtin random support ,... |
0b9979460de1463bcda0adc0f66ffe8934b159e9418f8a14cfbc2307ecf976e3 | mentat-collective/emmy | factorial_test.cljc | #_"SPDX-License-Identifier: GPL-3.0"
(ns emmy.special.factorial-test
(:require [clojure.test :refer [is deftest testing]]
[clojure.test.check.generators :as gen]
[com.gfredericks.test.chuck.clojure-test :refer [checking]]
[emmy.generic :as g]
[emmy.polynomial :as poly]... | null | https://raw.githubusercontent.com/mentat-collective/emmy/dc3cd96a281ee5165f8d57f1822f235921ee6305/test/emmy/special/factorial_test.cljc | clojure | they are the
confirmed via wolfram
simple but inefficient implementation for comparison with the
more efficient method in the library. | #_"SPDX-License-Identifier: GPL-3.0"
(ns emmy.special.factorial-test
(:require [clojure.test :refer [is deftest testing]]
[clojure.test.check.generators :as gen]
[com.gfredericks.test.chuck.clojure-test :refer [checking]]
[emmy.generic :as g]
[emmy.polynomial :as poly]... |
8dba4b2d1b3b31c78529714913f238db1f9ef6ccbad29d82e1bd6b732c1624bb | maximedenes/native-coq | uint63.mli | type t
val uint_size : int
val maxuint31 : t
(* conversion to int *)
val of_int : int -> t
val to_int : t -> int
msb , lsb
val of_int64 : Int64.t -> t
(*
val of_uint : int -> t
*)
(* convertion to a string *)
val to_string : t -> string
val of_string : string -> t
val compile : t -> string
(* constant... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/kernel/uint63.mli | ocaml | conversion to int
val of_uint : int -> t
convertion to a string
constants
logical operations
Arithmetic operations
Specific arithmetic operations
comparison
head and tail | type t
val uint_size : int
val maxuint31 : t
val of_int : int -> t
val to_int : t -> int
msb , lsb
val of_int64 : Int64.t -> t
val to_string : t -> string
val of_string : string -> t
val compile : t -> string
val zero : t
val l_sl : t -> t -> t
val l_sr : t -> t -> t
val l_and : t -> t -> t
val l_xor... |
a66893889a8b6019fd6ab6c8c4fea0dd09a05d9a74dbd9ca1fb02e87fd410f6c | den1k/vimsical | profiles.clj | ;; Need to be sourced in the relevant profiles in project.clj
{:env.backend/dev
{:env
{:env "dev"
;; HTTP server
:http-host "localhost"
:http-port "8080"
Datomic
:datomic-protocol "dev"
:datomic-host "localhos... | null | https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/profiles.clj | clojure | Need to be sourced in the relevant profiles in project.clj
HTTP server
Redis | {:env.backend/dev
{:env
{:env "dev"
:http-host "localhost"
:http-port "8080"
Datomic
:datomic-protocol "dev"
:datomic-host "localhost"
:datomic-port "4334"
:datomic-name "vim... |
4e9249516e8f0def85c910c91977ef84e6d2bb6fe2669f0f9e72cebfeb1d5353 | quek/paiprolog | gps-srch.lisp | ;;;; -*- Mode: Lisp; Syntax: Common-Lisp -*-
Code from Paradigms of AI Programming
Copyright ( c ) 1991
;;;; File gps-srch.lisp: Section 6.4 GPS based on explicit search
(requires "gps" "search")
(defun search-gps (start goal &optional (beam-width 10))
"Search for a sequence of operators leading to goal."
... | null | https://raw.githubusercontent.com/quek/paiprolog/012d6bb255d8af7f1c8b1d061dcd8a474fb3b57a/gps-srch.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp -*-
File gps-srch.lisp: Section 6.4 GPS based on explicit search | Code from Paradigms of AI Programming
Copyright ( c ) 1991
(requires "gps" "search")
(defun search-gps (start goal &optional (beam-width 10))
"Search for a sequence of operators leading to goal."
(find-all-if
#'action-p
(beam-search
(cons '(start) start)
#'(lambda (state) (subsetp goal ... |
368f0dff6235029860adfd66fd1c53b4a6bb7caea67e8f880569aed28055767d | spurious/snd-mirror | tlamb.scm | (set! (*s7* 'heap-size) 1024000)
(define size 1000000)
-------- [ 416 ] --------
op_closure_a for ( x 123 )
;(display (f1 (lambda (y) (+ y 1)))) (newline)
(define (f1-test)
(do ((i 0 (+ i 1)))
((= i size))
(f1 (lambda (y) (+ y 1))))) ; op_lambda_unchecked -> make_closure_unchecked, op_simple_do_st... | null | https://raw.githubusercontent.com/spurious/snd-mirror/b235fd0e744d2fd64cee9aee66ff79f69c1eb3c8/tools/tlamb.scm | scheme | (display (f1 (lambda (y) (+ y 1)))) (newline)
op_lambda_unchecked -> make_closure_unchecked, op_simple_do_step -> op_closure_p
define_funchecked + make_funclet, op_safe_closure_s
op_closure_a from op_safe_dotimes_step_o
fx_safe_closure_s_to_add1 [s_to_sc]
op_safe_closure_a_o from op_safe_dotimes_step_o
fx_safe_cl... | (set! (*s7* 'heap-size) 1024000)
(define size 1000000)
-------- [ 416 ] --------
op_closure_a for ( x 123 )
(define (f1-test)
(do ((i 0 (+ i 1)))
((= i size))
(f1-test)
-------- [ 467 ] --------
465 if define - constant , 675 if both are define - constant
(f2_1 x))
( display ( f2 123 ) ) ( new... |
b8f669ebdc85207c20e4fccc8c68f93c78c8f387497dbdae1bde2452a1d4d39b | mefesto/wabbitmq | test_content_type.clj | (ns com.mefesto.wabbitmq.test-content-type
(:use [cheshire.core :only (generate-string)]
[clojure.test]
[com.mefesto.wabbitmq.content-type])
(:import [java.util Arrays]))
(deftest text-plain-supported?
(is (true? (text-plain? "text/plain")))
(is (true? (text-plain? "text/plain; charset=UTF-8"))... | null | https://raw.githubusercontent.com/mefesto/wabbitmq/61ebd4f820f532604050f28542b24ea5f77c4505/test/com/mefesto/wabbitmq/test_content_type.clj | clojure | (ns com.mefesto.wabbitmq.test-content-type
(:use [cheshire.core :only (generate-string)]
[clojure.test]
[com.mefesto.wabbitmq.content-type])
(:import [java.util Arrays]))
(deftest text-plain-supported?
(is (true? (text-plain? "text/plain")))
(is (true? (text-plain? "text/plain; charset=UTF-8"))... | |
15b1fae86b5e6ef344adb5b99e1af7d7a7e0384fa453ad28d218fa786a9b3d1c | Innf107/polaris | loc.ml | type t = {
file : string;
start_line : int;
start_col : int;
end_line : int;
end_col : int
}
let pretty (loc : t) =
Printf.sprintf "%s:%d:%d-%d:%d" loc.file loc.start_line loc.start_col loc.end_line loc.end_col
let from_pos (start_pos : Lexing.position) (end_pos : Lexing.position) : t = {
... | null | https://raw.githubusercontent.com/Innf107/polaris/d273b97fa607dd4c70a17a07abd230a921e3817c/src/loc.ml | ocaml | pos_cnum is the offset between the beginning of the buffer and the position
and pos_bol is the offset between the beginning of the buffer and the beginning of the current line
| type t = {
file : string;
start_line : int;
start_col : int;
end_line : int;
end_col : int
}
let pretty (loc : t) =
Printf.sprintf "%s:%d:%d-%d:%d" loc.file loc.start_line loc.start_col loc.end_line loc.end_col
let from_pos (start_pos : Lexing.position) (end_pos : Lexing.position) : t = {
... |
fab24cccd147aa3c8f17de76f7ae792cc14dea409dfe6ed95a0bde339da159ab | tomjridge/tjr_kv | test.ml | FIXME resurrect
( * * Test the KV store with an LRU frontend
(** Test the KV store with an LRU frontend *)
open Kv_intf
open Shared_ctxt
open Tjr_monad.With_lwt
let file_ops = lwt_file_ops
open Tjr_kv
open Lwt_aux
module KVX = Kv_store_with_lru.Int_int_ex
let i2k i = i
let i2v i = i
let Kv_config_runtime.{... | null | https://raw.githubusercontent.com/tomjridge/tjr_kv/68b3d2fa0c7a144765a3720d78cffb96d5478b32/bin/test.ml | ocaml | * Test the KV store with an LRU frontend
this results in somewhat jerky sleeping
all threads | FIXME resurrect
( * * Test the KV store with an LRU frontend
open Kv_intf
open Shared_ctxt
open Tjr_monad.With_lwt
let file_ops = lwt_file_ops
open Tjr_kv
open Lwt_aux
module KVX = Kv_store_with_lru.Int_int_ex
let i2k i = i
let i2v i = i
let Kv_config_runtime.{
tst_thrd_dly_its=dly_its; tst_thrd_dly; ... |
f7e876c1ae5ba42dca96c8b7168a2b5e69103d3dc69f3cb9d545cd19665ddf84 | vyorkin/tiger | instruction.mli | type t = unit [@@deriving show]
val print : t -> string
| null | https://raw.githubusercontent.com/vyorkin/tiger/54dd179c1cd291df42f7894abce3ee9064e18def/chapter7/lib/instruction.mli | ocaml | type t = unit [@@deriving show]
val print : t -> string
| |
0bc9da403462424a0fddf294c23a7be6676c2690c693e26b5fd19fa2e33e6449 | twosigma/satellite | stats.clj | Copyright 2015 TWO SIGMA OPEN SOURCE , LLC
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, software
... | null | https://raw.githubusercontent.com/twosigma/satellite/d29d982f054d4f87ff47b4f94d23faa26a9b3fe4/satellite-master/src/satellite/services/stats.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | Copyright 2015 TWO SIGMA OPEN SOURCE , LLC
distributed under the License is distributed on an " AS IS " BASIS ,
(ns satellite.services.stats
(:require [clojure.tools.logging :as log]
[liberator.core :refer (resource)]))
(def state (atom {:num-hosts-up 0
:num-available-hosts 0}))
(d... |
b84d31739b7323b2872828db4832b2e849f00f8d2ce712d5ffeb51efcd092eb2 | Eonblast/Scalaxis | yaws_log_file_h.erl | %%%-------------------------------------------------------------------
%%% File : yaws_log_file_h.erl
%%% Author : <>
%%% Description :
%%%
Created : 11 Mar 2004 by < >
%%%-------------------------------------------------------------------
%% Just extending the error_logger_file_h abit,
%% If they change th... | null | https://raw.githubusercontent.com/Eonblast/Scalaxis/10287d11428e627dca8c41c818745763b9f7e8d4/contrib/yaws/src/yaws_log_file_h.erl | erlang | -------------------------------------------------------------------
File : yaws_log_file_h.erl
Author : <>
Description :
-------------------------------------------------------------------
Just extending the error_logger_file_h abit,
If they change the internals of that module, this module
change anything t... | Created : 11 Mar 2004 by < >
breaks , but then again , the otp crew does n't ever appear to
-module(yaws_log_file_h).
-behaviour(gen_event).
-export([init/1,
handle_event/2, handle_call/2, handle_info/2,
terminate/2, code_change/3]).
init(File) ->
init(File, []).
init(File, PrevHand... |
9b86c1bfe998f4fea6e09a0037ba5547b2af83c67b400621493fddb4dca5e31d | debasishg/hask | Banking.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MultiWayIf #-}
module Service.Banking where
import qualified Money as Y
import qualified Data.Map as M
import Data.Text ( Text )
import Data.Foldable ( Foldable(foldl', null) )
import Data.Pool... | null | https://raw.githubusercontent.com/debasishg/hask/1745ed50c8175cd035e8070c9cb988f4f5063653/hfrdomain/src/Service/Banking.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE MultiWayIf #
| a domain service for doing debit or credit transactions
| each transaction created will be added to transaction table and
| balance in account table will be updated depending on the type
| of the transaction
| This is a cached service wher... | # LANGUAGE FlexibleContexts #
# LANGUAGE DataKinds #
module Service.Banking where
import qualified Money as Y
import qualified Data.Map as M
import Data.Text ( Text )
import Data.Foldable ( Foldable(foldl', null) )
import Data.Pool ( Pool )
import Data.Time ( UTCTime )
import Data.Maybe (fromJust)
import Validation ... |
64fa9938cf2fb5b48d5b47be977e9416246ad0d39c9bb62ef08002cda462f2c5 | apache/couchdb-rebar | fish.erl | -module(fish).
-expoort([fish/0]).
fish() -> fish.
| null | https://raw.githubusercontent.com/apache/couchdb-rebar/8578221c20d0caa3deb724e5622a924045ffa8bf/inttest/tplugins/fish.erl | erlang | -module(fish).
-expoort([fish/0]).
fish() -> fish.
| |
970e97206762b2409dbe36593f4acbd5ef66d9e18711a35c43df5a9bc7a2b060 | gas2serra/cldk | image.lisp | (in-package :cldk-internals)
;;;
;;;
;;;
(defclass shared-image (basic-image)
((medium :initarg :medium :reader image-medium)))
| null | https://raw.githubusercontent.com/gas2serra/cldk/63c8322aedac44249ff8f28cd4f5f59a48ab1441/Core/mirror/image.lisp | lisp | (in-package :cldk-internals)
(defclass shared-image (basic-image)
((medium :initarg :medium :reader image-medium)))
| |
a615a3318b099103c08412f37d31bb89fb0f0b6f3637e34276c565294b412bb1 | elaforge/karya | Vsl_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.Vsl_test where
import qualified Data.List as List
import qualified Cmd.Instrument.MidiInst as MidiInst
import qualified Derive.Attrs as Attrs
import quali... | null | https://raw.githubusercontent.com/elaforge/karya/8ea15e6a5fb57e2f15f8c19836751e315f9c09f2/User/Elaforge/Instrument/Vsl_test.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
+harsh wins over +stac
Everything wins over +nv.
Strip them.
Can't strip if it would be non-unique.
Or if it's non-unique with an already stripped one. | Copyright 2013
module User.Elaforge.Instrument.Vsl_test where
import qualified Data.List as List
import qualified Cmd.Instrument.MidiInst as MidiInst
import qualified Derive.Attrs as Attrs
import qualified Derive.DeriveTest as DeriveTest
import qualified Derive.Score as Score
import qualified Derive.ShowVal as Sh... |
21d500dd58f0f7c7eae3d8736f44f6dc8aacdef709a0bc888f340ec4dd1d60cb | pauleve/pint | util.ml |
Copyright or © or Copr . , Morgan Magnin , ( 2010 )
This software is a computer program whose purpose is to provide Process
Hitting related tools .
This software is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software . You can use ,
m... | null | https://raw.githubusercontent.com/pauleve/pint/7cf943ec60afcf285c368950925fd45f59f66f4a/pintlib/util.ml | ocaml |
Copyright or © or Copr . , Morgan Magnin , ( 2010 )
This software is a computer program whose purpose is to provide Process
Hitting related tools .
This software is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software . You can use ,
m... | |
0c753ade5ebcdd2df4dbd04f5410c247f99ffe9faa6e06867bfbed01d3b012ed | igorhvr/bedlam | test-fmt.scm |
(cond-expand
(chicken
(load "fmt-chicken.scm"))
(else))
(cond-expand
(chicken
(use test)
(import fmt))
(gauche
(use gauche.test)
(use text.fmt)
(define test-begin test-start)
(define orig-test (with-module gauche.test test))
(define-syntax test
(syntax-rules ()
((test name expected expr)... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/fmt/fmt-0.8.1/test-fmt.scm | scheme | basic data types
(test "1e+23" (fmt #f (num 1e+23)))
exact rationals
(cond
((feature? 'full-numeric-tower)
(test "1+2i" (fmt #f (string->number "1+2i")))
(test "1+2i" (fmt #f (num (string->number "1+2i"))))
padding/trimming
utilities
shared structures
without shared detection
pretty printing
(define-m... |
(cond-expand
(chicken
(load "fmt-chicken.scm"))
(else))
(cond-expand
(chicken
(use test)
(import fmt))
(gauche
(use gauche.test)
(use text.fmt)
(define test-begin test-start)
(define orig-test (with-module gauche.test test))
(define-syntax test
(syntax-rules ()
((test name expected expr)... |
ed176d881de2e52bb6dec61f355e77c550a9a1d7390d64e49fa8135cd42c52a8 | jobjo/popper | fail_with_log.ml | open Popper
open Sample.Syntax
type int_list = int list [@@deriving show, ord, popper]
let test_rev =
test @@ fun () ->
let* () = Sample.log_key_value "x" "42" in
let* () = Sample.log_key_value "y" "Dummy" in
equal int_list_comparator (List.rev [ 1; 2; 3 ]) [ 2; 3; 1 ]
let () = Clean.run test_rev
| null | https://raw.githubusercontent.com/jobjo/popper/32c1ce0ff5ea24a5d3402f08c7966281521d5d57/test/expect/fail_with_log.ml | ocaml | open Popper
open Sample.Syntax
type int_list = int list [@@deriving show, ord, popper]
let test_rev =
test @@ fun () ->
let* () = Sample.log_key_value "x" "42" in
let* () = Sample.log_key_value "y" "Dummy" in
equal int_list_comparator (List.rev [ 1; 2; 3 ]) [ 2; 3; 1 ]
let () = Clean.run test_rev
| |
6632a04d4850ea7cb269b1917d9e12acf6ddfa31885dacb869fdef668d60662b | zchn/ethereum-analyzer | Main.hs | -- | Launch ethereum-analyzer server.
module Main
( main
) where
import Ethereum.Analyzer.Web (startApp)
main :: IO ()
main = startApp
| null | https://raw.githubusercontent.com/zchn/ethereum-analyzer/f2a60d8b451358971f1e3b1a61658f5741c4c099/ethereum-analyzer-webui/exec_src/Main.hs | haskell | | Launch ethereum-analyzer server. | module Main
( main
) where
import Ethereum.Analyzer.Web (startApp)
main :: IO ()
main = startApp
|
0844676c87acd65536c32277707b94d0f0f2848fe6cf76d8f04b3b0283772da1 | reach-sh/reach-lang | CP.hs | # OPTIONS_GHC -Wno - missing - export - lists #
module Reach.AST.CP where
import qualified Data.Map.Strict as M
import GHC.Generics
import Reach.AST.Base
import Reach.AST.DLBase
import Reach.Counter
import Reach.Pretty
import Reach.Texty
data CTail
= CT_Com DLStmt CTail
| CT_If SrcLoc DLArg CTail CTail
| CT_Sw... | null | https://raw.githubusercontent.com/reach-sh/reach-lang/f79282c49705c66fc10489045d502d17621d60c5/hs/src/Reach/AST/CP.hs | haskell | # OPTIONS_GHC -Wno - missing - export - lists #
module Reach.AST.CP where
import qualified Data.Map.Strict as M
import GHC.Generics
import Reach.AST.Base
import Reach.AST.DLBase
import Reach.Counter
import Reach.Pretty
import Reach.Texty
data CTail
= CT_Com DLStmt CTail
| CT_If SrcLoc DLArg CTail CTail
| CT_Sw... | |
d0a8b83a6d08622b387671b97d93dc8b8f6ba9833179b49b96223f59091bffc0 | gtk2hs/gtk2hs | CairoSDL.hs | {-# LANGUAGE OverloadedStrings #-}
An example of Cairo drawing to an SDL screen .
updated to GTK 3 and SDL2 by
This example uses SDL 2 + instead of SDL 1 in the gtk2 version , and requires
-- the haskell package sdl2.
import SDL
import Graphics.Rendering.Cairo
import Foreign.Ptr ( castPtr )
demo1 :: Render ()... | null | https://raw.githubusercontent.com/gtk2hs/gtk2hs/0f90caa1dae319a0f4bbab76ed1a84f17c730adf/cairo/demo/gtk3/CairoSDL.hs | haskell | # LANGUAGE OverloadedStrings #
the haskell package sdl2. | An example of Cairo drawing to an SDL screen .
updated to GTK 3 and SDL2 by
This example uses SDL 2 + instead of SDL 1 in the gtk2 version , and requires
import SDL
import Graphics.Rendering.Cairo
import Foreign.Ptr ( castPtr )
demo1 :: Render ()
demo1 = do
setSourceRGB 0 0 0
moveTo 100 100
lineTo 500 5... |
0540ed5f544b39cac1a93ff9f09e8602a2793ad08d5cd32b980b493d85235dfe | iu-parfunc/lvars | BulkRetry.hs | # LANGUAGE ScopedTypeVariables , BangPatterns , ConstraintKinds , TypeFamilies #
# LANGUAGE DataKinds #
| EXPERIMENTAL version which eventually should be made generic across Par monads
( i.e. a BulkRetryT transformer ) , and should thus be extended to transparently
-- catch any attempts by a thread to block, not j... | null | https://raw.githubusercontent.com/iu-parfunc/lvars/78e73c96a929aa75aa4f991d42b2f677849e433a/src/lvish/Control/LVish/BulkRetry.hs | haskell | catch any attempts by a thread to block, not just the special non-blocking calls
provided by *this* library.
Instances only.
------------------------------------------------------------------------------
| The point where users send abort messages.
^ This stores the iterations that fail.
^ This is the current ite... | # LANGUAGE ScopedTypeVariables , BangPatterns , ConstraintKinds , TypeFamilies #
# LANGUAGE DataKinds #
| EXPERIMENTAL version which eventually should be made generic across Par monads
( i.e. a BulkRetryT transformer ) , and should thus be extended to transparently
module Control.LVish.BulkRetry
where
im... |
2ac8f5419a05bbe7ea25fa93db62597f14e1959354757601d628fcbcc4d550d1 | kyleburton/sandbox | core_test.clj | (ns spec-sandbox.core-test
(:require [clojure.test :refer :all]
[spec-sandbox.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/kyleburton/sandbox/cccbcc9a97026336691063a0a7eb59293a35c31a/examples/clojure/spec-sandbox/test/spec_sandbox/core_test.clj | clojure | (ns spec-sandbox.core-test
(:require [clojure.test :refer :all]
[spec-sandbox.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
28d9ff7eb2cf95ecf56ba9da65ef72b0dcd80c5e23a2fc9002455f018c760448 | Perry961002/SICP | exe3.21-print-queue.scm | 因为队列是一个序对,它的car指针指向表的第一个数据项,cdr指针指向最后一个数据项,所以输出了那样的结果
(load "Chap3\\example\\exa3.3.2-queue.scm")
(define (print-queue queue)
(if (empty-queue? queue)
'()
(front-ptr queue))) | null | https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap3/exercise/exe3.21-print-queue.scm | scheme | 因为队列是一个序对,它的car指针指向表的第一个数据项,cdr指针指向最后一个数据项,所以输出了那样的结果
(load "Chap3\\example\\exa3.3.2-queue.scm")
(define (print-queue queue)
(if (empty-queue? queue)
'()
(front-ptr queue))) | |
4b37e32bd1f408a0b74a6862beb9097ddf6f2223d6be6605d39852e0a932c8b4 | ArulselvanMadhavan/haskell-first-principles | BadMonoid.hs | module BadMonoid where
import Data.Monoid
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
data Bull
= Fools
| Twoo
deriving (Eq, Show)
instance Arbitrary Bull where
arbitrary = frequency [(1, return Fools), (1, return Twoo)]
insta... | null | https://raw.githubusercontent.com/ArulselvanMadhavan/haskell-first-principles/06e0c71c502848c8e75c8109dd49c0954d815bba/chapter17/test/BadMonoid.hs | haskell | module BadMonoid where
import Data.Monoid
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
data Bull
= Fools
| Twoo
deriving (Eq, Show)
instance Arbitrary Bull where
arbitrary = frequency [(1, return Fools), (1, return Twoo)]
insta... | |
5ffb4b5ae4462b695d2ea604b69fcd5c0b4c2e46507b2cfd72cb5c2f1a435be3 | mtolly/onyxite-customs | Load.hs | {-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
module Onyx.FeedBack.Load where
import Control.Monad (guard, void)
import Contr... | null | https://raw.githubusercontent.com/mtolly/onyxite-customs/0c8acd6248fe92ea0d994b18b551973816adf85b/haskell/packages/onyx-lib/src/Onyx/FeedBack/Load.hs | haskell | # LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
# LANGUAGE OverloadedStrings #
I haven't seen this form in published charts, but it is written
for non-*/4 signatures by -ch
| Apply force and tap notes to modify a note stream
normal end
solo goes to end of song without ending
ended a solo without sta... | # LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
module Onyx.FeedBack.Load where
import Control.Monad (guard, void)
import Control.Monad.IO.Class (MonadIO)
import Data.Bifunctor (first)
import qu... |
d6b94b15a5bbd7e63047e7df169661354a77dc7bcb313d6aba0f3baa389e49eb | wireless-net/erlang-nommu | wxSetCursorEvent.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2013 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Publi... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/src/gen/wxSetCursorEvent.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitatio... | Copyright Ericsson AB 2008 - 2013 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(wxSetCursorEvent).
-include("wxe.... |
70607f8577e8fdbd40882533fa2dea4894efba7356b9b8786da1b5ba4760fb1a | fmi-lab/fp-elective-2017 | binomial-coefficient.scm | (require rackunit rackunit/text-ui)
(define (binomial-coefficient row index)
(cond ((= index 1) 1)
((= row index) 1)
(else (+ (binomial-coefficient (- row 1) (- index 1))
(binomial-coefficient (- row 1) index)))))
(define binomial-coefficient-tests
(test-suite
"Tests for binom... | null | https://raw.githubusercontent.com/fmi-lab/fp-elective-2017/e88d5c0319b6d03c0ecd8a12a2856fb1bf5dcbf3/exercises/03/binomial-coefficient.scm | scheme | (require rackunit rackunit/text-ui)
(define (binomial-coefficient row index)
(cond ((= index 1) 1)
((= row index) 1)
(else (+ (binomial-coefficient (- row 1) (- index 1))
(binomial-coefficient (- row 1) index)))))
(define binomial-coefficient-tests
(test-suite
"Tests for binom... | |
518c35a0ebb0ea53995e17199478618bbe28b24fb04fdef9647dd367dc245563 | htm-community/comportex | q_learning_1d.cljc | (ns org.nfrac.comportex.demos.q-learning-1d
(:require [org.nfrac.comportex.core :as cx]
[org.nfrac.comportex.layer :as layer]
[org.nfrac.comportex.synapses :as syn]
[org.nfrac.comportex.encoders :as enc]
[org.nfrac.comportex.util :as util :refer [round abs]]
... | null | https://raw.githubusercontent.com/htm-community/comportex/cd318492cf2e43cb7f25238b116b90b8195ec5aa/src/org/nfrac/comportex/demos/q_learning_1d.cljc | clojure | using Q learning instead
do not want temporal pooling here - actions are not static
lookup on columns of :action layer
Q = estimate of optimal future value = average active perm.
do the Q learning update on action layer
maintain map of state+action -> approx Q values, for diagnostics
calculate the next position | (ns org.nfrac.comportex.demos.q-learning-1d
(:require [org.nfrac.comportex.core :as cx]
[org.nfrac.comportex.layer :as layer]
[org.nfrac.comportex.synapses :as syn]
[org.nfrac.comportex.encoders :as enc]
[org.nfrac.comportex.util :as util :refer [round abs]]
... |
74f30acb9766d552dffe62928ed9b3099799bd938c511ed0efabd717f15d18b1 | georgefst/evdev | Evdev.hs | # OPTIONS_GHC -fno - state - hack #
-- | The main module for working with devices and events.
module Evdev (
-- * Devices
Device,
newDevice,
nextEvent,
evdevDir,
-- ** Properties
deviceName,
devicePath,
deviceProperties,
deviceEventTypes,
deviceHasEvent,
deviceFd,
de... | null | https://raw.githubusercontent.com/georgefst/evdev/75dfacfb940af7189348433b7f7a1be773254a94/evdev/src/Evdev.hs | haskell | | The main module for working with devices and events.
* Devices
** Properties
** Grabbing
* Events
* Lower-level
** C-style types
They are used internally, but may be useful for advanced users.
stores path that was originally used, as it seems impossible to recover this later
We don't allow the user to acces... | # OPTIONS_GHC -fno - state - hack #
module Evdev (
Device,
newDevice,
nextEvent,
evdevDir,
deviceName,
devicePath,
deviceProperties,
deviceEventTypes,
deviceHasEvent,
deviceFd,
devicePhys,
deviceUniq,
deviceProduct,
deviceVendor,
deviceBustype,
deviceVers... |
100882109ee20f68ac0a32aa5bc23bf02ce7e6fcc3366e428dc4853e0eac6f53 | greglook/cljstyle | project.clj | (defproject mvxcvi/cljstyle "0.15.0"
:description "A tool for formatting Clojure code"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:aliases
{"kaocha" ["with-profile" "+kaocha" "run" "-m" "kaocha.runner"]}
:plugins
[[lein-cloverage "1.2.2"]]
:dependencies
[[org.clo... | null | https://raw.githubusercontent.com/greglook/cljstyle/1f58e2e7af4c193aa77ad0695f6c2b9ac2c5c5ec/project.clj | clojure | (defproject mvxcvi/cljstyle "0.15.0"
:description "A tool for formatting Clojure code"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:aliases
{"kaocha" ["with-profile" "+kaocha" "run" "-m" "kaocha.runner"]}
:plugins
[[lein-cloverage "1.2.2"]]
:dependencies
[[org.clo... | |
aa035ab33742335a4fa3976f991a655b8429824fc00c9ed3065e133d364f6ec7 | litxio/ptghci | test.hs |
print "123"
%style --list
class A a where
test :: a -> Int
import Data.Aeson
%info encode
| null | https://raw.githubusercontent.com/litxio/ptghci/bbb3c5fdf2e73a557864b6b1e26833fffb34fc84/test.hs | haskell | list |
print "123"
class A a where
test :: a -> Int
import Data.Aeson
%info encode
|
748aa425f2873f67ef81c7a5039b3e873b7ba9f70cc189c0afcfca6afee6374c | albertoruiz/easyVision | chanShow.hs | import Vision.GUI
import Image.Processing
main = run $ sMonitor "image" sh
where
sh _ x = [ Draw (rgb x), Draw x ]
| null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/tour/chanShow.hs | haskell | import Vision.GUI
import Image.Processing
main = run $ sMonitor "image" sh
where
sh _ x = [ Draw (rgb x), Draw x ]
| |
25e023c463e604d526fcbc23aa35a2e8a7f0af33520edb7084b2a6de5a927fd7 | bmeurer/ocaml-experimental | rawwidget.ml | (***********************************************************************)
(* *)
MLTk , Tcl / Tk interface of Objective Caml
(* *)
, , and ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-experimental/fe5c10cdb0499e43af4b08f35a3248e5c1a8b541/otherlibs/labltk/support/rawwidget.ml | ocaml | *********************************************************************
described in file LICENSE found in the... | MLTk , Tcl / Tk interface of Objective Caml
, , and
projet Cristal , INRIA Rocquencourt
, Kyoto University RIMS
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique and... |
98d0e53730713209a83c6086cbc78c35d365a507804a31ad1dc56d3a8cc8e2bc | cxphoe/SICP-solutions | 2.02.rkt | (define (make-point x y)
(cons x y))
(define (x-point p)
(car p))
(define (y-point p)
(cdr p))
(define (make-segment p1 p2)
(cons p1 p2))
(define (start-segment segment)
(car segment))
(define (end-segment segment)
(cdr segment))
(define (midpoint-segment segment)
(make-point (/ (+ (x-point (start-s... | null | https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%202-Building%20Abstractions%20with%20Data/1.Introduction%20to%20Data%20Abstraction/2.02.rkt | racket | (define (make-point x y)
(cons x y))
(define (x-point p)
(car p))
(define (y-point p)
(cdr p))
(define (make-segment p1 p2)
(cons p1 p2))
(define (start-segment segment)
(car segment))
(define (end-segment segment)
(cdr segment))
(define (midpoint-segment segment)
(make-point (/ (+ (x-point (start-s... | |
6afd9d206a3940782ea21a56d2d24b04a55f8f71799776d57e6d09f06dd2c199 | W-Net-AI/LISP-CV | structs.lisp | ;;;; -*- mode: lisp; indent-tabs: nil -*-
structs.lisp
;;;; OpenCV bindings
;;;; OpenCV structs
(in-package :lisp-cv)
D - TREE - NODE
(defcstruct d-tree-node
(class_idx :int)
(Tn :int)
(value :double)
(parent :pointer)
(left :pointer)
(right :pointer)
(split :pointer)
(sample_count :int)
(depth :int... | null | https://raw.githubusercontent.com/W-Net-AI/LISP-CV/10d5c7c1a6fa026de488ca89a28e8a5c519ff8f2/structs.lisp | lisp | -*- mode: lisp; indent-tabs: nil -*-
OpenCV bindings
OpenCV structs
CV-TERM-CRITERIA
KEY-POINT1
try (:actual-type (:pointer (:struct key-point)))
(x :float)
(y :float)
(size :float)
(angle :float)
(response :float)
(octave :int)
(class-id :int)) | structs.lisp
(in-package :lisp-cv)
D - TREE - NODE
(defcstruct d-tree-node
(class_idx :int)
(Tn :int)
(value :double)
(parent :pointer)
(left :pointer)
(right :pointer)
(split :pointer)
(sample_count :int)
(depth :int)
(num_valid :pointer)
(offset :int)
(buf_idx :int)
(maxlr :double)
(complexit... |
9719803c0c68b404c1627502d84dccb4d7cb92a092db46cf64e36a0dc796cf2f | jesperes/aoc_erlang | aoc2018_day12.erl | -module(aoc2018_day12).
-behavior(aoc_puzzle).
-export([parse/1, solve1/1, solve2/1, info/0]).
-include("aoc_puzzle.hrl").
-spec info() -> aoc_puzzle().
info() ->
#aoc_puzzle{module = ?MODULE,
year = 2018,
day = 12,
name = "Subterranean Sustainability",
expe... | null | https://raw.githubusercontent.com/jesperes/aoc_erlang/ec0786088fb9ab886ee57e17ea0149ba3e91810a/src/2018/aoc2018_day12.erl | erlang | Instead we look at the pattern of successively larger inputs.
* 10^n.
| -module(aoc2018_day12).
-behavior(aoc_puzzle).
-export([parse/1, solve1/1, solve2/1, info/0]).
-include("aoc_puzzle.hrl").
-spec info() -> aoc_puzzle().
info() ->
#aoc_puzzle{module = ?MODULE,
year = 2018,
day = 12,
name = "Subterranean Sustainability",
expe... |
dadccbea1ccbf0fe009f0ba7e1a89d014eee1f46830eca005db22963b79275ef | rtoy/cmucl | big-requests.lisp | -*- Mode : Lisp ; Syntax : Common - Lisp ; Package : XLIB ; -*-
;;;
( c ) copyright 2006
( c ) copyright 2007 by
;;;
;;; Permission is granted to any individual or institution to use,
;;; copy, modify, and distribute this software, provided that this
;;; complete copyright and permission notice is maintained,... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/clx/extensions/big-requests.lisp | lisp | Syntax : Common - Lisp ; Package : XLIB ; -*-
Permission is granted to any individual or institution to use,
copy, modify, and distribute this software, provided that this
complete copyright and permission notice is maintained, intact, in
all copies and supporting documentation.
This program is distributed in ... | ( c ) copyright 2006
( c ) copyright 2007 by
(in-package "XLIB")
Requests Extension , section 3 )
Extension , section 4 )
(define-extension "BIG-REQUESTS")
(defun enable-big-requests (display)
(declare (type display display))
(let ((opcode (extension-opcode display "BIG-REQUESTS")))
(with-buffer-... |
70fa35329f19d448887d84fa15b0326037e16b727038ac1b7eafff50434f1035 | cloojure/tupelo | profile.clj | (ns tupelo.profile
(:use tupelo.core))
(def ^:no-doc timer-stats (atom {}))
(defn timer-stats-reset!
"Reset all timer statistics to empty"
[] (reset! timer-stats {}))
(defn stats-update!
"Updates timing stats for a given key & elapsed time"
[id seconds]
(swap! timer-stats
(fn update-stats-fn
[s... | null | https://raw.githubusercontent.com/cloojure/tupelo/1b192f38d89ccebb6f5a26231ea061559a888cb0/src/clj/tupelo/profile.clj | clojure | dummy docstring
lookup key is fully-qualified function name
function body unchanged
in case roundoff => neg | (ns tupelo.profile
(:use tupelo.core))
(def ^:no-doc timer-stats (atom {}))
(defn timer-stats-reset!
"Reset all timer statistics to empty"
[] (reset! timer-stats {}))
(defn stats-update!
"Updates timing stats for a given key & elapsed time"
[id seconds]
(swap! timer-stats
(fn update-stats-fn
[s... |
98e1f05f91db2e6c8a51a7701f9240d53258c763778292db584fac1e55ce2e76 | grin-compiler/ghc-whole-program-compiler-project | Double.hs | # LANGUAGE RecordWildCards , LambdaCase , OverloadedStrings , PatternSynonyms , MagicHash , UnboxedTuples , BangPatterns , Strict #
module Stg.Interpreter.PrimOp.Double where
import GHC.Word
import GHC.Int
import GHC.Float
import GHC.Exts
import Stg.Syntax
import Stg.Interpreter.Base
pattern IntV i = IntAtom i -- ... | null | https://raw.githubusercontent.com/grin-compiler/ghc-whole-program-compiler-project/6e75aaccf4df0d78786f5bb1a28778d54c09a7be/external-stg-interpreter/lib/Stg/Interpreter/PrimOp/Double.hs | haskell | Literal (LitNumber LitNumInt i)
Literal (LitNumber LitNumInt i)
>## :: Double# -> Double# -> Int#
>=## :: Double# -> Double# -> Int#
==## :: Double# -> Double# -> Int#
/=## :: Double# -> Double# -> Int#
<## :: Double# -> Double# -> Int#
<=## :: Double# -> Double# -> Int#
+## :: Double# -> Double# -> Double#
-... | # LANGUAGE RecordWildCards , LambdaCase , OverloadedStrings , PatternSynonyms , MagicHash , UnboxedTuples , BangPatterns , Strict #
module Stg.Interpreter.PrimOp.Double where
import GHC.Word
import GHC.Int
import GHC.Float
import GHC.Exts
import Stg.Syntax
import Stg.Interpreter.Base
Literal ( LitNumber LitNumWord ... |
817854f25b9d4b8269efb3ce47177d0145d6194e6829eb16265990c1fe4781a6 | Mayvenn/storefront | ugc.cljc | (ns storefront.ugc
(:require [storefront.events :as events]
[storefront.keypaths :as keypaths]))
(def ^:private shop-by-look-default
{:title "Shop by Look"
:description (str "Get inspiration for your next hairstyle and "
"shop your favorite looks from the... | null | https://raw.githubusercontent.com/Mayvenn/storefront/14d1152c17e9ffc885bfc648b06a76db279faa01/src-cljc/storefront/ugc.cljc | clojure | Looking for adventure? See adventure.select-new-look/album-keyword->prompt-image
TODO Rename aladdin-free-install album
TODO Get proper copy
TODO Get proper copy
These 'aladdin' albums might be shop or around services
Shop by Look on classic/non-aladdin
product detail page
shop product detail page
adventure
Q... | (ns storefront.ugc
(:require [storefront.events :as events]
[storefront.keypaths :as keypaths]))
(def ^:private shop-by-look-default
{:title "Shop by Look"
:description (str "Get inspiration for your next hairstyle and "
"shop your favorite looks from the... |
fa1092d545be3270b9caa996e8eb74c18b88692f9878b473d056eb461483b7eb | jlongster/gambit-iphone-example | iphone#.scm | ;;;; "iphone ffi types"
;;; Defines c types for the iphone ffis.
(c-define-type UIView "UIView")
(c-define-type UIView* (pointer UIView))
(c-define-type UIEvent "UIEvent")
(c-define-type UIEvent* (pointer UIEvent))
(c-define-type UITouch "UITouch")
(c-define-type UITouch* (pointer UITouch))
(c-define-type UIAccelerom... | null | https://raw.githubusercontent.com/jlongster/gambit-iphone-example/e55d915180cb6c57312cbb683d81823ea455e14f/lib/ffi/iphone%23.scm | scheme | "iphone ffi types"
Defines c types for the iphone ffis. |
(c-define-type UIView "UIView")
(c-define-type UIView* (pointer UIView))
(c-define-type UIEvent "UIEvent")
(c-define-type UIEvent* (pointer UIEvent))
(c-define-type UITouch "UITouch")
(c-define-type UITouch* (pointer UITouch))
(c-define-type UIAccelerometer "UIAccelerometer")
(c-define-type UIAccelerometer* (pointer ... |
79452d063d3a2ec458b29eeaf7138d89d298971c965805e5f3b02ac020d110ee | lgessler/glam | xtdb.clj | (ns glam.server.xtdb
(:require [xtdb.api :as xt]
[mount.core :refer [defstate]]
[glam.xtdb.easy :refer [install-tx-fns!]]
[glam.server.config :refer [config]]
[clojure.java.io :as io])
(:import [xtdb.api IXtdb]
(java.io StringWriter)))
(defn ^IXtdb start-l... | null | https://raw.githubusercontent.com/lgessler/glam/e6f9927dd026675e5a3cccbd6bf97398dd958ab1/src/main/glam/server/xtdb.clj | clojure | (xt/listen
node
{:xt/event-type :xt/indexed-tx, :with-tx-ops? true}
(fn [ev]
(clojure.pprint/pprint ev out)
(println
(str
"\nevent received!\n\n"
(.toString out)
"\n\n\n")))
(when (:committed? ev)
))))
TODO: keep going... | (ns glam.server.xtdb
(:require [xtdb.api :as xt]
[mount.core :refer [defstate]]
[glam.xtdb.easy :refer [install-tx-fns!]]
[glam.server.config :refer [config]]
[clojure.java.io :as io])
(:import [xtdb.api IXtdb]
(java.io StringWriter)))
(defn ^IXtdb start-l... |
4c58dfc4c1d7fd50dac4a9ee7a8ed32ff329409ee9f90043cca512a26a670fda | erlang/percept | percept_analyzer.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2007 - 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 applic... | null | https://raw.githubusercontent.com/erlang/percept/44ee3ca98bcd37dfab691072e953131107ebec55/src/percept_analyzer.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 2007 - 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(percept_analyzer).
-export([
minmax/1,
waiting_activities/1,
activities2count/2,
activities2count/3,
... |
131c09a21d3fd056efcd0f3a7c6b64080adbaf2c3da0f1c12c2439011ec21c92 | LeventErkok/sbv | Casts.hs | -----------------------------------------------------------------------------
-- |
-- Module : TestSuite.Overflows.Casts
Copyright : ( c )
-- License : BSD3
-- Maintainer:
-- Stability : experimental
--
-- Test suite for overflow checking
-----------------------------------------------------------------------... | null | https://raw.githubusercontent.com/LeventErkok/sbv/cfaa40b8c8ff8e1b7ff9ab71304654f6f531ba72/SBVTestSuite/TestSuite/Overflows/Casts.hs | haskell | ---------------------------------------------------------------------------
|
Module : TestSuite.Overflows.Casts
License : BSD3
Maintainer:
Stability : experimental
Test suite for overflow checking
---------------------------------------------------------------------------
# LANGUAGE Rank2Types #
... | Copyright : ( c )
# LANGUAGE ScopedTypeVariables #
module TestSuite.Overflows.Casts(tests) where
import Data.SBV
import Data.SBV.Tools.Overflow
import Utils.SBVTestFramework
type C a b = SBV a -> (SBV b, (SBool, SBool))
getBounds :: (Bounded a, Integral a) => a -> Maybe (Integer, Integer)
getBounds x = Just ... |
4f2aeb484f3355a48491c842cf46181df1a0038bf1567e0d3e78f2a6eb8a75a9 | shawwn/wiki | Redirects2.hs | [
("site.hs", "/hakyll.hs")
, ("Feed.hs", "")
, ("hakyll.hs", "/Main.hs")
]
| null | https://raw.githubusercontent.com/shawwn/wiki/a36db84e606cff85b1e425483db5c5148f9ecce4/static/redirects/Redirects2.hs | haskell | [
("site.hs", "/hakyll.hs")
, ("Feed.hs", "")
, ("hakyll.hs", "/Main.hs")
]
| |
b82cec286a6c47b41d53e660593c9e9a6c6415d399ff39097e39e2bf847f5583 | Ptival/language-ocaml | Location.hs | # LANGUAGE DeriveGeneric #
module Language.OCaml.Definitions.Parsing.Location
( Location (..),
none,
)
where
import GHC.Generics (Generic)
import Language.OCaml.Definitions.StdLib.Lexing (Position (..))
data Location = Location
{ locStart :: Position,
locEnd :: Position,
locGhost :: Bool
}
deri... | null | https://raw.githubusercontent.com/Ptival/language-ocaml/7b07fd3cc466bb2ad2cac4bfe3099505cb63a4f4/lib/Language/OCaml/Definitions/Parsing/Location.hs | haskell | # LANGUAGE DeriveGeneric #
module Language.OCaml.Definitions.Parsing.Location
( Location (..),
none,
)
where
import GHC.Generics (Generic)
import Language.OCaml.Definitions.StdLib.Lexing (Position (..))
data Location = Location
{ locStart :: Position,
locEnd :: Position,
locGhost :: Bool
}
deri... | |
07b642bbd857264cc6d3e9f4216a4e8e26fcbbc023e46082c672ac266fcdf4ca | racket/pict | transform.rkt | #lang racket/base
(require racket/math
pict)
(define a (cc-superimpose (rectangle 30 30) (rectangle 10.0 20.0)))
(define b (cc-superimpose (rectangle 30 30) (rectangle 10.0 20.0)))
(define c (frame (rotate (vc-append a b) (- (/ pi 2)))))
(define d (frame (shear (vc-append a b) 0.5 0)))
(define d2 (frame (she... | null | https://raw.githubusercontent.com/racket/pict/2ea1662a4d0755709139605c17b668f417104c94/pict-test/tests/pict/transform.rkt | racket | #lang racket/base
(require racket/math
pict)
(define a (cc-superimpose (rectangle 30 30) (rectangle 10.0 20.0)))
(define b (cc-superimpose (rectangle 30 30) (rectangle 10.0 20.0)))
(define c (frame (rotate (vc-append a b) (- (/ pi 2)))))
(define d (frame (shear (vc-append a b) 0.5 0)))
(define d2 (frame (she... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.