_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 |
|---|---|---|---|---|---|---|---|---|
56f79c38c53818b125415c680bbfefa516772c4776dc11f02f79e7d6b2ee0070 | erszcz/learning | myrec.erl | -module(myrec).
-compile([export_all]).
-record(myrec_v1, {field1 = a}).
-record(myrec_v2, {field1 = a,
field2 = b}).
%% Use after your record versions are defined!
-define(LATEST_RECORD_VERSION, myrec_v2).
-include("versioned_record.hrl").
-undef(LATEST_RECORD_VERSION).
%% This might require appl... | null | https://raw.githubusercontent.com/erszcz/learning/b21c58a09598e2aa5fa8a6909a80c81dc6be1601/erlang-versioned-records/examples/myrec.erl | erlang | Use after your record versions are defined!
This might require application-specific logic - override as applicable.
These are the fields new in v2 along with default values. | -module(myrec).
-compile([export_all]).
-record(myrec_v1, {field1 = a}).
-record(myrec_v2, {field1 = a,
field2 = b}).
-define(LATEST_RECORD_VERSION, myrec_v2).
-include("versioned_record.hrl").
-undef(LATEST_RECORD_VERSION).
upgrade(#myrec_v1{} = V1) ->
vr_lib:upgrade(V1, #myrec_v2{},
... |
15a9f0b7feb8c6968cfe78abe62064f5539f4021f6355f87137e94d481d5daa0 | krajj7/BotHack | scraper.clj | (ns bothack.scraper
"The screen scraper handles redraw events, tries to determine when the frame
is completely drawn and sends off higher-level events. It looks for prompts
and menus and triggers appropriate action selection prompts."
(:require [clojure.tools.logging :as log]
[clojure.string :as st... | null | https://raw.githubusercontent.com/krajj7/BotHack/70226b3c8ed12d29c64068aec0acc0ca71d57adf/src/bothack/scraper.clj | clojure | status may overflow
no text after cursor
assuming there was a topline msg "To what position do you want to be teleported?--More--"
should recover itself
game start
destroy old game
XXX prompt may re-appear in lastmsg+action as topline msg
message about a feature that would normally appear as topline message may... | (ns bothack.scraper
"The screen scraper handles redraw events, tries to determine when the frame
is completely drawn and sends off higher-level events. It looks for prompts
and menus and triggers appropriate action selection prompts."
(:require [clojure.tools.logging :as log]
[clojure.string :as st... |
40fead490d25558b8902f29eb29feaa6d1c9d05d3260f562c529b1575ea4a31e | zadean/xqerl | xs_anyURI_SUITE.erl | -module('xs_anyURI_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['cbcl-anyURI-001'/1]).
-export(['cbcl-anyURI-002'/1]).
-export(['cbcl-anyURI-003'/1])... | null | https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/xs/xs_anyURI_SUITE.erl | erlang | 0Ad%E2%9C%90%F0%98%9A%A0/\")", | -module('xs_anyURI_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['cbcl-anyURI-001'/1]).
-export(['cbcl-anyURI-002'/1]).
-export(['cbcl-anyURI-003'/1])... |
a26342a37c21de0a41df52cea937abf0f161e7a83603cfd52d6f1afbfcb403c2 | abakst/Brisk | data00.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE ScopedTypeVariables #
{-# OPTIONS_GHC -fplugin Brisk.Plugin #-}
# OPTIONS_GHC -fplugin - opt Brisk . Plugin : main #
module Scratch where
import Control.Distributed.Process
import Data.Binary
import Data.Typeable
i... | null | https://raw.githubusercontent.com/abakst/Brisk/3e4ce790a742d3e3b786dba45d36f715ea0e61ef/examples/data00.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveDataTypeable #
# OPTIONS_GHC -fplugin Brisk.Plugin # | # LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fplugin - opt Brisk . Plugin : main #
module Scratch where
import Control.Distributed.Process
import Data.Binary
import Data.Typeable
import GHC.Generics (Generic)
data PingMessage = Ping ProcessId | Pong ProcessId
deriving (Type... |
415d42554d3540e65598fc622c28dbf36799e1df80dacf4763236889dd8d446a | wargrey/w3s | compact.rkt | #lang typed/racket/base
;;; -20021121.html#formal
(provide (all-defined-out))
(require "recognizer.rkt")
(require "../digicore.rkt")
(require "../namespace.rkt")
(require digimon/string)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(struct annotation ([attrib... | null | https://raw.githubusercontent.com/wargrey/w3s/8283bc69bbcde2c935e632e420147f0f65e8c89e/sgml/digitama/relaxng/compact.rkt | racket | -20021121.html#formal
stupid design or bad-written specs
-20021121.html#d0e331
-20021121.html#d0e377
TODO: if prefixes should be added for `include` and `external`
default namespace prefix = uri <==> default namespace = uri; prefix = uri
[xml:uri ""]
(cond [(eq? prefix 'xml) (if (equal? uri xml:uri) #true (m... | #lang typed/racket/base
(provide (all-defined-out))
(require "recognizer.rkt")
(require "../digicore.rkt")
(require "../namespace.rkt")
(require digimon/string)
(struct annotation ([attributes : (Listof (Pairof Symbol String))] [documentations : (Listof String)] [elements : (Listof Annotation-Element)])
#:trans... |
a817477b542f634bd9dcc5d8036e41dd521ad0df6be59554cc96fa0464873708 | tommaisey/aeon | moog-ff.help.scm | (let ((n (mul (white-noise ar) 0.1))
(y (mouse-y kr 100 10000 1 0.1))
(x (mouse-x kr 0 4 0 0.1)))
(audition (moog-ff n y x 0)))
(let* ((p (pulse ar (mce2 40 121) (mce2 0.3 0.7)))
(f0 (lin-lin (lf-noise0 kr 0.43) -1 1 0.001 2.2))
(f1 (lin-lin (sin-osc kr f0 0) -1 1 30 4200))
(y (mouse... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/filters/moog-ff.help.scm | scheme | (let ((n (mul (white-noise ar) 0.1))
(y (mouse-y kr 100 10000 1 0.1))
(x (mouse-x kr 0 4 0 0.1)))
(audition (moog-ff n y x 0)))
(let* ((p (pulse ar (mce2 40 121) (mce2 0.3 0.7)))
(f0 (lin-lin (lf-noise0 kr 0.43) -1 1 0.001 2.2))
(f1 (lin-lin (sin-osc kr f0 0) -1 1 30 4200))
(y (mouse... | |
8395e0de84182c18da7b40e660e1e845c12fce71e4762607855598a44ed0936d | sbcl/sbcl | bug-255.lisp | (defpackage :bug255 (:use :cl))
(in-package :bug255)
(declaim (optimize (safety 3) (debug 2) (speed 2) (space 1)))
(defvar *1*)
(defvar *2*)
(defstruct v a b)
(defstruct w)
(defstruct yam (v nil :type (or v null)))
(defstruct un u)
(defstruct (bod (:include un)) bo)
(defstruct (bad (:include bod)) ba)
(declaim (ftype (... | null | https://raw.githubusercontent.com/sbcl/sbcl/5d0ee10bf7c22d1cb38b54ff1e4582f4c9dda6f5/tests/bug-255.lisp | lisp | (defpackage :bug255 (:use :cl))
(in-package :bug255)
(declaim (optimize (safety 3) (debug 2) (speed 2) (space 1)))
(defvar *1*)
(defvar *2*)
(defstruct v a b)
(defstruct w)
(defstruct yam (v nil :type (or v null)))
(defstruct un u)
(defstruct (bod (:include un)) bo)
(defstruct (bad (:include bod)) ba)
(declaim (ftype (... | |
0bbd381821f6250d473526e6ff91ea1bbfdcc708b3e9429053432602d87bac57 | lamdu/lamdu | Sugar.hs | | Top - level wrapper for Sugar . Convert , Sugar . Parens , Sugar . AddNames
module Lamdu.Sugar
( sugarWorkArea
, Sugar.WorkArea, Sugar.Payload, Sugar.ParenInfo, Sugar.EntityId, Name
) where
import qualified Control.Lens as Lens
import Control.Monad.Once (OnceT, Typeable)
import Con... | null | https://raw.githubusercontent.com/lamdu/lamdu/1aa73fa2783be8d649122f971c97b61760d7d6fe/src/Lamdu/Sugar.hs | haskell | | Top - level wrapper for Sugar . Convert , Sugar . Parens , Sugar . AddNames
module Lamdu.Sugar
( sugarWorkArea
, Sugar.WorkArea, Sugar.Payload, Sugar.ParenInfo, Sugar.EntityId, Name
) where
import qualified Control.Lens as Lens
import Control.Monad.Once (OnceT, Typeable)
import Con... | |
5bb1b4109a22f5c58eee7686240265d9248f282ec016a9d5a24a7bd2330ec31f | jeromesimeon/Galax | namespace_resolve.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/namespace/namespace_resolve.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : namespace_resolve.ml , v 1.9 2007/10/16 01:25:34
open Namespace_names
open Namespace_context
open Namespace_symbols
open Error
Note :
Given namespace environment an unresolved symbol , returns the
resolved sym... |
61c414d9af65965427a73313edabe18d07c06362f0468b7ba840eca49c593ea8 | mwand/eopl3 | scheduler.scm | (module scheduler (lib "eopl.ss" "eopl")
(require "drscheme-init.scm")
(require "queues.scm")
(require "data-structures.scm") ; for continuation?
(require "lang.scm") ; for expval?
(provide
initialize-scheduler!
set-final-answer!
time-expired?
decrement-timer... | null | https://raw.githubusercontent.com/mwand/eopl3/b50e015be7f021d94c1af5f0e3a05d40dd2b0cbf/chapter5/thread-lang/scheduler.scm | scheme | for continuation?
for expval?
the state ;;;;;;;;;;;;;;;;
components of the scheduler state:
initialize-scheduler! : Int -> Unspecified
the final answer ;;;;;;;;;;;;;;;;
place-on-ready-queue! : Thread -> Unspecified
run-next-thread : () -> FinalAnswer
set-final-answer! : ExpVal -> Unspecified
time-expired? : (... | (module scheduler (lib "eopl.ss" "eopl")
(require "drscheme-init.scm")
(require "queues.scm")
(provide
initialize-scheduler!
set-final-answer!
time-expired?
decrement-timer!
place-on-ready-queue!
run-next-thread
)
(define the-ready-queue 'uninitialized) ... |
f1822c58cb6bdf6e3a7d0f037c6b0e0a81c9d34f0612cbffd77daef666b45e82 | deadcode/Learning-CL--David-Touretzky | 7.12.lisp | (defun count-the (x)
(length (remove-if-not #'(lambda (word) (equal word 'the)) x)))
(let ((foo '(count-the '(the quick brown fox jumps over the lazy dog))))
(format t "~s = ~s~%" foo (eval foo)))
| null | https://raw.githubusercontent.com/deadcode/Learning-CL--David-Touretzky/b4557c33f58e382f765369971e6a4747c27ca692/Chapter%207/7.12.lisp | lisp | (defun count-the (x)
(length (remove-if-not #'(lambda (word) (equal word 'the)) x)))
(let ((foo '(count-the '(the quick brown fox jumps over the lazy dog))))
(format t "~s = ~s~%" foo (eval foo)))
| |
c9fba448006e1ac9fee45324288a5a49b2cdd3562dde4e2a85202de7144aeec2 | athoune/erlang-redis-protocol | redis_protocol_dummy.erl | -module(redis_protocol_dummy).
-behaviour(redis_protocol).
-export([start/0]).
-export([handle/3]).
start() ->
redis_protocol:start(6379, ?MODULE).
handle(Connection, State, Action) ->
io:format("Action ~p~n", [Action]),
ok = redis_protocol:answer(Connection, ok),
{ok, [Action | State]}.
| null | https://raw.githubusercontent.com/athoune/erlang-redis-protocol/bdd57967038db01a218a39aa4bc2b2ec4ebc622b/src/redis_protocol_dummy.erl | erlang | -module(redis_protocol_dummy).
-behaviour(redis_protocol).
-export([start/0]).
-export([handle/3]).
start() ->
redis_protocol:start(6379, ?MODULE).
handle(Connection, State, Action) ->
io:format("Action ~p~n", [Action]),
ok = redis_protocol:answer(Connection, ok),
{ok, [Action | State]}.
| |
43f79249ee87ad824e9998e530ef06342096830ef4a1e7123148cb39cb541fe7 | dalaing/little-languages | Value.hs | module Components.Term.Bool.Eval.Value (
bv
, valueInput
) where
import Data.Foldable (asum)
import Control.Lens (preview, review)
import Common.Recursion (Step(..), stepFnToReader)
import Common.Term.Eval.Value (ValueInput(..))
import Components.Term.Bool.Data
valueTmFalse :: WithBoolTerm ty tm
... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/multityped/nb-modular/src/Components/Term/Bool/Eval/Value.hs | haskell | module Components.Term.Bool.Eval.Value (
bv
, valueInput
) where
import Data.Foldable (asum)
import Control.Lens (preview, review)
import Common.Recursion (Step(..), stepFnToReader)
import Common.Term.Eval.Value (ValueInput(..))
import Components.Term.Bool.Data
valueTmFalse :: WithBoolTerm ty tm
... | |
2d4b5dfe15be50bc6e8b10d72ad1fe8404a9564d7d76a8fc21d36f3933942b29 | PeterDWhite/Osker | TimerDevice.hs | Copyright ( c ) , 2001 , 2002 , 2003
Copyright ( c ) OHSU , 2001 , 2002 , 2003
module TimerDevice ( timerDevice ) where
----------------------------------------------------------------------
-- The timer device driver
-- Inputs to the timer device driver:
DyanmicException ( ExecutiveMessage ): timer start , ... | null | https://raw.githubusercontent.com/PeterDWhite/Osker/301e1185f7c08c62c2929171cc0469a159ea802f/Kernel/DeviceDrivers/TimerDevice.hs | haskell | --------------------------------------------------------------------
The timer device driver
Inputs to the timer device driver:
UserException "tick": A timer tick
--------------------------------------------------------------------
Haskell imports
----------------------------------------------------... | Copyright ( c ) , 2001 , 2002 , 2003
Copyright ( c ) OHSU , 2001 , 2002 , 2003
module TimerDevice ( timerDevice ) where
DyanmicException ( ExecutiveMessage ): timer start , cancel , or status
This version of the timer device uses RIO ( Resumption IO ) , but
no bounded IO Monad around it . We will upgrage... |
132d4135b357837c79d47a839d0451c92c6b8bc4ef03f6f2bcb8f8feb69d88c1 | erszcz/learning | dog.erl | -module(dog).
-behaviour(animal).
-export([says/0,
does/1]).
This is not available in Erlang R16 + .
%-extend(animal).
%% These should actually be in a header file for easy reuse.
-define(FORWARD0(M, F), F() -> M:F()).
-define(FORWARD1(M, F), F(A1) -> M:F(A1)).
-define(FORWARD2(M, F), F(A1, A2) -> M:F(A1... | null | https://raw.githubusercontent.com/erszcz/learning/b21c58a09598e2aa5fa8a6909a80c81dc6be1601/erlang-behaviour/dog.erl | erlang | -extend(animal).
These should actually be in a header file for easy reuse.
There's no equivalent of C preprocessor ## operator,
so no macro name concatenations possible.
This won't work.
-define(FORWARD(M, F, A), ?(FORWARD ## A)(M, F)).
This is as far as code reuse can be pushed without parse transforms. | -module(dog).
-behaviour(animal).
-export([says/0,
does/1]).
This is not available in Erlang R16 + .
-define(FORWARD0(M, F), F() -> M:F()).
-define(FORWARD1(M, F), F(A1) -> M:F(A1)).
-define(FORWARD2(M, F), F(A1, A2) -> M:F(A1, A2)).
-define(FORWARD3(M, F), F(A1, A2, A3) -> M:F(A1, A2, A3)).
-define(FORW... |
a59f97481acc9082ef3e02c344d6a3a55f3b72ad6ba1aa9ac0282ab17ad007ca | cbaggers/cepl.examples | blending.lisp | (in-package :cepl.examples+camera)
;;- - - - - - - - - - - - - - - - - -
(defparameter box-data nil)
(defparameter box-index nil)
(defparameter box-stream nil)
(defparameter brick nil)
(defstruct box
(pos (v! 0 0 -10))
(rot (q:identity)))
(defparameter box-a (make-box :pos (v! 0 0 -5)))
(defparameter box-b (mak... | null | https://raw.githubusercontent.com/cbaggers/cepl.examples/87ac3def3e674632662350c809edf09f4820fbd1/examples/blending.lisp | lisp | - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - | (in-package :cepl.examples+camera)
(defparameter box-data nil)
(defparameter box-index nil)
(defparameter box-stream nil)
(defparameter brick nil)
(defstruct box
(pos (v! 0 0 -10))
(rot (q:identity)))
(defparameter box-a (make-box :pos (v! 0 0 -5)))
(defparameter box-b (make-box :pos (v! 0.3 0 -3)))
(defun mo... |
789ec0b20aa4ca24480f13fca0c28511827d5c6f6e00b37d577a3ac031459945 | processone/ejabberd | ejabberd_redis_sup.erl | %%%-------------------------------------------------------------------
Author : < >
Created : 6 Apr 2017 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License... | null | https://raw.githubusercontent.com/processone/ejabberd/c103182bc7e5b8a8ab123ce02d1959a54e939480/src/ejabberd_redis_sup.erl | erlang | -------------------------------------------------------------------
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHA... | Author : < >
Created : 6 Apr 2017 by < >
ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along
... |
e4d7e4a5809a0c859c528bc131af668be6fc02a913f41000be727ae21a8a9703 | deadtrickster/prometheus.cl | gauge.lisp | (in-package #:prometheus)
(define-constant +gauge-default+ 0)
(defclass gauge (metric-family)
()
(:default-initargs :type "gauge"))
(defmethod mf-make-metric ((metric gauge) labels)
(make-instance 'gauge-metric :labels labels))
(defclass gauge-metric (simple-metric)
((value :initform +gauge-default+)))
(de... | null | https://raw.githubusercontent.com/deadtrickster/prometheus.cl/60572b793135e8ab5a857d47cc1a5fe0af3a2d53/src/prometheus/metrics/gauge.lisp | lisp | (in-package #:prometheus)
(define-constant +gauge-default+ 0)
(defclass gauge (metric-family)
()
(:default-initargs :type "gauge"))
(defmethod mf-make-metric ((metric gauge) labels)
(make-instance 'gauge-metric :labels labels))
(defclass gauge-metric (simple-metric)
((value :initform +gauge-default+)))
(de... | |
180446928796ca8bf0a9b983d33275d7ff8324ca9d1ec441d6079d4921bae557 | casperschipper/ocaml-cisp | collatzTest.ml | open Cisp
open Midi
open Seq
let threeLists = [[11; 12; 13]; [42; 43; 44]; [100; 99]]
let seqs = List.map (fun lst -> ofList lst |> cycle) threeLists
let l_seqs = ofList seqs (* make this list also a lazy stream *)
let addCount () = Cons (count, l_seqs)
this adds in another infinite list , counts natural number... | null | https://raw.githubusercontent.com/casperschipper/ocaml-cisp/954e4b71dca0d0af0786395d727b7a7cde5568a7/examples/cisp_backup/collatzTest.ml | ocaml | make this list also a lazy stream
todo | open Cisp
open Midi
open Seq
let threeLists = [[11; 12; 13]; [42; 43; 44]; [100; 99]]
let seqs = List.map (fun lst -> ofList lst |> cycle) threeLists
let addCount () = Cons (count, l_seqs)
this adds in another infinite list , counts natural numbers
let trans = transpose addCount
let cat = trans |> concat |> t... |
b4e5809f200ee0a3c594a3f3394cfc55ae0510a0333b16b6c4374a52787517de | arcfide/oleg | html-entity-codes.scm | ; Unicodes for HTML character entities
by More
Tue , 30 Sep 2008 13:12:34 +0200
;
; The following table could be uses as an extension or replacement
for : predefined - parsed - entities . It requires the function
integer->char that accepts integer codes larger than 255 .
# # Custom addition :
based on na... | null | https://raw.githubusercontent.com/arcfide/oleg/c6826870436925fd4c873c01d7fcc24a7a7f95dc/ssax/lib/html-entity-codes.scm | scheme | Unicodes for HTML character entities
The following table could be uses as an extension or replacement | by More
Tue , 30 Sep 2008 13:12:34 +0200
for : predefined - parsed - entities . It requires the function
integer->char that accepts integer codes larger than 255 .
# # Custom addition :
based on name2codepoint of python 's htmlentitydefs library . To get it ,
type python , import htmlentitydefs ,
(de... |
0df58f7475d102b1299814ff7e4b54fab4d6650bc314641bc8f15ef06ba7a84d | AlexKnauth/music | duration.rkt | #lang agile
;; ------------------------------------------------------------------------
(provide duration
duration-common-divisions
duration-n/divisions
duration=?
duration<?
duration<=?
duration+
duration∆
duration/2
duration-divide
... | null | https://raw.githubusercontent.com/AlexKnauth/music/b4489c27d7c0f7116d769344c787fa76b479e5fa/music/data/time/duration.rkt | racket | ------------------------------------------------------------------------
duration<? : Duration Duration -> Bool
duration<=? : Duration Duration -> Bool
duration-common-divisions : Duration ... -> PosInt
duration-n/divisions : Duration PosInt -> Nat
duration+ : Duration Duration -> Duration
duration/2 : Duration ... | #lang agile
(provide duration
duration-common-divisions
duration-n/divisions
duration=?
duration<?
duration<=?
duration+
duration∆
duration/2
duration-divide
duration-fraction
duration-zero
duration-quarter
... |
3df5dc89626c007938f1da8a8114911dd8c5fb302893a839b887b3fbc1a3dd4b | haskell-opengl/OpenGLRaw | ES32Compatibility.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ARB.ES32Compatibility
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
--------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/ARB/ES32Compatibility.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.ARB.ES32Compatibility
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enums
* Funct... | # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.ARB.ES32Compatibility (
glGetARBES32Compatibility,
gl_ARB_ES3_2_compatibility,
pattern GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY_ARB,
pattern GL_MULTISAMPLE_LINE_WIDTH_RANGE_ARB,
pattern GL_PRIMITIVE_BOUNDIN... |
52bd7922753927d198d6e1ffcf85cf16a35408cbb4d106cfe989e50092fff68b | input-output-hk/cardano-benchmarking | DSL.hs | # LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE RankNTypes #-}
module Cardano.Benchmarking.DSL
where
import Prelude (error)
import Cardano.Prelude
import Cardano.Api
import Cardano.Benchmarking.... | null | https://raw.githubusercontent.com/input-output-hk/cardano-benchmarking/af05b42df27e2cc7305475cf5c4efa81e7f97540/cardano-tx-generator/src/Cardano/Benchmarking/DSL.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
Look at hardfork combinator for more elegant abstraction.
txGenerator is basically pure except for logging. | # LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
module Cardano.Benchmarking.DSL
where
import Prelude (error)
import Cardano.Prelude
import Cardano.Api
import Cardano.Benchmarking.Tracer
import Cardano.Benchmarking.Types ... |
08c60b6092967bbb11b07914eb0f1ac667e95f22f02fb8fe7898d667a8c66434 | exercism/common-lisp | logans-numeric-partition-test.lisp | ;; Ensures that logans-numeric-partition.lisp and the testing library are always loaded
(eval-when (:compile-toplevel :load-toplevel :execute)
(load "logans-numeric-partition")
(ql:quickload :fiveam))
Defines the testing package with symbols from logans - numeric - partition and FiveAM in scope
;; The `run-tests... | null | https://raw.githubusercontent.com/exercism/common-lisp/d7bc941b3088288ab6ad9dbd0700018643de1ec1/exercises/concept/logans-numeric-partition/logans-numeric-partition-test.lisp | lisp | Ensures that logans-numeric-partition.lisp and the testing library are always loaded
The `run-tests` function is exported for use by both the user and test-runner
Enter the testing package
Define and enter a new FiveAM test-suite | (eval-when (:compile-toplevel :load-toplevel :execute)
(load "logans-numeric-partition")
(ql:quickload :fiveam))
Defines the testing package with symbols from logans - numeric - partition and FiveAM in scope
(defpackage :logans-numeric-partition-test
(:use :cl :fiveam :logans-numeric-partition)
(:export :run... |
156baa1f077be5d4e503bf7e7d13bcde978cf6b9f1650f9d5041b8f864b8df47 | moby/vpnkit | flow.ml |
* Copyright ( C ) 2016 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/moby/vpnkit/eb9ba90261fcfe167888d209339d4d8fb0985243/src/dns_forward_test/flow.ml | ocaml | pending data from left to right
pending data from right to left |
* Copyright ( C ) 2016 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
a3803c458713e602eb6fd1d8eb90e882c8c95fe62b7d67eca3752ca3086e303c | brendanhay/gogol | Custombatch.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-shopping-content/gen/Gogol/ShoppingContent/Content/Datafeedstatuses/Custombatch.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Gets multiple Merchant Center datafeed statuses in a single request.
* Resource
** Constructing a Request
| A resource alias for @content.datafeedstatuses.custombatch@ method which the
'ContentDatafeedstatusesCustombatch' req... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
0c9c1f34ee141bb89908137bd9b2749bfbbfc7cab34e4de9c8a9fddc2ce2cb09 | magnars/stasis | project.clj | (defproject stasis "2.5.1"
:description "A library of tools for creating static websites."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[ring/ring-codec "1.1.2"]
[narkisr/clansi "1.2.0"]]
:profiles {:dev {:dependencies [[org.clojure/clojure "1.... | null | https://raw.githubusercontent.com/magnars/stasis/ba4ccba25756144727d68a78973797e2656890bb/project.clj | clojure | (defproject stasis "2.5.1"
:description "A library of tools for creating static websites."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[ring/ring-codec "1.1.2"]
[narkisr/clansi "1.2.0"]]
:profiles {:dev {:dependencies [[org.clojure/clojure "1.... | |
567c6dac9b238e5e0ed9a977d68afd4c72b591257b14ae11ad13fc46041102bb | composewell/streamly | Type.hs | -- |
Module : Streamly . Internal . Data . Fold . Concurrent . Channel . Type
Copyright : ( c ) 2017 , 2022 Composewell Technologies
-- License : BSD-3-Clause
-- Maintainer :
-- Stability : experimental
Portability : GHC
module Streamly.Internal.Data.Fold.Concurrent.Channel.Type
( Channel (.... | null | https://raw.githubusercontent.com/composewell/streamly/9b788e036f57ea85a24d3215fa36d5a94e99f4cf/src/Streamly/Internal/Data/Fold/Concurrent/Channel/Type.hs | haskell | |
License : BSD-3-Clause
Maintainer :
Stability : experimental
FORWARD FLOW: Flow of data from the driver to the consuming fold
XXX This is inputQueue instead.
Shared output queue (events, length)
[LOCKING] Frequent locked access. This is updated by the driver on each
yield and once in a while read by... | Module : Streamly . Internal . Data . Fold . Concurrent . Channel . Type
Copyright : ( c ) 2017 , 2022 Composewell Technologies
Portability : GHC
module Streamly.Internal.Data.Fold.Concurrent.Channel.Type
( Channel (..)
, newChannel
, Config
, sendToWorker
, checkFoldStatus
, dum... |
0e41d0c47349fae4c99f86d1daccba36319158ec39653c142da256ee497e7ae1 | mirage/xentropyd | writeBufferStream.ml |
* Copyright ( C ) Citrix Systems Inc.
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AN... | null | https://raw.githubusercontent.com/mirage/xentropyd/4705bb2f6c10ae84f842a5c39cd8a513ea8c761a/core/writeBufferStream.ml | ocaml | Return the next contiguous buffer fragment available for writing
total space available is len - (producer - consumer_ but we only want to
return contiguous space
Ensure all data [up_to] have been transmitted
If we crashed on a previous run we might not have bumped the consumer
pointer -- do it no... |
* Copyright ( C ) Citrix Systems Inc.
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AN... |
70f98d5d81c196e4d79dfdd2c9f8a6d184628e98eb7a6b3c4350c0ebc26b62ea | zwizwa/staapl | demo.rkt | #lang racket/base
(require
"arm.rkt")
;; Test
(define (print-macro macro)
(state-print-code
(macro (state:stack))))
(define-syntax-rule (code> . words) (print-macro (macro: . words)))
(code>
1 2 3 add
4 5 6 sub)
| null | https://raw.githubusercontent.com/zwizwa/staapl/e30e6ae6ac45de7141b97ad3cebf9b5a51bcda52/arm/demo.rkt | racket | Test | #lang racket/base
(require
"arm.rkt")
(define (print-macro macro)
(state-print-code
(macro (state:stack))))
(define-syntax-rule (code> . words) (print-macro (macro: . words)))
(code>
1 2 3 add
4 5 6 sub)
|
8227b4d8973190ae287ba81271bb2a158b967c514bc95bf69868dd1a24698e4a | bracevac/corrl | Unique.hs | -----------------------------------------------------------------------------
Copyright 2012 Microsoft Corporation .
--
-- This is free software; you can redistribute it and/or modify it under the
terms of the Apache License , Version 2.0 . A copy of the License can be
found in the file " license.txt " at the roo... | null | https://raw.githubusercontent.com/bracevac/corrl/416cd107087ac070a6bcabf8e7937211b6f415bb/koka/src/Common/Unique.hs | haskell | ---------------------------------------------------------------------------
This is free software; you can redistribute it and/or modify it under the
---------------------------------------------------------------------------
Useful monad classes.
----------------------------------------------------------------... | Copyright 2012 Microsoft Corporation .
terms of the Apache License , Version 2.0 . A copy of the License can be
found in the file " license.txt " at the root of this distribution .
HasUnique(updateUnique,setUnique,unique,uniques,uniqueId,uniqueIds,uniqueName)
, Unique, runU... |
4182d45cad9d56f14d5c6802137390aafde5e99d29dd9b3756cfd3b9467a91f4 | mayconamaro/ringell | ExpL.hs | module ExpL where
import Control.Monad
import ExpR (Ty(TyNat, TyFun), partialIf)
data ExpL = Zero
| Error
| Var String Int
| Suc ExpL
| Abs String Ty ExpL
| App ExpL ExpL
| Match ExpL ExpL String ExpL
deriving (Eq)--, Show
-- Substitution --
sh... | null | https://raw.githubusercontent.com/mayconamaro/ringell/4c55645c34cd5833f32fb799caa31240bd0fa587/Property-based%20tests/src/ExpL.hs | haskell | , Show
Substitution --
Evaluation -- | module ExpL where
import Control.Monad
import ExpR (Ty(TyNat, TyFun), partialIf)
data ExpL = Zero
| Error
| Var String Int
| Suc ExpL
| Abs String Ty ExpL
| App ExpL ExpL
| Match ExpL ExpL String ExpL
shiftTerm :: Int -> ExpL -> ExpL
shiftTerm d = walk 0
... |
6e37e854e9205805eb5f76e7d042f79b6dd5b632a9f67378faf209169aec8dc8 | klarna/avlizer | avlizer.erl | %%%-----------------------------------------------------------------------------
%%%
Copyright ( c ) 2018 - 2019 Klarna Bank AB ( publ ) .
%%%
This file is provided to you under the Apache License ,
%%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain... | null | https://raw.githubusercontent.com/klarna/avlizer/1a08628ba06585fda73a504e8d1c02cef8aeda73/src/avlizer.erl | erlang | -----------------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing ... | Copyright ( c ) 2018 - 2019 Klarna Bank AB ( publ ) .
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(avlizer).
-expo... |
f4a8bc15ca1c321cf2afb6aea0722acb81daf3473102eefc3aac2ef210d3b3f7 | samply/blaze | arithmetic_operators.clj | (ns blaze.elm.compiler.arithmetic-operators
"16. Arithmetic Operators
Section numbers are according to
-logicalspecification.html."
(:require
[blaze.anomaly :as ba :refer [throw-anom]]
[blaze.elm.compiler.core :as core]
[blaze.elm.compiler.macros :refer [defbinop defunop]]
[blaze.elm.date-time ... | null | https://raw.githubusercontent.com/samply/blaze/f7d26bf3db0bc74b9195c59891261b1eb2c5accb/modules/cql/src/blaze/elm/compiler/arithmetic_operators.clj | clojure | (ns blaze.elm.compiler.arithmetic-operators
"16. Arithmetic Operators
Section numbers are according to
-logicalspecification.html."
(:require
[blaze.anomaly :as ba :refer [throw-anom]]
[blaze.elm.compiler.core :as core]
[blaze.elm.compiler.macros :refer [defbinop defunop]]
[blaze.elm.date-time ... | |
a3d5cce0a81ec960d7e20f4639df069db969bd7cec1566e6f597be3b55300155 | tdammers/sprinkles | Handlers.hs | # LANGUAGE NoImplicitPrelude #
module Web.Sprinkles.Handlers
( handleStaticTarget
, handleJSONTarget
, handleRedirectTarget
, handleAutoTemplateTarget
, handleTextTemplateTarget
, handleHtmlTemplateTarget
, handleNotFound
, handleMethodNotAllowed
, handle404
, handle405
, handle500
)
where
import Web.Sprinkles.Prelude... | null | https://raw.githubusercontent.com/tdammers/sprinkles/a9161e4506427a3cf5f686654edc7ed9aa3ea82b/src/Web/Sprinkles/Handlers.hs | haskell | # LANGUAGE NoImplicitPrelude #
module Web.Sprinkles.Handlers
( handleStaticTarget
, handleJSONTarget
, handleRedirectTarget
, handleAutoTemplateTarget
, handleTextTemplateTarget
, handleHtmlTemplateTarget
, handleNotFound
, handleMethodNotAllowed
, handle404
, handle405
, handle500
)
where
import Web.Sprinkles.Prelude... | |
04b06923f218254c61378699da840837b874722724eff122c9899d604ccc8b9c | dwayne/haskell-programming | Hello.hs | module Hello
( sayHello )
where
sayHello :: String -> IO ()
sayHello name = putStrLn ("Hi " ++ name ++ "!")
| null | https://raw.githubusercontent.com/dwayne/haskell-programming/d08679e76cfd39985fa2ee3cd89d55c9aedfb531/ch13/hello/src/Hello.hs | haskell | module Hello
( sayHello )
where
sayHello :: String -> IO ()
sayHello name = putStrLn ("Hi " ++ name ++ "!")
| |
1685cb1abe00c159b4c06ef157d2025c090e4c39ff1656e5e6855cb785754612 | jellelicht/guix | orpheus.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the Lice... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/orpheus.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2014 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages orpheus)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module... |
33a63b44b93de73e6c2e717a4ec70fbad6197cb2451f8c07ee112b2513511795 | bos/rwh | MonadLaws.hs | {-- snippet functor --}
fmap id == id
fmap (f . g) == fmap f . fmap g
{-- /snippet functor --}
{-- snippet leftIdentity --}
return x >>= f === f x
{-- /snippet leftIdentity --}
{-- snippet leftIdentityDo --}
do y <- return x
f y === f x
{-- /snippet leftIdentityDo --... | null | https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch14/MonadLaws.hs | haskell | - snippet functor -
- /snippet functor -
- snippet leftIdentity -
- /snippet leftIdentity -
- snippet leftIdentityDo -
- /snippet leftIdentityDo -
- snippet rightIdentity -
- /snippet rightIdentity -
- snippet rightIdentityDo -
- /snippet rightIdentityDo -
- snippet associativity -
- /snippet associativity -
- snippet ... | fmap id == id
fmap (f . g) == fmap f . fmap g
return x >>= f === f x
do y <- return x
f y === f x
m >>= return === m
do y <- m
return y === m
m >>= (\x -> f x >>= g) === (m >>= f) >>= g
m >>= s
where s x = f x >>= g
t >>=... |
1570468a0bb8d996fbcffc12fab06c105778b89742c808d1c60f0ab4a726aaa7 | VisionsGlobalEmpowerment/webchange | views.cljs | (ns webchange.lesson-builder.tools.effects-add.character-movements.views
(:require
[re-frame.core :as re-frame]
[webchange.lesson-builder.components.draggable.views :refer [draggable draggable-list]]
[webchange.lesson-builder.tools.effects-add.character-movements.state :as state]
[webchange.ui.index :... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/20eef58ec4c5658eaf5bcec40d6543ccf5983272/src/cljs/webchange/lesson_builder/tools/effects_add/character_movements/views.cljs | clojure | (ns webchange.lesson-builder.tools.effects-add.character-movements.views
(:require
[re-frame.core :as re-frame]
[webchange.lesson-builder.components.draggable.views :refer [draggable draggable-list]]
[webchange.lesson-builder.tools.effects-add.character-movements.state :as state]
[webchange.ui.index :... | |
edaabae77b447eccd3d6a3390f2b8cccefefc371e41bb14c52b4be14e9139990 | fmi-lab/fp-elective-2017 | task-3.scm | (require rackunit rackunit/text-ui)
(define (is-sur? domain codomain f)
(define (for-all? l p?)
(foldl (lambda (x acc) (and (p? x) acc)) #t l))
(define (exists? l p?)
(not (for-all? l (compose not p?))))
(define transforms?
(for-all? domain (lambda (x) (member (f x) codomain))))
(define covers?
... | null | https://raw.githubusercontent.com/fmi-lab/fp-elective-2017/e88d5c0319b6d03c0ecd8a12a2856fb1bf5dcbf3/exams/01/variant-b/task-3.scm | scheme | (require rackunit rackunit/text-ui)
(define (is-sur? domain codomain f)
(define (for-all? l p?)
(foldl (lambda (x acc) (and (p? x) acc)) #t l))
(define (exists? l p?)
(not (for-all? l (compose not p?))))
(define transforms?
(for-all? domain (lambda (x) (member (f x) codomain))))
(define covers?
... | |
cb1a1f27bf7ffc3d2d890fcf294a4a794e49a345f2cd0047527b9de25d60f180 | alang9/dynamic-graphs | Random.hs | -- | Randomly balanced tree.
{-# LANGUAGE CPP #-}
{-# LANGUAGE MultiWayIf #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Data.Graph.Dynamic.Internal.Random
( Tree
, single... | null | https://raw.githubusercontent.com/alang9/dynamic-graphs/b88f001850c7bee8faa62099e93172a0bb0df613/src/Data/Graph/Dynamic/Internal/Random.hs | haskell | | Randomly balanced tree.
# LANGUAGE CPP #
# LANGUAGE MultiWayIf #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeSynonymInstances #
* Debugging only
# UNPACK #
# UNPACK #
# UNPACK #
right is not set (we want to avoid Maybe's since they cause a lot of
i... | # LANGUAGE RecordWildCards #
module Data.Graph.Dynamic.Internal.Random
( Tree
, singleton
, append
, split
, connected
, root
, label
, aggregate
, toList
, freeze
, print
, assertInvariants
, assertSingleton
, assertRoot
) where
import Cont... |
fed1578da440818c7efb643c76d96e70117c7b7e9ce6c9c958ca8739cfe552c4 | morpheusgraphql/morpheus-graphql | TypeCategory.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE NoImplicitPrelude #
module Data.Morpheus.Types.Internal.AST.TypeCategory
( TypeCategory (IN, OUT, LEAF),
type (<=!),
type (<... | null | https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/cfaadc6f8491548bccab856757e95584946681b7/morpheus-graphql-core/src/Data/Morpheus/Types/Internal/AST/TypeCategory.hs | haskell | # LANGUAGE ConstraintKinds #
<=
leaf
input
output
all other cases are false | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE NoImplicitPrelude #
module Data.Morpheus.Types.Internal.AST.TypeCategory
( TypeCategory (IN, OUT, LEAF),
type (<=!),
type (<=?),
OUT,
IN,
ANY,
... |
7757a982aded79edb701ee6ffac8204f4e39e35093ea6e19924dfa20aa70c79e | ygrek/mldonkey | gnutellaInteractive.ml | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/networks/gnutella/gnutellaInteractive.ml | ocaml |
type query =
QAnd of query * query
| QOr of query * query
| QAndNot of query * query
| QHasWord of string
| QHasField of string * string
| QHasMinVal of string * int64
| QHasMaxVal of string * int64
| QNone (** temporary, used when no value is available ;
must be simplified before transforming into strings
Ma... | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
... |
2577b16b3080629c28489748ed226b0cf64207aacd596e7c97a212df076f9121 | logicmoo/wam_common_lisp | fsc.lisp | -*-Mode : LISP ; Package:(PCL LISP 1000 ) ; ; Syntax : Common - lisp -*-
;;;
;;; *************************************************************************
Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation .
;;; All rights reserved.
;;;
;;; Use and copying of this software and preparation of d... | null | https://raw.githubusercontent.com/logicmoo/wam_common_lisp/4396d9e26b050f68182d65c9a2d5a939557616dd/prolog/wam_cl/src/pcl/fsc.lisp | lisp | Package:(PCL LISP 1000 ) ; ; Syntax : Common - lisp -*-
*************************************************************************
All rights reserved.
Use and copying of this software and preparation of derivative works
based upon this software are permitted. Any distribution of this
States export control law... | Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation .
software or derivative works must comply with all applicable United
This software is made available AS IS , and Xerox Corporation makes no
CommonLoops Coordinator
Xerox PARC
3333 Coyote Hill Rd .
Palo Alto , CA 94304
( o... |
085219591d29d142abc97bd3067fa2373e10ee3550e73d85bfe37b28afdfc58b | nshepperd/funn | Mixing.hs | # LANGUAGE NoStarIsType #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
# LANGUAGE TypeApplications #
# LANGUAGE PartialTypeSignatures #
{-# OPTIONS_GHC -fplugin GHC.TypeLits.Normalise #-}
# OPTIONS_GHC -fplugin GHC.TypeLi... | null | https://raw.githubusercontent.com/nshepperd/funn/23138fc44cfda90afd49927c39b122ed78945293/AI/Funn/CL/Mixing.hs | haskell | # OPTIONS_GHC -fplugin GHC.TypeLits.Normalise #
# OPTIONS_GHC -fconstraint-solver-iterations=10 # | # LANGUAGE NoStarIsType #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
# LANGUAGE TypeApplications #
# LANGUAGE PartialTypeSignatures #
# OPTIONS_GHC -fplugin GHC.TypeLits . KnownNat . Solver #
module AI.Funn.CL.Mixing (a... |
e13105e9498a9917085a63bbc0c93a41d3653a660d6fad88c7f2e5f6154657eb | dyoo/whalesong | record.rkt | #lang racket/base
(provide record-javascript-implementation!
has-javascript-implementation?
lookup-javascript-implementation
record-redirection!
follow-redirection
#;record-exported-name!
collect-redirections-to
record-module-require!... | null | https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/lang/js/record.rkt | racket | record-exported-name!
record-javascript-implementation!: path string -> void
has-javascript-implementation?: path -> boolean
lookup-javascript-implementation: path -> module-path
(define (record-exported-name! a-path internal-name external-name) | #lang racket/base
(provide record-javascript-implementation!
has-javascript-implementation?
lookup-javascript-implementation
record-redirection!
follow-redirection
collect-redirections-to
record-module-require!
lookup-module-requires
... |
1c8c73cbb9ac23a33d4cf28206fc6fc2c90a6fecde744486c344046069e2bbf7 | atongen/setml | config.ml | open Cmdliner
type t = {
setml_env: string;
listen_port: int;
docroot: string;
db_name: string;
db_host: string;
db_port: int;
db_user: string;
db_pass: string;
db_pool: int;
crypto_secret: string;
}
exception RequiredMissing of string
let to_string c =
Printf.sprintf
... | null | https://raw.githubusercontent.com/atongen/setml/8afee909ba6656506a69f79fd8682b37f2d2928a/src/server/config.ml | ocaml | open Cmdliner
type t = {
setml_env: string;
listen_port: int;
docroot: string;
db_name: string;
db_host: string;
db_port: int;
db_user: string;
db_pass: string;
db_pool: int;
crypto_secret: string;
}
exception RequiredMissing of string
let to_string c =
Printf.sprintf
... | |
401ce6c8a249504d8292445222d6fb85983801ccf39492c6a9af0557f691a292 | agda/agda | WarshallSolver.hs |
module Agda.TypeChecking.SizedTypes.WarshallSolver where
import Prelude hiding ( null, truncate )
import Control.Monad
import Data.Function (on)
import qualified Data.List as List
import Data.Maybe
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map (Map)
import qualified Data.Map as Map
import... | null | https://raw.githubusercontent.com/agda/agda/b52a21df3816c2cbc1a36d4e849c68b7e53fffb0/src/full/Agda/TypeChecking/SizedTypes/WarshallSolver.hs | haskell | | Compute list of edges that start in a given node.
| Compute list of edges that target a given node.
Note: expensive for unidirectional graph representations.
| Floyd-Warshall algorithm.
> w@ via @v@ to @g@
step :: (Ord n, Dioid a) => Graph.Graph n n a -> n -> Graph.Graph n n a
* Edge weights
| Partial impl... |
module Agda.TypeChecking.SizedTypes.WarshallSolver where
import Prelude hiding ( null, truncate )
import Control.Monad
import Data.Function (on)
import qualified Data.List as List
import Data.Maybe
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map (Map)
import qualified Data.Map as Map
import... |
db6975a3707b730dfa51c3a5eade54ae7e4066f641f4022c7618c6ee68d00a8d | dpiponi/Moodler | alias.hs | do
plane <- currentPlane
(x, y) <- fmap (quantise2 quantum) mouse
panel <- container' "panel_3x1.png" (x, y) plane
lab <- label' "alias" (x-25.0, y+75.0) plane
parent panel lab
name <- new' "alias"
inp <- plugin' (name ++ ".step") (x-21, y+25) plane
setColour inp "#control"
parent pa... | null | https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/alias.hs | haskell | do
plane <- currentPlane
(x, y) <- fmap (quantise2 quantum) mouse
panel <- container' "panel_3x1.png" (x, y) plane
lab <- label' "alias" (x-25.0, y+75.0) plane
parent panel lab
name <- new' "alias"
inp <- plugin' (name ++ ".step") (x-21, y+25) plane
setColour inp "#control"
parent pa... | |
f33c0e875af2f824c26edd2cf865b67bf34e0422ca52442b61603e7eae0d09b9 | owickstrom/wickstrom.tech | UnicodeNumbers.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
import Data.Function ((&))
import Data.Text (Text)
import qualified Data.Text as Text
import qualified Data.Text.Read as Text
import Text.Pandoc.JSON
import Text.Regex.PC... | null | https://raw.githubusercontent.com/owickstrom/wickstrom.tech/5aa7d5f6ceda04597a5d935081e24251435df1ca/filters/src/UnicodeNumbers.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes # |
import Data.Function ((&))
import Data.Text (Text)
import qualified Data.Text as Text
import qualified Data.Text.Read as Text
import Text.Pandoc.JSON
import Text.Regex.PCRE.Heavy
import Debug.Trace
main = toJSONFilter unicodeNum... |
bf759f705353c6b457563ec1830208f0600596be22ae8474ac3cda4210dfc5d0 | NelosG/fp-tests | T8Spec.hs | # LANGUAGE CPP , QuasiQuotes #
module Hi.Test.T8Spec (spec) where
import Text.RawString.QQ
import HW3.Action
import Text.RawString.QQ
import Hi.Test.Common
import qualified Data.Set as Set
spec :: Spec
spec = do
#if HI_TEST_UPTO < 8
emptyTest
#else
let testEvalIO = testEvalM . unwrapHIO . Set.fromList
describ... | null | https://raw.githubusercontent.com/NelosG/fp-tests/90442f9ad7ec72136cbd29ffc289b924f9077309/hw3/test/Hi/Test/T8Spec.hs | haskell | # LANGUAGE CPP , QuasiQuotes #
module Hi.Test.T8Spec (spec) where
import Text.RawString.QQ
import HW3.Action
import Text.RawString.QQ
import Hi.Test.Common
import qualified Data.Set as Set
spec :: Spec
spec = do
#if HI_TEST_UPTO < 8
emptyTest
#else
let testEvalIO = testEvalM . unwrapHIO . Set.fromList
describ... | |
1009ceeec8a16b8c9ca1a9680deb9c356abae37c4bd089188dac3265f3c93af1 | clj-commons/vizdeps | project.clj | (defproject sample/bravo "0.1.0-SNAPSHOT"
:plugins [[lein-parent "0.3.1"]]
:parent-project {:path "../project.clj"
:inherit [:managed-dependencies]}
:dependencies [[com.stuartsierra/component]
[ring/ring-core "1.5.0"]
[commons-codec "1.6"]]) | null | https://raw.githubusercontent.com/clj-commons/vizdeps/dadf0b8f69926c20df9472c4313056917bdd17b6/sample-multiproject/bravo/project.clj | clojure | (defproject sample/bravo "0.1.0-SNAPSHOT"
:plugins [[lein-parent "0.3.1"]]
:parent-project {:path "../project.clj"
:inherit [:managed-dependencies]}
:dependencies [[com.stuartsierra/component]
[ring/ring-core "1.5.0"]
[commons-codec "1.6"]]) | |
20ea25fc3ca15cf3bc992f69e8d95ef08d8ffcb680b630cb9c407ef09d333a5a | clj-dasha/dasha | core.cljs | (ns dasha.core
(:require-macros
[cljs.core.async.macros :as asyncm :refer (go go-loop)])
(:require [cljs.core.async :as async :refer (<! >! put! chan)]
[taoensso.sente :as sente :refer (cb-success?)]
[dasha.routing :as r]))
(defn log
[data]
(.log js/console (str data)))
(defn route... | null | https://raw.githubusercontent.com/clj-dasha/dasha/13508b5d75cabce5a6dff9545054f7ef40731717/src-cljs/dasha/core.cljs | clojure | Note the same path as before | (ns dasha.core
(:require-macros
[cljs.core.async.macros :as asyncm :refer (go go-loop)])
(:require [cljs.core.async :as async :refer (<! >! put! chan)]
[taoensso.sente :as sente :refer (cb-success?)]
[dasha.routing :as r]))
(defn log
[data]
(.log js/console (str data)))
(defn route... |
34b6ef521c7d9a6b230dd500fdc607857493f414faddf2011b2bb718e3af1de3 | processone/xmpp | xep0363.erl | Created automatically by XML generator ( fxml_gen.erl )
%% Source: xmpp_codec.spec
-module(xep0363).
-compile(export_all).
do_decode(<<"retry">>, <<"urn:xmpp:http:upload:0">>, El,
Opts) ->
decode_upload_retry(<<"urn:xmpp:http:upload:0">>,
Opts,
El);
do_... | null | https://raw.githubusercontent.com/processone/xmpp/88c43c3cf5843a8a0f76eac390980a3a39c972dd/src/xep0363.erl | erlang | Source: xmpp_codec.spec | Created automatically by XML generator ( fxml_gen.erl )
-module(xep0363).
-compile(export_all).
do_decode(<<"retry">>, <<"urn:xmpp:http:upload:0">>, El,
Opts) ->
decode_upload_retry(<<"urn:xmpp:http:upload:0">>,
Opts,
El);
do_decode(<<"file-too-large">>... |
6a1f3d1a4d44f682629a6145aac33df333504d6a8b462a984b635dcff296c09b | Smoltbob/Caml-Est-Belle | tuple2.ml | let rec f x =
let (a,b)= x in
if a<b then
print_int a
else
print_int b
in f(1,true) | null | https://raw.githubusercontent.com/Smoltbob/Caml-Est-Belle/3d6f53d4e8e01bbae57a0a402b7c0f02f4ed767c/tests/typechecking/invalid/tuple2.ml | ocaml | let rec f x =
let (a,b)= x in
if a<b then
print_int a
else
print_int b
in f(1,true) | |
0173c20491eec44cd3df31fcb01deadb968a66f3130c4d7ccb64cacc97287c4a | ghc/packages-Cabal | setup-internal-fail.test.hs | import Test.Cabal.Prelude
main = setupAndCabalTest $ do
skipUnless =<< ghcVersionIs (>= mkVersion [8,1])
r <- fails $ setup' "configure" ["--cabal-file", "Includes2.cabal.fail"]
assertOutputContains "mysql" r
| null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/Backpack/Includes2/setup-internal-fail.test.hs | haskell | import Test.Cabal.Prelude
main = setupAndCabalTest $ do
skipUnless =<< ghcVersionIs (>= mkVersion [8,1])
r <- fails $ setup' "configure" ["--cabal-file", "Includes2.cabal.fail"]
assertOutputContains "mysql" r
| |
a20e711fa26a1ea23db722da72b428da01c4c29d3d3c89fca06fdd34fec18525 | clojure-interop/java-jdk | ValidationEventCollector.clj | (ns javax.xml.bind.util.ValidationEventCollector
"ValidationEventHandler
implementation that collects all events.
To use this class, create a new instance and pass it to the setEventHandler
method of the Validator, Unmarshaller, Marshaller class. After the call to
validate or unmarshal completes, call the ... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/bind/util/ValidationEventCollector.clj | clojure | (ns javax.xml.bind.util.ValidationEventCollector
"ValidationEventHandler
implementation that collects all events.
To use this class, create a new instance and pass it to the setEventHandler
method of the Validator, Unmarshaller, Marshaller class. After the call to
validate or unmarshal completes, call the ... | |
51a70c884f6b2c29623b2e4e6165d1f29059ac564145fb8e73514ccc093e51a8 | ksuandi/role-based-auth-api | utils.clj | (ns role-based-auth-api.utils)
(defn parse-int [s]
(if s
(Integer/parseInt (re-find #"-?\d+" s))
0))
| null | https://raw.githubusercontent.com/ksuandi/role-based-auth-api/e22af336650a2e3663292775c29ac1b3bead05dd/src/role_based_auth_api/utils.clj | clojure | (ns role-based-auth-api.utils)
(defn parse-int [s]
(if s
(Integer/parseInt (re-find #"-?\d+" s))
0))
| |
492d332a5c04612dd088be7cb00984fb3d4b003595a99d8f9eb588f78d8bdaed | robinheghan/differ | diff_test.cljc | Copyright © 2014 - 2019 .
Distributed under the MIT License ( ) .
(ns differ.diff-test
(:require [differ.diff :as diff]
#?(:clj [clojure.test :refer [is deftest testing]]
:cljs [cljs.test :refer-macros [is deftest testing]])))
(let [state {:one 1
:two {:three 2
... | null | https://raw.githubusercontent.com/robinheghan/differ/e76bf2fbfa262e554a0f3201de595de2de3a024b/test/differ/diff_test.cljc | clojure | Copyright © 2014 - 2019 .
Distributed under the MIT License ( ) .
(ns differ.diff-test
(:require [differ.diff :as diff]
#?(:clj [clojure.test :refer [is deftest testing]]
:cljs [cljs.test :refer-macros [is deftest testing]])))
(let [state {:one 1
:two {:three 2
... | |
7abca19c080b2ada151f0679a83dba86057b4ec8b85a85ee805bac83c6fe97bf | bos/llvm | Mips.hs | # LANGUAGE ForeignFunctionInterface #
module LLVM.Target.Mips(initializeTarget) where
initializeTarget :: IO ()
initializeTarget = do
initializeMipsTargetInfo
initializeMipsTarget
foreign import ccall unsafe "LLVMInitializeMipsTargetInfo" initializeMipsTargetInfo :: IO ()
foreign import ccall unsafe "LLVMInit... | null | https://raw.githubusercontent.com/bos/llvm/819b94d048c9d7787ce41cd7c71b84424e894f64/base/LLVM/Target/Mips.hs | haskell | # LANGUAGE ForeignFunctionInterface #
module LLVM.Target.Mips(initializeTarget) where
initializeTarget :: IO ()
initializeTarget = do
initializeMipsTargetInfo
initializeMipsTarget
foreign import ccall unsafe "LLVMInitializeMipsTargetInfo" initializeMipsTargetInfo :: IO ()
foreign import ccall unsafe "LLVMInit... | |
668ca853fdf8a2d6e19f774c38f481091abb0bdb8acf54f15906e7962b54e343 | MalloZup/fullrocketmetal | core.clj | (ns fullrocketmetal.core
(:require [missile.channels :as channels]
[missile.config :as config]
[fullrocketmetal.reminders :as reminders]
[fullrocketmetal.scheduler :as rock-sched]
[clojurewerkz.quartzite.scheduler :as qs]
[clojurewerkz.quartzite.... | null | https://raw.githubusercontent.com/MalloZup/fullrocketmetal/6029a2d2bf6c59910611650e7adaaf7b4c3697ae/src/fullrocketmetal/core.clj | clojure | -donts-redundant-map
TODO: we should check that we didn't scheduled an already present reminder | (ns fullrocketmetal.core
(:require [missile.channels :as channels]
[missile.config :as config]
[fullrocketmetal.reminders :as reminders]
[fullrocketmetal.scheduler :as rock-sched]
[clojurewerkz.quartzite.scheduler :as qs]
[clojurewerkz.quartzite.... |
322a65e1dbe99b52bf95b26e3efdb7665a7c177cede9a5100a06396b32c1d954 | pink-gorilla/goldly | app_system.cljs | (ns goldly.app-system
(:require
[goldly.component.load]
[goldly.component.type.system]
[goldly.component.type.notebook]
[goldly.notebook-loader.clj-load]
[goldly.notebook-loader.clj-list :refer [start-watch-notebooks]]
[ui.notebook.loader.list]
[goldly.broadcast.core]
; needs refactoring:
... | null | https://raw.githubusercontent.com/pink-gorilla/goldly/a942f29378e51da5725989ba017bac5a61e7fe54/src-unused/system/goldly/app_system.cljs | clojure | needs refactoring: | (ns goldly.app-system
(:require
[goldly.component.load]
[goldly.component.type.system]
[goldly.component.type.notebook]
[goldly.notebook-loader.clj-load]
[goldly.notebook-loader.clj-list :refer [start-watch-notebooks]]
[ui.notebook.loader.list]
[goldly.broadcast.core]
[goldly.system.ui]
[... |
e0b5cda4e6c483bd64925dcd624c2a9e069309791997eb15bd4e56f74511099d | synrc/nitro | element_iframe.erl | -module(element_iframe).
-author('Vladimir Galunshchikov').
-include_lib("nitro/include/nitro.hrl").
-compile(export_all).
render_element(Record) when Record#iframe.show_if==false -> [<<>>];
render_element(Record) ->
List = [
%global
{<<"accesskey">>, Record#iframe.accesskey},
{<<"class">>, Recor... | null | https://raw.githubusercontent.com/synrc/nitro/753b543626add2c014584546ec50870808a2eb90/src/elements/embed/element_iframe.erl | erlang | global
spec | -module(element_iframe).
-author('Vladimir Galunshchikov').
-include_lib("nitro/include/nitro.hrl").
-compile(export_all).
render_element(Record) when Record#iframe.show_if==false -> [<<>>];
render_element(Record) ->
List = [
{<<"accesskey">>, Record#iframe.accesskey},
{<<"class">>, Record#iframe.class... |
6b36404031d697f9189589f8190f88c2b4a9a6163b5cfd9bc7310ca46f942ad1 | ekmett/transformers-compat | Instances.hs | # LANGUAGE CPP #
#ifndef HASKELL98
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE EmptyDataDecls #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE KindSignatures #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# if __GLASGOW_HASKELL__ >= 702
# LANGUAGE Trustworthy #
# endif
# if _... | null | https://raw.githubusercontent.com/ekmett/transformers-compat/16b477d985e4cfee36b1298e07e48ab4c84985bc/src/Control/Monad/Trans/Instances.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE EmptyDataDecls #
---------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Stability : provisional
Portability : portable
Backports orphan instances which are not provided by other modules in
@trans... | # LANGUAGE CPP #
#ifndef HASKELL98
# LANGUAGE FlexibleContexts #
# LANGUAGE KindSignatures #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# if __GLASGOW_HASKELL__ >= 702
# LANGUAGE Trustworthy #
# endif
# if __GLASGOW_HASKELL__ >= 706
# LANGUAGE PolyKinds #
# endif
# if __GLA... |
ec3fadf5c192b9370e452f467641d1f25151d31c5147585cefb74f3a33937e0b | ruricolist/overlord | db.lisp | (defpackage :overlord/db
(:use :cl :alexandria :serapeum
:overlord/specials
:overlord/types
:overlord/message
:overlord/global-state
:overlord/cache
:overlord/asdf)
(:import-from :uiop
:implementation-type
:with-temporary-file
:rename-file-overwriting-target
:file-exists-p
... | null | https://raw.githubusercontent.com/ruricolist/overlord/1dc3155c676ea713b4c409e116f61bca2e5177d5/db.lisp | lisp | The database is a single file, an append-only log. If the log is
too long, it is compacted during the initial load.
The log is stored at a path that incorporates the Lisp
database.
Any change to the database format should be accompanied by bumping
versioned.)
The database is thread-safe within a single Lisp inst... | (defpackage :overlord/db
(:use :cl :alexandria :serapeum
:overlord/specials
:overlord/types
:overlord/message
:overlord/global-state
:overlord/cache
:overlord/asdf)
(:import-from :uiop
:implementation-type
:with-temporary-file
:rename-file-overwriting-target
:file-exists-p
... |
0027b3a2ae169675b14be682ae89805fe5456a4f64b476a68182b97553142538 | mransan/base58 | b58.ml |
The MIT License ( MIT )
Copyright ( c ) 2016 < >
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rights
... | null | https://raw.githubusercontent.com/mransan/base58/7fc85731e775f41d687586894468c86e4e2b25ee/src/b58.ml | ocaml | Util
[inp] iteration |
The MIT License ( MIT )
Copyright ( c ) 2016 < >
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rights
... |
66d26a5b5744023fc9f08f9e3c128cd3c923a3a3d231e3f53528cceb6826fb79 | shirok/Gauche | text-progress.scm | ;; sample program to show how to use text.progress
(use text.progress)
(define (main args)
(define (num-format cur max)
(format "~d/~d(~3d%)" cur max
(round->exact (/. (* cur 100) max))))
(let ((p (make-text-progress-bar :header "Example"
:header-width 10
... | null | https://raw.githubusercontent.com/shirok/Gauche/ecaf82f72e2e946f62d99ed8febe0df8960d20c4/examples/text-progress.scm | scheme | sample program to show how to use text.progress |
(use text.progress)
(define (main args)
(define (num-format cur max)
(format "~d/~d(~3d%)" cur max
(round->exact (/. (* cur 100) max))))
(let ((p (make-text-progress-bar :header "Example"
:header-width 10
:bar-char #\o
... |
c720a532d1b08dfee25dfa9dd1709c414ead7e91713be79e88c85ffffa6f9c8b | dgtized/shimmers | sea_and_sky.cljs | (ns shimmers.sketches.sea-and-sky
"More triangle fill techniques but trying to evoke Rothko a little?"
(:require
[quil.core :as q :include-macros true]
[quil.middleware :as m]
[shimmers.common.framerate :as framerate]
[shimmers.common.quil :as cq]
[shimmers.common.ui.controls :as ctrl]
[shimmers.m... | null | https://raw.githubusercontent.com/dgtized/shimmers/529071e9047348da733a5150b8dc1ea40bcef6ae/src/shimmers/sketches/sea_and_sky.cljs | clojure | Add whitecaps
TODO: optionally hide framerate somehow? | (ns shimmers.sketches.sea-and-sky
"More triangle fill techniques but trying to evoke Rothko a little?"
(:require
[quil.core :as q :include-macros true]
[quil.middleware :as m]
[shimmers.common.framerate :as framerate]
[shimmers.common.quil :as cq]
[shimmers.common.ui.controls :as ctrl]
[shimmers.m... |
737fcc17c37498496fccd1d1926a6f27137674a7b8baa9e6e55a315d7693f4f1 | clojerl/clojerl | clojerl.IIndexed.erl | %%% Code generate by scripts/generate-protocols
-module('clojerl.IIndexed').
-include("clojerl.hrl").
-include("clojerl_int.hrl").
-clojure(true).
-protocol(true).
-export(['nth'/2, 'nth'/3]).
-export([?SATISFIES/1]).
-export([?EXTENDS/1]).
-callback 'nth'(any(), any()) -> any().
-callback 'nth'(any(), any(), any()... | null | https://raw.githubusercontent.com/clojerl/clojerl/aa35847ca64e1c66224867ca4c31ca6de95bc898/src/erl/lang/protocols/clojerl.IIndexed.erl | erlang | Code generate by scripts/generate-protocols | -module('clojerl.IIndexed').
-include("clojerl.hrl").
-include("clojerl_int.hrl").
-clojure(true).
-protocol(true).
-export(['nth'/2, 'nth'/3]).
-export([?SATISFIES/1]).
-export([?EXTENDS/1]).
-callback 'nth'(any(), any()) -> any().
-callback 'nth'(any(), any(), any()) -> any().
-optional_callbacks(['nth'/2, 'nth'/... |
533dc07982781370527047d1d2a99cdf248e64df1709c5d7ec269f92cab2fc16 | jfaure/Irie-lang | Main.hs | main = Text > > > > Core > > STG > >
module Main where
import CmdLine
import qualified ParseSyntax as P
import Parser (parseModule)
import ModulePaths (findModule)
import Externs (Externs(..) , GlobalResolver(..) , ModDependencies(..) , ModDeps , primResolver , addModuleToResolver , resolveImports , addModName , ad... | null | https://raw.githubusercontent.com/jfaure/Irie-lang/186640a095d14560ff102ef613648e558e5b3f1e/compiler/1_Main/Main.hs | haskell | ( (^.), Field2(_2) )
prefix '@' to files in there
./module == module for cache purposes so they must be converted
<dead code> for use in ghci
| PParse (Either (ParseErrorBundle Text Void) P.Module)
| PImports (Either BitSet P.Module)
| PJudge (Either Errors JudgedModule)
even stale cached module... | main = Text > > > > Core > > STG > >
module Main where
import CmdLine
import qualified ParseSyntax as P
import Parser (parseModule)
import ModulePaths (findModule)
import Externs (Externs(..) , GlobalResolver(..) , ModDependencies(..) , ModDeps , primResolver , addModuleToResolver , resolveImports , addModName , ad... |
f3f84477cccac54213a79bff9c89c3d561f81e3407c90b71b0c4dc69d9016f28 | CarlosMChica/HaskellBook | First.hs | module First where
import Optional
import Data.Monoid
import MonoidProps
import Test.QuickCheck
newtype First' a =
First' { getFirst' :: Optional a }
deriving (Eq, Show)
instance Monoid (First' a) where
mempty = First' Nada
mappend (First' Nada) (First' Nada) = First' Nada
mappend (First' (Only a)... | null | https://raw.githubusercontent.com/CarlosMChica/HaskellBook/86f82cf36cd00003b1a1aebf264e4b5d606ddfad/chapter15/First.hs | haskell | module First where
import Optional
import Data.Monoid
import MonoidProps
import Test.QuickCheck
newtype First' a =
First' { getFirst' :: Optional a }
deriving (Eq, Show)
instance Monoid (First' a) where
mempty = First' Nada
mappend (First' Nada) (First' Nada) = First' Nada
mappend (First' (Only a)... | |
7d88d04418246a5dc4cf6ab3f603d8357ba591cf4d579aeaae874edcc0741018 | zkat/sheeple | post-boot.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 ; indent - tabs - mode : nil -*-
;;;; This file is part of Sheeple
;;;; post-boot.lisp
;;;;
;;;; Once sheeple is booted up, we can define messages/replies normally
;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/zkat/sheeple/5393c74737ccf22c3fd5f390076b75c38453cb04/src/post-boot.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 ; indent - tabs - mode : nil -*-
This file is part of Sheeple
post-boot.lisp
Once sheeple is booted up, we can define messages/replies normally
Printing Objects!
Error Reporting and Recovery
|
(in-package :sheeple)
(defmessage print-sheeple-object (object stream)
(:documentation "Defines the expression print-object uses.")
(:reply (object (stream =stream=))
(std-print-sheeple-object object stream))
(:reply ((object =boxed-object=) (stream =stream=))
(print-unreadable-object (object stream :i... |
4518ca63f58e979f87e120b70a1d0de3844a6d7132b64f611b6892c2b78f5b29 | emotiq/emotiq | util.lisp | (in-package :emotiq-rest)
(defun assemble-path (components)
"Return a slash-delimited path assembled from list of COMPONENTS."
(loop :for component :in components
:with result = ""
:doing (setf result (concatenate 'string result
"/" component))
:finally (return ... | null | https://raw.githubusercontent.com/emotiq/emotiq/9af78023f670777895a3dac29a2bbe98e19b6249/src/network/rest/util.lisp | lisp | HACK: but better to represent as text
TODO We only handle <file:> scheme with funk merge to ASDF | (in-package :emotiq-rest)
(defun assemble-path (components)
"Return a slash-delimited path assembled from list of COMPONENTS."
(loop :for component :in components
:with result = ""
:doing (setf result (concatenate 'string result
"/" component))
:finally (return ... |
b8ba7ced24f9802270666b5fee239dae9d76ad060442903937ea8c3e1a75d325 | camllight/camllight | num.ml | num : arithmetique exacte mixte sur rationnels et entiers ( grands et petits ) .
Adapte de nums.ml de Caml V3.1 , .
Adapte de nums.ml de Caml V3.1, Valerie Menissier. *)
#open "exc";;
#open "bool";;
#open "fstring";;
#open "fchar";;
#open "fvect";;
#open "list";;
#open "pair";;
#open "ref";;
#open "float";... | null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/windows/src/lib/num.ml | ocaml | Coercion big_int -> num
Comparisons on nums
Coercions with basic types
Coercion with int type
Coercion with big_int type
Coercion with ratio type
Coercion with string type
Coercion with float type | num : arithmetique exacte mixte sur rationnels et entiers ( grands et petits ) .
Adapte de nums.ml de Caml V3.1 , .
Adapte de nums.ml de Caml V3.1, Valerie Menissier. *)
#open "exc";;
#open "bool";;
#open "fstring";;
#open "fchar";;
#open "fvect";;
#open "list";;
#open "pair";;
#open "ref";;
#open "float";... |
6d6fdc13e2fe6e81952ff5e68d74475b8b921047be9a6028581e2f00d0309bb9 | ocaml-multicore/tezos | sc_rollup_client.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/tezt/lib_tezos/sc_rollup_client.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 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 IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN... |
c22552ac8c69c1a54b573cb47af2e9f6a2a6785efb6302e7e66b09fa5547b747 | aristidb/aws | GetUser.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
module Aws.Iam.Commands.GetUser
( GetUser(..)
, GetUserResponse(..)
, User(..)
) where
import Aws.Core
import Aws.Iam.Core
import Aws.Iam.Internal
import Co... | null | https://raw.githubusercontent.com/aristidb/aws/a99113ed7768f9758346052c0d8939b66c6efa87/Aws/Iam/Commands/GetUser.hs | haskell |
access key signing the request.
<> | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
module Aws.Iam.Commands.GetUser
( GetUser(..)
, GetUserResponse(..)
, User(..)
) where
import Aws.Core
import Aws.Iam.Core
import Aws.Iam.Internal
import Co... |
b6c1660053587eed635134a18f5c6f431e91d829565c65c9192c846c3f70c079 | hongchangwu/ocaml-type-classes | show.ml | module type S = sig
type t
val show : t -> string
end
module Bool = struct
type t = bool
let show = function
| true -> "True"
| false -> "False"
;;
end
let bool = (module Bool : S with type t = bool)
module Char = struct
type t = char
let show x = "'" ^ Char.escaped x ^ "'"
end
let char = (... | null | https://raw.githubusercontent.com/hongchangwu/ocaml-type-classes/17b11af26008f42a88aec85001a94ba18584ea72/lib/show.ml | ocaml | module type S = sig
type t
val show : t -> string
end
module Bool = struct
type t = bool
let show = function
| true -> "True"
| false -> "False"
;;
end
let bool = (module Bool : S with type t = bool)
module Char = struct
type t = char
let show x = "'" ^ Char.escaped x ^ "'"
end
let char = (... | |
2e8eeb1f38814a3dc70b77c7bf346d0f493686030bd9c5c5a294ecd04b6d4638 | mlabs-haskell/plutus-pioneer-program | Solution2.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# L... | null | https://raw.githubusercontent.com/mlabs-haskell/plutus-pioneer-program/b50b196d57dc35559b7526fe17b49dd2ba4790bc/code/week02/src/Week02/Solution2.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators # | # LANGUAGE DeriveGeneric #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Week02.Solution2 where
import Control.Monad hiding (fmap)
import Data.Aeson ... |
a16fd08ba90dc16b7e7c1c6a5b18709902c21f7851c0c93ed184cc6b9f49eb21 | lilyball/projecteuler-ocaml | prob23.ml |
A perfect number is a number for which the sum of its proper divisors is exactly
equal to the number . For example , the sum of the proper divisors of 28 would
be 1 + 2 + 4 + 7 + 14 = 28 , which means that 28 is a perfect number .
A number whose proper divisors are less than the number is called defici... | null | https://raw.githubusercontent.com/lilyball/projecteuler-ocaml/a88ed8355b565ad0726cfcac4916d2b80512da7a/prob23.ml | ocaml |
A perfect number is a number for which the sum of its proper divisors is exactly
equal to the number . For example , the sum of the proper divisors of 28 would
be 1 + 2 + 4 + 7 + 14 = 28 , which means that 28 is a perfect number .
A number whose proper divisors are less than the number is called defici... | |
0b3302f6b78c34cb64683f1396fbd9ee85f696a76c317d84bd05a43930b8ec3c | eeng/shevek | api_test.clj | (ns shevek.users.api-test
(:require [clojure.test :refer [use-fixtures deftest is]]
[shevek.test-helper :refer [it wrap-unit-tests]]
[shevek.asserts :refer [submaps?]]
[shevek.users.api :as api]
[shevek.makers :refer [make! make]]
[shevek.schemas.user :refer... | null | https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/test/clj/shevek/users/api_test.clj | clojure | (ns shevek.users.api-test
(:require [clojure.test :refer [use-fixtures deftest is]]
[shevek.test-helper :refer [it wrap-unit-tests]]
[shevek.asserts :refer [submaps?]]
[shevek.users.api :as api]
[shevek.makers :refer [make! make]]
[shevek.schemas.user :refer... | |
27d0dc26194184a582bd2bf9637a32b990b32db76716abaf1e07d69f628835fa | mbj/stratosphere | SamplingRuleRecordProperty.hs | module Stratosphere.XRay.SamplingRule.SamplingRuleRecordProperty (
module Exports, SamplingRuleRecordProperty(..),
mkSamplingRuleRecordProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/xray/gen/Stratosphere/XRay/SamplingRule/SamplingRuleRecordProperty.hs | haskell | # SOURCE # | module Stratosphere.XRay.SamplingRule.SamplingRuleRecordProperty (
module Exports, SamplingRuleRecordProperty(..),
mkSamplingRuleRecordProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProper... |
c9357ebd21dd92cd14e76b1b16288ed5c18f12d52ecd7f50421ad73c4e2bf95a | awslabs/s2n-bignum | bignum_even.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/arm/proofs/bignum_even.ml | ocaml | =========================================================================
Deduce if a bignum is even or odd.
=========================================================================
*** print_literal_from_elf "arm/generic/bignum_even.o";;
***
-----------------------------... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
let bignum_even_mc = define_assert_from_elf "bignum_even_mc" "arm/... |
b6dbeb5f9a6f30de120a9e0f6043635738c3ce838dbe854bc110b76a1bad2cad | turtlegrammar/faconne | core.clj | (ns faconne.test.core
(:require [faconne.core :as f])
(:use [clojure.test]))
(def test-times 20)
(defn gen-structure-from-domain
"Create a function that when invoked will generate a random extension of `domain`."
[domain]
(let [max-size 10
get-size (fn [& args] (Math/floor (rand max-size)))
... | null | https://raw.githubusercontent.com/turtlegrammar/faconne/d2827132d7b2d8ffb8dcd59dcae1890251d42bec/test/faconne/test/core.clj | clojure | {k1 {k2 v}} -> {k1 #{v}}
{k v} -> {v k}
{k [v]} -> #{[k v]}
todo: fix
Reducers ;;
readme
readme | (ns faconne.test.core
(:require [faconne.core :as f])
(:use [clojure.test]))
(def test-times 20)
(defn gen-structure-from-domain
"Create a function that when invoked will generate a random extension of `domain`."
[domain]
(let [max-size 10
get-size (fn [& args] (Math/floor (rand max-size)))
... |
b20d358d0ea65dcae20c55e4e33d14c07ebb3bc02936c9ea1797e46d88adc73e | facebook/flow | find_provider_test.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/2cd54bfc70898f3643ed176be52b2ebaa8ce62fb/src/analysis/env_builder/__tests__/find_provider_test.ml | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
fdc4266b5cdbb30d1c6f82291504d7239458baa788346ece89888cfa838e639c | Simre1/haskell-game | Async.hs | # LANGUAGE TemplateHaskell #
module Polysemy.Async
( -- * Effect
Async (..)
-- * Actions
, async
, await
-- * Interpretations
, asyncToIO
, asyncToIOFinal
, lowerAsync
) where
import qualified Control.Concurrent.Async as A
import Polysemy
import Polysemy.Final
------... | null | https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/polysemy/src/Polysemy/Async.hs | haskell | * Effect
* Actions
* Interpretations
----------------------------------------------------------------------------
| An effect for spawning asynchronous computations.
The 'Maybe' returned by 'async' is due to the fact that we can't be sure an
-----------------------------------------------------------------------... | # LANGUAGE TemplateHaskell #
module Polysemy.Async
Async (..)
, async
, await
, asyncToIO
, asyncToIOFinal
, lowerAsync
) where
import qualified Control.Concurrent.Async as A
import Polysemy
import Polysemy.Final
' Polysemy . Error . Error ' effect did n't fail locally .
@... |
4d5630557d8e37dfe5ad72c92c168a43d61ec24b4e69268944f703ec0f622207 | hbr/albatross | array.mli | open Module_types
val length: 'a array -> int
val is_empty: 'a array -> bool
val make: int -> 'a -> 'a array
val init: int -> (int -> 'a) -> 'a array
val get: 'a array -> int -> 'a
val set: 'a array -> int -> 'a -> unit
val map: ('a -> 'b) -> 'a array -> 'b array
val mapi: (int -> 'a -> 'b) -> 'a array -> 'b array
va... | null | https://raw.githubusercontent.com/hbr/albatross/8f28ef97951f92f30dc69cf94c0bbe20d64fba21/ocaml/fmlib/basic/array.mli | ocaml | open Module_types
val length: 'a array -> int
val is_empty: 'a array -> bool
val make: int -> 'a -> 'a array
val init: int -> (int -> 'a) -> 'a array
val get: 'a array -> int -> 'a
val set: 'a array -> int -> 'a -> unit
val map: ('a -> 'b) -> 'a array -> 'b array
val mapi: (int -> 'a -> 'b) -> 'a array -> 'b array
va... | |
1b8b8af7390cfee2bd9f04d1851cf6eb256ce4505202fe822d12c226bd0250e2 | nojb/tortuga | types.ml | The MIT License ( MIT )
Copyright ( c ) 2014 - 2016 < >
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rig... | null | https://raw.githubusercontent.com/nojb/tortuga/ab5b7bdbc6a3f59dd13a7d4ac8c96063a543fb36/lib/types.ml | ocaml | type pf =
| Pf0 of (unit -> atom)
| Pf1 of (atom -> atom)
| Pf2 of (atom -> atom -> atom)
| Pf3 of (atom -> atom -> atom -> atom)
| Pfn of int * (atom list -> atom)
| Pfcn of int * (env -> atom list -> (atom -> unit) -> unit)
type proc =
| Pf of pf
| Pr of int * (exp list -> exp)
le... | The MIT License ( MIT )
Copyright ( c ) 2014 - 2016 < >
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rig... |
bdcf7904448d38f24ba9e6dc67b9e78026ae9d73006b082aec80a8e440de57f9 | lisp-korea/sicp2014 | ch5-eceval-compiler.scm | #lang planet neil/sicp
(#%provide (all-defined))
(#%require "ch5-syntax.scm")
(#%require "ch5-regsim.scm")
(#%require "ch5-compiler.scm")
(#%require "ch5-eceval-support.scm")
;;;;EXPLICIT-CONTROL EVALUATOR FROM SECTION 5.4 OF
;;;; STRUCTURE AND INTERPRETATION OF COMPUTER PROGRAMS
;;;; MODIFIED TO SUPPORT COMPILED CODE... | null | https://raw.githubusercontent.com/lisp-korea/sicp2014/9e60f70cb84ad2ad5987a71aebe1069db288b680/netpyoung/5.5.2/ch5-eceval-compiler.scm | scheme | EXPLICIT-CONTROL EVALUATOR FROM SECTION 5.4 OF
STRUCTURE AND INTERPRETATION OF COMPUTER PROGRAMS
MODIFIED TO SUPPORT COMPILED CODE (AS IN SECTION 5.5.7)
Changes to basic evaluator machine are
Explicit-control evaluator.
support it needs (including the register-machine simulator)
To resume the machine without re... | #lang planet neil/sicp
(#%provide (all-defined))
(#%require "ch5-syntax.scm")
(#%require "ch5-regsim.scm")
(#%require "ch5-compiler.scm")
(#%require "ch5-eceval-support.scm")
( 3 ) support for compiled code to call interpreted code ( exercise 5.47 ) --
( new register and 1 new instruction at start )
( 4 ) n... |
ecdb95512b3b4dc98e970fa570f56f8f91781e870dd12ed4f32e717f84b54930 | BioHaskell/hPDB | PDBEvents.hs | | This module contains datatype declaration for PDB parsing
-- events generated by 'PDBEventParser' module.
module Bio.PDB.EventParser.PDBEvents(
String,V3(..),ATID(..),RESID(..),PDBEvent(..),
StrandSenseT(..),HelixT(..),ExpMethod(..))
where
import Prelude hiding (String)
import qualified Data.ByteString.Char8 a... | null | https://raw.githubusercontent.com/BioHaskell/hPDB/5be747e2f2c57370b498f4c11f9f1887fdab0418/Bio/PDB/EventParser/PDBEvents.hs | haskell | events generated by 'PDBEventParser' module.
| Atom id: atom name, residue name, chain, residue id, residue insertion code
| Residue id: residue name, chain, residue id, residue insertion code
why not a number?
why not a number?
Errors | | This module contains datatype declaration for PDB parsing
module Bio.PDB.EventParser.PDBEvents(
String,V3(..),ATID(..),RESID(..),PDBEvent(..),
StrandSenseT(..),HelixT(..),ExpMethod(..))
where
import Prelude hiding (String)
import qualified Data.ByteString.Char8 as BS
import Bio.PDB.EventParser.ExperimentalMet... |
3384664bf5fc9df60a5ed8a2f7f697480151dd674d95d55f281a582dc3d3ea99 | Mayvenn/storefront | core.clj | (ns storefront.core
(:gen-class :main true)
(:require [com.stuartsierra.component :as component]
[tocsin.core :as tocsin]
[environ.core :refer [env]]
[storefront.jetty :as jetty]
[storefront.system :as system]))
(def the-system nil)
(.addShutdownHook (Runtime/getRun... | null | https://raw.githubusercontent.com/Mayvenn/storefront/ffca6d1b8c6ecd672e77fb739b3e7c5684df2dac/src/storefront/core.clj | clojure | Ensure de-registered from service registry before stopping | (ns storefront.core
(:gen-class :main true)
(:require [com.stuartsierra.component :as component]
[tocsin.core :as tocsin]
[environ.core :refer [env]]
[storefront.jetty :as jetty]
[storefront.system :as system]))
(def the-system nil)
(.addShutdownHook (Runtime/getRun... |
9c1b4842af331603a9ee973edf8ab36767d64c98b74ed71ab524fe866bbe1599 | jmorag/open-strings | Survey.hs | # LANGUAGE TemplateHaskell #
module Model.Survey where
import ClassyPrelude.Yesod
data ViolinistType
= Amateur
| StudentBeginner
| StudentIntermediate
| StudentAdvanced
| ProfessionalSolo
| ProfessionalChamber
| ProfessionalOrchestra
deriving (Generic, Show, Eq, Read, Ord)
deriving anyclass (FromJS... | null | https://raw.githubusercontent.com/jmorag/open-strings/a9deff3c6ce36d588e47a237d47f191e195faa56/src/Model/Survey.hs | haskell | # LANGUAGE TemplateHaskell #
module Model.Survey where
import ClassyPrelude.Yesod
data ViolinistType
= Amateur
| StudentBeginner
| StudentIntermediate
| StudentAdvanced
| ProfessionalSolo
| ProfessionalChamber
| ProfessionalOrchestra
deriving (Generic, Show, Eq, Read, Ord)
deriving anyclass (FromJS... | |
f55db9e8e00f1d19f0e01872bc4436cd8d075650a39664d8a8a128c796efc68e | mariari/Misc-ML-Scripts | askedProblems.hs | # LANGUAGE FlexibleContexts #
import Control.Monad.Writer.Lazy as W
import qualified Data.Set as S
import Data.Monoid
-- asked by someone
-- is it possible to remove 0 or more characters from a string S1 = string S2
isSameRem :: String -> String -> Bool
isSameRem (x:xs) (y:ys)
| ... | null | https://raw.githubusercontent.com/mariari/Misc-ML-Scripts/d18aecf539c2d2ccf7ba9eb796f90e3ca809f5bf/Haskell/askedProblems.hs | haskell | asked by someone
is it possible to remove 0 or more characters from a string S1 = string S2
if the character is not valid write it to a log
we are doing this over lines of strings | # LANGUAGE FlexibleContexts #
import Control.Monad.Writer.Lazy as W
import qualified Data.Set as S
import Data.Monoid
isSameRem :: String -> String -> Bool
isSameRem (x:xs) (y:ys)
| x == y = isSameRem xs ys
| otherwise = isSameRem xs (y:ys)
isSameRem _ [] = True
isSameRem [... |
a679b212c3e7690f994d2d6c3fc97f4b294991469949fadd0d685fed489e8f08 | marick/Midje | facts.clj | (ns as-documentation.facts
(:require [midje.config :as config]
[midje.sweet :refer :all]
[midje.test-util :refer :all]))
's test suite is configured not to show some output that 's demonstrated here .
This resets 's setting back to the default .
(config/with-augmented-config {:visible-f... | null | https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/test/as_documentation/facts.clj | clojure | Basics
for this file.
Facts do not have to have descriptions
In some other test suites, exceptions caught when calculating the actual value | (ns as-documentation.facts
(:require [midje.config :as config]
[midje.sweet :refer :all]
[midje.test-util :refer :all]))
's test suite is configured not to show some output that 's demonstrated here .
This resets 's setting back to the default .
(config/with-augmented-config {:visible-f... |
44b63804747b3231ab95dee6de5f6d9129de9b998ac9059574365c0fbe36808f | HealthSamurai/jute.clj | runner.clj | (ns runner
(:require [cognitect.test-runner]
[clojure.test :as test])
(:gen-class))
(defn -main [& args]
(apply cognitect.test-runner/-main args))
| null | https://raw.githubusercontent.com/HealthSamurai/jute.clj/18d8bc57d1b87da182ef79b4257e6e196a3f3e24/test/runner.clj | clojure | (ns runner
(:require [cognitect.test-runner]
[clojure.test :as test])
(:gen-class))
(defn -main [& args]
(apply cognitect.test-runner/-main args))
| |
57f2720a759aecd38c69de34c4206e9db11fe8b1571b0ae39a611c3d06c79ecf | gwkkwg/cl-graph | delicious-graphs.lisp | (in-package #:metatilities)
#|
color by tag weight
|#
(defclass* delicious-post ()
((post-time nil ia :initarg :time)
(tags nil ia :initarg :tag)
(hash nil ia)
(extended nil ia)
(description nil ia)
(post-href nil ia :initarg :href)))
;;; -------------------------------------------------------------... | null | https://raw.githubusercontent.com/gwkkwg/cl-graph/3cb786797b24883d784b7350e7372e8b1e743508/dev/examples/delicious-graphs.lisp | lisp |
color by tag weight
---------------------------------------------------------------------------
---------------------------------------------------------------------------
---------------------------------------------------------------------------
------------------------------------------------------------------... | (in-package #:metatilities)
(defclass* delicious-post ()
((post-time nil ia :initarg :time)
(tags nil ia :initarg :tag)
(hash nil ia)
(extended nil ia)
(description nil ia)
(post-href nil ia :initarg :href)))
(defmethod initialize-instance :after ((object delicious-post) &key)
(setf (tags object)... |
3ee8a2d376bd420c9176e6250ed8adc9e004b22d270908a65f531d1bf56bb2db | hiroshi-unno/coar | z3interface.ml | open Core
open Common
open Common.Ext
open Ast
let verbose = false
module Debug = Debug.Make (val Debug.Config.(if verbose then enable else disable))
* Z3 interface for PropLogic . Formula
(* Propositional Logic Satisfiability *)
let rec pos_exprs_of_strings ctx = function
| [] -> []
| s::tl -> Z3.Boolean.mk_co... | null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/Z3Sat/z3interface.ml | ocaml | Propositional Logic Satisfiability
("well_sorted_check", "true");
Z3.Boolean.mk_const_s ctx id
Z3.set_global_param "sat.core.minimize" "true";
Z3.set_global_param "smt.core.minimize" "true";
("sat.core.minimize", "true");
("smt.core.minimize", "true")
("MBQI", "false");
debug_pri... | open Core
open Common
open Common.Ext
open Ast
let verbose = false
module Debug = Debug.Make (val Debug.Config.(if verbose then enable else disable))
* Z3 interface for PropLogic . Formula
let rec pos_exprs_of_strings ctx = function
| [] -> []
| s::tl -> Z3.Boolean.mk_const_s ctx s :: pos_exprs_of_strings ctx t... |
99f73ed641a227b0dfa32326fa891c412fec4d6f98604de178b6f4acd773603b | NetComposer/nksip | nksip_outbound_plugin.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2019 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the... | null | https://raw.githubusercontent.com/NetComposer/nksip/7fbcc66806635dc8ecc5d11c30322e4d1df36f0a/src/plugins/nksip_outbound_plugin.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2019 . 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(nksip_outbound_plugi... |
5d93dbfa8a11647fd4e1ecb15d7e3ea7103498aaac9d953b2ec4b50ce538e115 | haskell/aeson | BigSum.hs | # LANGUAGE DeriveGeneric #
module Auto.G.BigSum where
import Control.DeepSeq
import Data.Aeson
import GHC.Generics (Generic)
import Options
data BigSum = F01 | F02 | F03 | F04 | F05
| F06 | F07 | F08 | F09 | F10
| F11 | F12 | F13 | F14 | F15
| F16 | F17 | F18 | F19 | F20
... | null | https://raw.githubusercontent.com/haskell/aeson/d711df76b826942f4a9e791712512c6b19b8c1c8/benchmarks/bench/Auto/G/BigSum.hs | haskell | # LANGUAGE DeriveGeneric #
module Auto.G.BigSum where
import Control.DeepSeq
import Data.Aeson
import GHC.Generics (Generic)
import Options
data BigSum = F01 | F02 | F03 | F04 | F05
| F06 | F07 | F08 | F09 | F10
| F11 | F12 | F13 | F14 | F15
| F16 | F17 | F18 | F19 | F20
... | |
8745069af3086a3d5250a5751828809c8438e4c8913765ed4f0f8ef477810e94 | DomainDrivenArchitecture/dda-serverspec-crate | test.clj | Licensed to the Apache Software Foundation ( ASF ) under one
; or more contributor license agreements. See the NOTICE file
; distributed with this work for additional information
; regarding copyright ownership. The ASF licenses this file
to you under the Apache License , Version 2.0 ( the
; "License"); you may not... | null | https://raw.githubusercontent.com/DomainDrivenArchitecture/dda-serverspec-crate/0a2fd8cdd54a9efc3aad9e141098c2bf01d40861/main/src/dda/pallet/dda_serverspec_crate/infra/core/test.clj | clojure | or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
"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 b... | Licensed to the Apache Software Foundation ( ASF ) under one
to you under the Apache License , Version 2.0 ( the
distributed under the License is distributed on an " AS IS " BASIS ,
(ns dda.pallet.dda-serverspec-crate.infra.core.test
(:require
[clojure.tools.logging :as logging]
[schema.core :as s]
... |
46f50e987d9f2ff2b4abd7e05de38c8e7f0f0b26bd7dd08216e6f66fb8eff492 | marijnh/cl-tk | acl.lisp | (in-package :cl-tk)
(let ((loaded nil))
(defun load-libs ()
(unless loaded
#+unix
(progn (load "libtcl8.5.so")
(load "libtk8.5.so"))
#+mswindows
(progn (load "tcl85.dll")
(load "tk85.dll"))
#+(and (not mswindows) (not unix))
(error "Don't know how to ... | null | https://raw.githubusercontent.com/marijnh/cl-tk/c9e25704c33b31effddb5ea9192bd562a12ba748/acl.lisp | lisp | (in-package :cl-tk)
(let ((loaded nil))
(defun load-libs ()
(unless loaded
#+unix
(progn (load "libtcl8.5.so")
(load "libtk8.5.so"))
#+mswindows
(progn (load "tcl85.dll")
(load "tk85.dll"))
#+(and (not mswindows) (not unix))
(error "Don't know how to ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.