_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 |
|---|---|---|---|---|---|---|---|---|
12889ceb2b1c25d6a664a3bcf8b49c6d995bb57e892cc6cf90ec5abf0c13349b | takikawa/racket-ppa | gen-match.rkt | #lang racket/base
(require "patterns.rkt" "compiler.rkt"
syntax/stx syntax/parse racket/syntax
(for-template racket/base (only-in "runtime.rkt" match:error fail syntax-srclocs)))
(provide go go/one)
;; this transforms `match'-style clauses into ones acceptable to `go'
;; go : syntax syntax syntax -... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/5f2031309f6359c61a8dfd1fec0b77bbf9fb78df/collects/racket/match/gen-match.rkt | racket | this transforms `match'-style clauses into ones acceptable to `go'
go : syntax syntax syntax -> syntax
this parses the clauses using parse, then compiles them
go : syntax syntax syntax -> syntax | #lang racket/base
(require "patterns.rkt" "compiler.rkt"
syntax/stx syntax/parse racket/syntax
(for-template racket/base (only-in "runtime.rkt" match:error fail syntax-srclocs)))
(provide go go/one)
(define (go/one parse stx expr clauses)
(define-syntax-class cl
#:description "a clause with a... |
6b1544393a2352d255e7491d056dc2eaddb416ab18992617501fe44cbb8cc898 | pixlsus/registry.gimp.org_static | tapered_stroke_along_path.scm | ; tapered_stroke_along_path.scm
by
;
Version 1.0 ( 20080926 )
; Description
;
; paints a tapered stroke along the path
;
; License:
;
; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Softw... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/tapered_stroke_along_path.scm | scheme | tapered_stroke_along_path.scm
Description
paints a tapered stroke along the path
License:
This program is free software; you can redistribute it and/or modify
either version 2 of the License , or
(at your option) any later version.
This program is distributed in the hope that it will be usef... | by
Version 1.0 ( 20080926 )
it under the terms of the GNU General Public License as published by
The GNU Public License is available at
(define (tapered_stroke_along_path img inLayer inPath inStartWidth inEndWidth inSpacing inCurve)
(let*
(
(width (car (gimp-image-width img)))
... |
6be9d3da14f88b37a1c0b3558649191e96cb225c6741a33956f2cc197b9a90d5 | prg-titech/Kani-CUDA | profile1.rkt | 0 0 0 0 0 0 0 0 0 0 3 3 9 9 3
0 0 0 1 0 0 0 0 0 0 3 3 9 9 3
0 0 0 2 0 0 0 0 0 0 3 3 9 9 3
0 0 0 3 0 0 0 0 0 0 3 3 9 9 3
0 0 0 4 0 0 0 0 0 0 3 3 9 9 3
0 0 0 5 0 0 0 0 0 0 3 3 9 9 3
0 0 0 6 0 0 0 0 0 0 3 3 9 9 3
0 0 0 7 0 0 0 0 0 0 3 3 9 9 3
0 0 0 8 0 0 0 0 0 0 3 3 9 9 3
0 0 0 N 0 0 0 0 0 0 3 3 9 9 3
1 0 1 0 1 0 1 1 0 1 ... | null | https://raw.githubusercontent.com/prg-titech/Kani-CUDA/e97c4bede43a5fc4031a7d2cfc32d71b01ac26c4/Emulator/Examples/Diffusion3d/profile1.rkt | racket | 0 0 0 0 0 0 0 0 0 0 3 3 9 9 3
0 0 0 1 0 0 0 0 0 0 3 3 9 9 3
0 0 0 2 0 0 0 0 0 0 3 3 9 9 3
0 0 0 3 0 0 0 0 0 0 3 3 9 9 3
0 0 0 4 0 0 0 0 0 0 3 3 9 9 3
0 0 0 5 0 0 0 0 0 0 3 3 9 9 3
0 0 0 6 0 0 0 0 0 0 3 3 9 9 3
0 0 0 7 0 0 0 0 0 0 3 3 9 9 3
0 0 0 8 0 0 0 0 0 0 3 3 9 9 3
0 0 0 N 0 0 0 0 0 0 3 3 9 9 3
1 0 1 0 1 0 1 1 0 1 ... | |
5bddfb42992d527a099fec7d33f932769d65f6785ad11200f7dcd6dfc1c8cc5b | tisnik/clojure-examples | project.clj | ;
( C ) Copyright 2021
;
; All rights reserved. This program and the accompanying materials
; are made available under the terms of the Eclipse Public License v1.0
; which accompanies this distribution, and is available at
-v10.html
;
; Contributors:
;
(defproject matrix2 "0.1.0-SNAPSHOT"
:des... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/cf9b3484a332ebd93bc585f051802c333ebde3df/matrix2/project.clj | clojure |
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Contributors:
| ( C ) Copyright 2021
-v10.html
(defproject matrix2 "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.10.1"]
[net.mikera/core.matrix "0.34.0"]]
:plug... |
99abefa3fa48243d2c05249b11a7fbf7460d52f0e8fd1c495ac479e4becde592 | evertedsphere/noether | Group.hs | module Noether.Algebra.Single.Group where
import Noether.Lemmata.TypeFu
import Noether.Algebra.Single.Cancellative
import Noether.Algebra.Single.Commutative
import Noether.Algebra.Single.Magma
import Noether.Algebra.Single.Monoid
type family GroupS (op :: k) (a :: Ty... | null | https://raw.githubusercontent.com/evertedsphere/noether/c4223f64b9df5b0dbbeec1fea726bfff7f5810f5/library/Noether/Algebra/Single/Group.hs | haskell | module Noether.Algebra.Single.Group where
import Noether.Lemmata.TypeFu
import Noether.Algebra.Single.Cancellative
import Noether.Algebra.Single.Commutative
import Noether.Algebra.Single.Magma
import Noether.Algebra.Single.Monoid
type family GroupS (op :: k) (a :: Ty... | |
b8d1f17e8d7601d49d1ca1817feb2e15864cde871ff084daeb296caa38f3ae9b | tlaplus/tlapm | newversion.ml |
* Copyright ( C ) 2012 INRIA and Microsoft Corporation
* Copyright (C) 2012 INRIA and Microsoft Corporation
*)
open Printf
open Scanf
Change the following two lines for a new version
let major = 1
let minor = 5
(* The rest of the file has no magic numbers *)
let same_version = ref false
let loud = ref ... | null | https://raw.githubusercontent.com/tlaplus/tlapm/b82e2fd049c5bc1b14508ae16890666c6928975f/tools/newversion.ml | ocaml | The rest of the file has no magic numbers
AUTOMATICALLY GENERATED by tools/newversion.ml \
-- DO NOT EDIT
AUTOMATICALLY GENERATED by tools/newversion.ml \
-- DO NOT EDIT |
* Copyright ( C ) 2012 INRIA and Microsoft Corporation
* Copyright (C) 2012 INRIA and Microsoft Corporation
*)
open Printf
open Scanf
Change the following two lines for a new version
let major = 1
let minor = 5
let same_version = ref false
let loud = ref true
let release = ref false
let rv_exists = Sys... |
a10e3703671917e8acb1b34815b3cdfeda5d3983fb0c7879fd5c0e28ab9b49a3 | ndmitchell/catch | Reduce.hs |
module Reduce(reduce, reduces, reduceWithM, reducesWithM, propMapReduceM, propMapReduce) where
import Req
import General
import DataRep
import Data.Proposition
import Control.Monad
import Control.Monad.Identity
import Yhc.Core
import Data.List
import Data.Maybe
-- DRIVERS
reduces :: Core -> Reqs -> Reqs
reduces co... | null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/gadget/Reduce.hs | haskell | DRIVERS
take a function that reduces a Call
and reduce the entire thing
this function does the real work!
since will never return anything
absolutely no idea what the result is
if you care, abstract before here |
module Reduce(reduce, reduces, reduceWithM, reducesWithM, propMapReduceM, propMapReduce) where
import Req
import General
import DataRep
import Data.Proposition
import Control.Monad
import Control.Monad.Identity
import Yhc.Core
import Data.List
import Data.Maybe
reduces :: Core -> Reqs -> Reqs
reduces core reqs = p... |
277d2fce56f967a049d5ef2c8f4bf840dd0cb0464ab64f0bbee0a279cba5f236 | graninas/Hydra | Meteor.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DuplicateRecordFields #
module Astro.API.Meteor where
import Hydra.Prelude
data MeteorTemplate = MeteorTemplate
{ size :: Int32
, mass :: Int32
, azimuth :: Int32
, altitude :: Int32
}
deriving (Show, Eq, Ord, Generic, ToJSON, From... | null | https://raw.githubusercontent.com/graninas/Hydra/7ce16e705c2ce166f954dcca3910f258ae9b950c/app/astro/src/Astro/API/Meteor.hs | haskell | # LANGUAGE DeriveAnyClass # | # LANGUAGE DuplicateRecordFields #
module Astro.API.Meteor where
import Hydra.Prelude
data MeteorTemplate = MeteorTemplate
{ size :: Int32
, mass :: Int32
, azimuth :: Int32
, altitude :: Int32
}
deriving (Show, Eq, Ord, Generic, ToJSON, FromJSON)
|
d2fef5193e521db700ceb4b34a1e4a78c62f925a2252c35f311a68ac692c26c7 | fpco/inline-c | Exceptions.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ViewPatterns #
# DEPRECATED " Language . C.Inline . . Exceptions is deprecated in favor of Language . C.Inline . . Exception which changes the CppException data type to preserve the exception for custom error handling . " #
CppException(CppHaskellException)
, pattern Lang... | null | https://raw.githubusercontent.com/fpco/inline-c/063e8876137bf73b378797cf57819076bf78bb76/inline-c-cpp/src/Language/C/Inline/Cpp/Exceptions.hs | haskell | # LANGUAGE PatternSynonyms #
# LANGUAGE ViewPatterns #
# DEPRECATED " Language . C.Inline . . Exceptions is deprecated in favor of Language . C.Inline . . Exception which changes the CppException data type to preserve the exception for custom error handling . " #
CppException(CppHaskellException)
, pattern Lang... | |
ee401af212b2f7872bf57701d15117bfa488762d0620c88d370c43859f19940e | cyverse-archive/DiscoveryEnvironmentBackend | index.clj | (ns infosquito.index
(:require [clojure-commons.file-utils :as file]))
(defn indexable?
[index-base collection]
(let [home (file/path-join index-base "home")
trash (file/path-join index-base "trash")
home-trash (file/path-join trash "home")]
(and (not= index-base collection)
... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/Infosquito/src/infosquito/index.clj | clojure | (ns infosquito.index
(:require [clojure-commons.file-utils :as file]))
(defn indexable?
[index-base collection]
(let [home (file/path-join index-base "home")
trash (file/path-join index-base "trash")
home-trash (file/path-join trash "home")]
(and (not= index-base collection)
... | |
b26b077fa75090a1b92049408c232c9dd5f23dff79765c4df5d9baa02c17d5cc | 2600hz-archive/whistle | t_evtsub.erl | -module(t_evtsub).
-include("crossbar.hrl").
%% Test the full API using ibrowse to make calls to the rest endpoint
%% -export([start_full_test/0]).
%% start_full_test() ->
%% ibrowse:start(),
%% logger:start(),
%% UrlBase = ":8000/v1/accounts",
Headers = [ { " X - Auth - Token " , " - test " }
... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/whistle_apps/apps/crossbar/src/t/t_evtsub.erl | erlang | Test the full API using ibrowse to make calls to the rest endpoint
-export([start_full_test/0]).
start_full_test() ->
ibrowse:start(),
logger:start(),
UrlBase = ":8000/v1/accounts",
,{"Accept", "application/json"}
],
EmptyEvtSubResp = [{[<<"data">>, <<"streams">>], []}
... | -module(t_evtsub).
-include("crossbar.hrl").
Headers = [ { " X - Auth - Token " , " - test " }
, { " Content - Type " , " application / json " }
MaxEvents = 5 ,
PutJSON = get_put_json(<<"directory.authn_req " > > , MaxEvents ) ,
logger : format_log(info , " GET ~s ~ n " , [ Ur... |
b88da25289649ca3da3a1b3090ecc999a8b9bc1be1a7334725b3fe396e23d4a3 | OlivierSohn/hamazed | Spec.hs | import Test.Imj.Jitter
main :: IO ()
main = do
testThreadDelay
| null | https://raw.githubusercontent.com/OlivierSohn/hamazed/6c2b20d839ede7b8651fb7b425cb27ea93808a4a/imj-game-synths/test/Spec.hs | haskell | import Test.Imj.Jitter
main :: IO ()
main = do
testThreadDelay
| |
1fa75e0c25b07bd32fe1390e9b513c403fda29ced67255dafc3c4bcda5434338 | johnswanson/tictag | beeminder.clj | (ns tictag.beeminder
(:require [org.httpkit.client :as http]
[cheshire.core :as cheshire]
[taoensso.timbre :as timbre]
[clojure.string :as str]
[clojure.data :refer [diff]]
[clj-time.core :as t]
[clj-time.periodic :as p]
[tictag.db :a... | null | https://raw.githubusercontent.com/johnswanson/tictag/89140b5084817690ec417b07b7d095ba7677f4e0/src/clj/tictag/beeminder.clj | clojure | (ns tictag.beeminder
(:require [org.httpkit.client :as http]
[cheshire.core :as cheshire]
[taoensso.timbre :as timbre]
[clojure.string :as str]
[clojure.data :refer [diff]]
[clj-time.core :as t]
[clj-time.periodic :as p]
[tictag.db :a... | |
6e48f60b6271fd4bb86010262f714db2a74de9cbea77acd336ec2d0c188cc92f | erlang/rebar3 | ec_rbdict.erl | %%% vi:ts=4 sw=4 et
Copyright ( c ) 2008 . All rights reserved .
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the following conditions
%%% are met:
%%%
1 . Redistributions of source code must retain the above copyright
%%% notice, this... | null | https://raw.githubusercontent.com/erlang/rebar3/048412ed4593e19097f4fa91747593aac6706afb/vendor/erlware_commons/src/ec_rbdict.erl | erlang | vi:ts=4 sw=4 et
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer in the
documentation... | Copyright ( c ) 2008 . All rights reserved .
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
COPYRIGHT HOLDERS OR FOR ANY DIRECT , INDIRECT ,
IN... |
690204d8669097500ee013d4bfe915f0d61c09f089fb214dcc553b3b3047e66b | heshrobe/joshua-dist | documentation-commands.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CLIM - ENV ; Base : 10 ; Lowercase : Yes -*-
Copyright ( c ) 1994 - 2000 , .
Copyright ( c ) 2001 - 2003 , and .
;;; All rights reserved. No warranty is expressed or implied.
;;; See COPYRIGHT for full copyright and terms of use.
(in-package :cl... | null | https://raw.githubusercontent.com/heshrobe/joshua-dist/f59f06303f9fabef3e945a920cf9a26d9c2fd55e/clim-env/portable-lisp-environment/documentation-commands.lisp | lisp | Syntax : ANSI - Common - Lisp ; Package : CLIM - ENV ; Base : 10 ; Lowercase : Yes -*-
All rights reserved. No warranty is expressed or implied.
See COPYRIGHT for full copyright and terms of use.
Documentation commands
--- Help {Commands, Keyboard}
--- Keyboard -> basic input editor help, including advice to try ... |
Copyright ( c ) 1994 - 2000 , .
Copyright ( c ) 2001 - 2003 , and .
(in-package :clim-env)
--- Commands - > lists all the commands in the current comtab
|
b5e06259c0e08da02476339a9cc525f9833bc416ac6d3fd0c18facb70a8d36bf | informatimago/lisp | c11-yacc.lisp | (DEFINE-PARSER *C11-PARSER*
(:START-SYMBOL |translation_unit|)
(:TERMINALS (
|identifier| |typedef_name| |func_name| |string_literal|
|i_constant| |f_constant| |enum_name|
|alignas| |alignof| |atomic| |generic| |noreturn| |static_assert|
|thread_local| ... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/languages/c11/c11-yacc.lisp | lisp | renaming terminals:
ENUMERATION_CONSTANT
productions:
)
)
)
)
))
))
)
)
)
)
)
)) | (DEFINE-PARSER *C11-PARSER*
(:START-SYMBOL |translation_unit|)
(:TERMINALS (
|identifier| |typedef_name| |func_name| |string_literal|
|i_constant| |f_constant| |enum_name|
|alignas| |alignof| |atomic| |generic| |noreturn| |static_assert|
|thread_local| ... |
f968b46b921e4e0296cc9c21d04fcf0b4feae5d8590308616b37b4aec1483fb4 | NetComposer/nksip | basic_test_server.erl |
%% -------------------------------------------------------------------
%%
%% basic_test: Basic Test Suite
%%
Copyright ( c ) 2013 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License... | null | https://raw.githubusercontent.com/NetComposer/nksip/7fbcc66806635dc8ecc5d11c30322e4d1df36f0a/test/callbacks/basic_test_server.erl | erlang | -------------------------------------------------------------------
basic_test: Basic Test Suite
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specif... |
Copyright ( c ) 2013 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(basic_test_server).... |
998e4baef3708d15d6e6d568bab5b667e4d309c431aecc56fa5d3eb58c049b88 | jakemcc/test-refresh | hello.clj | (ns example.hello)
(defn greet [name]
(str "Hello " name))
| null | https://raw.githubusercontent.com/jakemcc/test-refresh/209d1d410ff4fdd0fc091b023483979fad86ae09/dep.edn/src/example/hello.clj | clojure | (ns example.hello)
(defn greet [name]
(str "Hello " name))
| |
2e9ffaf8cbc8171158f512a3e6d98801f050c310199fbc0a5366a2e8306e566f | basho/riak_search | riak_search_kv_erlang_extractor.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
%%
%% -------------------------------------------------------------------
-module(riak_search_kv_erlang_extractor).
-export([extract/3,
extract_value/3]).
-... | null | https://raw.githubusercontent.com/basho/riak_search/79c034350f37706a1db42ffca8f6449d4cce99e1/src/riak_search_kv_erlang_extractor.erl | erlang | -------------------------------------------------------------------
-------------------------------------------------------------------
Index erlang terms and proplists (bz)
Riak objects should have the content type "application/x-erlang"
Much like the JSON extractor:
* proplists are indexed under ... | Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
-module(riak_search_kv_erlang_extractor).
-export([extract/3,
extract_value/3]).
-include("riak_search.hrl").
-import(riak_search_utils, [to_utf8/1]).
* bare terms ( ' foo ' , < < " foo " > > , 123 ) are indexed in the default ... |
d1d4059bc33b68856cb0961318a5bedd0c0457c9fc175ed3d2030509a3861bcb | binaryage/chromex | signed_in_devices.cljs | (ns chromex.app.signed-in-devices (:require-macros [chromex.app.signed-in-devices :refer [gen-wrap]])
(:require [chromex.core]))
-- functions --------------------------------------------------------------------------------------------------------------
(defn get* [config is-local]
(gen-wrap :function ::get co... | null | https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/apps/chromex/app/signed_in_devices.cljs | clojure | -- events ----------------------------------------------------------------------------------------------------------------- | (ns chromex.app.signed-in-devices (:require-macros [chromex.app.signed-in-devices :refer [gen-wrap]])
(:require [chromex.core]))
-- functions --------------------------------------------------------------------------------------------------------------
(defn get* [config is-local]
(gen-wrap :function ::get co... |
456e65098faf5e3b5384c518c81eac673e84a9702a0adaca329fdae15d26b15d | byteverse/json-syntax | print-syntax.hs | # language BangPatterns #
# language LambdaCase #
import Data.Primitive (ByteArray)
import Data.ByteString (ByteString)
import Data.Bool (bool)
import Control.Exception
import Foreign.C.Types (CChar)
import qualified Json
import qualified Data.Bytes as Bytes
import qualified Data.Bytes.Chunks as Chunks
import qualifi... | null | https://raw.githubusercontent.com/byteverse/json-syntax/c9978417b96f1e6bbc50a9bbfed907b7d0859ace/scripts/print-syntax.hs | haskell | # language BangPatterns #
# language LambdaCase #
import Data.Primitive (ByteArray)
import Data.ByteString (ByteString)
import Data.Bool (bool)
import Control.Exception
import Foreign.C.Types (CChar)
import qualified Json
import qualified Data.Bytes as Bytes
import qualified Data.Bytes.Chunks as Chunks
import qualifi... | |
667a40b7a276e446fceb6c40f5a96890adbf70a4364d4737f4c47cb8b115a26d | zenspider/schemers | exercise.2.52.scm | #lang racket/base
Exercise 2.52
;; Make changes to the square limit of `wave' shown in *Note Figure
2 - 9 : : by working at each of the levels described above . In
;; particular:
;;
;; a. Add some segments to the primitive `wave' painter of *Note
;; Exercise 2-49:: (to add a smile, for example).
;;
;; b.... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_2/exercise.2.52.scm | scheme | Make changes to the square limit of `wave' shown in *Note Figure
particular:
a. Add some segments to the primitive `wave' painter of *Note
Exercise 2-49:: (to add a smile, for example).
b. Change the pattern constructed by `corner-split' (for
`square-of-four' so as to assemble the corners in a di... | #lang racket/base
Exercise 2.52
2 - 9 : : by working at each of the levels described above . In
example , by using only one copy of the ` up - split ' and
` right - split ' images instead of two ) .
c. Modify the version of ` square - limit ' that uses
pattern . ( For example , you migh... |
2505d72c9eb32358fda12f3323693cd52dd7bfc589cf83a7a9b7d49bc43ed545 | emaphis/HtDP2e-solutions | ex114a.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-reader.ss" "lang")((modname 06_04_space_invader_3) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repea... | null | https://raw.githubusercontent.com/emaphis/HtDP2e-solutions/ecb60b9a7bbf9b8999c0122b6ea152a3301f0a68/1-Fixed-Size-Data/06-Itemizations-Structures/ex114a.rkt | racket | about the language level of this file in a form that our tools can easily process.
6.4 Checking the World
(A Graphical Editor).
space invader simulation
Draw some sketches of what the game scenery looks like at various stages.
Use the sketches to determine the constant and the variable pieces of the
game. For th... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 06_04_space_invader_3) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
HtDP 2e - 6 Itemizations and Structures
Exerci... |
2c3c93c0285217194bd310397a6046eb32408b925f04e6eedaa49650e773b120 | davidlazar/ocaml-semantics | literal-string.ml | "Hello \"World\"!"
| null | https://raw.githubusercontent.com/davidlazar/ocaml-semantics/6f302c6b9cced0407d501d70ad25c2d2aefbb77d/tests/unit/literal-string.ml | ocaml | "Hello \"World\"!"
| |
963553f447adcb46b2a52973f14bb84902561e9375a52397b6f675c123b73368 | haskell-hvr/paths | Lens.hs | {-# LANGUAGE RankNTypes #-}
{-# LANGUAGE Safe #-}
# LANGUAGE ScopedTypeVariables #
| Lenses in the style of [ System . FilePath . Lens]( / package / lens / docs / System - FilePath - Lens.html ) .
--
@since 0.2.0.0
module System.Path.Lens
( -- * Operators
(</>~)
, (<.>~)
... | null | https://raw.githubusercontent.com/haskell-hvr/paths/2d29fd546ae122b4c027c75fa85313244c2e1f77/src/System/Path/Lens.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE Safe #
* Operators
* Lenses
--------------------------------------------------------------------------
--------------------------------------------------------------------------
local helper
------------------------------------------------------------------... | # LANGUAGE ScopedTypeVariables #
| Lenses in the style of [ System . FilePath . Lens]( / package / lens / docs / System - FilePath - Lens.html ) .
@since 0.2.0.0
module System.Path.Lens
(</>~)
, (<.>~)
, basename
, directory
, extension
, filename
) where
import Data.Functo... |
c7bb4be373091bcbbd49fc5b1f0d7f85aa0e5c54f269815541a25c50eb7a4a1a | privet-kitty/cl-competitive | offline-dynamic-connectivity.lisp | ;;;
;;; Offline dynamic connectivity
;;;
(defpackage :cp/offline-dynamic-connectivity
(:use :cl :cp/undoable-disjoint-set)
(:export #:dynamic-connectivity #:make-dynamic-connectivity
#:dycon-insert #:dycon-delete #:dycon-build #:dycon-map
#:dycon-num-components #:dycon-disjoint-set))
(in-pack... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/offline-dynamic-connectivity.lisp | lisp |
Offline dynamic connectivity
NOTE: not tested
disjoint set that holds connectivity of graph
number of connected components |
(defpackage :cp/offline-dynamic-connectivity
(:use :cl :cp/undoable-disjoint-set)
(:export #:dynamic-connectivity #:make-dynamic-connectivity
#:dycon-insert #:dycon-delete #:dycon-build #:dycon-map
#:dycon-num-components #:dycon-disjoint-set))
(in-package :cp/offline-dynamic-connectivity)
... |
211b78381aea0d498fc7e64b7fc9fc5ecc2095d65b2ef2595a6a92c5c20cc49c | phronmophobic/snowball | snowball.clj | (ns com.phronemophobic.snowball
(:require [clojure.tools.build.api :as b]
clojure.tools.deps.alpha
[treemap-clj.core :as treemap]
[clojure.zip :as z]
[membrane.ui :as ui]
[clojure.data.json :as json]
;; (require 'membrane.java2d)
[tre... | null | https://raw.githubusercontent.com/phronmophobic/snowball/a4b70762e029913e6e57362dba6bad5c30ffd0d6/src/com/phronemophobic/snowball.clj | clojure | (require 'membrane.java2d)
based on clojure.tools.deps.alpha/print-tree
they're most likely unzipped
if clojure.tools.deps.alpha/make-tree breaks,
check clojure.tools.deps.alpha/print-tree
(select-keys lib-tree (top-level-deps lib-tree))
else | (ns com.phronemophobic.snowball
(:require [clojure.tools.build.api :as b]
clojure.tools.deps.alpha
[treemap-clj.core :as treemap]
[clojure.zip :as z]
[membrane.ui :as ui]
[clojure.data.json :as json]
[treemap-clj.rtree :as rtree]
[mem... |
fff5a860c43cb5fb2fa2feb10ad68356bb4d31c027a07fcb5dd8ac7e725b7745 | CommonDoc/common-doc | constructors.lisp | (in-package :common-doc)
Utilities
(defun construct (class children metadata reference)
"Instantiate a class with children and metadata."
(make-instance class
:children (uiop:ensure-list children)
:metadata metadata
:reference reference))
;; NOTE:
;; Originall... | null | https://raw.githubusercontent.com/CommonDoc/common-doc/1406ab65b8f111f14f1b7759a1a83c65ced763ab/src/constructors.lisp | lisp | NOTE:
Originally, I wanted something like that, to keep metadata and
item has a string.
Thus I've decided to create correct meta-data in the web-link's contructor :(
from slot values of items returned by FIND-SPECIAL-SLOTS?
;; We have to keep metadata and slot values syncronized, because
; some f... | (in-package :common-doc)
Utilities
(defun construct (class children metadata reference)
"Instantiate a class with children and metadata."
(make-instance class
:children (uiop:ensure-list children)
:metadata metadata
:reference reference))
slots in sync , but... |
e75bb434437193f1cc3770da380b5c9c140a59136df2a01de1a725a226571112 | monadbobo/ocaml-core | string_id.ml | open Std_internal
include String
let check s =
let stripped = String.strip s in
if not (String.(=) stripped s) then
Some (sprintf ("'%s' is not a valid identifier " ^^
"because it has whitespace on the edge")
s)
else if String.(=) s "" then
Some "Attempt to use empty i... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/string_id.ml | ocaml | open Std_internal
include String
let check s =
let stripped = String.strip s in
if not (String.(=) stripped s) then
Some (sprintf ("'%s' is not a valid identifier " ^^
"because it has whitespace on the edge")
s)
else if String.(=) s "" then
Some "Attempt to use empty i... | |
b28f5ea0b4c37187e87a5428774a676496f47ffede00c0477934c6f3b296caab | heraldry/heraldicon | debounce.cljs | (ns heraldicon.frontend.debounce
(:require
[re-frame.core :as rf]))
(defonce timeouts
(atom {}))
(defn- clear-timer [id]
(some-> @timeouts (get id) js/clearTimeout))
(rf/reg-fx ::dispatch
(fn [[id event-vec n]]
(clear-timer id)
(swap! timeouts assoc id
(js/setTimeout (fn []
... | null | https://raw.githubusercontent.com/heraldry/heraldicon/6fb727fc675e171db70a4d2080c54d7e6428bd87/src/heraldicon/frontend/debounce.cljs | clojure | (ns heraldicon.frontend.debounce
(:require
[re-frame.core :as rf]))
(defonce timeouts
(atom {}))
(defn- clear-timer [id]
(some-> @timeouts (get id) js/clearTimeout))
(rf/reg-fx ::dispatch
(fn [[id event-vec n]]
(clear-timer id)
(swap! timeouts assoc id
(js/setTimeout (fn []
... | |
957712144c1fdb29093c0651757c17a2396c2560e2f2a2d4a3b0272c3c46b5b2 | martijnbastiaan/doctest-parallel | ModuleA.hs | -- |
> > > import .
> > > fib 10
55
module BugfixImportHierarchical.ModuleA where
import BugfixImportHierarchical.ModuleB ()
| null | https://raw.githubusercontent.com/martijnbastiaan/doctest-parallel/f70d6a1c946cc0ada88571b90a39a7cd4d065452/test/integration/BugfixImportHierarchical/ModuleA.hs | haskell | | | > > > import .
> > > fib 10
55
module BugfixImportHierarchical.ModuleA where
import BugfixImportHierarchical.ModuleB ()
|
e7433b4bd914311850b74a92f91e2152df0166fd0643e337ea6e26fc097145c3 | mbudde/jana | Printf.hs | module Jana.Printf (printfRender) where
import Data.List (elemIndex, delete)
import Jana.Error
import Jana.ErrorMessages
printfRender :: [String] -> [(String, String)] -> Either Message String
printfRender str [] =
case findPercent (last str) of
Just _ -> Left printfNotEnoughArgs
Nothing -> Right $ conca... | null | https://raw.githubusercontent.com/mbudde/jana/5b51b57e0b6f13ec1e1c61d719a18bf58696f84b/src/Jana/Printf.hs | haskell | module Jana.Printf (printfRender) where
import Data.List (elemIndex, delete)
import Jana.Error
import Jana.ErrorMessages
printfRender :: [String] -> [(String, String)] -> Either Message String
printfRender str [] =
case findPercent (last str) of
Just _ -> Left printfNotEnoughArgs
Nothing -> Right $ conca... | |
5707a867a45fc7db759ec8a907f9c800decbbd7b6d4ec71da7e54a923cb952fc | utdemir/nix-tree | Test.hs | # LANGUAGE TemplateHaskell #
module Main where
import Hedgehog
import Hedgehog.Main
import qualified Test.Data.InvertedIndex
main :: IO ()
main =
defaultMain . map checkParallel $
[Test.Data.InvertedIndex.tests]
| null | https://raw.githubusercontent.com/utdemir/nix-tree/27cf891b0635f12d775848cdabb0e9484cb9d54f/test/Test.hs | haskell | # LANGUAGE TemplateHaskell #
module Main where
import Hedgehog
import Hedgehog.Main
import qualified Test.Data.InvertedIndex
main :: IO ()
main =
defaultMain . map checkParallel $
[Test.Data.InvertedIndex.tests]
| |
e8296259ac5427291178e24522346a57d0af5bc055d13b4f42ddc0ca9690ec06 | jeromesimeon/Galax | code_nestedloop.mli | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/code_selection/code/code_nestedloop.mli | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : code_nestedloop.mli , v 1.7 2007/02/01 22:08:45 simeon Exp $
open Algebra_type
open Xquery_common_ast
open Xquery_algebra_ast
open Physical_value
open Execution_context
open Code_selection_context
val build_tuple_nodup_code :
... |
53ef2a16b27447a77ca681655723910c8e9f7641ad5c66cbc7484e3f5bf73c41 | nobrakal/asak | wtree.mli | This file is part of asak .
*
* Copyright ( C ) 2019 IRIF / OCaml Software Foundation .
*
* asak is distributed under the terms of the MIT license . See the
* included LICENSE file for details .
*
* Copyright (C) 2019 IRIF / OCaml Software Foundation.
*
* asak is distributed under the terms of the ... | null | https://raw.githubusercontent.com/nobrakal/asak/c1aaf985815563edd2463f8fe18e2d790f955f05/src/wtree.mli | ocaml | * Type for weighted trees. | This file is part of asak .
*
* Copyright ( C ) 2019 IRIF / OCaml Software Foundation .
*
* asak is distributed under the terms of the MIT license . See the
* included LICENSE file for details .
*
* Copyright (C) 2019 IRIF / OCaml Software Foundation.
*
* asak is distributed under the terms of the ... |
212271fb21e49d31ba38363508fa2ecdd1b3a2df7a98c2411cabf6dc08cb6be4 | tsurucapital/euphoria | Main.hs | module Main where
import Criterion.Main (defaultMain)
import qualified FRP.Euphoria.EnumCollection.Lazy.Bench as ECL
import qualified FRP.Euphoria.EnumCollection.Strict.Bench as ECS
import qualified FRP.Euphoria.HashCollection.Lazy.Bench as HCL
import qualified FRP.Euphoria.HashCollection.Strict.Bench as HCS
main ::... | null | https://raw.githubusercontent.com/tsurucapital/euphoria/15ddb49ddc79d62970a0163fe8d77789254db202/benchmarks/Main.hs | haskell | module Main where
import Criterion.Main (defaultMain)
import qualified FRP.Euphoria.EnumCollection.Lazy.Bench as ECL
import qualified FRP.Euphoria.EnumCollection.Strict.Bench as ECS
import qualified FRP.Euphoria.HashCollection.Lazy.Bench as HCL
import qualified FRP.Euphoria.HashCollection.Strict.Bench as HCS
main ::... | |
3ce78fe5a43bd3a9d8ba04fe1f89620ce42edba5352903085d76270e6d239007 | mirage/ke | rke.ml | type ('a, 'b) t = {
mutable r : int;
mutable w : int;
mutable c : int;
k : ('a, 'b) Bigarray.kind;
mutable v : ('a, 'b, Bigarray.c_layout) Bigarray.Array1.t;
}
exception Empty
external ( = ) : 'a -> 'a -> bool = "%equal"
let ( = ) (a : int) b = a = b
let[@inline always] mask t v = v land (t.c - 1)
let[@inl... | null | https://raw.githubusercontent.com/mirage/ke/2b79a7fa8a2249653d5310c8e851bbce66fac57c/lib/rke.ml | ocaml | type ('a, 'b) t = {
mutable r : int;
mutable w : int;
mutable c : int;
k : ('a, 'b) Bigarray.kind;
mutable v : ('a, 'b, Bigarray.c_layout) Bigarray.Array1.t;
}
exception Empty
external ( = ) : 'a -> 'a -> bool = "%equal"
let ( = ) (a : int) b = a = b
let[@inline always] mask t v = v land (t.c - 1)
let[@inl... | |
a3f08f1cf49ccd89cd43de36a58d8625b997a6b25f52c19238264e8c3536bb77 | blinkov/sockjs-pubsub | sockjs_pubsub_sup.erl | -module(sockjs_pubsub_sup).
-behaviour(supervisor).
-author("Ivan Blinkov <>").
-include("constants.hrl").
-export([
start_link/0
]).
-export([
init/1
]).
-spec start_link() -> {ok, Pid::pid()}.
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init(_Args) ->
{ok,
{
{one_for_one, 10, 1... | null | https://raw.githubusercontent.com/blinkov/sockjs-pubsub/ea0cf97b3345768c966abe328b1c80b4429c8b07/src/sockjs_pubsub_sup.erl | erlang | -module(sockjs_pubsub_sup).
-behaviour(supervisor).
-author("Ivan Blinkov <>").
-include("constants.hrl").
-export([
start_link/0
]).
-export([
init/1
]).
-spec start_link() -> {ok, Pid::pid()}.
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init(_Args) ->
{ok,
{
{one_for_one, 10, 1... | |
5329c16623881fa9557a6e45b1b32c9b7db3864714d66fec51d3fb05fa97d65d | rmculpepper/crypto | main.rkt | Copyright 2012 - 2018
Copyright 2007 - 2009 < vyzo at media.mit.edu >
;;
;; 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 optio... | null | https://raw.githubusercontent.com/rmculpepper/crypto/63e131c06d54756c3f36833ad0b700d56d6a75c8/crypto-lib/main.rkt | racket |
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
(at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCH... | Copyright 2012 - 2018
Copyright 2007 - 2009 < vyzo at media.mit.edu >
by the Free Software Foundation , either version 3 of the License , or
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
#lang racket/base
(require racket/cont... |
ffb661136b81d4edaf6997080ee3b2814d48c10ecff441c3c3518c13fb3475d2 | grin-compiler/ghc-wpc-sample-programs | XorShift.hs | -- |
-- Module : Foundation.Random.XorShift
-- License : BSD-style
--
XorShift variant : Xoroshiro128 +
-- <>
--
-- Xoroshiro128+ is a PRNG that uses a shift/rotate-based linear transformation.
-- This is lar
--
-- C implementation at:
-- <>
--
module Basement.Alg.XorShift
( State(..)
, next
, ne... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/basement-0.0.11/Basement/Alg/XorShift.hs | haskell | |
Module : Foundation.Random.XorShift
License : BSD-style
<>
Xoroshiro128+ is a PRNG that uses a shift/rotate-based linear transformation.
This is lar
C implementation at:
<>
# UNPACK #
# UNPACK # | XorShift variant : Xoroshiro128 +
module Basement.Alg.XorShift
( State(..)
, next
, nextDouble
, jump
) where
import Data.Word
import Data.Bits
import Basement.Compat.Base
import Basement.Floating (wordToDouble)
import Basement.Numerical.Additive
... |
b1dc32beb7e59b71333d1bb21d6f09b369d05c8ed7c356500e6d31bf44077d6f | AmpersandTarski/Ampersand | Extra.hs | # LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
-- | Extra functions for optparse-applicative.
module Options.Applicative.Builder.Extra
( boolFlags,
boolFlagsNoDefault,
firstBoolFlagsNoDefault,
firstBoolFlagsTrue,
firstBoolFlagsFalse,
enableDisableFlags,
enableDisableFlagsNoDefa... | null | https://raw.githubusercontent.com/AmpersandTarski/Ampersand/8a1c00e3b0aeccd7ea6283b20097a8b73310b138/src/Options/Applicative/Builder/Extra.hs | haskell | | Extra functions for optparse-applicative.
,absFileOption
,relFileOption
,absDirOption
,relDirOption
import Path hiding ((</>))
| Enable/disable flags for a 'Bool'.
| Default value
| Flag name
| Help suffix
| Enable/disable flags for a 'Bool', without a default case (to allow chaining with '<|>').
| Fla... | # LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
module Options.Applicative.Builder.Extra
( boolFlags,
boolFlagsNoDefault,
firstBoolFlagsNoDefault,
firstBoolFlagsTrue,
firstBoolFlagsFalse,
enableDisableFlags,
enableDisableFlagsNoDefault,
extraHelpOption,
textOption,
t... |
0d7a49738313ef25d234941ea8fe8ca771c3d4a6b04aeebc8861b123ebc1de9b | clojurecademy/clojurecademy | course.cljs | (ns clojurecademy.controller.course
(:require [clojurecademy.util :as util]
[reagent.core :as reagent]
[goog.dom :as dom]))
(defn- close
[_]
(reagent/render [(fn [_] [:div])] (dom/getElement "msg-container")))
(defn- refresh
[_]
(.reload js/location))
(defn- render-info-window
... | null | https://raw.githubusercontent.com/clojurecademy/clojurecademy/97dc7f9b91a90a3f30ca5a3de88542c90a50ce01/src/cljs/clojurecademy/controller/course.cljs | clojure | (ns clojurecademy.controller.course
(:require [clojurecademy.util :as util]
[reagent.core :as reagent]
[goog.dom :as dom]))
(defn- close
[_]
(reagent/render [(fn [_] [:div])] (dom/getElement "msg-container")))
(defn- refresh
[_]
(.reload js/location))
(defn- render-info-window
... | |
e9adc1aa4a9bdaab473cffff3b7879f7b0fec652ea0284ed9646c743335d4fa9 | everpeace/programming-erlang-code | area_server_final.erl | -module(area_server_final).
-export([start/0, area/2]).
start() -> spawn(fun loop/0).
area(Pid, What) ->
rpc(Pid, What).
rpc(Pid, Request) ->
Pid ! {self(), Request},
receive
{Pid, Response} ->
Response
end.
loop() ->
receive
{From, {rectangle, Width, Ht}} ->
From ! {self(), Wid... | null | https://raw.githubusercontent.com/everpeace/programming-erlang-code/8ef31aa13d15b41754dda225c50284915c29cb48/code/area_server_final.erl | erlang | -module(area_server_final).
-export([start/0, area/2]).
start() -> spawn(fun loop/0).
area(Pid, What) ->
rpc(Pid, What).
rpc(Pid, Request) ->
Pid ! {self(), Request},
receive
{Pid, Response} ->
Response
end.
loop() ->
receive
{From, {rectangle, Width, Ht}} ->
From ! {self(), Wid... | |
e8ab5dc5c1551f590de031af5a8da4bb9896f8309593a1d0f27312a5b48c910f | sbcl/sbcl | readtable.lisp | ;;;; READTABLEs
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public domain and is
;;;; provided with... | null | https://raw.githubusercontent.com/sbcl/sbcl/8db39e18758349d3ad4acdf1514ead8b19bf9d7f/src/code/readtable.lisp | lisp | READTABLEs
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
constants for readtable character attributes. These are all as in
the manual.
code in CHAR-CLASS{,2,3} in the reader implementat... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB-IMPL")
(sb-xc:deftype attribute-table ()
`(simple-array (unsigned-byte 8) (,base-char-code-limit)))
FIX... |
607862bca2eb315d88e020767dcac4bd9d05b11ef9b00eb18e86a2f8d8942535 | programaker-project/Programaker-Core | automate_coordination_app.erl | %%%-------------------------------------------------------------------
@doc automate_coordination APP
%% @end
%%%-------------------------------------------------------------------
-module(automate_coordination_app).
-behaviour(application).
%% Application callbacks
-export([start/0, start/2, stop/1]).
%%========... | null | https://raw.githubusercontent.com/programaker-project/Programaker-Core/ef10fc6d2a228b2096b121170c421f5c29f9f270/backend/apps/automate_coordination/src/automate_coordination_app.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
Application callbacks
====================================================================
API
====================================================================
------------... | @doc automate_coordination APP
-module(automate_coordination_app).
-behaviour(application).
-export([start/0, start/2, stop/1]).
start() ->
automate_coordination_sup:start_link().
start(_StartType, _StartArgs) ->
start().
stop(_State) ->
ok.
Internal functions
|
1536a9df668212765d73db4629a654aa98984e0cea72e6a967aab9fa01ce4fa3 | titola/incudine | types.lisp | (in-package :incudine-tests)
;; Foreign types.
(deftest arg-types.1
(progn
(define-ugen arg-test-1 list ((a foreign-float) (b foreign-double)
(c int32) (d int64) (p foreign-pointer))
(list a b c d (cffi:null-pointer-p p)))
(let* ((u (funcall (arg-test-1 1 2 3... | null | https://raw.githubusercontent.com/titola/incudine/325174a54a540f4daa67bcbb29780073c35b7b80/tests/vug/types.lisp | lisp | Foreign types.
Foreign types (alias).
Coercing of the numbers inside WITH.
Foreign pointer test. | (in-package :incudine-tests)
(deftest arg-types.1
(progn
(define-ugen arg-test-1 list ((a foreign-float) (b foreign-double)
(c int32) (d int64) (p foreign-pointer))
(list a b c d (cffi:null-pointer-p p)))
(let* ((u (funcall (arg-test-1 1 2 3 4 (cffi:null-poin... |
bc1cacde97b15223cd3e389c2118a11ee9a46c68f4e056b9494e850f00e683cb | SNePS/SNePS2 | driver.lisp | -*- Mode : Lisp ; Syntax : Common - Lisp ; Package : SNEPSUL ; -*-
Copyright ( C ) 1984 - -2013
Research Foundation of State University of New York
Version : $ I d : driver.lisp , v 1.2 2013/08/28 19:07:23 shapiro Exp $
;; This file is part of SNePS.
$ BEGIN LICENSE$
The contents of this file are subj... | null | https://raw.githubusercontent.com/SNePS/SNePS2/d3862108609b1879f2c546112072ad4caefc050d/demo/snere/arcinfo/driver.lisp | lisp | Syntax : Common - Lisp ; Package : SNEPSUL ; -*-
This file is part of SNePS.
you may
not use this file except in compliance with the License. You
may obtain a copy of the License at
. edu/sneps/Downloads/ubpl.pdf.
or implied. See the License for the specific language gov
erning rights and limitations under ... |
Copyright ( C ) 1984 - -2013
Research Foundation of State University of New York
Version : $ I d : driver.lisp , v 1.2 2013/08/28 19:07:23 shapiro Exp $
$ BEGIN LICENSE$
The contents of this file are subject to the University at
Software distributed under the License is distributed on an
" AS IS " ba... |
fce5a65ca5ed757a00ad5c91669d7023e2ef58cde852126fe82bdc9757d580a2 | xxyzz/SICP | Exercise_3_17.rkt | #lang racket/base
(define (find-in-list item l)
(cond [(null? l) #f]
[(eq? item (mcar l)) #t]
[else (find-in-list item (mcdr l))]))
(define (count-pairs x)
(define (iter pair counted-list count)
(cond [(null? pair) count]
[(find-in-list (mcar pair) counted-list) count]
[(no... | null | https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/3_Modularity_Objects_and_State/3.3_Modeling_with_Mutable_Data/Exercise_3_17.rkt | racket | #lang racket/base
(define (find-in-list item l)
(cond [(null? l) #f]
[(eq? item (mcar l)) #t]
[else (find-in-list item (mcdr l))]))
(define (count-pairs x)
(define (iter pair counted-list count)
(cond [(null? pair) count]
[(find-in-list (mcar pair) counted-list) count]
[(no... | |
351e340024658ecf7269e0ea251e3fe379fbd2ffcabb9e682d68b5cbea97a24a | racket/racket7 | input-port.rkt | #lang racket/base
(require "../common/check.rkt"
"../host/thread.rkt"
"port.rkt"
"evt.rkt")
(provide prop:input-port
input-port?
->core-input-port
(struct-out core-input-port)
make-core-input-port)
(define-values (prop:input-port input-port-via-property? ... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/io/port/input-port.rkt | racket | This function should not be called in atomic mode,
since it can invoke an artitrary function
Various functions below are called in atomic mode. The intent of
atomic mode is to ensure that the completion and return of the
function is atomic with respect to some further activity, such
as position and line counting.... | #lang racket/base
(require "../common/check.rkt"
"../host/thread.rkt"
"port.rkt"
"evt.rkt")
(provide prop:input-port
input-port?
->core-input-port
(struct-out core-input-port)
make-core-input-port)
(define-values (prop:input-port input-port-via-property? ... |
e31f3218a7037008ac554b366bb4f293d8101e8fdd93da6bc52fcdc4332f937c | kudu-dynamics/blaze | Main.hs | module Main where
import Blaze.Prelude
import Blaze.Util.MLIL
import qualified Data.Text as Text
main :: IO ()
main = getArgs >>= \case
[opName, binPath] -> do
xs <- getInstructionsWithOpByName (Text.pack opName) binPath
mapM_ p xs
putText "[finished]"
exitSuccess
where
p (fn, ix) = putTe... | null | https://raw.githubusercontent.com/kudu-dynamics/blaze/a385bb3b37a0a0e061217ebdd70dd0eecbb20332/app/find_mlil/Main.hs | haskell | module Main where
import Blaze.Prelude
import Blaze.Util.MLIL
import qualified Data.Text as Text
main :: IO ()
main = getArgs >>= \case
[opName, binPath] -> do
xs <- getInstructionsWithOpByName (Text.pack opName) binPath
mapM_ p xs
putText "[finished]"
exitSuccess
where
p (fn, ix) = putTe... | |
5520229b0715c7aafc780c3375652821e97c2de8eda0fbae15b8713f87224338 | jpmonettas/clindex | data_readers.clj | {url clindex.utils/read-url}
| null | https://raw.githubusercontent.com/jpmonettas/clindex/77097d80a23aa85d2ff50e55645a1452f2dcb3c0/src/data_readers.clj | clojure | {url clindex.utils/read-url}
| |
a1a8bcb1906627a30b08ca4655c3713168720b1a78b6d063efcd7da4d6123215 | mon-key/unicly | unicly-uuid-version.lisp | : FILE - CREATED < Timestamp : # { 2011 - 08 - 17T16:19:17 - 04:00Z}#{11333 } - by MON >
;;; :FILE unicly/unicly-uuid-version.lisp
;;; ==============================
(in-package #:unicly)
;; *package*
;; %uuid-uuid-version-if
(declaim (inline %uuid-uuid-version-if))
(defun %uuid-uuid-version-if (uuid-time-high-a... | null | https://raw.githubusercontent.com/mon-key/unicly/f9bd21446f35e28766d2f1ada2741399b14d93cb/unicly-uuid-version.lisp | lisp | :FILE unicly/unicly-uuid-version.lisp
==============================
*package*
%uuid-uuid-version-if
:TEST (signals succesfully)
(let ((v4uuid (make-v4-uuid)))
(%uuid-uuid-version-if (slot-value v4uuid '%uuid_time-high-and-version) v4uuid))
==============================
,---- RFC4122 4.1.3. Subsection "Vers... | : FILE - CREATED < Timestamp : # { 2011 - 08 - 17T16:19:17 - 04:00Z}#{11333 } - by MON >
(in-package #:unicly)
(declaim (inline %uuid-uuid-version-if))
(defun %uuid-uuid-version-if (uuid-time-high-and-version uuid)
( setf ( slot - value v4uuid ' % uuid_time - high - and - version ) # xFFFF )
(declare (type... |
dbffb5a3b55f70bd8cf517180adfe65ea1babd48104e13216a92d5633534f803 | FranklinChen/hugs98-plus-Sep2006 | GeislerTest.hs | module Main where
import Xml2Haskell
generated with DtdToHaskell from Geisler.dtd
readFoo :: IO Foo
readFoo = readXml "-"
writeFoo :: Foo -> IO ()
writeFoo = writeXml "-"
main = do
foo <- readFoo
writeFoo foo
| null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/HaXml/bugs/GeislerTest.hs | haskell | module Main where
import Xml2Haskell
generated with DtdToHaskell from Geisler.dtd
readFoo :: IO Foo
readFoo = readXml "-"
writeFoo :: Foo -> IO ()
writeFoo = writeXml "-"
main = do
foo <- readFoo
writeFoo foo
| |
7fec94889b38072020c5871c5f1884823eb346115656f1c2de8354328e928c11 | CRogers/obc | growvect.ml |
* growvect.ml
*
* This file is part of the Oxford Oberon-2 compiler
* Copyright ( c ) 2006
* All rights reserved
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1 . Redistribution... | null | https://raw.githubusercontent.com/CRogers/obc/49064db244e0c9d2ec2a83420c8d0ee917b54196/yacc/growvect.ml | ocaml |
* growvect.ml
*
* This file is part of the Oxford Oberon-2 compiler
* Copyright ( c ) 2006
* All rights reserved
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1 . Redistribution... | |
88aafd2bcbaef7a50688fe431a5c84b4f795e9062afc10125cfedd2d43c60e05 | lancelet/wgpu-hs | Device.hs | # LANGUAGE ForeignFunctionInterface #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
{-# OPTIONS_GHC -Wno-deferred-type-errors #-}
-- |
-- Module : WGPU.Internal.Device.
-- Description : Device (open connection to a device).
module WGPU.Internal.Device
( -- * Ty... | null | https://raw.githubusercontent.com/lancelet/wgpu-hs/29c6a7a3f21ec074f3b23e282ea69396bad337cb/wgpu-hs/src-internal/WGPU/Internal/Device.hs | haskell | # OPTIONS_GHC -Wno-deferred-type-errors #
|
Module : WGPU.Internal.Device.
Description : Device (open connection to a device).
* Types
* Functions
-----------------------------------------------------------------------------
| An open connection to a graphics and/or compute device.
A 'Device' may be create... | # LANGUAGE ForeignFunctionInterface #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
module WGPU.Internal.Device
Device (..),
DeviceDescriptor (..),
Features (..),
Limits (..),
requestDevice,
)
where
import Control.Monad.IO.Class (MonadIO, liftI... |
0ce51c0c11706ec5d56c1be0f8e90fb965c03a3e2f272243d122e1077ebf530b | ekmett/guanxi | Cont.hs | # LANGUAGE CPP #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE ViewPatterns #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
-- |
Copyright : ( c ) 2018
License : BSD-2 - Clause OR Apache-2.0
Maintainer ... | null | https://raw.githubusercontent.com/ekmett/guanxi/e267f4210a9c10d0091371ea9b028b7d6fa8b9f3/src/Logic/Cont.hs | haskell | # LANGUAGE RankNTypes #
|
Stability : experimental
Portability: non-portable | # LANGUAGE CPP #
# LANGUAGE PatternSynonyms #
# LANGUAGE ViewPatterns #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
Copyright : ( c ) 2018
License : BSD-2 - Clause OR Apache-2.0
Maintainer : < >
module Logic.Cont whe... |
4a0560dade787c29d667430078faf3dc7dc0556029bff78f874ab90e13f71556 | 8thlight/hyperion | types.clj | (ns hyperion.postgres.types
(:require [chee.coerce :refer [->keyword]]
[hyperion.coerce]
[hyperion.api :refer [unpack pack]]))
(defmethod pack clojure.lang.Keyword [_ value]
(->keyword value))
(defmethod unpack clojure.lang.Keyword [_ value]
(->keyword value))
| null | https://raw.githubusercontent.com/8thlight/hyperion/b1b8f60a5ef013da854e98319220b97920727865/postgres/src/hyperion/postgres/types.clj | clojure | (ns hyperion.postgres.types
(:require [chee.coerce :refer [->keyword]]
[hyperion.coerce]
[hyperion.api :refer [unpack pack]]))
(defmethod pack clojure.lang.Keyword [_ value]
(->keyword value))
(defmethod unpack clojure.lang.Keyword [_ value]
(->keyword value))
| |
835f5728e1b7274c44f67c792aabb186d44afde7fe3efe0fdc75ac8ad7bfeff9 | hyperfiddle/electric | missionary_test.cljc | (ns hyperfiddle.missionary-test
(:require [missionary.core :as m]
[hyperfiddle.rcf :refer [tests tap % with]])
(:import (missionary Cancelled)))
(tests
"flow cancel before transfer"
(def !x (atom 0))
(def >x (m/watch !x))
(def !it (>x (fn [] (tap ::notify))
(fn [] (tap ::termina... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/test/hyperfiddle/missionary_test.cljc | clojure | (ns hyperfiddle.missionary-test
(:require [missionary.core :as m]
[hyperfiddle.rcf :refer [tests tap % with]])
(:import (missionary Cancelled)))
(tests
"flow cancel before transfer"
(def !x (atom 0))
(def >x (m/watch !x))
(def !it (>x (fn [] (tap ::notify))
(fn [] (tap ::termina... | |
15bbf509a831af087025c9266444302fd9c3b3b22e1e51aac5df685a0efbb566 | spawnfest/eep49ers | complex2.erl | -module(complex2).
-export([start/1, stop/0, init/1]).
-export([foo/1, bar/1]).
start(ExtPrg) ->
spawn(?MODULE, init, [ExtPrg]).
stop() ->
complex ! stop.
foo(X) ->
call_port({foo, X}).
bar(Y) ->
call_port({bar, Y}).
call_port(Msg) ->
complex ! {call, self(), Msg},
receive
{complex, Result} ... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/system/doc/tutorial/complex2.erl | erlang | -module(complex2).
-export([start/1, stop/0, init/1]).
-export([foo/1, bar/1]).
start(ExtPrg) ->
spawn(?MODULE, init, [ExtPrg]).
stop() ->
complex ! stop.
foo(X) ->
call_port({foo, X}).
bar(Y) ->
call_port({bar, Y}).
call_port(Msg) ->
complex ! {call, self(), Msg},
receive
{complex, Result} ... | |
1f4be140fa9a11c1bf143c6bdd9ffd1d5a939139833ffca1580904ce6f50204c | otakar-smrz/elixir-fm | B.hs |
module Elixir.Data.Moony.Regular.B (section) where
import Elixir.Lexicon
lexicon = include section
cluster_1 = cluster
|> "b r ^s" <| [
FuCL `noun` {- <bur^s> -} [ ['m','a','t'] ]
`plural` HaFCAL,
HaFCaL `adj` ... | null | https://raw.githubusercontent.com/otakar-smrz/elixir-fm/fae5bab6dd53c15d25c1e147e7787b2c254aabf0/Haskell/ElixirFM/Elixir/Data/Moony/Regular/B.hs | haskell | <bur^s>
<'abra^s>
<barA^s>
<bArA^sUt>
<bar^sam>
<bar^sam>
<bar^samaT>
<bur^sAmaT>
<bur^sAm>
<bur^sAm^gIy>
<bur^sAm^gIyaT>
<bar^sUmIy>
<biri^st>
<bari.s>
<bur.s>
<bara.s>
<'abra.s>
<bara.d>
<burU.d>
<bar.tUz>
<bar.ta`>
<bar.tal>
<tabar.tal>
<bir.tIl>
<bar.tam>
<bur.tUm>... |
module Elixir.Data.Moony.Regular.B (section) where
import Elixir.Lexicon
lexicon = include section
cluster_1 = cluster
|> "b r ^s" <| [
`plural` HaFCAL,
cluster_2 = cluster
|> ['b','A','r','A','^','s','U','t'] <| [
cluster_3 = cluster
|> "b r ^s m" <| [
... |
b58bbc506af5e6d6c7c9e60faf85961a2e11c5a9805d1365435edfc91a6a5ec8 | Clozure/ccl-tests | rotatef.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Apr 20 15:44:38 2003
;;;; Contains: Tests for ROTATEF
(in-package :cl-test)
(deftest rotatef-order.1
(let ((x (vector 'a 'b 'c 'd 'e 'f))
(i 2))
(values
(rotatef (aref x (incf i)) (aref x (incf i)))
x i))
nil
#(a b c e d f)
4)
(deftest ... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/rotatef.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests for ROTATEF
These tests apply rotatef to various accessors
TODO: third,...,tenth
Test that explicit calls to macroexpand in subforms
are done in the correct environment
TODO: macro-function, mask-field, row-major-aref,
logical-pathname-translations, readtable-case | Author :
Created : Sun Apr 20 15:44:38 2003
(in-package :cl-test)
(deftest rotatef-order.1
(let ((x (vector 'a 'b 'c 'd 'e 'f))
(i 2))
(values
(rotatef (aref x (incf i)) (aref x (incf i)))
x i))
nil
#(a b c e d f)
4)
(deftest rotatef-order.2
(let ((x (vector 'a 'b 'c 'd 'e 'f))
(... |
372c987382fd8e92cdb7f52994552897e4a9f0055f61e32dc01c521626bb2b46 | saltlang/saltlang | Driver.hs | Copyright ( c ) 2015 . All rights reserved .
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions
-- are met:
--
1 . Redistributions of source code must retain the above copyright
-- notice, this list of conditions and ... | null | https://raw.githubusercontent.com/saltlang/saltlang/f3478904139f19373f23824f25d28e8be745dc60/src/saltc/Language/Salt/Compiler/Driver.hs | haskell |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer in the
documentation and/or other ma... | Copyright ( c ) 2015 . All rights reserved .
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of the author nor the names of any contributors
THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTO... |
28df670460e29ddcd91cf35728e9af9084002aa44520b581cea5df278f1ddf3d | foshardware/lsc | SVG.hs | Copyright 2018 - < >
SPDX - License - Identifier : GPL-3.0 - or - later
{-# LANGUAGE OverloadedStrings #-}
module LSC.SVG where
import Control.Applicative
import Control.Lens
import Data.Foldable
import Data.Hashable
import Data.IntSet (elems)
import Data.List (intersperse)
import Data.Text (Text)
import qua... | null | https://raw.githubusercontent.com/foshardware/lsc/006c245a89b0a0056286205917438c7d031d04b9/src/LSC/SVG.hs | haskell | # LANGUAGE OverloadedStrings # | Copyright 2018 - < >
SPDX - License - Identifier : GPL-3.0 - or - later
module LSC.SVG where
import Control.Applicative
import Control.Lens
import Data.Foldable
import Data.Hashable
import Data.IntSet (elems)
import Data.List (intersperse)
import Data.Text (Text)
import qualified Data.Text as T
import qualif... |
11aabe95961781ea99353483f46d3cf78aef36ac82b9e5428eef8275ded7ff85 | helins/templ-lib.cljc | user.clj | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns user
"For daydreaming at the REPL."
{:author "{{ developer }}"}
(:require [{{ group }}.{{ name }} :as {{ name }}]
... | null | https://raw.githubusercontent.com/helins/templ-lib.cljc/c2438aaa7c6e1fc11d9f328275987cee6b7720bc/resources/clj/new/helins_lib_cljc/src/dev/user.clj | clojure | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns user
"For daydreaming at the REPL."
{:author "{{ developer }}"}
(:require [{{ group }}.{{ name }} :as {{ name }}]
... | |
c853339bfcade4d19a00fdeddeb896a30d0c289a4f11086aca55760cc26dfc4f | songyahui/AlgebraicEffect | 5_sequence_of_elements.ml | effect Produce : int -> unit
let rec string_of_int_list li : string =
match li with
| [] -> ""
| x :: xs -> string_of_int x ^ "; " ^ string_of_int_list xs
let rec pos li : bool =
match li with
| [] -> true
| x :: xs -> if x <= 0 then false else pos xs
let producer ()
(*@ requires (true, _^* ,()) ... | null | https://raw.githubusercontent.com/songyahui/AlgebraicEffect/27688952b598a101a27523be796e8011d70b02de/src/sp_tests/5_sequence_of_elements.ml | ocaml | @ requires (true, _^* ,()) @
@ ensures (true, Produce(3).Produce(5),()) @
@ requires (true, emp,()) @
@ ensures (true, {l->[1]}.[pos (l)].{l->l++[3]}.[pos (l)].{l->l++[5]},()) @ | effect Produce : int -> unit
let rec string_of_int_list li : string =
match li with
| [] -> ""
| x :: xs -> string_of_int x ^ "; " ^ string_of_int_list xs
let rec pos li : bool =
match li with
| [] -> true
| x :: xs -> if x <= 0 then false else pos xs
let producer ()
=
perform (Produce 3);
... |
59eb2c5fd86e7c46a46fda33c3b4341cf19b59c40ce3be9c83ad885755743033 | openworkload/swm-core | wm_user.erl | -module(wm_user).
-behaviour(gen_server).
-export([start_link/1]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-include("../../lib/wm_log.hrl").
-include("../../lib/wm_entity.hrl").
-include("../../../include/wm_scheduler.hrl").
-record(mstate, {spool = "" :: string})... | null | https://raw.githubusercontent.com/openworkload/swm-core/250facc707739010715cd9f1605b0dda817ab05c/src/srv/user/wm_user.erl | erlang | ============================================================================
API
============================================================================
============================================================================
Callbacks
=====================================================================... | -module(wm_user).
-behaviour(gen_server).
-export([start_link/1]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-include("../../lib/wm_log.hrl").
-include("../../lib/wm_entity.hrl").
-include("../../../include/wm_scheduler.hrl").
-record(mstate, {spool = "" :: string})... |
20e3ef1c3d3196a6ee29caffce34d68b099b2ff995228da4707a3a6f58ab2ac8 | inhabitedtype/ocaml-aws | deleteCustomAvailabilityZone.ml | open Types
open Aws
type input = DeleteCustomAvailabilityZoneMessage.t
type output = DeleteCustomAvailabilityZoneResult.t
type error = Errors_internal.t
let service = "rds"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_op... | null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/rds/lib/deleteCustomAvailabilityZone.ml | ocaml | open Types
open Aws
type input = DeleteCustomAvailabilityZoneMessage.t
type output = DeleteCustomAvailabilityZoneResult.t
type error = Errors_internal.t
let service = "rds"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_op... | |
37858549ce00ed33a7116ff8e7d1f3f8ea554ec0ca24fbd755579c9a5a059e74 | erlymon/erlymon | em_tk103_protocol.erl | %%%-------------------------------------------------------------------
@author
( C ) 2015 , < >
%%% @doc
Erlymon is an open source GPS tracking system for various GPS tracking devices .
%%%
Copyright ( C ) 2015 , < > .
%%%
This file is part of Erlymon .
%%%
Erlymon is free software : yo... | null | https://raw.githubusercontent.com/erlymon/erlymon/2250619783d6da1e33a502911a8fa52ce016c094/apps/erlymon/src/em_hardware/protocols/em_tk103_protocol.erl | erlang | -------------------------------------------------------------------
@doc
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
along with this program. If not, see </>.
@end
-------------------------------------------------------... | @author
( C ) 2015 , < >
Erlymon is an open source GPS tracking system for various GPS tracking devices .
Copyright ( C ) 2015 , < > .
This file is part of Erlymon .
Erlymon is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Publ... |
3fafaa8a1db47564eac353181c06fd71bb32e957923ff32a25b73e82b1da3f6c | evturn/haskellbook | 30.07-our-exceptions.hs | module OurExceptions where
import Control.Exception
data EATD = NotEven Int
| NotDivThree Int
deriving (Eq, Show)
instance Exception EATD
evenAndThreeDiv :: Int -> IO Int
evenAndThreeDiv i
| rem i 3 /= 0 = throwIO (NotDivThree i)
| even i = throwIO (NotEven i)
| other... | null | https://raw.githubusercontent.com/evturn/haskellbook/3d310d0ddd4221ffc5b9fd7ec6476b2a0731274a/30/30.07-our-exceptions.hs | haskell | catchNotDivThree = catch
catchNotEven :: IO Int -> (NotEven -> IO Int) -> IO Int
catchNotEven = catch | module OurExceptions where
import Control.Exception
data EATD = NotEven Int
| NotDivThree Int
deriving (Eq, Show)
instance Exception EATD
evenAndThreeDiv :: Int -> IO Int
evenAndThreeDiv i
| rem i 3 /= 0 = throwIO (NotDivThree i)
| even i = throwIO (NotEven i)
| other... |
d1449ca52b8272b5880f9f0745e87b3546d5c4b492366fd6fea9db033932f6d0 | RDTK/generator | mixins.lisp | ;;;; mixins.lisp --- Generic mixin classes used by project, templates, etc.
;;;;
Copyright ( C ) 2012 - 2019 Jan Moringen
;;;;
Author : < >
(cl:in-package #:build-generator.model.variables)
;;; `direct-variables-mixin'
(defclass direct-variables-mixin ()
((variables :initarg :variables
:type ... | null | https://raw.githubusercontent.com/RDTK/generator/8d9e6e47776f2ccb7b5ed934337d2db50ecbe2f5/src/model/variables/mixins.lisp | lisp | mixins.lisp --- Generic mixin classes used by project, templates, etc.
`direct-variables-mixin'
alist
`builtin-entries-mixin' | Copyright ( C ) 2012 - 2019 Jan Moringen
Author : < >
(cl:in-package #:build-generator.model.variables)
(defclass direct-variables-mixin ()
((variables :initarg :variables
:accessor %direct-variables
:reader direct-variables
:initform '()
:documenta... |
45d19f55394edb2af28f1c585d9ba25a9312b6674808b2293e6a7d9546ba8af7 | pierric/neural-network | SIMD.hs | module Data.NeuralNetwork.Backend.BLASHS.SIMD where
import Data.Vector.Storable.Mutable as MV
import qualified Data.Vector.Storable as SV
import Data.Primitive.SIMD
import Control.Exception
import Control.Monad
class Num (SIMDPACK a) => SIMDable a where
type SIMDPACK a
konst :: a -> SIMDPACK a
foreach :: (SIMD... | null | https://raw.githubusercontent.com/pierric/neural-network/406ecaf334cde9b10c9324e1f6c4b8663eae58d7/Backend-blashs/vec512/Data/NeuralNetwork/Backend/BLASHS/SIMD.hs | haskell | module Data.NeuralNetwork.Backend.BLASHS.SIMD where
import Data.Vector.Storable.Mutable as MV
import qualified Data.Vector.Storable as SV
import Data.Primitive.SIMD
import Control.Exception
import Control.Monad
class Num (SIMDPACK a) => SIMDable a where
type SIMDPACK a
konst :: a -> SIMDPACK a
foreach :: (SIMD... | |
e5d6cd773bdaa85b526d463a51f9b1f76ce601821faf03342a22bd110743bb66 | mtravers/goddinpotty | database_test.clj | (ns goddinpotty.database-test
(:require [goddinpotty.database :refer :all]
[goddinpotty.parser :as parser]
[clojure.test :refer :all]))
(deftest content-refs-test
(is (= #{"wizards" "light"}
;; This is trick for referring to non-public fn, good to know...
(set (#'block-ref... | null | https://raw.githubusercontent.com/mtravers/goddinpotty/d1abee0b2c06b0d5f264ce08b18ba7d14ad92c1c/test/goddinpotty/database_test.clj | clojure | This is trick for referring to non-public fn, good to know... | (ns goddinpotty.database-test
(:require [goddinpotty.database :refer :all]
[goddinpotty.parser :as parser]
[clojure.test :refer :all]))
(deftest content-refs-test
(is (= #{"wizards" "light"}
(set (#'block-refs {:parsed (parser/parse-to-ast "Do not meddle in the affairs of #wizards,... |
249cdd8bb8401ed14778142048b708a3055e2d4c311323af3f8e13eca361bf4c | rcherrueau/rastache | renderer.rkt | #lang racket/base
; /\ \__ /\ \
; _ __ __ ____\ \ ,_\ __ ___\ \ \___ __
/\`'__\/'__`\ /',__\\ \ \/ /'__`\ /'___\ \ _ ` \ /'__`\
; \ \ \//\ \L\.\_/\__, `\\ \ \_/\ \L\.\_/\ \__/\ \ \ \ \/\ __/
\ \_\\ \__/.\_\/\____/ \ \__\ \__/.\_\ \____\\ \_\ \... | null | https://raw.githubusercontent.com/rcherrueau/rastache/059d00c83416f8ba27cc38fa7f8321b075756d14/rastache/renderer.rkt | racket | /\ \__ /\ \
_ __ __ ____\ \ ,_\ __ ___\ \ \___ __
\ \ \//\ \L\.\_/\__, `\\ \ \_/\ \L\.\_/\ \__/\ \ \ \ \/\ __/
\/_/ \/__/\/_/\/___/ \/__/\/__/\/_/\/____/ \/_/\/_/\/____/
Mustache template engine for Racket
Mustache template renderer.
Reads a list of... | #lang racket/base
/\`'__\/'__`\ /',__\\ \ \/ /'__`\ /'___\ \ _ ` \ /'__`\
\ \_\\ \__/.\_\/\____/ \ \__\ \__/.\_\ \____\\ \_\ \_\
(provide render)
(require "commons.rkt"
"parser.rkt"
racket/match
net/url
xml)
(define rast-context? hash?)
# f.
(define (lookup c... |
56b9c47154a4763061c0af3a242aec0442e9dc48a8d8233c58446aad3bf04efa | roman01la/clojurescript-workshop | core.cljs | ;; Composition & partial application
(def coll [1 2 3 4 5])
# 1
8
# 2
(def crunch-numbers (comp #(reduce + %)
#(filter odd? %)
#(map inc %)))
8
# 3
(def crunch-numbers (comp (partial reduce +)
(partial filter odd?)
... | null | https://raw.githubusercontent.com/roman01la/clojurescript-workshop/48b02266d65cae8113edd4ce34c4ab282ad256d1/06.higher_order_fns/core.cljs | clojure | Composition & partial application
takes some time
immediately returns cached result
immediately returns cached result
Identity
Juxtaposition |
(def coll [1 2 3 4 5])
# 1
8
# 2
(def crunch-numbers (comp #(reduce + %)
#(filter odd? %)
#(map inc %)))
8
# 3
(def crunch-numbers (comp (partial reduce +)
(partial filter odd?)
(partial map inc)))
... |
39e07fb5bb21bb739ceeff9c00f791b9af3b985008f71f59eddc4c39e05f9a86 | wdebeaum/step | balance.lisp | ;;;;
;;;; W::BALANCE
;;;;
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::BALANCE
(SENSES
((LF-PARENT ONT::balance-scale) (TEMPL COUNT-PRED-TEMPL)
(META-DATA :ORIGIN CALO :ENTRY-DATE 20040204 :CHANGE-DATE NIL
:COMMENTS HTML-PURCHASING-CORPUS))))
))
(define-words :pos W::v :TEMPL AGE... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/balance.lisp | lisp |
W::BALANCE
BE-AT-LOC) |
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::BALANCE
(SENSES
((LF-PARENT ONT::balance-scale) (TEMPL COUNT-PRED-TEMPL)
(META-DATA :ORIGIN CALO :ENTRY-DATE 20040204 :CHANGE-DATE NIL
:COMMENTS HTML-PURCHASING-CORPUS))))
))
(define-words :pos W::v :TEMPL AGENT-FORMAL-XP-TEMPL
:words... |
0dbb249f81288728ef5d0c10d70e87915c47c11b1e894f35e9fceb007e542b03 | fpco/th-utilities | FixQ.hs | # LANGUAGE CPP #
-- | A compat module to take fixed points in 'Q'.
module TH.FixQ (fixQ) where
#if MIN_VERSION_template_haskell(2,17,0)
import Control.Monad.Fix (mfix)
import Language.Haskell.TH.Syntax (Q (..))
fixQ :: (a -> Q a) -> Q a
fixQ = mfix
#else
We do n't have a MonadFix instance for Q
import Control.Con... | null | https://raw.githubusercontent.com/fpco/th-utilities/893adcb8a2f7b48342d4f63e816cda2217629f7b/src/TH/FixQ.hs | haskell | | A compat module to take fixed points in 'Q'. | # LANGUAGE CPP #
module TH.FixQ (fixQ) where
#if MIN_VERSION_template_haskell(2,17,0)
import Control.Monad.Fix (mfix)
import Language.Haskell.TH.Syntax (Q (..))
fixQ :: (a -> Q a) -> Q a
fixQ = mfix
#else
We do n't have a MonadFix instance for Q
import Control.Concurrent.MVar (newEmptyMVar, readMVar, putMVar)
imp... |
07f6570d25c74b72b38869346b0ab9428a67a83eccc39f8853f8586a1f571693 | konfig-xyz/rust-reason-parser | SchemaParser.hs | {-# LANGUAGE OverloadedStrings #-}
module SchemaParser (parseTypeContainer, parseSchema) where
import Data.Set (member)
import qualified Data.Text as T
import Text.Parsec
import Type.Reflection.Unsafe
import Types
data TypeName = Simple T.Text | Qual... | null | https://raw.githubusercontent.com/konfig-xyz/rust-reason-parser/71b7d79bca485e0c67835ec477dbf9760746385f/src/SchemaParser.hs | haskell | # LANGUAGE OverloadedStrings # |
module SchemaParser (parseTypeContainer, parseSchema) where
import Data.Set (member)
import qualified Data.Text as T
import Text.Parsec
import Type.Reflection.Unsafe
import Types
data TypeName = Simple T.Text | Qualified (T.Text, T.Text)
deriving (... |
06fbad30a5415b4c05e3dd5e0f2dddbedf82c704271d04c8f819ab785e4abfcc | janestreet/core | doubly_linked_intf.ml | * Doubly - linked lists .
Compared to other doubly - linked lists , in this one :
1 . Calls to modification functions ( [ insert * ] , [ move * ] , ... ) detect if the list is
being iterated over ( [ iter ] , [ fold ] , ... ) , and if so raise an exception . For example ,
a use like the foll... | null | https://raw.githubusercontent.com/janestreet/core/f382131ccdcb4a8cd21ebf9a49fa42dcf8183de6/core/src/doubly_linked_intf.ml | ocaml | * pointer equality
* pointer equality
* [fold_elt t ~init ~f] is the same as fold, except [f] is called with the ['a
Elt.t]'s from the list instead of the contained ['a] values.
Note that like other iteration functions, it is an error to mutate [t] inside the
fold. If you'd like to call [remove] on... | * Doubly - linked lists .
Compared to other doubly - linked lists , in this one :
1 . Calls to modification functions ( [ insert * ] , [ move * ] , ... ) detect if the list is
being iterated over ( [ iter ] , [ fold ] , ... ) , and if so raise an exception . For example ,
a use like the foll... |
fac2812561fd65a80c89d8538966fbcdb433a6b05ee2946c0a56a6671dada925 | seancorfield/usermanager-example | main.clj | copyright ( c ) 2019 - 2023 , all rights reserved
(ns usermanager.main
"This is an example web application, using just a few basic Clojure
libraries: Ring, Compojure, Component, Selmer, and next.jdbc.
I recommend this as a good way to get started building web applications
in Clojure so that you understand... | null | https://raw.githubusercontent.com/seancorfield/usermanager-example/1a58880c692a68a7f46796fee66d13dabe170300/src/usermanager/main.clj | clojure | http-kit instead, uncomment this line...
[org.httpkit.server :refer [run-server]]
Implement your application's lifecycle here:
Although the application config is not used in this simple
case, it probably would be in the general case -- and the
application state here is trivial but could be more complex.
configur... | copyright ( c ) 2019 - 2023 , all rights reserved
(ns usermanager.main
"This is an example web application, using just a few basic Clojure
libraries: Ring, Compojure, Component, Selmer, and next.jdbc.
I recommend this as a good way to get started building web applications
in Clojure so that you understand... |
095ca24869ccbfbd74a0b9c7a23df5903bcd0de1a799eefd307356ee75815116 | leandrosilva/cameron | cameron_job_runner.erl | @author < >
2011 .
%% @doc The gen_server responsable to execute a process instance, which we call job.
-module(cameron_job_runner).
-author('Leandro Silva <>').
-behaviour(gen_server).
% admin api
-export([start_link/2, dump/1, stop/1]).
% public api
-export([run_job/1, handle_task/2]).
% gen_server call... | null | https://raw.githubusercontent.com/leandrosilva/cameron/34051395b620d2c3cb2cb63c854e65234786a176/src/cameron_job_runner.erl | erlang | @doc The gen_server responsable to execute a process instance, which we call job.
admin api
public api
gen_server callbacks
Includes and Records ---------------------------------------------------------------------------
Admin API --------------------------------------------------------------------------------... | @author < >
2011 .
-module(cameron_job_runner).
-author('Leandro Silva <>').
-behaviour(gen_server).
-export([start_link/2, dump/1, stop/1]).
-export([run_job/1, handle_task/2]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-include("cameron.hrl").
-record... |
ad57f17b864b4fff4ebc9ef3fd84262e407f4b33d5927337a358fdd6d6a12bee | alex-hhh/ActivityLog2 | trends-bavg.rkt | #lang racket/base
;; trends-bavg.rkt -- aggregate best-average chart
;;
;; This file is part of ActivityLog2, an fitness activity tracker
Copyright ( C ) 2016 , 2018 , 2019 , 2020 , 2021 < >
;;
;; This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public L... | null | https://raw.githubusercontent.com/alex-hhh/ActivityLog2/1a63a10a9100bd1a33c74896acfcb68f2cb75e9c/rkt/trend-charts/trends-bavg.rkt | racket | trends-bavg.rkt -- aggregate best-average chart
This file is part of ActivityLog2, an fitness activity tracker
This program is free software: you can redistribute it and/or modify it
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
without even the implied warranty... | #lang racket/base
Copyright ( C ) 2016 , 2018 , 2019 , 2020 , 2021 < >
under the terms of the GNU General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option )
(require data-frame
data-frame/private/spline
pict
pict/sn... |
35a260b142585b985810f11f07b06e660aad3b174a18e64314f0d85841aed9e8 | argp/bap | piqic_ocaml_types.ml | pp camlp4o -I ` ocamlfind query piqi.syntax ` pa_labelscope.cmo pa_openin.cmo
Copyright 2009 , 2010 , 2011 , 2012 , 2013
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at ... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/libtracewrap/libtrace/piqi/piqi/piqic/piqic_ocaml_types.ml | ocaml |
* generation of Ocaml type declarations
TODO: move to piqic configuration
let gen_cc_cond a b =
if !cc_mode
then a
else b
TODO: this is a dirty method for sharing the setting across all
* piqic_ocaml_* modules
this function will be called only for named types (i.e. typedefs)
imported name
local na... | pp camlp4o -I ` ocamlfind query piqi.syntax ` pa_labelscope.cmo pa_openin.cmo
Copyright 2009 , 2010 , 2011 , 2012 , 2013
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at ... |
8983c4576e9cd34e60ec1d4f15c1398ac16dad474d65857e3819951dbbf687a9 | bittide/bittide-hardware | Node.hs | SPDX - FileCopyrightText : 2022 Google LLC
--
SPDX - License - Identifier : Apache-2.0
{-# OPTIONS_GHC -fconstraint-solver-iterations=6 #-}
{-# LANGUAGE GADTs #-}
module Bittide.Node where
import Clash.Prelude
import Protocols.Wishbone
import Bittide.Calendar
import Bittide.DoubleBufferedRam
import Bittide.Link... | null | https://raw.githubusercontent.com/bittide/bittide-hardware/261e3f9e9c0f639fbae8e84d1b5d2f81f23fcb59/bittide/src/Bittide/Node.hs | haskell |
# OPTIONS_GHC -fconstraint-solver-iterations=6 #
# LANGUAGE GADTs #
however, the 'calendar' is initialized with a single entry of repeated zeroes.
* The 'calendar' for the 'scatterUnitWB'.
* The 'calendar' for the 'gatherUnitWB'.
* The interface of the 'rxUnit' on the 'gppe' side.
* The interface of the 'txUnit' ... | SPDX - FileCopyrightText : 2022 Google LLC
SPDX - License - Identifier : Apache-2.0
module Bittide.Node where
import Clash.Prelude
import Protocols.Wishbone
import Bittide.Calendar
import Bittide.DoubleBufferedRam
import Bittide.Link
import Bittide.ProcessingElement
import Bittide.ScatterGather
import Bittide.S... |
86683170b59a3d58f5f9ad20df94270b95745b7c261e2abf0494086d9c80e93a | tari3x/csec-modex | pitparser.ml | type token =
| CHOICE
| STAR
| COMMA
| LPAREN
| RPAREN
| LBRACKET
| RBRACKET
| BAR
| SEMI
| NEW
| OUT
| IN
| IDENT of (Pitptree.ident)
| STRING of (Pitptree.ident)
| INT of (int)
| REPL
| IF
| THEN
| ELSE
| EQUAL
| FUN
| EQUATION
| REDUCTION
| PREDICATE
| PROCESS
| SL... | null | https://raw.githubusercontent.com/tari3x/csec-modex/5ab2aa18ef308b4d18ac479e5ab14476328a6a50/deps/proverif1.84/src/pitparser.ml | ocaml | CHOICE
STAR
COMMA
LPAREN
RPAREN
LBRACKET
RBRACKET
SEMI
NEW
OUT
IN
REPL
IF
THEN
ELSE
FUN
EQUATION
REDUCTION
PREDICATE
PROCESS
SLASH
LET
QUERY
EVENT
NOT
FREE
RED
WEDGE
COLON
PHASE
WEAKSECRET
TYPE
SET
FORALL
INJEVENT
OR
CHANNEL
DEFINE
EXPAND
YI... | type token =
| CHOICE
| STAR
| COMMA
| LPAREN
| RPAREN
| LBRACKET
| RBRACKET
| BAR
| SEMI
| NEW
| OUT
| IN
| IDENT of (Pitptree.ident)
| STRING of (Pitptree.ident)
| INT of (int)
| REPL
| IF
| THEN
| ELSE
| EQUAL
| FUN
| EQUATION
| REDUCTION
| PREDICATE
| PROCESS
| SL... |
c970dbe9b5c7f329f8c27fa779681dcdd11247709d5c4567927820c605ae4b3c | larcenists/larceny | srfi-69-test.sps | Test suite for SRFI 69
;
$ Id$
(import (rnrs base)
(rnrs io simple)
(rnrs unicode)
(rnrs sorting)
(rnrs arithmetic fixnums)
(srfi :69 basic-hash-tables))
(define (writeln . xs)
(for-each display xs)
(newline))
(define (fail token . more)
(writeln "Error: test failed:... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/lib/SRFI/test/srfi-69-test.sps | scheme |
to the same value. In particular, a symbol might be hashed
the same as its print string.
Not yet tested:
hash-table->alist
hash-table-copy
hash-table-merge!
hash
string-hash
string-ci-hash
hash-by-identity | Test suite for SRFI 69
$ Id$
(import (rnrs base)
(rnrs io simple)
(rnrs unicode)
(rnrs sorting)
(rnrs arithmetic fixnums)
(srfi :69 basic-hash-tables))
(define (writeln . xs)
(for-each display xs)
(newline))
(define (fail token . more)
(writeln "Error: test failed: "... |
3e0bb157f3ec9f5f1189a7e29ad8e0e0820e8b5b22bd0ebfec92ded15b8c77ab | andreabedini/foliage | Pages.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Foliage.Pages
( allPackagesPageTemplate,
allPackageVersionsPageTemplate,
packageVersionPageTemplate,
makeAllPackagesPage,
makePackageVersionPage,
makeAllPackageVersionsPage,
... | null | https://raw.githubusercontent.com/andreabedini/foliage/20049b1e814692731b35f8aec1e3852934ca637a/app/Foliage/Pages.hs | haskell | # LANGUAGE OverloadedStrings #
group package versions by package name
for each package name pick the most recent version
sort them from the most recent version to the least recent
pick the most recent version
turn it into the template data
sort packages by pkgId
collect all cabal file revisions including the ori... | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE TemplateHaskell #
module Foliage.Pages
( allPackagesPageTemplate,
allPackageVersionsPageTemplate,
packageVersionPageTemplate,
makeAllPackagesPage,
makePackageVersionPage,
makeAllPackageVersionsPage,
makeIndexPage,
)
where
impor... |
5b94b02f578866982fef1873249c2a3e9a9adda2a409a79451321fc1cae75f4c | xapi-project/xen-api | xapi_pif_helpers.ml |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... | null | https://raw.githubusercontent.com/xapi-project/xen-api/fa6f118fb512a2c90159368a1a0bc1cc730c895b/ocaml/xapi/xapi_pif_helpers.ml | ocaml | Disallow creating on bond slave
Here we rely on the implementation to guarantee that `Physical` is a terminating case
Disallow creating on bond slave
Here we rely on the implementation to guarantee that `Physical` is a terminating case
Disallow creating on bond slave
Here we rely on the implementation to gua... |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... |
19488cf140cdd2602092e72cb57b5e54474b5efe7425360e4c654e215c0711a3 | scicloj/wadogo | ordinal.clj | (ns wadogo.scale.ordinal
(:require [wadogo.common :refer [scale ->ScaleType strip-keys merge-params]]
[wadogo.utils :refer [ensure-seq-content]]))
(defmethod scale :ordinal
([_] (scale :ordinal {}))
([s params]
(let [{:keys [domain range sort?] :as params} (merge-params s params)
ndomain ... | null | https://raw.githubusercontent.com/scicloj/wadogo/ae293aa28d6da55719c3f2771649c2f2e56b692b/src/wadogo/scale/ordinal.clj | clojure | (ns wadogo.scale.ordinal
(:require [wadogo.common :refer [scale ->ScaleType strip-keys merge-params]]
[wadogo.utils :refer [ensure-seq-content]]))
(defmethod scale :ordinal
([_] (scale :ordinal {}))
([s params]
(let [{:keys [domain range sort?] :as params} (merge-params s params)
ndomain ... | |
d8625a7ed742c504fc83d3b1867624caac7d8232614d42ec64a09d74cec75072 | anwarmamat/cmsc330fall18-public | data.ml | open Funs
(***********************)
Part 2 : Integer BST
(***********************)
type int_tree =
| IntLeaf
| IntNode of int * int_tree * int_tree
let empty_int_tree = IntLeaf
let rec int_insert x t =
match t with
| IntLeaf -> IntNode(x, IntLeaf, IntLeaf)
| IntNode (y, l, r) when x > y -> IntNode (y, l... | null | https://raw.githubusercontent.com/anwarmamat/cmsc330fall18-public/12585d98d45f954f75e2f78df3062444f5f97cf6/p2b/src/data.ml | ocaml | *********************
*********************
Implement the functions below.
*************************
Part 3: Polymorphic BST
*************************
Implement the functions below.
*****************************
***************************** | open Funs
Part 2 : Integer BST
type int_tree =
| IntLeaf
| IntNode of int * int_tree * int_tree
let empty_int_tree = IntLeaf
let rec int_insert x t =
match t with
| IntLeaf -> IntNode(x, IntLeaf, IntLeaf)
| IntNode (y, l, r) when x > y -> IntNode (y, l, int_insert x r)
| IntNode (y, l, r) when x = y -... |
b7bcc5e017ee7cafda106433a4eba722cbbc15807d4c7cd56c08c6eb4ee31bde | tud-fop/vanda-haskell | Shuffle.hs | -----------------------------------------------------------------------------
-- |
-- Module : Data.List.Shuffle
-- Description : shuffling lists
Copyright : ( c ) Technische Universität Dresden 2016
-- License : BSD-style
--
-- Maintainer :
-- Stability : unknown
-- Portability : portable
--
... | null | https://raw.githubusercontent.com/tud-fop/vanda-haskell/3214966361b6dbf178155950c94423eee7f9453e/library/Data/List/Shuffle.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.List.Shuffle
Description : shuffling lists
License : BSD-style
Maintainer :
Stability : unknown
Portability : portable
Shuffling list.
----------------------------------------------------------------... | Copyright : ( c ) Technische Universität Dresden 2016
module Data.List.Shuffle
( shuffle
) where
import Control.Monad (forM)
import Control.Monad.ST
import Data.Array.MArray.Safe (newListArray)
import Data.Array.ST.Safe
import Data.STRef
import System.Random (RandomGen, randomR)
| Shuffle a list using a g... |
812cc7614286b62d814d0cd6eca4b8ac8dde9f828988391fc3cc25e407ff8a93 | clash-lang/clash-compiler | Modelsim.hs | # LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
module Test.Tasty.Modelsim where
import Control.Monad (forM_)
import Data.Coerce (coerce)
import qualified Data.List as List
import Data.Proxy
import ... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/fe65a65b993f58b779b4be01340df441fa3996eb/tests/src/Test/Tasty/Modelsim.hs | haskell | | @--modelsim@ flag for enabling tests that use modelsim.
^ Shared temporary directory
^ Directory to work from
^ Expected failure code and output (if any)
^ Entry point to simulate
See Note [copy data files hack]
TODO: remove -voptargs=+acc=p for a next release of questa intel edition | # LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeApplications #
module Test.Tasty.Modelsim where
import Control.Monad (forM_)
import Data.Coerce (coerce)
import qualified Data.List as List
import Data.Proxy
import ... |
bc71b70d4c52f636988ec758969f339c61c9efddf59f8273c009b6800851ebb7 | tezos/tezos-mirror | test_srs.ml | (*****************************************************************************)
(* *)
MIT License
Copyright ( c ) 2022 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/603edb19d5217fcf0cc1036effe617d78a6ba265/src/lib_bls12_381_polynomial/test/test_srs.ml | ocaml | ***************************************************************************
Permission is hereby granted, free of charge, to any person obtaining a
copy of this so... | MIT License
Copyright ( c ) 2022 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS... |
ee41b94a097951f654c58364df2b8c6cfe35a1c9697e61ea606a71b94020b440 | DaveWM/lobster-writer | editable_list.cljs | (ns lobster-writer.components.editable-list
(:require [reagent.core :as reagent]
[lobster-writer.utils :as utils]))
(defn editable-list []
(let [*input-text (reagent/atom "")]
(fn [{:keys [on-item-added on-item-removed on-item-moved-up on-item-moved-down label-fn items]
:or {label-fn ide... | null | https://raw.githubusercontent.com/DaveWM/lobster-writer/98eef942cc61725f0a2e00c34e6952c1e262f1ad/src/cljs/lobster_writer/components/editable_list.cljs | clojure | (ns lobster-writer.components.editable-list
(:require [reagent.core :as reagent]
[lobster-writer.utils :as utils]))
(defn editable-list []
(let [*input-text (reagent/atom "")]
(fn [{:keys [on-item-added on-item-removed on-item-moved-up on-item-moved-down label-fn items]
:or {label-fn ide... | |
a39915f81a9309927a8d4877354e867dc15a93b05c7c512146afb51837f4a7e6 | RefactoringTools/HaRe | BCpp.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE CPP #
Check that we can parse a file which requires CPP
module BCpp where
bob :: Int -> Int -> Int
#if __GLASGOW_HASKELL__ > 704
bob x y = x + y
#else
bob x y = x + y * 2
#endif
| null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/BCpp.hs | haskell | # LANGUAGE FlexibleInstances #
# LANGUAGE CPP #
Check that we can parse a file which requires CPP
module BCpp where
bob :: Int -> Int -> Int
#if __GLASGOW_HASKELL__ > 704
bob x y = x + y
#else
bob x y = x + y * 2
#endif
| |
9af67d7cbc02b511a67726d2d225b93bfc6663ca3c76340480990bbcfd07d749 | synduce/Synduce | Reduce.mli | open Term
module CondTree : sig
type 'a t =
| CBr of 'a
| CIf of term * 'a t * 'a t
val to_term : term t -> term
val of_term : term -> term t
val map : 'a t -> f:('a -> 'b) -> 'b t
val all_or_none : 'a option t -> 'a t option
end
type func_resolution =
| FRFun of fpattern list * term
| FRPmrs o... | null | https://raw.githubusercontent.com/synduce/Synduce/42d970faa863365f10531b19945cbb5cfb70f134/src/lang/Reduce.mli | ocaml | * Resolve the funcion definiton of a term in an environment.
* Project irreducible terms into tuples.
*
[until_irreducible f t] applies [f] to [t] until [t] is unchanged by application of [f] or we have
reached the limit of rewrites Reduce._MAX.
@param f A function that returns a pair of a term and a boolean. I... | open Term
module CondTree : sig
type 'a t =
| CBr of 'a
| CIf of term * 'a t * 'a t
val to_term : term t -> term
val of_term : term -> term t
val map : 'a t -> f:('a -> 'b) -> 'b t
val all_or_none : 'a option t -> 'a t option
end
type func_resolution =
| FRFun of fpattern list * term
| FRPmrs o... |
630bc0414dfb5a28ab62b8f772a4ccb9d0b2dcabc1b228194b39e0b2633a4e8a | FlowForwarding/loom | tap_yaws.erl | %%------------------------------------------------------------------------------
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable la... | null | https://raw.githubusercontent.com/FlowForwarding/loom/86a9c5aa8b7d4776062365716c9a3dbbf3330bc5/tapestry/apps/tapestry/src/tap_yaws.erl | erlang | ------------------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, eithe... | Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author Infoblox Inc < >
2013 Infoblox Inc
-module(tap_yaws).
-behavior(gen_server).
-export([start_link/1]).
-export([init/1,
handle_call/3,
handle_... |
f6449aef2505adf372d5a70c9425f569b63b8b47571f95b06a918c56123c0c63 | quark-lang/quark | Expression.hs | module Core.Parser.AST.Expression where
import Core.Parser.AST.Literal
import Core.Utility.Color (bold, bBlue)
data Expression
= Node Expression [Expression]
| List [Expression]
| Literal Literal
| Quoted Expression
| Identifier String
deriving Eq
instance Show Expression where
sho... | null | https://raw.githubusercontent.com/quark-lang/quark/e3dc7fff4e4dfba3e5c9ab71f10ede8bc5a30a44/app/Core/Parser/AST/Expression.hs | haskell | module Core.Parser.AST.Expression where
import Core.Parser.AST.Literal
import Core.Utility.Color (bold, bBlue)
data Expression
= Node Expression [Expression]
| List [Expression]
| Literal Literal
| Quoted Expression
| Identifier String
deriving Eq
instance Show Expression where
sho... | |
40485fc1d87f969349e5b8fe0049223f2acd5be943a65c28bc9019cb6826d936 | abarbu/haskell-torch | Inplace.hs | # LANGUAGE AllowAmbiguousTypes , CPP , ConstraintKinds , DataKinds , FlexibleContexts , FlexibleInstances , FunctionalDependencies , GADTs #
# LANGUAGE KindSignatures , MultiParamTypeClasses , OverloadedLabels , OverloadedStrings , PartialTypeSignatures , PolyKinds , RankNTypes #
# LANGUAGE ScopedTypeVariables , Templa... | null | https://raw.githubusercontent.com/abarbu/haskell-torch/e0afcaf81b78e9211ba120dcd247f9a6112b57ab/haskell-torch/src/Torch/Inplace.hs | haskell | # LANGUAGE UndecidableInstances #
# OPTIONS_GHC -pgmP cc -optP -E -optP -undef -optP -std=c89 #
| Operations that mutate tensors.
* Mathematical operations
| x + alpha * y
| x + alpha * y
| x + alpha * y
| x + alph... | # LANGUAGE AllowAmbiguousTypes , CPP , ConstraintKinds , DataKinds , FlexibleContexts , FlexibleInstances , FunctionalDependencies , GADTs #
# LANGUAGE KindSignatures , MultiParamTypeClasses , OverloadedLabels , OverloadedStrings , PartialTypeSignatures , PolyKinds , RankNTypes #
# LANGUAGE ScopedTypeVariables , Templa... |
44b0880bcabc865814cbcd470a0208c2f19f07545ecc019db1378615da77adfd | FranklinChen/hugs98-plus-Sep2006 | Either.hs | # OPTIONS_GHC -fno - implicit - prelude #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Either
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : ex... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/base/Data/Either.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Either
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : portable
The Either type, and associated operations.
-----------------------------... | # OPTIONS_GHC -fno - implicit - prelude #
Copyright : ( c ) The University of Glasgow 2001
module Data.Either (
Either(..),
) where
#ifdef __GLASGOW_HASKELL__
import GHC.Base
|
The ' Either ' type represents values with two possibilities : a value of
type @'Either ' a b@ is either @'Left ' a@ or ' b... |
3377fdaf268c2b23ba7ad57014fa26e0f410e6e1651f02cc4a1c7d16a8556acb | jmlowenthal/staged-streams.agda | Stream.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE MagicHash #-}
-- |
-- Module : Data.List.Stream
Copyright : ( c ) 2007
( c ) 2007 - 2013
-- License : BSD-style
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
A reimplementation of the standard list libra... | null | https://raw.githubusercontent.com/jmlowenthal/staged-streams.agda/3ac5fbff18808a505185c88000a817046de35d0d/lib/stream-fusion-0.1.2.5/Data/List/Stream.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE MagicHash #
|
Module : Data.List.Stream
License : BSD-style
Maintainer :
Stability : experimental
Portability : portable
based on stream fusion for sequences. Described in:
* /Stream Fusion: From Lists to Streams to Nothing at All/, by
</~dons/pap... | Copyright : ( c ) 2007
( c ) 2007 - 2013
A reimplementation of the standard list library to take advantage of
stream fusion , and new GHC optimisations . The fusion mechanism is
, and , ICFP 2007 .
* /Rewriting Haskell Strings/ , by , and
Roman Leshchinskiy... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.