_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 |
|---|---|---|---|---|---|---|---|---|
8f7fe45ceb2c43e78e300bb1302ff509e7839b5f9d15c6ce55b67bd36fea3a10 | gen-smtp/gen_smtp | smtp_socket.erl | Copyright 2009 < > . All rights reserved .
%%%
%%% Permission is hereby granted, free of charge, to any person obtaining
%%% a copy of this software and associated documentation files (the
" Software " ) , to deal in the Software without restriction , including
%%% without limitation the rights to use, copy, mo... | null | https://raw.githubusercontent.com/gen-smtp/gen_smtp/1bd8d085ec5ca355b880b678d19a739ab6334640/src/smtp_socket.erl | erlang |
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
without limitation the rights to use, copy, modify, merge, publish,
the following conditions:
The above copyright notice and this permission notice shall be
EXPRESS OR IMPLIED, ... | Copyright 2009 < > . All rights reserved .
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , and to
permit persons to whom the Software is furnished to do so , subject to
included in all copies or substantial portions of... |
022f838ce6676d64ae2c5a1fc73e21c6894845e173745ada39d96bb858dfeed4 | grin-compiler/ghc-wpc-sample-programs | Encoding.hs | -- |
-- Module : Basement.String.Encoding.Encoding
-- License : BSD-style
-- Maintainer : Foundation
-- Stability : experimental
-- Portability : portable
--
# LANGUAGE FlexibleContexts #
module Basement.String.Encoding.Encoding
( Encoding(..)
, convertFromTo
) where
import Basement... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/basement-0.0.11/Basement/String/Encoding/Encoding.hs | haskell | |
Module : Basement.String.Encoding.Encoding
License : BSD-style
Maintainer : Foundation
Stability : experimental
Portability : portable
| the unit element use for the encoding.
| define the type of error handling you want to use for the
next function.
of the next possible `Unit encoding`
^ ... |
# LANGUAGE FlexibleContexts #
module Basement.String.Encoding.Encoding
( Encoding(..)
, convertFromTo
) where
import Basement.Compat.Base
import Basement.Types.OffsetSize
import Basement.Monad
import Basement.PrimType
import Basement.MutableBuilder
import... |
3ef4c8ab72815f66c78acb70d2b12fcfd957df431424fdb8b101bbde8c688d92 | GaloisInc/tower | Options.hs | {-# LANGUAGE RankNTypes #-}
module Ivory.Tower.Options
( TOpts(..)
, towerGetOpts
, parseOpts
, getOpts
, finalizeOpts
) where
import Prelude ()
import Prelude.Compat
import System.Console.GetOpt
(ArgOrder(Permute), OptDescr(..), getOpt', usageInfo)
import System.Exit (exitFailure)
import System.Enviro... | null | https://raw.githubusercontent.com/GaloisInc/tower/a43f5e36c6443472ea2dc15bbd49faf8643a6f87/tower/src/Ivory/Tower/Options.hs | haskell | # LANGUAGE RankNTypes # |
module Ivory.Tower.Options
( TOpts(..)
, towerGetOpts
, parseOpts
, getOpts
, finalizeOpts
) where
import Prelude ()
import Prelude.Compat
import System.Console.GetOpt
(ArgOrder(Permute), OptDescr(..), getOpt', usageInfo)
import System.Exit (exitFailure)
import System.Environment (getArgs)
import quali... |
1952d814d2d101d493a9e897f45b9f6803eff74ac0f42249c56aab1a8f3094ac | pedropramos/PyonR | cpy-importing.rkt | (module cpy-importing racket
(require "runtime.rkt"
"libpython.rkt"
(for-syntax "libpython.rkt")
ffi/unsafe)
(provide (all-defined-out))
(define (cpy->racket x)
(let ([type (PyString_AsString
(PyObject_GetAttrString
(PyObject_Type x) "_... | null | https://raw.githubusercontent.com/pedropramos/PyonR/16edd14f3950fd5a01f8b0237e023536ef48d17b/cpy-importing.rkt | racket | [("list") (list-from-cpy x)]
[("tuple") (tuple-from-cpy x)]
[("dict") (dict-from-cpy x)]
[("dictproxy") (dictproxy-from-cpy x)]
(printf "cpy->racket: wrapping value ~a of type ~a\n" (PyString_AsString (PyObject_Repr x)) type)
used only for holding attribute/method names as keys (implemented as symbols)
used only fo... | (module cpy-importing racket
(require "runtime.rkt"
"libpython.rkt"
(for-syntax "libpython.rkt")
ffi/unsafe)
(provide (all-defined-out))
(define (cpy->racket x)
(let ([type (PyString_AsString
(PyObject_GetAttrString
(PyObject_Type x) "_... |
404dd518fb13c198f7b8e511c8b18835e68b5f454644770465d8e7f4be299bb5 | janestreet/async_ssl | ffi__library_must_be_initialized.ml | open Core
open Poly
open Async
open Import
module Ssl_method = Bindings.Ssl_method
module Ssl_error = struct
type t =
| Zero_return
| Want_read
| Want_write
| Want_connect
| Want_accept
| Want_X509_lookup
| Syscall_error
| Ssl_error
[@@deriving sexp_of]
let of_int n =
let ope... | null | https://raw.githubusercontent.com/janestreet/async_ssl/37b9c26674affb4018e24e56ba7b04f4a372863a/src/ffi__library_must_be_initialized.ml | ocaml | for use in ctypes type signatures
SSL_CTX_set_options(3) returns the new options bitmask after adding options. We
don't really have a use for this, so ignore.
get1_session increments the reference count | open Core
open Poly
open Async
open Import
module Ssl_method = Bindings.Ssl_method
module Ssl_error = struct
type t =
| Zero_return
| Want_read
| Want_write
| Want_connect
| Want_accept
| Want_X509_lookup
| Syscall_error
| Ssl_error
[@@deriving sexp_of]
let of_int n =
let ope... |
51469b2b6b392f76ecd3ad32e65ba91a30dfef49ee2de5a34201c486dfe0ff39 | doomeer/kalandralang | id.ml | module M =
struct
type t = { int: int; string: string }
let compare a b = Int.compare a.int b.int
end
include M
let string_table: (string, t) Hashtbl.t = Hashtbl.create 512
let next = ref 0
let make string =
match Hashtbl.find_opt string_table string with
| None ->
let int = !next in
incr n... | null | https://raw.githubusercontent.com/doomeer/kalandralang/1d0fa5340cd8cbfec881838efc06c2fb9035d1b0/src/id.ml | ocaml | module M =
struct
type t = { int: int; string: string }
let compare a b = Int.compare a.int b.int
end
include M
let string_table: (string, t) Hashtbl.t = Hashtbl.create 512
let next = ref 0
let make string =
match Hashtbl.find_opt string_table string with
| None ->
let int = !next in
incr n... | |
22781983146f14af4305fc2e93184c3a9f4af98c804b0ebe785227ad1a8db3b4 | databrary/databrary | Comment.hs | {-# LANGUAGE OverloadedStrings #-}
module Controller.Comment
( postComment
) where
import Control.Monad (forM_, when)
import Control.Monad.Trans.Class (lift)
import Data.Function (on)
import Data.Text (Text)
import Ops
import qualified JSON
import Model.Permission
import Model.Id
import Model.Container
import Mod... | null | https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Controller/Comment.hs | haskell | # LANGUAGE OverloadedStrings # | module Controller.Comment
( postComment
) where
import Control.Monad (forM_, when)
import Control.Monad.Trans.Class (lift)
import Data.Function (on)
import Data.Text (Text)
import Ops
import qualified JSON
import Model.Permission
import Model.Id
import Model.Container
import Model.Slot
import Model.Notification.T... |
59988e718644d997015bf2da206bad7d77d1d925c5a4346b3a160e85fdaa71d2 | fredrikt/yxa | targetlist.erl | %%%-------------------------------------------------------------------
%%% File : targetlist.erl
@author < >
@doc is a module for managing a list of ongoing
%%% client transactions for sipproxy.
@since 28 Jun 2003 by < >
%%% @end
@private
%%%-------------------------------------... | null | https://raw.githubusercontent.com/fredrikt/yxa/85da46a999d083e6f00b5f156a634ca9be65645b/src/targetlist.erl | erlang | -------------------------------------------------------------------
File : targetlist.erl
client transactions for sipproxy.
@end
-------------------------------------------------------------------
--------------------------------------------------------------------
External exports
--------------------... | @author < >
@doc is a module for managing a list of ongoing
@since 28 Jun 2003 by < >
@private
-module(targetlist).
-export([
add/8,
empty/0,
get_length/1,
debugfriendly/1,
get_using_pid/2,
get_using_branch/2,
get_targets_in_state/2,
get_responses/1,
extract/2,
set_pid/2... |
2236dc5c92ff3acf2e12260cf095033e88f1edd79721940f3e2e1248791efd31 | awslabs/s2n-bignum | bignum_sub_p256.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_sub_p256.ml | ocaml | =========================================================================
=========================================================================
*** print_literal_from_elf "arm/p256/bignum_sub_p256.o";;
***
arm_CSETM X3 Condition_CC
-------------------------------------------------------------------------
... |
* 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
*)
Subtraction modulo p_256 , the field characteristic for NIST P-256... |
39b11c30b8ab5b74f9eebe1a8963b6a3cc201859027b33d9a0eeb895cb84ef90 | HunterYIboHu/htdp2-solution | ex88-VPC-Struct-define.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-beginner-abbr-reader.ss" "lang")((modname ex88-VPC-Struct-define) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htd... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter1/Section5/ex88-VPC-Struct-define.rkt | racket | about the language level of this file in a form that our tools can easily process.
interpretation (make-cat p h) means the cat's x-coordinate and
cat's happiness point.
Full cat-program
consume a initial state and return the next one. | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex88-VPC-Struct-define) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeati... |
2bdea44db7c3cace7d48ffbb89d332f3f4155812f674d1fbb1e62128b8c9d2ae | erlyaws/yaws | rewritetest.erl | -module(rewritetest).
-export([arg_rewrite/1]).
-include("../../include/yaws.hrl").
-include("../../include/yaws_api.hrl").
arg_rewrite(Arg) ->
Url = yaws_api:request_url(Arg),
case Url#url.path of
"/rewrite" ++ Rest ->
Req0 = Arg#arg.req,
Req1 = Req0#http_request{path={abs_pa... | null | https://raw.githubusercontent.com/erlyaws/yaws/da198c828e9d95ca2137da7884cddadd73941d13/testsuite/revproxy_SUITE_data/rewritetest.erl | erlang | -module(rewritetest).
-export([arg_rewrite/1]).
-include("../../include/yaws.hrl").
-include("../../include/yaws_api.hrl").
arg_rewrite(Arg) ->
Url = yaws_api:request_url(Arg),
case Url#url.path of
"/rewrite" ++ Rest ->
Req0 = Arg#arg.req,
Req1 = Req0#http_request{path={abs_pa... | |
03ec1bfb287df88961c9100443bd12b6b61532200e4c0aed6c6e19125dd07253 | FranklinChen/hugs98-plus-Sep2006 | PickSquare.hs |
PickSquare.hs ( adapted from picksquare.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2005 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
Use of multiple names and picking are demonstrated . A 3x3 grid... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/GLUT/examples/RedBook/PickSquare.hs | haskell | Clear color value for every square on the board
and the other for the column on the grid. The color of each square is
determined by its position on the grid, and the value in the board array.
Note: In contrast to the the original example, we always give names to
squares, regardless of the render mode. This simplif... |
PickSquare.hs ( adapted from picksquare.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2005 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
Use of multiple names and picking are demonstrated . A 3x3 grid... |
120874f774e65a6c0000955b1cfebf8dec8a8b038ad820fafbf6b9f85a767203 | awkay/om-tutorial | A_Introduction.cljs | (ns om-tutorial.A-Introduction
(:require-macros
[cljs.test :refer [is]]
)
(:require [om.next :as om :refer-macros [defui]]
[om.dom :as dom]
[devcards.core :as dc :refer-macros [defcard defcard-doc]]
))
(defcard-doc
"# Introduction
This tutorial will walk you through... | null | https://raw.githubusercontent.com/awkay/om-tutorial/83ca10d91380ba62458b98ccaa80fd11b9c8321d/src/tutorial/om_tutorial/A_Introduction.cljs | clojure | wrapper function that can accept a state atom
options....show me the current value of the data | (ns om-tutorial.A-Introduction
(:require-macros
[cljs.test :refer [is]]
)
(:require [om.next :as om :refer-macros [defui]]
[om.dom :as dom]
[devcards.core :as dc :refer-macros [defcard defcard-doc]]
))
(defcard-doc
"# Introduction
This tutorial will walk you through... |
2272f42b02f40fa6fa8998586cd6c10f56b5217d613be1090f4233f5941204c3 | AeroNotix/lispkit | macros.lisp | (in-package :lispkit)
(defmacro destructuring-dolist (vars list &body body)
(let ((var (gensym))
(l (gensym)))
`(let ((,l ,list))
(dolist (,var ,l)
(destructuring-bind ,vars ,var
,@body)))))
(defun gdk-event-slot (slot)
(intern (format nil "GDK-EVENT-KEY-~a" slot) 'gdk))
... | null | https://raw.githubusercontent.com/AeroNotix/lispkit/2482dbeabc79667407dabe7765dfbffc16584b08/macros.lisp | lisp | (in-package :lispkit)
(defmacro destructuring-dolist (vars list &body body)
(let ((var (gensym))
(l (gensym)))
`(let ((,l ,list))
(dolist (,var ,l)
(destructuring-bind ,vars ,var
,@body)))))
(defun gdk-event-slot (slot)
(intern (format nil "GDK-EVENT-KEY-~a" slot) 'gdk))
... | |
42f9d8c682aa4a1d980891e626142326c07570100c643a0c430cc26bf2d6c28c | haskus/packages | Buffer.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE BangPatterns #-}
# LANGUAGE BlockArguments #
-- | Serializer into a mutable buffer
--
> > > let w = do putWord8 0x01 ; putWord32BE 0x23456789 ; putWord32BE 0xAABBCCDD
> > > b <... | null | https://raw.githubusercontent.com/haskus/packages/6d4a64dc26b55622af86b8b45a30a10f61d52e4d/haskus-binary/src/lib/Haskus/Binary/Serialize/Buffer.hs | haskell | # LANGUAGE BangPatterns #
| Serializer into a mutable buffer
>>> void $ runBufferPut b 0 overflowBufferFail w
>>> xs <- forM [0..4] (bufferReadWord8IO b)
True
small buffer
>>> xs <- forM [0..4] (bufferReadWord8IO b')
True
* Put
* Get
* Buffer overflow
| Action to perform when the buffer isn't large enough... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE BlockArguments #
> > > let w = do putWord8 0x01 ; putWord32BE 0x23456789 ; putWord32BE 0xAABBCCDD
> > > b < - newBuffer 10
> > > xs = = [ 0x01,0x23,0x45,0x67,0x89 ]
> > > ( _... |
bf34569878b0fabc031bfdf634c627ca590989f8f58c266e8955984cb2634b20 | 8c6794b6/haskell-sc-scratch | SCDiff2.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE Rank2Types #-}
|
Module : $ Header$
License : :
Stability : unstable
Portability : non - portable
Yet another take to compare synth nodes .
Attempt to cons... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/Diff/SCDiff2.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE Rank2Types #
Group 0
Group 2
Group 20
Just (Par ["amp":=0.3,"freq":=440.0,"out":=0.0]) | # LANGUAGE KindSignatures #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
|
Module : $ Header$
License : :
Stability : unstable
Portability : non - portable
Yet another take to compare synth nodes .
Attempt to construct osc message from diff with using zipper and
... |
dc3bf9147d1e78f8dcbadc05188faee333783ffef9e26a21a4df81808e832184 | typeclasses/dsv | FileStrictRead.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
module DSV.FileStrictRead
( readDsvFileStrictWithZippedHeader
, readDsvFileStrictWithoutHeader
, readDsvFileStrictIgnoringHeader
) where
import DSV.ByteString
import DSV.DelimiterType
import DSV.Fold
import DSV.Header
import DSV.IO
import DSV.Par... | null | https://raw.githubusercontent.com/typeclasses/dsv/ae4eb823e27e4c569c4f9b097441985cf865fbab/dsv/library/DSV/FileStrictRead.hs | haskell | ^ What character separates input values, e.g. 'comma' or 'tab'
^ The path of a CSV file to read
^ What character separates input values, e.g. 'comma' or 'tab'
^ The path of a CSV file to read
^ What character separates input values, e.g. 'comma' or 'tab'
^ The path of a CSV file to read | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
module DSV.FileStrictRead
( readDsvFileStrictWithZippedHeader
, readDsvFileStrictWithoutHeader
, readDsvFileStrictIgnoringHeader
) where
import DSV.ByteString
import DSV.DelimiterType
import DSV.Fold
import DSV.Header
import DSV.IO
import DSV.Par... |
e62ed65f7338820f29f7a9266c16a54580160b6a124d332273302e7d8324e102 | andrejbauer/alg | enum.ml | open Theory
open Algebra
open Util
module EPR=Enum_predicate_relation
(* General helper functions for partitioning axioms. *)
(* Select axioms that refer only to unary operations and constants. *)
let part_axioms axioms =
let rec no_binary = function
| Binary _ -> false
| Unary (_, t) -> no_binary t
| ... | null | https://raw.githubusercontent.com/andrejbauer/alg/95715bb1bf93fcc534a8d6c7c96c8913dc03de0c/src/enum.ml | ocaml | General helper functions for partitioning axioms.
Select axioms that refer only to unary operations and constants.
Select associativity axioms.
List of distinct variables of a term.
List of distinct variables of an axiom.
Number of distinct variables in an axiom.
Could also look for maximum variable ... | open Theory
open Algebra
open Util
module EPR=Enum_predicate_relation
let part_axioms axioms =
let rec no_binary = function
| Binary _ -> false
| Unary (_, t) -> no_binary t
| Var _ | Const _ | Elem _ -> true in
let no_binary_axiom (eq1, eq2) = no_binary eq1 && no_binary eq2 in
List.partition (ap... |
fb17835cef3f3779c9a6d508e81f1f6fce3882ccbcaea09c3506805afc3f64af | spechub/Hets | Cleaning.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
|
Module : ./Persistence . : ( c ) Uni Magdeburg 2017
License : GPLv2 or higher , see LICENSE.txt
Maintainer : < >
Stability : provisional
Portab... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/Persistence/DevGraph/Cleaning.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
|
Module : ./Persistence . : ( c ) Uni Magdeburg 2017
License : GPLv2 or higher , see LICENSE.txt
Maintainer : < >
Stability : provisional
Portability : portable
Module : ./Persis... |
d0e8d82d16d3fe75102c09b772d9c1d372c9eef3eb599dd419a62b81b304cc56 | iffyio/pong.hs | pong.hs | import Haste
import Haste.DOM
import Haste.Events
import Haste.Graphics.Canvas
import Data.IORef
-- Type declarations
data GameState = GameState{
ballPos :: Point, -- position of ball
ballSpeed :: Point, -- how far will ball move in a single update
paddlePos:: Double, -- start position of paddle on x axis
... | null | https://raw.githubusercontent.com/iffyio/pong.hs/fd9fe6ca2d55862f952f93ef93b3f7a898b56b1f/pong.hs | haskell | Type declarations
position of ball
how far will ball move in a single update
start position of paddle on x axis
Constants
width of canvas
height of canvas
radius of ball
height of paddle
width of paddle
Dimensions for start and restart button
Render game state on canvas
blue color
Draw a ball
Draw a paddle... | import Haste
import Haste.DOM
import Haste.Events
import Haste.Graphics.Canvas
import Data.IORef
data GameState = GameState{
score :: Int,
canvasElement :: Maybe Elem
}
data Paddle = Top | Bottom
width, height,ballRadius, paddleWidth, paddleHeight :: Double
halfWidth = width / 2
halfHeight = height / 2
btn... |
be522ba162081109b76f51bd24e0d3b97a6fb420c781e5f1c13c648aa82f7f3a | mistupv/cauder | exPat.erl | -module(exPat).
-export([ack/2, main/0]).
main() ->
self() ! {1, 2},
ack(1, 2).
ack(N, M) ->
receive
{N, M} ->
true;
_ ->
false
end.
| null | https://raw.githubusercontent.com/mistupv/cauder/ff4955cca4b0aa6ae9d682e9f0532be188a5cc16/examples/exPat.erl | erlang | -module(exPat).
-export([ack/2, main/0]).
main() ->
self() ! {1, 2},
ack(1, 2).
ack(N, M) ->
receive
{N, M} ->
true;
_ ->
false
end.
| |
0f6eb7a1b2cfc2ecc107f2541d769a55ee6bba03969a3d6cc196a3c20282f5a1 | athensresearch/athens | core.cljs | (ns athens.types.core
"Athens Block/Entity Types")
(defprotocol BlockTypeProtocol
"Block/Entity Type Protocol for rendering aspects"
(text-view
[this block-data attr]
"Renders Block/Entity Type as textual representation.
Recursively resolves references and all.")
(inline-ref-view
[this bloc... | null | https://raw.githubusercontent.com/athensresearch/athens/04f83dfc6f6bced8debe1a13daf228154f0a9a80/src/cljs/athens/types/core.cljs | clojure | (ns athens.types.core
"Athens Block/Entity Types")
(defprotocol BlockTypeProtocol
"Block/Entity Type Protocol for rendering aspects"
(text-view
[this block-data attr]
"Renders Block/Entity Type as textual representation.
Recursively resolves references and all.")
(inline-ref-view
[this bloc... | |
845e12945b4b8f832515365dbab94de72b38c3635bba04ff4afa5fcdefd450d0 | facebook/infer | SourceFileGraph.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/74e3bb0edd7fd1192b6511c7e649bb0df36fef14/infer/src/backend/SourceFileGraph.ml | ocaml | * Build a hash table from procedure name to source file where it's defined, and a hash table
from source files to list of procedures defined.
* build a hashtable from a procedure to all (static) callees
* An edge labelled by the number of calls from procedures in the source file to procedures in
the des... |
* 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
... |
86ecccb1eb367ccdc2d39ac5adc6b683a6d4d4a482e1f2be4a8fa5f15fc127d9 | mirage/metrics | metrics.mli |
* Copyright ( c ) 2018 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/mirage/metrics/be41443d0033f25f8ac5c459e150f6163436d064/src/core/metrics.mli | ocaml | * Metrics Monitoring.
[Metrics] provides a basic infrastructure to monitor metrics using time
series. {{!func} Monitoring} is performed on {{!srcs} sources}, indexed by
{{!tags} tags}. Tags allow users to select at runtime which metric sources
are producing data points. Disabled data-sources have a low... |
* Copyright ( c ) 2018 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
b70f8bbf2e0e13e3092ed4be40d8fede8814fabc709106ca77393cd0cdcbd225 | geremih/xcljb | render_types.clj | This file is automatically generated . DO NOT MODIFY .
(clojure.core/ns
xcljb.gen.render-types
(:require [xcljb gen-common] [xcljb.gen xproto-types]))
(def GLYPH xcljb.gen.xproto-types/CARD32)
(def GLYPHSET (xcljb.gen-common/->Primitive :uint32))
(def PICTURE (xcljb.gen-common/->Primitive :uint32))
(def PICTFO... | null | https://raw.githubusercontent.com/geremih/xcljb/59e9ff795bf00595a3d46231a7bb4ec976852396/src/xcljb/gen/render_types.clj | clojure | Manually written. | This file is automatically generated . DO NOT MODIFY .
(clojure.core/ns
xcljb.gen.render-types
(:require [xcljb gen-common] [xcljb.gen xproto-types]))
(def GLYPH xcljb.gen.xproto-types/CARD32)
(def GLYPHSET (xcljb.gen-common/->Primitive :uint32))
(def PICTURE (xcljb.gen-common/->Primitive :uint32))
(def PICTFO... |
a196ab825ee5f4f49f18d0b373a4af8b167fd5230db272c7150799cd3aec63b8 | morazanm/fsm | stateTransition.rkt | #lang racket
(require "../../fsm-gui/components/stateTransitions.rkt"
"../../fsm-gui/globals.rkt"
"../../fsm-core/private/constants.rkt"
"../test-helpers.rkt")
(module+ test
(require rackunit)
(define getCurrentRule
(test-suite "Tests getCurRule Function"
(test-case... | null | https://raw.githubusercontent.com/morazanm/fsm/9cbb0928b38c3c9cd94858eed64d3f3d688a4048/fsm-test/fsm-gui/stateTransition.rkt | racket | Mopve Left
Write a
end submodule | #lang racket
(require "../../fsm-gui/components/stateTransitions.rkt"
"../../fsm-gui/globals.rkt"
"../../fsm-core/private/constants.rkt"
"../test-helpers.rkt")
(module+ test
(require rackunit)
(define getCurrentRule
(test-suite "Tests getCurRule Function"
(test-case... |
f2fae5b0a0de6f8a4eaef4c060e7bc197340a1fca69a48bfa37b463ca6ec81a5 | layerware/hugsql | unbound_fn.clj | (ns hugsql.unbound-fn
(:require [clojure.test :as t]
[hugsql.core :as hugsql]))
(hugsql/def-sqlvec-fns "hugsql/sql/test.sql")
(t/deftest unbound-fn
(let [es (java.util.concurrent.Executors/newFixedThreadPool 20)]
(try
(dotimes [i 1000]
(doseq [[s v] (ns-publics 'hugsql.expr-run)]
... | null | https://raw.githubusercontent.com/layerware/hugsql/052c04a2a6dc99c3c35810ddf83416c2fd93c5e5/hugsql-core/test/hugsql/unbound_fn.clj | clojure | (ns hugsql.unbound-fn
(:require [clojure.test :as t]
[hugsql.core :as hugsql]))
(hugsql/def-sqlvec-fns "hugsql/sql/test.sql")
(t/deftest unbound-fn
(let [es (java.util.concurrent.Executors/newFixedThreadPool 20)]
(try
(dotimes [i 1000]
(doseq [[s v] (ns-publics 'hugsql.expr-run)]
... | |
123a569343d63f5b04293a455c1b8b74200d8d7f84a0a2ed61b72c17f3dcf924 | Opetushallitus/ataru | form_role.clj | (ns ataru.hakija.form-role
(:require [schema.core :as s]))
(s/defschema FormRole (s/enum :hakija :virkailija :with-henkilo))
(s/defn ^:always-validate virkailija? :- s/Bool
[roles :- [FormRole]]
(boolean (some #(= :virkailija %) roles)))
(s/defn ^:always-validate with-henkilo? :- s/Bool
[roles :- [FormRole]]... | null | https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/src/clj/ataru/hakija/form_role.clj | clojure | (ns ataru.hakija.form-role
(:require [schema.core :as s]))
(s/defschema FormRole (s/enum :hakija :virkailija :with-henkilo))
(s/defn ^:always-validate virkailija? :- s/Bool
[roles :- [FormRole]]
(boolean (some #(= :virkailija %) roles)))
(s/defn ^:always-validate with-henkilo? :- s/Bool
[roles :- [FormRole]]... | |
b865114116702bf1ed769004abff9757a9a8052422d4bdd90a5dabbbd21fdfb3 | xldenis/ill | Builtins.hs | {-# LANGUAGE OverloadedStrings #-}
module Thrill.Syntax.Builtins where
import Thrill.Syntax.Type
import Thrill.Syntax.Kind
import Thrill.Syntax.Name
import Thrill.Prelude
import Data.String (IsString)
builtinTypes :: [(QualifiedName, Kind)]
builtinTypes =
[ (Qualified "Prelude" "Int", Star)
, (Qualified "Prelude"... | null | https://raw.githubusercontent.com/xldenis/ill/46bb41bf5c82cd6fc4ad6d0d8d33cda9e87a671c/src/Thrill/Syntax/Builtins.hs | haskell | # LANGUAGE OverloadedStrings # | module Thrill.Syntax.Builtins where
import Thrill.Syntax.Type
import Thrill.Syntax.Kind
import Thrill.Syntax.Name
import Thrill.Prelude
import Data.String (IsString)
builtinTypes :: [(QualifiedName, Kind)]
builtinTypes =
[ (Qualified "Prelude" "Int", Star)
, (Qualified "Prelude" "String", Star)
, (Qualified "Pr... |
51156b1724c9cdc6e82305eea0469b4e0176da003138e0dc1b35088bbdd6179b | janestreet/core | source_code_position.mli | * This module extends { { ! Base . . Source_code_position ] } .
* @inline
include module type of struct
include Base.Source_code_position
end
type t = Base.Source_code_position.t =
{ pos_fname : string
; pos_lnum : int
; pos_bol : int
; pos_cnum : int
}
[@@deriving fields]
include Comparable.S with type... | null | https://raw.githubusercontent.com/janestreet/core/4b6635d206f7adcfac8324820d246299d6f572fe/core/src/source_code_position.mli | ocaml | * This module extends { { ! Base . . Source_code_position ] } .
* @inline
include module type of struct
include Base.Source_code_position
end
type t = Base.Source_code_position.t =
{ pos_fname : string
; pos_lnum : int
; pos_bol : int
; pos_cnum : int
}
[@@deriving fields]
include Comparable.S with type... | |
cfdc8d191d00964e1af865b84990a89e14bba7b0ba2e8677898286d4f9570ed3 | namin/propagators | depends.scm | ;;; ----------------------------------------------------------------------
Copyright 2009 Massachusetts Institute of Technology .
;;; ----------------------------------------------------------------------
This file is part of Propagator Network Prototype .
;;;
Propagator Network Prototype is free software ; you ... | null | https://raw.githubusercontent.com/namin/propagators/ae694dfe680125e53a3d49e5e91c378f2d333937/experiment/depends.scm | scheme | ----------------------------------------------------------------------
----------------------------------------------------------------------
you can
redistribute it and/or modify it under the terms of the GNU
any later version.
will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of M... | Copyright 2009 Massachusetts Institute of Technology .
This file is part of Propagator Network Prototype .
General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at your option )
Propagator Network Prototype is distributed in the hope that it
You should ... |
23010bc0d1dd780881ef9a3bc9cefbf11ac2d2737301e59069ec12c189e02cc8 | eeng/mercurius | logging.clj | (ns mercurius.core.configuration.logging
(:require [taoensso.timbre :as log]
[clojure.string :as str]))
(defn- truncate [str length]
(subs str (- (count str) length)))
(defn output-fn
"Customize the default output as we don't need the hostname, nor the timestamp on dev (cooper already provides one)"... | null | https://raw.githubusercontent.com/eeng/mercurius/f83778ddde99aa13692e4fe2e70b2e9dc2fd70e9/src/mercurius/core/configuration/logging.clj | clojure | (ns mercurius.core.configuration.logging
(:require [taoensso.timbre :as log]
[clojure.string :as str]))
(defn- truncate [str length]
(subs str (- (count str) length)))
(defn output-fn
"Customize the default output as we don't need the hostname, nor the timestamp on dev (cooper already provides one)"... | |
eae4e64c2dd7477a3dcb008986c13b1f222ca4b8edb54303fa3fc772c91226a4 | johnyob/ppx-template | gen_dune_rules.ml | open Core
Code generation for the testing process from :
-05-09-an-introduction-to-ocaml-ppx-ecosystem
*)
let ppx_name = "ppx_template"
module Test = struct
type kind =
| Passing
| Errors
let pp_executable ppf ~kind (name, modules) =
match kind with
| Passing ->
Format.fprin... | null | https://raw.githubusercontent.com/johnyob/ppx-template/eabd72a0d247d5cb4cbf6c738b89f685f095e5bb/test/gen_dune_rules.ml | ocaml | Each test should only consist of a single file (or module)
Avoid capturing preprocessed files | open Core
Code generation for the testing process from :
-05-09-an-introduction-to-ocaml-ppx-ecosystem
*)
let ppx_name = "ppx_template"
module Test = struct
type kind =
| Passing
| Errors
let pp_executable ppf ~kind (name, modules) =
match kind with
| Passing ->
Format.fprin... |
9c4343fa93990a64100e244cb95a60449f33d052d146e463c568a74381676327 | nibbula/lish | package.lisp | ;;;
package.lisp - Package definition for
;;;
(defpackage :lish
(:documentation
"Lish is both a command shell and a Lisp REPL.
Lish is designed to make typing both operating system commands and Common Lisp
expressions convienient. It combines the features of a traditional operating
system shell with a Lisp RE... | null | https://raw.githubusercontent.com/nibbula/lish/1e1eb4e60dca05c005e3641af62efb55c1955e52/package.lisp | lisp |
Main entry point(s)
variables
hooks @@@ maybe should be made into options?
installation
shell options
@@@ maybe we don't really need to export all this junk
#:lish-history-save-values #:set-lish-history-save-values
shell object
arguments
argument types
argument types for builtins
argument generics
c... | package.lisp - Package definition for
(defpackage :lish
(:documentation
"Lish is both a command shell and a Lisp REPL.
Lish is designed to make typing both operating system commands and Common Lisp
expressions convienient. It combines the features of a traditional operating
system shell with a Lisp REPL. It's... |
a6c8226934338d08980db84d9cb3a9d4c4affa89f2f65d1bcd5793aca06a6d59 | batebobo/fp1819 | 7-pow.rkt | #lang racket
(require rackunit)
(require rackunit/text-ui)
(require "5-accumulate.rkt")
Искаме да повдигнем , accumulate
(define (pow x k)
(accumulate * 1 1 k (lambda (n) x) (lambda (x) (+ x 1)))
)
(define tests (test-suite
"Pow tests"
(test-case "" (check-equal? (pow 3 3) 27))
(test-case "" (check-eq... | null | https://raw.githubusercontent.com/batebobo/fp1819/2061b7e62a1a9ade3a5fff9753f9fe0da5684275/scheme/3/solutions/7-pow.rkt | racket | #lang racket
(require rackunit)
(require rackunit/text-ui)
(require "5-accumulate.rkt")
Искаме да повдигнем , accumulate
(define (pow x k)
(accumulate * 1 1 k (lambda (n) x) (lambda (x) (+ x 1)))
)
(define tests (test-suite
"Pow tests"
(test-case "" (check-equal? (pow 3 3) 27))
(test-case "" (check-eq... | |
df6b11b5733664a740dd6144d25d73b569db234f6f5965d4297ad6ddd5a33f50 | ghcjs/ghcjs-dom | WebGPURenderPipelineColorAttachmentDescriptor.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.WebGPURenderPipelineColorAttachmentDescriptor
(js_setPixelFormat, setPixelFormat, js_ge... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/WebGPURenderPipelineColorAttachmentDescriptor.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.WebGPURenderPipelineColorAttachmentDescriptor
(js_setPixelFormat, setPixelFormat, js_getPixelFormat,
getPixelFormat, WebGPURenderPipelineColorAttachmentDescriptor(..),
gT... |
1e245a4f2a775b0967f44f85203b4c8dc52e998ecb7e1079f98ed093d7e0fe40 | csabahruska/jhc-components | GenUtil.hs | $ I d : GenUtil.hs , v 1.53 2009/06/04 04:39:15
arch - tag : 835e46b7 - 8ffd-40a0 - aaf9 - 326b7e347760
Copyright ( c ) 2002 ( )
--
-- Permission is hereby granted, free of charge, to any person obtaining a
-- copy of this software and associated documentation files (the
" Software " ) , to deal in the ... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-common/src/GenUtil.hs | haskell |
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
without limitation the rights to use, copy, modify, merge, publish,
the following conditions:
The above copyright notice and this permission notice shall be included
OR IMPLIED,... | $ I d : GenUtil.hs , v 1.53 2009/06/04 04:39:15
arch - tag : 835e46b7 - 8ffd-40a0 - aaf9 - 326b7e347760
Copyright ( c ) 2002 ( )
" 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 S... |
8997fbb7cbf540d8ab75020da1385aee5325f2128965b003602ad70c80a804ca | ostinelli/bisbino | bisbino_app.erl | % ==========================================================================================================
BISBINO
%
Copyright ( C ) 2010 , < >
% All rights reserved.
%
% BSD License
%
% Redistribution and use in source and binary forms, with or without modification, are permitted provided
% that the followin... | null | https://raw.githubusercontent.com/ostinelli/bisbino/eb722fbf174edbe4aac0acb48ab3be076f241860/src/bisbino_app.erl | erlang | ==========================================================================================================
All rights reserved.
BSD License
Redistribution and use in source and binary forms, with or without modification, are permitted provided
that the following conditions are met:
* Redistributions of sour... | BISBINO
Copyright ( C ) 2010 , < >
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS OR
PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR FOR
ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INC... |
4de91b86efcc90402197aa420b95313cfbc9efde43030f8207066cd7c2685164 | uswitch/transducers-workshop | lab04.clj | (ns transducers-workshop.solutions.lab04
(:require
[clojure.core.reducers :as r]
[transducers-workshop.solutions.lab01 :as lab01]
[transducers-workshop.xf :as xf]
[clojure.core.async :as async]))
(defn load-data
"load the usual test data but repeat them to create a much
larger dataset"
[n]
(i... | null | https://raw.githubusercontent.com/uswitch/transducers-workshop/8779a70f55db58b2c40d98b1cb055f75f3442bf2/src/transducers_workshop/solutions/lab04.clj | clojure | (require '[transducers-workshop.solutions.lab04 :as lab04] :reload)
(require '[transducers-workshop.solutions.lab01 :as lab01] :reload)
(time (def cs (call-parallel-reducers)))
(time (def cs (call-parallel-async)))
(time (def cs (call-parallel-async-multiple))) | (ns transducers-workshop.solutions.lab04
(:require
[clojure.core.reducers :as r]
[transducers-workshop.solutions.lab01 :as lab01]
[transducers-workshop.xf :as xf]
[clojure.core.async :as async]))
(defn load-data
"load the usual test data but repeat them to create a much
larger dataset"
[n]
(i... |
6e699f53b7df440407877ce46ebc98a8764a846cb9b02ac3293a2a11999499d8 | paypal/seazme-sources | analytics_jira_fields.clj | (ns seazme.scripts.analytics-jira-fields
(:require [seazme.sources.jira-api :as jira-api]
[clojure.data.json :as json] [clojure.edn :as edn] [clojure.java.io :as io] [clojure.data.csv :as csv]
[clj-time.format :as tf] [clj-time.coerce :as tr] [clj-time.core :as tc]
[clojure.core.ma... | null | https://raw.githubusercontent.com/paypal/seazme-sources/57e5b7579f5e475a908b2318a00549dd131f7745/src/main/clojure/seazme/scripts/analytics_jira_fields.clj | clojure |
parameters
STEPS
real
on source machine
test
common code
field use
mapping file
extracting data from JIRA
(defn- write-to-stream[w s] (prn (count s))(.write w (pr-str s)) (.newLine w))
TODO copy docs from paper | (ns seazme.scripts.analytics-jira-fields
(:require [seazme.sources.jira-api :as jira-api]
[clojure.data.json :as json] [clojure.edn :as edn] [clojure.java.io :as io] [clojure.data.csv :as csv]
[clj-time.format :as tf] [clj-time.coerce :as tr] [clj-time.core :as tc]
[clojure.core.ma... |
39d7b219f8e4486bd4429d15ac48f956631e4920a75d551386978b388de035ff | informatimago/lisp | asdf-file.lisp | -*- mode : lisp;coding : utf-8 -*-
;;;;**************************************************************************
FILE : asdf-file.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
;;;; Reads ASDF files.
;;;;
< PJB > <... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/tools/asdf-file.lisp | lisp | coding : utf-8 -*-
**************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
Reads ASDF files.
LEGAL
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
... | FILE : asdf-file.lisp
USER - INTERFACE :
< PJB > < >
MODIFICATIONS
2014 - 09 - 02 < PJB > Added generate - dot .
2013 - 09 - 06 < PJB > Updated for publication .
2012 - 04 - 09 < PJB > Created .
AGPL3
Copyright 2012 - 2016
it under the terms of the GNU Af... |
275c76e7525fc2a9dbea8f9d494f86c912fa2c402d0e97ee6dfd33ab5ba90963 | dongcarl/guix | selinux.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2016 , 2017 , 2018 < >
Copyright © 2018 < >
Copyright © 2019 , 2020 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/packages/selinux.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2016 , 2017 , 2018 < >
Copyright © 2018 < >
Copyright © 2019 , 2020 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages selinux)
... |
9f0ac21dc0d0a62fc0f8ab7ae5ec68e2a7898228d0fba20aa8d19bcba76867b7 | kuberlog/holon | change.lisp | (in-package :holon)
this idea was stolen from
;; and encoded into lisp
cc *
(defun wait-for-user () (read-line))
(defun get-leverage (change-to-be-made)
(change-pleasure-link change-to-be-made)
(change-pain-link change-to-be-made))
(defun change-pain-link (change-to-be-made)
(format t "Think of the wo... | null | https://raw.githubusercontent.com/kuberlog/holon/27236b6947ff3e7472d844142fc3c2882589db11/lisp/change/change.lisp | lisp | and encoded into lisp
*cc -> creative commons | (in-package :holon)
this idea was stolen from
cc *
(defun wait-for-user () (read-line))
(defun get-leverage (change-to-be-made)
(change-pleasure-link change-to-be-made)
(change-pain-link change-to-be-made))
(defun change-pain-link (change-to-be-made)
(format t "Think of the worst thing that could resu... |
235a74fb9601bb6d09d640910b4a0ced480c18cea61f05f4fa52dd1efedb0ddf | ferd/calcalc | calcalc_icelandic.erl | -module(calcalc_icelandic).
-compile(export_all).
-export([epoch/0, date/1, is_valid/1,
to_fixed/1, from_fixed/1]).
-import(calcalc_math, [sum/3,
lcm/2, gcd/2, mod/2, amod/2, signum/1,
floor/1, ceil/1,
deg/1]).
-include("calcalc.hrl").
sunnu... | null | https://raw.githubusercontent.com/ferd/calcalc/d16eec3512d7b4402b1ddde82128f2483e955e98/src/calcalc_icelandic.erl | erlang | fixed(1) | -module(calcalc_icelandic).
-compile(export_all).
-export([epoch/0, date/1, is_valid/1,
to_fixed/1, from_fixed/1]).
-import(calcalc_math, [sum/3,
lcm/2, gcd/2, mod/2, amod/2, signum/1,
floor/1, ceil/1,
deg/1]).
-include("calcalc.hrl").
sunnu... |
9bb1be9a953fb72345e5ec7cf4366acf2804a3894ee3d23a02a70031f6ccb067 | orthecreedence/cl-rethinkdb | run.lisp | (in-package :cl-rethinkdb-test)
(defun run-tests ()
(run! 'cl-rethinkdb-test))
| null | https://raw.githubusercontent.com/orthecreedence/cl-rethinkdb/f435e72dce7f900f599ade193859a202fd1ac33e/test/run.lisp | lisp | (in-package :cl-rethinkdb-test)
(defun run-tests ()
(run! 'cl-rethinkdb-test))
| |
ee110a7cbdac7dc605d98a227e356ebd81f07816fb4031c406b86178200141f3 | racket/games | utils.rkt | (module utils racket
(require sgl/gl-vectors
sgl
racket/math
racket/gui
racket/class
"doors.rkt")
(provide door-bm
magic-door-bm
locked-door-bm
door-drawer
locked-door-drawer
magic-door-drawer
... | null | https://raw.githubusercontent.com/racket/games/e57376f067be51257ed12cdf3e4509a00ffd533d/doors/utils.rkt | racket | (module utils racket
(require sgl/gl-vectors
sgl
racket/math
racket/gui
racket/class
"doors.rkt")
(provide door-bm
magic-door-bm
locked-door-bm
door-drawer
locked-door-drawer
magic-door-drawer
... | |
3d96c25ab524db1c1797f6125fc991df327893cdb8586657477439c8d5e9ab28 | carl-eastlund/dracula | prover.rkt | #lang racket
(require (prefix-in acl2- "conditionals.rkt")
"../teachpacks/testing.rkt")
(define-syntax (assert-event stx)
(syntax-case stx ()
[(_ e)
(syntax/loc stx (check-expect (acl2-if e 't '()) 't))]))
(define-syntax (thm stx)
(syntax-case stx ()
[(_ e) #'(begin)]))
(define-syntax (pro... | null | https://raw.githubusercontent.com/carl-eastlund/dracula/a937f4b40463779246e3544e4021c53744a33847/lang/prover.rkt | racket | #lang racket
(require (prefix-in acl2- "conditionals.rkt")
"../teachpacks/testing.rkt")
(define-syntax (assert-event stx)
(syntax-case stx ()
[(_ e)
(syntax/loc stx (check-expect (acl2-if e 't '()) 't))]))
(define-syntax (thm stx)
(syntax-case stx ()
[(_ e) #'(begin)]))
(define-syntax (pro... | |
ff990b606d3632df8c23bec8f4c03b83c06fa79f198106fc320cc1a7458baf25 | jepsen-io/jepsen | rethinkdb.clj | (ns jepsen.rethinkdb
(:refer-clojure :exclude [run!])
(:require [clojure [pprint :refer :all]
[string :as str]
[set :as set]]
[clojure.java.io :as io]
[clojure.tools.logging :refer [debug info warn]]
[jepsen [core :as jepsen]
... | null | https://raw.githubusercontent.com/jepsen-io/jepsen/a75d5a50dd5fa8d639a622c124bf61253460b754/rethinkdb/src/jepsen/rethinkdb.clj | clojure | Install package
Set up logfile
primary in a different side.
Disregard that, pick randomly
Pick a new primary and replicas at random.
Pick a new primary visible to the current one.
primary' (-> nodes
(disj primary)
(set/difference (set (grudge primary)))
Pick a new set of replicas includ... | (ns jepsen.rethinkdb
(:refer-clojure :exclude [run!])
(:require [clojure [pprint :refer :all]
[string :as str]
[set :as set]]
[clojure.java.io :as io]
[clojure.tools.logging :refer [debug info warn]]
[jepsen [core :as jepsen]
... |
ccc8740a97bcd562c2df0d2257aaaf2c5d6d4a7e42eecf0af5d9d292dd10e655 | haskell-lisp/yale-haskell | core-symbols.scm | ;;; This defines all core symbols.
Core symbols are stored in global variables . The core - symbol
;;; macro just turns a string into a variable name.
(define-syntax (core-symbol str)
(make-core-symbol-name str))
(define (make-core-symbol-name str)
(string->symbol (string-append "*core-" str "*")))
(define ... | null | https://raw.githubusercontent.com/haskell-lisp/yale-haskell/4e987026148fe65c323afbc93cd560c07bf06b3f/top/core-symbols.scm | scheme | This defines all core symbols.
macro just turns a string into a variable name.
This is just used to create a define for each var without a
value. |
Core symbols are stored in global variables . The core - symbol
(define-syntax (core-symbol str)
(make-core-symbol-name str))
(define (make-core-symbol-name str)
(string->symbol (string-append "*core-" str "*")))
(define (symbol->core-var name)
(make-core-symbol-name (symbol->string name)))
(define (get-... |
22d019ca8e765c572f2901509f831140a842dcad0f8d92518ed2f9f6c49068a8 | softwarelanguageslab/maf | R5RS_gambit_primes-2.scm | ; Changes:
* removed : 0
* added : 0
* swaps : 0
* negated predicates : 1
; * swapped branches: 0
* calls to i d fun : 2
(letrec ((interval-list (lambda (m n)
(<change>
(if (> m n)
()
(cons m... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_gambit_primes-2.scm | scheme | Changes:
* swapped branches: 0 | * removed : 0
* added : 0
* swaps : 0
* negated predicates : 1
* calls to i d fun : 2
(letrec ((interval-list (lambda (m n)
(<change>
(if (> m n)
()
(cons m (interval-list (+ 1 m) n)))
... |
e3392cb4b02227c6009f54ebe65856d0b2dba8073d9bc07839a0ed71af5e5a50 | kind2-mc/kind2 | subSystem.ml | This file is part of the Kind 2 model checker .
Copyright ( c ) 2014 by the Board of Trustees of the University of Iowa
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 a... | null | https://raw.githubusercontent.com/kind2-mc/kind2/639c5f2773b4c23048ebd3710b1d2e4a24b61558/src/subSystem.ml | ocaml | Name of the system as a scope.
Original input.
System can be abstracted to its contract.
System has modes.
System can be refined to its implementation.
Direct sub-systems.
Strategy info of a subsystem.
All subsystems added, return.
Skip altogether, subsystems have already been added.
Subsystems that ... | This file is part of the Kind 2 model checker .
Copyright ( c ) 2014 by the Board of Trustees of the University of Iowa
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 a... |
00ed8f146d0e5af5b967eb54de7b16d038521f78801d8ac2544f07d6a5d703d6 | tonyfloatersu/solution-haskell-craft-of-FP | TreeADT.hs | module TreeADT ( Tree
, nil
, isNil
, isNode
, leftSub
, rightSub
, treeVal
, insTree
, delete
, minTree
, elemT
, showTree ) where
data Tree a = Nil | No... | null | https://raw.githubusercontent.com/tonyfloatersu/solution-haskell-craft-of-FP/0d4090ef28417c82a7b01e4a764f657641cb83f3/TreeADT.hs | haskell | module TreeADT ( Tree
, nil
, isNil
, isNode
, leftSub
, rightSub
, treeVal
, insTree
, delete
, minTree
, elemT
, showTree ) where
data Tree a = Nil | No... | |
c7d799d6202ab518568d44817188fedaaf4ed87983ba873540d993dff135e8bb | ont-app/igraph | core.cljc | (ns ^{:author "Eric D. Scott",
:doc "Abstractions over a graph object, intended to sit alongside the
other basic clojure data structures such as maps, vectors and sets.
"}
ont-app.igraph.core
(:require [clojure.pprint :as pp]
[clojure.set :as set]
[clojure.spec.alpha :as spec]
... | null | https://raw.githubusercontent.com/ont-app/igraph/449ebc6eeef139118fe5a700e953dd167353f7ce/src/ont_app/igraph/core.cljc | clojure | FUN WITH READER MACROS
No reader macros below this point
ACCESS FUNCTIONS
for IFn
= (normal-form `g`)
= (get-p-o `g`)
= (match-or-traverse g s p o)
mutability
CONTENT MANIPULATION
MULTI-METHODS FOR ALTERING GRAPHS
else we're good
To subtract from a graph, we can use normal form or
leave out p and o ... | (ns ^{:author "Eric D. Scott",
:doc "Abstractions over a graph object, intended to sit alongside the
other basic clojure data structures such as maps, vectors and sets.
"}
ont-app.igraph.core
(:require [clojure.pprint :as pp]
[clojure.set :as set]
[clojure.spec.alpha :as spec]
... |
4afb980b00e49da967568af6a6bbc90f8f87b3188f57471bf4a7b1e1ab467499 | camllight/camllight | main.ml | (* The lexer generator. Command-line parsing. *)
#open "sys";;
#open "lexing";;
#open "parsing";;
#open "syntax";;
#open "scanner";;
#open "grammar";;
#open "lexgen";;
#open "output";;
let main () =
if vect_length command_line != 2 then begin
prerr_endline "Usage: camllex <input file>";
io__exit 2
end;
... | null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/windows/src/lex/main.ml | ocaml | The lexer generator. Command-line parsing. |
#open "sys";;
#open "lexing";;
#open "parsing";;
#open "syntax";;
#open "scanner";;
#open "grammar";;
#open "lexgen";;
#open "output";;
let main () =
if vect_length command_line != 2 then begin
prerr_endline "Usage: camllex <input file>";
io__exit 2
end;
let source_name = command_line.(1) in
let dest_... |
830ea69ee5cf53aa45ab7ccafccb9b9a414d085ce7ce5dfe02f71b3cca73c570 | imitator-model-checker/imitator | AlgoBCShuffle.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Université Paris 13 , LIPN , CNRS , France
* Université de Lorraine , CNRS , , LORIA , Nancy , France
*
* Module description : Classical Beh... | null | https://raw.githubusercontent.com/imitator-model-checker/imitator/105408ae2bd8c3e3291f286e4d127defd492a58b/src/AlgoBCShuffle.mli | ocaml | **********************************************************
Modules
**********************************************************
**********************************************************
Class definition
**********************************************************
*******************************************************... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Université Paris 13 , LIPN , CNRS , France
* Université de Lorraine , CNRS , , LORIA , Nancy , France
*
* Module description : Classical Beh... |
e1a6032591848d8ab4b0e1dfe078da970a454a08103e67fbcd6d6931bac872bb | arttuka/reagent-material-ui | person_2_rounded.cljs | (ns reagent-mui.icons.person-2-rounded
"Imports @mui/icons-material/Person2Rounded as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def person-2-rounded (create-... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/icons/reagent_mui/icons/person_2_rounded.cljs | clojure | (ns reagent-mui.icons.person-2-rounded
"Imports @mui/icons-material/Person2Rounded as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def person-2-rounded (create-... | |
59429d43e42ab34ff89a0ad22d4b8ae643efe1f866d2453bce8adc9d45f2cf56 | BillHallahan/G2 | TestUtils.hs | {-# LANGUAGE OverloadedStrings #-}
module TestUtils where
import qualified Data.Map as M
import Data.Monoid
import qualified Data.Text as T
import System.Directory
import G2.Config
import G2.Language
mkConfigTestIO :: IO Config
mkConfigTestIO = do
homedir <- getHomeDirectory
return $
(mkConfigDirec... | null | https://raw.githubusercontent.com/BillHallahan/G2/521ac4f4a6573f15521765cefc3255be33249d2e/tests/TestUtils.hs | haskell | # LANGUAGE OverloadedStrings #
, baseInclude = [ "./base-4.9.1.0/Control/Exception/" |
module TestUtils where
import qualified Data.Map as M
import Data.Monoid
import qualified Data.Text as T
import System.Directory
import G2.Config
import G2.Language
mkConfigTestIO :: IO Config
mkConfigTestIO = do
homedir <- getHomeDirectory
return $
(mkConfigDirect homedir [] M.empty)
{... |
6e3c2e78dcdc38c3a77c77b860eb8ef35fbf966bc63ec1baa84ff13fc73325b5 | sebashack/servantRestfulAPI | API.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeOper... | null | https://raw.githubusercontent.com/sebashack/servantRestfulAPI/e625535d196acefaff4f5bf03108816be668fe4d/libs/Domains/ContentAdminDomain/Article/API.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
| # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# LANGUAGE ScopedTypeVariables #
module Domains.ContentAdminDomain.Article.API
(
ArticleAPI
) where
import Domains.... |
1fb86b6283c6b1d3555cffa1e75c83c6b3b676428ba5528d4c5b1bbbaca58b11 | skanev/playground | 25.scm | SICP exercise 5.25
;
; Modify the evaluator so that it uses normal-order evaluation, based on the
lazy evaluator of section 4.2 .
; This is tricky.
;
First , in order to do normal - order evaluation , we should not cache thunk
; values. That would beat the purpose of normal-order.
;
Second , we will accomplish... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/05/25.scm | scheme |
Modify the evaluator so that it uses normal-order evaluation, based on the
This is tricky.
values. That would beat the purpose of normal-order.
ev-map-operands, that will apply the procedure in the exp register to each
argument in unev. It is used by primitive-apply with actual-value and
compound-apply with de... | SICP exercise 5.25
lazy evaluator of section 4.2 .
First , in order to do normal - order evaluation , we should not cache thunk
Second , we will accomplish this with a more general procedure called
(define (delay-it exp env) (list 'thunk exp env))
(define (thunk? obj) (tagged-list? obj 'thunk))
(define (thunk... |
b3c48645e9817d15d8d81f2b585a97de17ad98be0ce5381074030dfc1115c9d6 | huangjs/cl | ratpoi.lisp | -*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The data in this file contains enhancments. ;;;;;
;;; ;;;;;
... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/src/ratpoi.lisp | lisp | Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
The data in this file contains enhancments. ;;;;;
;;;;;
; ; ; ;
All rights reserved ;;;;;
; ;
POISCDECODE D... |
#+:poisson-cre
(progn
(declare-top (special $ratvars genvar))
(defvar poisco1 '(1 . 1))
(defvar poiscom1 '(-1 . 1))
THESE PROGRAMS MAKE POISSON COEFFICIENTS RATIONAL FUNCTIONS ( CRE )
(defun poiscdecode (x)
($ratdisrep (cons (list 'mrat 'simp (cdr $ratvars) genvar) x)))
INTOPOISCO PUTS AN EXPRESSION INTO P... |
31e06562823c63e6eef64a0409271e4df52d53795d727754e9c67b267118f38a | joachimdb/dl4clj | core_test.clj | (ns dl4clj.core-test
(:require [clojure.test :refer :all]
[dl4clj.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/joachimdb/dl4clj/fe9af7c886b80df5e18cd79923fbc6955ddc2694/test/dl4clj/core_test.clj | clojure | (ns dl4clj.core-test
(:require [clojure.test :refer :all]
[dl4clj.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
0f790c0eecd9f329fd115212c3cbb2a1d2fe6b134f3b46a2f14b827d450aecec | careercup/CtCI-6th-Edition-Clojure | chapter_2_q4_test.clj | (ns ^{:author "Leeor Engel"}
chapter-2.chapter-2-q4-test
(:require [clojure.test :refer :all]
[chapter-2.chapter-2-q4 :refer :all]))
(deftest partition-test
(is (= '(2) (partition-list '(2) 2)))
(is (= '(2) (partition-list '(2) 1)))
(is (= '(2) (partition-list '(2) 3)))
(is (= '(2 4) (partition-l... | null | https://raw.githubusercontent.com/careercup/CtCI-6th-Edition-Clojure/ef151b94978af82fb3e0b1b0cd084d910870c52a/test/chapter_2/chapter_2_q4_test.clj | clojure | (ns ^{:author "Leeor Engel"}
chapter-2.chapter-2-q4-test
(:require [clojure.test :refer :all]
[chapter-2.chapter-2-q4 :refer :all]))
(deftest partition-test
(is (= '(2) (partition-list '(2) 2)))
(is (= '(2) (partition-list '(2) 1)))
(is (= '(2) (partition-list '(2) 3)))
(is (= '(2 4) (partition-l... | |
24ab1b0ee7383c5bd4ece1db3dc2d76fe8dd1f9e1ad6dbaf88c0e6dbac36f76e | acowley/concurrent-machines | Pipeline.hs | import Data.Time.Clock (getCurrentTime, diffUTCTime)
import Control.Concurrent (threadDelay)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Data.Machine.Concurrent
worker :: String -> Double -> ProcessT IO () ()
worker name dt = repeatedly $ do _ <- await
liftIO $ do
... | null | https://raw.githubusercontent.com/acowley/concurrent-machines/70d2a8ae481e6fef503f2609c65b530bd1f96e1b/examples/Pipeline.hs | haskell | import Data.Time.Clock (getCurrentTime, diffUTCTime)
import Control.Concurrent (threadDelay)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Data.Machine.Concurrent
worker :: String -> Double -> ProcessT IO () ()
worker name dt = repeatedly $ do _ <- await
liftIO $ do
... | |
b1a330752dcbffb1d1f4496be384cb24730a70584269acd66deb0866d10b4065 | maximedenes/native-coq | dumpglob.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/interp/dumpglob.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
val open_glob_file : string -... |
2f7ee291d910005f50dfd35eced7997ed1c6ffc479a239cced8c7e6694ee9c5f | coleslaw-org/coleslaw | heroku.lisp | (eval-when (:compile-toplevel :load-toplevel)
(ql:quickload 'hunchentoot))
(defpackage :coleslaw-heroku
(:use :cl)
(:import-from #:hunchentoot :create-folder-dispatcher-and-handler
:create-static-file-dispatcher-and-handler
:*dispatch-table*)
(:import... | null | https://raw.githubusercontent.com/coleslaw-org/coleslaw/0b9f027a36ea00ca2e4b6f8d9fd7a135127cc2da/plugins/heroku.lisp | lisp | (eval-when (:compile-toplevel :load-toplevel)
(ql:quickload 'hunchentoot))
(defpackage :coleslaw-heroku
(:use :cl)
(:import-from #:hunchentoot :create-folder-dispatcher-and-handler
:create-static-file-dispatcher-and-handler
:*dispatch-table*)
(:import... | |
ecddeb49d7f95d638393d871e1ca655325366a0762b02219d1206e9a3548d8fc | apinf/proxy42 | vegur_websockets_backend.erl | Copyright ( c ) 2013 - 2015 , Heroku Inc < > .
%%% 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,... | null | https://raw.githubusercontent.com/apinf/proxy42/01b483b711881391e8306bf64b83b4df9d0bc832/apps/vegur/test/vegur_websockets_backend.erl | erlang | 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 ) 2013 - 2015 , Heroku Inc < > .
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE ,
... |
3d9ae6416034d858029afec2f13613d996fea4972adc8c87b806b6cfa7fa599c | patricoferris/jsoo-mithril | index.ml | open Mithril
open Brr
module Date = struct
type t = Jv.t
let date = Jv.get Jv.global "Date"
let now () =
let d = Jv.new' date [||] in
let date = Jv.call d "toLocaleDateString" [||] |> Jv.to_string in
let time = Jv.call d "toLocaleTimeString" [||] |> Jv.to_string in
date ^ " " ^ time
end
(* A n... | null | https://raw.githubusercontent.com/patricoferris/jsoo-mithril/5f2ccebd647f737bac7dbd1981b78a4d5bd0f5ea/examples/1-section/todo-stack/example/index.ml | ocaml | A nice, typed OCaml representation of a todo item
Update state
Set target's value to none | open Mithril
open Brr
module Date = struct
type t = Jv.t
let date = Jv.get Jv.global "Date"
let now () =
let d = Jv.new' date [||] in
let date = Jv.call d "toLocaleDateString" [||] |> Jv.to_string in
let time = Jv.call d "toLocaleTimeString" [||] |> Jv.to_string in
date ^ " " ^ time
end
module... |
961228f2bdbd8357159bce833db0001e959ddaecbb7909a163ef08c948cace4e | haskell-suite/haskell-src-exts | DataHeadParen.hs | # LANGUAGE TypeOperators #
module DataHeadParen where
data (a1 :< a2) = Foo
| null | https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/DataHeadParen.hs | haskell | # LANGUAGE TypeOperators #
module DataHeadParen where
data (a1 :< a2) = Foo
| |
58e3dc3b3024045f4543dc1ec0ce6ffb528f475d362486db1b794528418d5d0d | rizo/snowflake-os | optcompile.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/plugins/ocamlopt.opt/driver/optcompile.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
Compile a .ml or .mli file
... |
c0c48e031ab33cde8f8430bedeb1d6409874d340b61b2e506b4e4f56787fba8d | con-kitty/categorifier-c | Gen.hs | # LANGUAGE MonoLocalBinds #
# LANGUAGE NoMonomorphismRestriction #
| The core code - generation functions for ' KGen ' .
module Categorifier.C.KGenGenerate.FFI.Gen
( -- * Code generation of functions
mkCgFromArraysFun,
mkCgFromPolyVecFun,
codeGenWithBindings,
SBVSpec,
)
where
import qualified Ba... | null | https://raw.githubusercontent.com/con-kitty/categorifier-c/a34ff2603529b4da7ad6ffe681dad095f102d1b9/test-lib/Categorifier/C/KGenGenerate/FFI/Gen.hs | haskell | * Code generation of functions
minimum size of one. In other words, the generated code will _not_ exactly match the 'Arrays
more info.
| This function takes a polyvectorized function and its input specification and gives you an
'SBVCodeGen' action you can pass to 'codeGenWithBindings' to generate the corresponding... | # LANGUAGE MonoLocalBinds #
# LANGUAGE NoMonomorphismRestriction #
| The core code - generation functions for ' KGen ' .
module Categorifier.C.KGenGenerate.FFI.Gen
mkCgFromArraysFun,
mkCgFromPolyVecFun,
codeGenWithBindings,
SBVSpec,
)
where
import qualified Barbies
import qualified Categorifier.C.... |
b839268358fe9c0125b5fd3e42a6f41171feda47a6ef35489f51618958c8b23f | reborg/clojure-essential-reference | 5.clj | (require '[clojure.pprint :as pprint])
< 1 >
;; (0
1
2
;; ...
;; 99)nil
< 2 >
(pprint/write (range 100)))
( 0 1 2 ... 99)nil
(alter-var-root #'pprint/*print-pretty* (constantly false)) ; <3>
(pprint/write (range 100))
( 0 1 2 ... 99)nil
< 4 > | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/9a3eb82024c8e5fbe17412af541c2cd30820c92e/DynamicVariablesintheStandardLibrary/Prettyprintingvariables/5.clj | clojure | (0
...
99)nil
<3> | (require '[clojure.pprint :as pprint])
< 1 >
1
2
< 2 >
(pprint/write (range 100)))
( 0 1 2 ... 99)nil
(pprint/write (range 100))
( 0 1 2 ... 99)nil
< 4 > |
8e1c7191e82c455cec402311bf866dd8d7f588431b08b6242221cfaa68cae248 | artemeff/raven-erlang | raven_app_test.erl | %% @doc Tests for raven_app.
-module(raven_app_test).
-include_lib("eunit/include/eunit.hrl").
%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% TESTS DESCRIPTIONS %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%
load_configuration_test_() ->
[
{"Loads configuration from application env",
fun() ->
{StartAppStatus, _} = a... | null | https://raw.githubusercontent.com/artemeff/raven-erlang/9a2ac47e1c4145c490be3c56c0cc9cc0da751cbf/test/raven_app_test.erl | erlang | @doc Tests for raven_app.
TESTS DESCRIPTIONS %%%
|
-module(raven_app_test).
-include_lib("eunit/include/eunit.hrl").
load_configuration_test_() ->
[
{"Loads configuration from application env",
fun() ->
{StartAppStatus, _} = application:ensure_all_started(raven_erlang),
?assertEqual(ok, StartAppStatus),
Config ... |
b434f08c3aca4eb2599d45f5d2cc9e14608c1cae187147a2e75d4a69d8f3c188 | rescript-lang/rescript-compiler | ounit_cmd_util.ml | let (//) = Filename.concat
* may nonterminate when [ cwd ] is ' . '
let rec unsafe_root_dir_aux cwd =
if Sys.file_exists (cwd//Literals.bsconfig_json) then cwd
else unsafe_root_dir_aux (Filename.dirname cwd)
let project_root = unsafe_root_dir_aux (Sys.getcwd ())
let jscomp = project_root // "jscomp"
let ... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/81a3dc63ca387b2af23fed297db283254ae3ab20/jscomp/ounit_tests/ounit_cmd_util.ml | ocaml | [dup] can not be 0, 1, 2 | let (//) = Filename.concat
* may nonterminate when [ cwd ] is ' . '
let rec unsafe_root_dir_aux cwd =
if Sys.file_exists (cwd//Literals.bsconfig_json) then cwd
else unsafe_root_dir_aux (Filename.dirname cwd)
let project_root = unsafe_root_dir_aux (Sys.getcwd ())
let jscomp = project_root // "jscomp"
let ... |
c39e91d4b10fd5e51391a4742d6c06d5f66317e71ff8c38663923dc541dbdae7 | paurkedal/ocaml-prime | unprime_char.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/42efa85317069d726e8e3989e51c24ba03c56b47/lib/unprime_char.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... | |
a575e20580661047ae0dd19ef994424debd0e0674ad58b4bb515da716a673d1b | bmeurer/ocaml-experimental | odoc_str.mli | (***********************************************************************)
(* OCamldoc *)
(* *)
, projet Cristal , INRIA Rocquencourt
(* ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-experimental/fe5c10cdb0499e43af4b08f35a3248e5c1a8b541/ocamldoc/odoc_str.mli | ocaml | *********************************************************************
OCamldoc
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
val string_of_variance : Odoc_ty... |
d2b8db0e56cd9f4b7ead8e9144b3502a3281f275c1f002bbeddf7428d5b3d162 | expipiplus1/vulkan | Constants.hs | module Julia.Constants
where
import Data.Word
juliaWorkgroupX, juliaWorkgroupY :: Word32
juliaWorkgroupX = 8
juliaWorkgroupY = 8
| null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/examples/resize/Julia/Constants.hs | haskell | module Julia.Constants
where
import Data.Word
juliaWorkgroupX, juliaWorkgroupY :: Word32
juliaWorkgroupX = 8
juliaWorkgroupY = 8
| |
443c0ea80e377aeb2d7b37af20b583cae8caea3c41576e95e2dc2340fa4f431a | philnguyen/soft-contract | ocm.rkt | #lang racket/base
(provide
min-entry
make-ocm
(prefix-out ocm- min-entry)
(prefix-out ocm- min-index)
)
;; -----------------------------------------------------------------------------
(require
require-typed-check
"ocm-struct.rkt"
(only-in racket/list argmin)
(only-in racket/sequence sequence->list)
(on... | null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/gradual-typing-benchmarks/quadBG/ocm.rkt | racket | -----------------------------------------------------------------------------
=============================================================================
=============================================================================
Wrapper for the matrix procedure
that automatically maintains a hash cache of pre... | #lang racket/base
(provide
min-entry
make-ocm
(prefix-out ocm- min-entry)
(prefix-out ocm- min-index)
)
(require
require-typed-check
"ocm-struct.rkt"
(only-in racket/list argmin)
(only-in racket/sequence sequence->list)
(only-in racket/vector vector-drop vector-append)
(for-syntax racket/base racket/sy... |
905f5c9f96278a33fdbf12dd54143d51a5af4843d9ff5f953550d54fdb13d583 | ocamllabs/ocaml-effects | nativeint.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-effects/36008b741adc201bf9b547545344507da603ae31/stdlib/nativeint.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
* Processor - native integers .
T... |
2640b9d5aae35975abf0fb05ed625a113acdb791fa2a44bc5eb6a975986c3f08 | tek/helic | LoadTest.hs | module Helic.Test.LoadTest where
import Polysemy.Chronos (ChronosTime, interpretTimeChronosConstant)
import Polysemy.Conc (interpretAtomic)
import Polysemy.Log (interpretLogNull)
import Polysemy.Test (UnitTest, assertEq, assertJust, runTestAuto)
import Helic.Data.AgentId (AgentId (AgentId))
import qualified Helic.Dat... | null | https://raw.githubusercontent.com/tek/helic/317b7b1b356a9e2d3612e7a50f1facd02e7a9765/packages/helic/test/Helic/Test/LoadTest.hs | haskell | module Helic.Test.LoadTest where
import Polysemy.Chronos (ChronosTime, interpretTimeChronosConstant)
import Polysemy.Conc (interpretAtomic)
import Polysemy.Log (interpretLogNull)
import Polysemy.Test (UnitTest, assertEq, assertJust, runTestAuto)
import Helic.Data.AgentId (AgentId (AgentId))
import qualified Helic.Dat... | |
903cfa48495db7a946953811ceb1908f7fc0239caa42dccf667b07fe3767bb85 | waldheinz/bling | Examples.hs |
module Examples (
imageFilters
) where
import Control.Monad ( forM_ )
import Graphics.Bling
imageFilters :: IO ()
imageFilters = do
let
flts =
[ ("box" , mkBoxFilter)
, ("gauss" , mkGaussFilter 3 3 2)
, ("mitchell", mkMitchellFilter 3 3 (1/3) (1/3))
, ("sinc" , mkSincFilte... | null | https://raw.githubusercontent.com/waldheinz/bling/1f338f4b8dbd6a2708cb10787f4a2ac55f66d5a8/src/cmdline/Examples.hs | haskell | shift to center of pixel |
module Examples (
imageFilters
) where
import Control.Monad ( forM_ )
import Graphics.Bling
imageFilters :: IO ()
imageFilters = do
let
flts =
[ ("box" , mkBoxFilter)
, ("gauss" , mkGaussFilter 3 3 2)
, ("mitchell", mkMitchellFilter 3 3 (1/3) (1/3))
, ("sinc" , mkSincFilte... |
4b000801c82206f74434add4d044c2f1fd0397058a784d19736cd0aa413c4c4d | Bogdanp/racket-http-easy | timeout.rkt | #lang racket/base
(require racket/contract)
(provide
timeout/c
make-timeout-config
timeout-config?
timeout-config-lease
timeout-config-connect
timeout-config-request)
(define timeout/c
(or/c false/c (and/c real? positive?)))
(struct timeout-config (lease connect request)
#:transparent)
(define/contract (... | null | https://raw.githubusercontent.com/Bogdanp/racket-http-easy/630a982a282a51fd7fd85dc5e2f3f581c564b5e4/http-easy-lib/http-easy/private/timeout.rkt | racket | #lang racket/base
(require racket/contract)
(provide
timeout/c
make-timeout-config
timeout-config?
timeout-config-lease
timeout-config-connect
timeout-config-request)
(define timeout/c
(or/c false/c (and/c real? positive?)))
(struct timeout-config (lease connect request)
#:transparent)
(define/contract (... | |
3de47a90b4634c078267dfc40f1a172b77b3ea9d87550d8a9fcbfc7da5d16647 | clingen-data-model/genegraph | omim_test.clj | (ns genegraph.transform.omim-test
(:require [clojure.test :refer :all]
[genegraph.database.util :refer [with-test-database]]
[genegraph.database.load :as l]
[genegraph.database.query :as q]
[genegraph.sink.stream :as s]
[genegraph.source.graphql.gene-dosage ... | null | https://raw.githubusercontent.com/clingen-data-model/genegraph/8c217e4c3820b3bd0a0937a6e331a6e6a49b8c14/test/genegraph/transform/omim_test.clj | clojure | (def base-triples
[["" :rdf/type :owl/Class]
["" :rdf/type (q/resource "")]
["" :owl/equivalent-class (q/resource "")]
]) | (ns genegraph.transform.omim-test
(:require [clojure.test :refer :all]
[genegraph.database.util :refer [with-test-database]]
[genegraph.database.load :as l]
[genegraph.database.query :as q]
[genegraph.sink.stream :as s]
[genegraph.source.graphql.gene-dosage ... |
e4cb25675f6778397f4b059f39b90815e14af1b30e636991892661349706e332 | Yleisradio/http-kit-aws4 | aws_credentials.clj | (ns http-kit-aws4.aws-credentials
(:require [cheshire.core :as json]
[clojure.core.memoize :as memo]
[org.httpkit.client :as http-client]
[camel-snake-kebab.core :refer [->kebab-case-keyword]]))
(def ^:private aws-container-credentials-url
(when-let [relative-uri (System/getenv ... | null | https://raw.githubusercontent.com/Yleisradio/http-kit-aws4/a2ef738fad8a5fbfdee40df0573aa5e2ff96e324/src/http_kit_aws4/aws_credentials.clj | clojure | (ns http-kit-aws4.aws-credentials
(:require [cheshire.core :as json]
[clojure.core.memoize :as memo]
[org.httpkit.client :as http-client]
[camel-snake-kebab.core :refer [->kebab-case-keyword]]))
(def ^:private aws-container-credentials-url
(when-let [relative-uri (System/getenv ... | |
cf32c4ac5d965a6c3759b0fad9bf88c429dc4c678689a4d23df462f378675260 | g000001/tagger | variable-storage.lisp | -*- Package : VARIABLE - STORAGE ; Mode : Lisp ; Base : 10 -*-
Copyright ( c ) 1990 , 1991 by Xerox Corporation
;;; Resource facility for variable sized objects
#|(cl:defpackage :variable-storage
(:use :common-lisp :cons-resource)
(:use :tagger.internal)
(:export #:make-variable-storage #:clear-variable-stor... | null | https://raw.githubusercontent.com/g000001/tagger/a4e0650c55aba44250871b96e2220e1b4953c6ab/util/variable-storage.lisp | lisp | Mode : Lisp ; Base : 10 -*-
Resource facility for variable sized objects
(cl:defpackage :variable-storage
(:use :common-lisp :cons-resource)
(:use :tagger.internal)
(:export #:make-variable-storage #:clear-variable-storage
#:count-variable-storage #:print-variable-storage
#:alloc-item #:free-item
#:... |
Copyright ( c ) 1990 , 1991 by Xerox Corporation
(cl:in-package :variable-storage)
(cltl1-eval-when (compile eval load)
(deftype fixnum-vector () `(simple-array fixnum (*)))
(defmacro fash (x y)
`(the fixnum (ash (the fixnum ,x) (the fixnum ,y))))
(defmacro f+ (x y)
`(the fixnum (+ (the fixnum... |
1f7af6a9aa7ef89f76e46d1c1967461c0215cd992a962a8c8090ca02b2f0c971 | ryanpbrewster/haskell | P018.hs | module Problems.P018
( process
) where
- 018.hs
- Project Euler problem 18
- There is a triangle located in 018.in
- Find the path from the top of the triangle to the bottom
- which has the largest sum
- 018.hs
- Project Euler problem 18
- There is a triangle located in 018.in
- Find the path... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/src/Problems/P018.hs | haskell |
[1 5 9 2]
yields:
[4 8 13 6]
Since:
maxPath takes in the whole triangle and returns the best path
It does this by propogating down the best choice you can make
at each row, using bestRow | module Problems.P018
( process
) where
- 018.hs
- Project Euler problem 18
- There is a triangle located in 018.in
- Find the path from the top of the triangle to the bottom
- which has the largest sum
- 018.hs
- Project Euler problem 18
- There is a triangle located in 018.in
- Find the path... |
30e992b133d3ec525c14ac3bbb03e002860d1e4ede5e05e60f605d60a0da9987 | slagyr/gaeshi | generate.clj | (ns gaeshi.kuzushi.commands.generate
(:use
[joodo.kuzushi.common :only (symbolize)]
[joodo.kuzushi.generation :only (create-templater add-tokens ->path ->name)]
[joodo.kuzushi.commands.help :only (usage-for)]
[joodo.kuzushi.commands.generate :as joodo :only (generate-controller)])
(:import
[file... | null | https://raw.githubusercontent.com/slagyr/gaeshi/a5677ed1c8d9269d412f07a7ab33bbc40aa7011a/lein-gaeshi/src/gaeshi/kuzushi/commands/generate.clj | clojure | (ns gaeshi.kuzushi.commands.generate
(:use
[joodo.kuzushi.common :only (symbolize)]
[joodo.kuzushi.generation :only (create-templater add-tokens ->path ->name)]
[joodo.kuzushi.commands.help :only (usage-for)]
[joodo.kuzushi.commands.generate :as joodo :only (generate-controller)])
(:import
[file... | |
aebebbfe9b29cb1312143d79cc54d2a5a689dd2c09c2ff7c6e8fe562d0bc6b60 | jadahl/mod_restful | tests.erl | %%%----------------------------------------------------------------------
File : mod_restful.erl
Author : < >
%%% Purpose : Tests for mod_restful
Created : 28 Nov 2010 by < >
%%%
%%%
Copyright ( C ) 2010
%%%
%%% This program is free software; you can redistribute it and/or
modify it under the... | null | https://raw.githubusercontent.com/jadahl/mod_restful/3a4995e0facd29879a6c2949547177a1ac618474/tests/tests.erl | erlang | ----------------------------------------------------------------------
Purpose : Tests for mod_restful
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without ... | File : mod_restful.erl
Author : < >
Created : 28 Nov 2010 by < >
Copyright ( C ) 2010
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License
Foun... |
283bde9b6811608c3478bd7242fd0ee5bcf9bac009ccd3671706f914d30e8ac9 | TrustInSoft/tis-kernel | unroll_loops.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/kernel_internals/typing/unroll_loops.ml | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
a8efb52288d2470b81f7ab14c75c18f8c4b9665ee1379f8f37a0c259aae4b36a | squaresLab/footpatch | symExec.ml |
* Copyright ( c ) 2009 - 2013 Monoidics ltd .
* Copyright ( c ) 2013 - present Facebook , Inc.
* All rights reserved .
*
* This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree . An additional grant
* of patent rights can be f... | null | https://raw.githubusercontent.com/squaresLab/footpatch/8b79c1964d89b833179aed7ed4fde0638a435782/infer/src/backend/symExec.ml | ocaml | * Symbolic Execution
* Given a node, returns a list of pvar of blocks that have been nullified in the block.
* Given a proposition and an objc block checks whether by existentially quantifying
captured variables in the block we obtain a leak.
java allocation initializes with default values
we are in a lookup ... |
* Copyright ( c ) 2009 - 2013 Monoidics ltd .
* Copyright ( c ) 2013 - present Facebook , Inc.
* All rights reserved .
*
* This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree . An additional grant
* of patent rights can be f... |
a67dd19344d78df0520208c5b8c2584ddf360c6d13d13b0730df93616906a688 | hopbit/sonic-pi-snippets | mel_nem.sps | # key: mel nem
# point_line: 0
# point_index: 0
# --
# metallica - nothing else matters (24 beats)
melody = (ring :e5, :r, :g5, :r, :b5, :r, :e6, :r, :b5, :r, :g5, :r) * 2
##| melody = (ring :b6, :r, :b6, :r, :r, :r, :b6, :r, :e6, :r, :b6, :r)
##| melody += (ring :c7, :r, :b6, :r, :c7, :r, :b6, :c7)
| null | https://raw.githubusercontent.com/hopbit/sonic-pi-snippets/2232854ac9587fc2f9f684ba04d7476e2dbaa288/melodies/mel_nem.sps | scheme | # key: mel nem
# point_line: 0
# point_index: 0
# --
# metallica - nothing else matters (24 beats)
melody = (ring :e5, :r, :g5, :r, :b5, :r, :e6, :r, :b5, :r, :g5, :r) * 2
##| melody = (ring :b6, :r, :b6, :r, :r, :r, :b6, :r, :e6, :r, :b6, :r)
##| melody += (ring :c7, :r, :b6, :r, :c7, :r, :b6, :c7)
| |
e4aa4b40be5f3012f2f515262bad301d93e8ab037adea5392b35f8442013a938 | erlangonrails/devdb | email_msg.erl | %%
%% file: email_msg.erl
author : < >
%% description: a very simple module that creates a non-multipart
%% email message.
%% Doesn't support MIME or non-ascii characters
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Usage Example
%%
2 > c(email_msg ) .
%% {ok,email_msg}
3 > From = " " .
%% ""
... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/contrib/log4erl/src/email_msg.erl | erlang |
file: email_msg.erl
description: a very simple module that creates a non-multipart
email message.
Doesn't support MIME or non-ascii characters
Usage Example
{ok,email_msg}
""
""
"Testing !!!!"
"from: \r\nto: \r\n
| author : < >
2 > c(email_msg ) .
3 > From = " " .
4 > To = " " .
5 > Subject = " Testing ! ! ! ! " .
6 > Content = " Hi , this is a test , bye " .
" Hi , this is a test , bye "
7 > Msg = email_msg : simp_msg(From , To , Subject , Content ) .
subject : Testi ng ! ! ! ! , this is a test , bye\r... |
e1772f89ac036171dc891df209b50b12bd78832e7960fd3b7dadf080398ca309 | facebook/duckling | Core.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
# LANGUAGE NoRebindableSyntax #
-- | Everything needed to run Duckling.
module Duckling.Core
( Context(.... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Core.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
| Everything needed to run Duckling.
Duckling API
Reference time builders
| Builds a `DucklingTime` for timezone `tz` at `utcTime`.
If no `series` found for `tz`, u... | Copyright ( c ) 2016 - present , Facebook , Inc.
# LANGUAGE NoRebindableSyntax #
module Duckling.Core
( Context(..)
, Dimension(..)
, Entity(..)
, Lang(..)
, Locale
, Node(..)
, Options(..)
, Range(..)
, Region(..)
, ResolvedVal(..)
, Seal(..)
, withSeal
, fromName
, makeLocale
, toJ... |
0c4124f315857f509c719723ea01ef9ea24999a27ac802fae79f956e66500e3b | facebook/pyre-check | transform.mli |
* 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/pyre-check/7c76a295c577696b57cc7e9dacc19f043ba9daf5/source/ast/transform.mli | ocaml |
* 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... | |
cb6720a5edad688b0544c55cc3b685146c54cf41a90616a5311a4a18aed0da04 | mbenelli/klio | fwsim.scm | ;; fwsim.scm - Simulator for fetch-write protocol
;;
Copyright ( c ) 2011 by < >
;; All Right Reserved.
;;
Author : < >
;;
The fecth - write protocol is used to communicate with Siemens S5 / S7 plcs .
;;
;;
;; TODO: check mutex
(##include "~~lib/gambit#.scm")
(##include "~/.klio/prelude#.scm")
(##namespace... | null | https://raw.githubusercontent.com/mbenelli/klio/33c11700d6080de44a22a27a5147f97899583f6e/examples/scada/fwsim.scm | scheme | fwsim.scm - Simulator for fetch-write protocol
All Right Reserved.
TODO: check mutex
misc | Copyright ( c ) 2011 by < >
Author : < >
The fecth - write protocol is used to communicate with Siemens S5 / S7 plcs .
(##include "~~lib/gambit#.scm")
(##include "~/.klio/prelude#.scm")
(##namespace
("fetchwrite#" OK OPCODE-WRITE OPCODE-FETCH make-response-header))
(load "~/.klio/fetchwrite")
(define bu... |
302602f8fd09e3934769adc58724a04585251018a580999a88d155f99153daca | zenspider/schemers | exercise.2.70.scm | #lang racket/base
(require "../lib/test.rkt")
(require "../lib/myutils.scm")
Exercise 2.70 :
The following eight - symbol alphabet with associated relative
frequencies was designed to efficiently encode the lyrics of 1950s
;; rock songs. (Note that the "symbols" of an "alphabet" need not be
;; individual lette... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_2/exercise.2.70.scm | scheme | rock songs. (Note that the "symbols" of an "alphabet" need not be
individual letters.)
Get a job
Sha na na na na na na na na
Get a job
Sha na na na na na na na na
Sha boom
How many bits are required for the encoding? What is the smallest
number of bits that would be needed to enco... | #lang racket/base
(require "../lib/test.rkt")
(require "../lib/myutils.scm")
Exercise 2.70 :
The following eight - symbol alphabet with associated relative
frequencies was designed to efficiently encode the lyrics of 1950s
A 2 NA 16
BOOM 1 SHA 3
GET 2 YIP 9
JOB 2... |
81618eb580e6bc12bceebdaf30bcaa3ffecd454cbc5e2e9c7580d96be3b2c86a | fused-effects/fused-effects-exceptions | Main.hs | {-# LANGUAGE ScopedTypeVariables, TypeApplications #-}
module Main where
import Prelude hiding (ioError)
import qualified Control.Carrier.State.IORef as IOState
import qualified Control.Carrier.State.Strict as State
import Control.Carrier.Lift (runM)
import Control.Effect.Exception
import ... | null | https://raw.githubusercontent.com/fused-effects/fused-effects-exceptions/7920fa7a96743b0c77897651707be09f31d4afbc/test/Main.hs | haskell | # LANGUAGE ScopedTypeVariables, TypeApplications #
writes are lost |
module Main where
import Prelude hiding (ioError)
import qualified Control.Carrier.State.IORef as IOState
import qualified Control.Carrier.State.Strict as State
import Control.Carrier.Lift (runM)
import Control.Effect.Exception
import Control.Effect.State
import qualified Test.Tasty ... |
29f76fbf4ab2547ab14b03badf5aa221f1b9131f84b8714bf0d5c5bdda552bae | ParaPhrase/skel | sk_assembler.erl | %%%----------------------------------------------------------------------------
@author < >
2012 University of St Andrews ( See LICENCE )
@headerfile " skel.hrl "
%%%
%%% @doc This module takes a workflow specification, and converts it in into a
%%% set of (concurrent) running processes.
%%%
%%%
%%% @end
%%%-... | null | https://raw.githubusercontent.com/ParaPhrase/skel/bf55de94e64354592ea335f4375f4b40607baf43/src/sk_assembler.erl | erlang | ----------------------------------------------------------------------------
@doc This module takes a workflow specification, and converts it in into a
set of (concurrent) running processes.
@end
----------------------------------------------------------------------------
@doc Function to produce a set of proces... | @author < >
2012 University of St Andrews ( See LICENCE )
@headerfile " skel.hrl "
-module(sk_assembler).
-export([
make/2
,make_hyb/4
,run/2
]).
-include("skel.hrl").
-ifdef(TEST).
-compile(export_all).
-endif.
-spec make(workflow(), pid() | module()) -> pid() .
make(WorkFlow, E... |
ec34e0b2672499b079255b518bdeaa5c3a36b9964a7b0a4e1069d234c7ce6844 | chchen/comet | mapping.rkt | #lang rosette/safe
(require "../synth.rkt"
"../util.rkt"
"bitvector.rkt"
"symbolic.rkt"
"syntax.rkt"
(prefix-in unity: "../unity/semantics.rkt")
(prefix-in unity: "../unity/syntax.rkt")
rosette/lib/match
;; unsafe! only allowed for concrete evalua... | null | https://raw.githubusercontent.com/chchen/comet/005477b761f4d35c9fce175738f4dcbb805909e7/unity-synthesis/arduino/mapping.rkt | racket | unsafe! only allowed for concrete evaluation
variables, unsigned int variables, input pins, and output pins. Variables are
used for internal state, and pins are used for external state (input/output).
The current strategy for showing equivalence is to translate a
UNITY context C_u into an Arduino context C_a, and... | #lang rosette/safe
(require "../synth.rkt"
"../util.rkt"
"bitvector.rkt"
"symbolic.rkt"
"syntax.rkt"
(prefix-in unity: "../unity/semantics.rkt")
(prefix-in unity: "../unity/syntax.rkt")
rosette/lib/match
(only-in racket/base string->symbol))
(def... |
718f41be6ddee0a27cc92491223b523111d2e00b9c37b21ae97dfe59db31c530 | spurious/snd-mirror | rgb.scm | ;;; X11 color names converted to Snd colors
(provide 'snd-rgb.scm)
(define *rgb*
(let ((snow (make-color 1.00 0.98 0.98))
(ghost-white (make-color 0.97 0.97 1.00))
(white-smoke (make-color 0.96 0.96 0.96))
(gainsboro (make-color 0.86 0.86 0.86))
(floral-white (make-color 1.00 0.98 0.94))
(old-lace (make-color ... | null | https://raw.githubusercontent.com/spurious/snd-mirror/8e7a643c840592797c29384ffe07c87ba5c0a3eb/rgb.scm | scheme | X11 color names converted to Snd colors |
(provide 'snd-rgb.scm)
(define *rgb*
(let ((snow (make-color 1.00 0.98 0.98))
(ghost-white (make-color 0.97 0.97 1.00))
(white-smoke (make-color 0.96 0.96 0.96))
(gainsboro (make-color 0.86 0.86 0.86))
(floral-white (make-color 1.00 0.98 0.94))
(old-lace (make-color 0.99 0.96 0.90))
(linen (make-color 0.98 0.... |
8105174464d310b05831332367e1905a27c646ad12b32fd9ca6ec1eaead13862 | facebook/duckling | Rules.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.TimeGrain.FR.Rules
( rules ) where
import Data.Text (... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/TimeGrain/FR/Rules.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.TimeGrain.FR.Rules
( rules ) where
import Data.Text (Text)
import Prelude
import Data.String
import Duckling.Dimensions.Types
import qualified Duckling.TimeGrain.Types as TG
import Duckling.Types
grains :: [(Text, String, TG.Grain)]
grains = [ (... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.