_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 |
|---|---|---|---|---|---|---|---|---|
3fef7dd8da81a4dd747bc99d3fa8d073d59f2a73ec58b1285f8ca2c633864485 | SRI-CSL/yices2_ocaml_bindings | gmp.yes.ml | let present = true
| null | https://raw.githubusercontent.com/SRI-CSL/yices2_ocaml_bindings/16e91100f82079576d63cbc3c49962178b79dfb9/config/gmp.yes.ml | ocaml | let present = true
| |
d75d0830d421f07430635c4d27e0828701017a460302a48777e19507c17a13d9 | binaryage/cljs-devtools | main.cljs | (ns devtools.main
(:require [devtools.core]))
| null | https://raw.githubusercontent.com/binaryage/cljs-devtools/d07fc6d404479b1ddd32cecc105009de77e3cba7/test/src/tests/devtools/main.cljs | clojure | (ns devtools.main
(:require [devtools.core]))
| |
27e05a1566a05d586b57a0140671b84b9e544f6c79ce7ecd83bc8a8585de27bb | reanimate/reanimate | Memo.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE ExistentialQuantification #
{-# LANGUAGE RankNTypes #-}
|
Copyright : Written by
License : Unlicense
Maintainer :
Stability : experimental
Portability : POSIX
With animations defined as SVG images over time , it is unfortu... | null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/src/Reanimate/Memo.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE RankNTypes #
sizeCacheMap :: CacheMap -> Int
FIXME: There should be a way to clear the cache.
| Keys can either by any boxed object with identity (to be compared with
| Cache expensive value in global store. You must guarantee that the
key uniquely... | # LANGUAGE ExistentialQuantification #
|
Copyright : Written by
License : Unlicense
Maintainer :
Stability : experimental
Portability : POSIX
With animations defined as SVG images over time , it is unfortunately
quite easy to write inefficient code where expensive expressions are
re - e... |
43dbe2c31013c9165134029ec4234643910a1e14f0b7ff2e776d2f707dd0c2f2 | cdepillabout/testing-code-that-accesses-db-in-haskell | Test.hs |
-- These are the tests for our api. The only real interesting parts are
the ' DBAccess ' instance and ' app ' function .
# LANGUAGE DeriveFunctor #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE... | null | https://raw.githubusercontent.com/cdepillabout/testing-code-that-accesses-db-in-haskell/d6afb919bf42f5670a8182e918cd98e7581bb87b/without-db/typeclass/test/Test.hs | haskell | These are the tests for our api. The only real interesting parts are
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
'DB' monad, and evaluates it in a Servant context (e.g. the @'EitherT'
(corresponding to the id count) for simplicity, but it could easily be
something in the database. ... |
the ' DBAccess ' instance and ' app ' function .
# LANGUAGE DeriveFunctor #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
module Main (main) where
import Control.Monad (w... |
355184d8382675fd6578fdc478e0cca9d7a7370192913c337141853b45ecf314 | D00mch/PWA-clojure | app.cljs | (ns pwa.app
(:require [pwa.core :as core]))
;;ignore println statements in prod
(set! *print-fn* (fn [& _]))
(core/init!)
| null | https://raw.githubusercontent.com/D00mch/PWA-clojure/39ab4d3690c7a8ddbdd8095d65a782961f92c183/env/prod/cljs/pwa/app.cljs | clojure | ignore println statements in prod | (ns pwa.app
(:require [pwa.core :as core]))
(set! *print-fn* (fn [& _]))
(core/init!)
|
851d0230e3c6cef02f84f0e93c1bb5b7a812307d2ab12b4dbbf6a59f22f79dd4 | fulcrologic/fulcro | tx_processing_debug.cljc | (ns com.fulcrologic.fulcro.algorithms.tx-processing-debug
"Helper functions for debugging tx processing. Uses pprint, which adds
a lot to build size, so it is in a separate ns to keep it out of prod builds."
(:require
[clojure.string :as str]
[clojure.pprint :refer [pprint]]))
(defn tx-status!
"Debugg... | null | https://raw.githubusercontent.com/fulcrologic/fulcro/71ed79c650222567ac4a566513365a95f12657e3/src/main/com/fulcrologic/fulcro/algorithms/tx_processing_debug.cljc | clojure | (ns com.fulcrologic.fulcro.algorithms.tx-processing-debug
"Helper functions for debugging tx processing. Uses pprint, which adds
a lot to build size, so it is in a separate ns to keep it out of prod builds."
(:require
[clojure.string :as str]
[clojure.pprint :refer [pprint]]))
(defn tx-status!
"Debugg... | |
c1e3574fa72919c014a58c40dc92fe45886bb861358f3f4ca938b775f44cb7f9 | kmi/irs | simple-time-modified.lisp | Mode : Lisp ; Package :
The Open University
(in-package "OCML")
(in-ontology simple-time)
(def-class year-in-time ()?x
"A year-in-time must be an integer and integer can be a year-in-time"
:iff-def (integer ?x))
(def-class month-in-time ()?x
"A month-in-time is an integer in the interval 0-12"
:iff-def (and (... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/simple-time-modified/simple-time-modified.lisp | lisp | Package :
; ; These are few useful relations for the Time - Ranges ; ; ; * ; ; ;
These are BASIC relations;;;
; ;
This function decodes the subtracted result of time-point difference into again standard time-point structure.;;; |
The Open University
(in-package "OCML")
(in-ontology simple-time)
(def-class year-in-time ()?x
"A year-in-time must be an integer and integer can be a year-in-time"
:iff-def (integer ?x))
(def-class month-in-time ()?x
"A month-in-time is an integer in the interval 0-12"
:iff-def (and (integer ?x)(< ?x 13) (or (=... |
83254c6f1176962bc27a017d51bc7502c2d394712c247acb54eceb388b048b3f | 05st/capri | Lexer.hs | {-# Language OverloadedStrings #-}
module Lexer where
import Data.Char
import Data.Text (Text, singleton)
import Data.Void
import Control.Monad.Reader
import Text.Megaparsec
import Text.Megaparsec.Char
import qualified Text.Megaparsec.Char.Lexer as L
import OperatorDef
type Parser = ReaderT [OperatorDef] (Parsec ... | null | https://raw.githubusercontent.com/05st/capri/aed6f6cce3302992a7f6519fa830faa825ba65c5/src/Lexer.hs | haskell | # Language OverloadedStrings # |
module Lexer where
import Data.Char
import Data.Text (Text, singleton)
import Data.Void
import Control.Monad.Reader
import Text.Megaparsec
import Text.Megaparsec.Char
import qualified Text.Megaparsec.Char.Lexer as L
import OperatorDef
type Parser = ReaderT [OperatorDef] (Parsec Void Text)
reservedNames :: [Text]... |
d0ddbe9b3cac170e56a95cfebfd867b10604f133ae91e2994a3252e32ec03bbe | wireapp/wire-server | Types.hs | -- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License... | null | https://raw.githubusercontent.com/wireapp/wire-server/cb6e9c23459dab34fe15d0f9427603ca672fc682/services/brig/src/Brig/Team/Types.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module Brig.Team.Types where
im... |
da01ad24b48727b6efc969b531882874699c16088d55a07c568dfaad3b1f8b6f | helvm/helma | EvaluatorSpec.hs | module HelVM.HelMA.Automata.SubLeq.EvaluatorSpec (spec) where
import HelVM.HelMA.Automata.SubLeq.Evaluator
import HelVM.HelMA.Automata.SubLeq.FileExtra
import HelVM.HelMA.Automaton.Types.RAMType
import HelVM.GoldenExpectations
import HelVM.HelMA.Automaton.IO.MockIO
... | null | https://raw.githubusercontent.com/helvm/helma/ca7f0c7fe08b5d6614875319d8d14110395f038a/hs/test/HelVM/HelMA/Automata/SubLeq/EvaluatorSpec.hs | haskell | , ("eForth" , "" ) | module HelVM.HelMA.Automata.SubLeq.EvaluatorSpec (spec) where
import HelVM.HelMA.Automata.SubLeq.Evaluator
import HelVM.HelMA.Automata.SubLeq.FileExtra
import HelVM.HelMA.Automaton.Types.RAMType
import HelVM.GoldenExpectations
import HelVM.HelMA.Automaton.IO.MockIO
... |
ab240a1b3b28e218343b03c29106fff3b1f60f202537bd78ba4790a473bc88c5 | travitch/llvm-analysis | Names.hs | # LANGUAGE TypeOperators #
| Utilities to parse the type names used by . Names are parsed
into the representation used by the Itanium ABI package . This
-- representation can deal with namespace qualified names and supports
conversion between Strings and Names .
module LLVM.Analysis.Util.Names (
parseTypeN... | null | https://raw.githubusercontent.com/travitch/llvm-analysis/090c3484650552e620d02c5ddc7885267e04ac62/src/LLVM/Analysis/Util/Names.hs | haskell | representation can deal with namespace qualified names and supports
Just a hack since we know we won't have qualifiers. It is fine if
it always fails because the empty list is allowed | # LANGUAGE TypeOperators #
| Utilities to parse the type names used by . Names are parsed
into the representation used by the Itanium ABI package . This
conversion between Strings and Names .
module LLVM.Analysis.Util.Names (
parseTypeName,
unparseTypeName,
parseFunctionName,
unparseFunctionName
) ... |
3c249c77e87b506861c030b47e95d567503dcee930ac6b6561da5cc51b60f9b4 | adrieng/pulsar | compiler.mli | This file is part of Pulsar , a temporal functional language .
* Copyright ( C ) 2017
*
* This program is free software : you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation , either version 3 of the License , or ... | null | https://raw.githubusercontent.com/adrieng/pulsar/c3901388659d9c7978b04dce0815e3ff9aea1a0c/pulsar-lib/compiler.mli | ocaml | * The following functions can be called by passes to communicate messages to
the user. The [error] function never returns.
* The type of passes.
* [names p] returns the name of the atomic passes included in the pass
[p]. | This file is part of Pulsar , a temporal functional language .
* Copyright ( C ) 2017
*
* This program is free software : you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation , either version 3 of the License , or ... |
656dd3e896b7052f5ce573838952658b03bb6b40b3a37fb0cfd3042882385ec3 | janestreet/virtual_dom | css_parser.ml | (* Recursive descent parsers. A parser returns false if based on a
single token lookahead it decides that the given text can not be
parsed. Any other parse errors are handled by raising exceptions.
Some parsers return unit because we only call them when a failure
to parse implies a parse error (and not t... | null | https://raw.githubusercontent.com/janestreet/virtual_dom/756eafc44873737352ff35d1c13d6dc1e0eb24fb/css_gen/src/css_parser.ml | ocaml | Recursive descent parsers. A parser returns false if based on a
single token lookahead it decides that the given text can not be
parsed. Any other parse errors are handled by raising exceptions.
Some parsers return unit because we only call them when a failure
to parse implies a parse error (and not tha... |
open Core
open! Int.Replace_polymorphic_compare
let rec next ct =
Css_tokenizer.next ct;
if Css_tokenizer.(Token.equal (current ct) Comment) then next ct else ()
;;
let skip_white_space ct =
while Css_tokenizer.(Token.equal (current ct) White_space) do
next ct
done
;;
let accept ct expected =
let got ... |
4cf2ca9388e0c20dcd7045a050c28e6a9e3a304971c6581788aaf3e7feb8fd9d | robert-strandh/SICL | generic-functions.lisp | (cl:in-package #:sicl-package)
(defgeneric (setf home-package) (new-home-package symbol))
(defgeneric delete-package (package-designator))
| null | https://raw.githubusercontent.com/robert-strandh/SICL/ae4604e27b86c955d7a27d7d0ed0808a7404a83a/Code/Package/generic-functions.lisp | lisp | (cl:in-package #:sicl-package)
(defgeneric (setf home-package) (new-home-package symbol))
(defgeneric delete-package (package-designator))
| |
8e4f3875e53d6b71b6fadeb758ded0e6ec1d6d94d591cfd704d852b130dcdb04 | ygrek/mldonkey | gui_columns.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/gtk/gui/gui_columns.ml | ocaml | * Types to define columns.
* The different columns which can be displayed for a file.
* The different columns which can be displayed for a client/location/friend.
* The different columns which can be displayed for a server.
* The different columns which can be displayed for a search result.
* The different columns... | 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
... |
b34d1c14c0c3e10bab7dde8c78de980bd494f3d395f1a78250eedd1a04966510 | alonsodomin/groot | Shell.hs | {-# LANGUAGE OverloadedStrings #-}
module Groot.Shell (grootShell) where
import Control.Monad.IO.Class
import Data.String
import qualified Data.Text as T
import Data.Version (showVersion)
import Options.Applicative hiding (defaultPrefs)
import qu... | null | https://raw.githubusercontent.com/alonsodomin/groot/040215db2797bef27b1c336ea826a58ddd45f8de/src/Groot/Shell.hs | haskell | # LANGUAGE OverloadedStrings # |
module Groot.Shell (grootShell) where
import Control.Monad.IO.Class
import Data.String
import qualified Data.Text as T
import Data.Version (showVersion)
import Options.Applicative hiding (defaultPrefs)
import qualified Options.Applicative as... |
12aa2818972bd25ed12180685e4e889fb3262bc67deb47a5437e49aade75438a | afiniate/aws_async | sqs_sendmessage.ml | open Core.Std
open Async.Std
open Deferred.Result.Monad_infix
type result = {message_md5:String.t;
message_id:String.t;
request_id:String.t} with sexp
let parse_result xml_string =
let open Result.Monad_infix in
let parse_send_message_result channel =
Sqs_xml.expect_tag channel ~... | null | https://raw.githubusercontent.com/afiniate/aws_async/44c27bf9f18f76e9e6405c2252098c4aa3d9a8bc/lib/sqs/sqs_sendmessage.ml | ocaml | open Core.Std
open Async.Std
open Deferred.Result.Monad_infix
type result = {message_md5:String.t;
message_id:String.t;
request_id:String.t} with sexp
let parse_result xml_string =
let open Result.Monad_infix in
let parse_send_message_result channel =
Sqs_xml.expect_tag channel ~... | |
6527f42b463db5aadcbc6e7ba80fe96f06d7452ba930367d66110eb6298f3cd6 | CompSciCabal/SMRTYPRTY | nested-sequences.rkt | #lang racket
2.40
(define (prime? n)
(define (check-prime n divisor)
(cond [(> divisor (sqrt n))
#t]
[(= (modulo n divisor) 0)
#f]
[else (check-prime n (+ divisor 1))]))
(check-prime n 2))
(define (flatmap proc seq)
(foldr append empty (map proc seq)))
(define (... | null | https://raw.githubusercontent.com/CompSciCabal/SMRTYPRTY/4a5550789c997c20fb7256b81469de1f1fce3514/sicp/v4/2.4/nested-sequences.rkt | racket | unfinished!
(define (unique-triples n)
(flatmap
(lambda (i)
(flatmap (lambda (j)
(map (lambda (k)
(list i j k))
(define (triples-that-sum-to n s)
(filter
sum-to-s
(unique-triples n))) | #lang racket
2.40
(define (prime? n)
(define (check-prime n divisor)
(cond [(> divisor (sqrt n))
#t]
[(= (modulo n divisor) 0)
#f]
[else (check-prime n (+ divisor 1))]))
(check-prime n 2))
(define (flatmap proc seq)
(foldr append empty (map proc seq)))
(define (... |
2aad1ff7ea531f3965f8e581017afe8b886d934d0862ec46fb60974cc4da62e4 | exercism/clojure | allergies.clj | (ns allergies)
(defn allergies [] ;; <- arglist goes here
;; your code goes here
)
(defn allergic-to? [] ;; <- arglist goes here
;; your code goes here
)
| null | https://raw.githubusercontent.com/exercism/clojure/7ed96a5ae3c471c37db2602baf3db2be3b5a2d1a/exercises/practice/allergies/src/allergies.clj | clojure | <- arglist goes here
your code goes here
<- arglist goes here
your code goes here | (ns allergies)
)
)
|
aaf9f2611514630da8074d633babf941dec5879f029b599ace25ac4200524ac4 | cardmagic/lucash | signals.scm | Signal constant definitions for HP - UX
Copyright ( c ) 1994 by . See file COPYING .
Copyright ( c ) 1994 by .
(define-enum-constants signal
(hup 1) ; floating point exception
(int 2) ; Interrupt
(quit 3) ; quit
(ill 4) ; Illegal instruction (not reset when caught)
(trap 5) ; trace trap (... | null | https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scsh/hpux/signals.scm | scheme | floating point exception
Interrupt
quit
Illegal instruction (not reset when caught)
trace trap (not reset when caught)
Process abort signal
IOT instruction
EMT instruction
Floating point exception
kill (cannot be caught of ignored)
bus error
Segmentation violation
bad argument to system call
... | Signal constant definitions for HP - UX
Copyright ( c ) 1994 by . See file COPYING .
Copyright ( c ) 1994 by .
(define-enum-constants signal
user defined signal 1
user defined signal 2
for HP - UX hpstreams signal
urgent condition on IO channel
Signal 31 is reserved for future use .
(define sign... |
6819586d24228ff4255d17fca451cbfd3bc3ce44ea41d706b3bc07c778104684 | softwarelanguageslab/maf | stutter.scm | From SOTER benchmarks ( stutter ) . Description from SOTER :
;; A process running stutter discards a message in the mailbox and feeds the next to its functional argument and so on in a loop. Another process sends a `bad argument' and a good one in alternation such that only the good ones are fed to the function. The ... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/be58e02c63d25cab5b48fdf7b737b68b882e9dca/test/concurrentScheme/actors/contracts/soter/stutter.scm | scheme | A process running stutter discards a message in the mailbox and feeds the next to its functional argument and so on in a loop. Another process sends a `bad argument' and a good one in alternation such that only the good ones are fed to the function. The property is that the function is never called with a bad argument... | From SOTER benchmarks ( stutter ) . Description from SOTER :
This example shows some limitations of : no data / message abstraction supported by can get rid of the spurious traces .
(letrec ((stutter (actor "stutter" (f)
(message (x)
(become unstutter f))... |
c6025b0fb223da85fde57ff41179e3cb205a09713916a8d131b39341ce9316f9 | BU-CS320/Fall-2018 | ParserMonad.hs | module ParserMonad where
import Control.Monad(ap)
import Data.Char
If your intrestied in this style of parsing look at the parsec , megaparsec , attoparsec libraries
-- the type of a parser
-- these are the same as last time, but we wrap it in a data so we can define typeclasses on it
data Parser a = Parser (Stri... | null | https://raw.githubusercontent.com/BU-CS320/Fall-2018/beec3ca88be5c5a62271a45c8053fb1b092e0af1/project/src/ParserMonad.hs | haskell | the type of a parser
these are the same as last time, but we wrap it in a data so we can define typeclasses on it
a helper function to pull out the function bit (same as book)
fmap :: (a -> b) -> Parser a -> Parser b
ignore this for now
return :: a -> Parser a
read in a char (from book)
a parser that always fails... | module ParserMonad where
import Control.Monad(ap)
import Data.Char
If your intrestied in this style of parsing look at the parsec , megaparsec , attoparsec libraries
data Parser a = Parser (String -> Maybe (a, String))
parse :: Parser a -> (String -> Maybe (a, String))
parse (Parser f) = f
instance Functor P... |
fb5bbc18306534631b4017da5bed11cce216aaa7c1a5bc64ee223d8c5a128276 | alexisvincent/voip | user.clj | (ns user
(:require [dev :as dev]
[clojure.spec.test :as s]))
(defn start
"Load and switch to the 'dev' namespace."
[]
;(require 'dev)
(in-ns 'dev)
(s/instrument))
(start) | null | https://raw.githubusercontent.com/alexisvincent/voip/d99dcd499b5640e2eff505e7b10cc296495204cf/dev/user.clj | clojure | (require 'dev) | (ns user
(:require [dev :as dev]
[clojure.spec.test :as s]))
(defn start
"Load and switch to the 'dev' namespace."
[]
(in-ns 'dev)
(s/instrument))
(start) |
1d77d4741865172db0d661147e280666cac62718f8758bee446d1e08354fb685 | Metaxal/MrEd-Designer | widget.rkt | #lang racket
(require "../../mred-plugin.rkt"
"../../default-values.rkt"
racket/gui/base)
(define dft-prefix (get-default-shortcut-prefix))
(make-plugin
[type 'menu-item]
[tooltip "Menu Item"]
[button-group "Menu"]
[widget-class menu-item%]
[parent-class (list menu% popup-menu%)]
[necessary '... | null | https://raw.githubusercontent.com/Metaxal/MrEd-Designer/220833b738a1d46fbe309ea124ef61b825e42e68/mred-designer/widgets/menu-item/widget.rkt | racket | widget properties | #lang racket
(require "../../mred-plugin.rkt"
"../../default-values.rkt"
racket/gui/base)
(define dft-prefix (get-default-shortcut-prefix))
(make-plugin
[type 'menu-item]
[tooltip "Menu Item"]
[button-group "Menu"]
[widget-class menu-item%]
[parent-class (list menu% popup-menu%)]
[necessary '... |
286e0e0f984a2ec955f26a2c6190cc01e4a8ecf788bf1f49d2f92ad320ba3314 | pink-gorilla/webly | emoji.cljs | (ns demo.emoji)
;; font awesome example:
;; [:i.fas.fa-trash]
; / - icon font generator
(defn emoji [name]
[:i {:class (str "fiem " name)}])
; fontisto-emoji
; another option is:
; -css.afeld.me/
; nice browser, but they have no npm
| null | https://raw.githubusercontent.com/pink-gorilla/webly/d449a506e6101afc16d384300cdebb7425e3a7f3/demo-webly/src/demo/emoji.cljs | clojure | font awesome example:
[:i.fas.fa-trash]
/ - icon font generator
fontisto-emoji
another option is:
-css.afeld.me/
nice browser, but they have no npm | (ns demo.emoji)
(defn emoji [name]
[:i {:class (str "fiem " name)}])
|
7b72ce9298a70bba38ee485c8d726d588a50a82cfb18ecd2695f25ccdbb1ad27 | clojurebook/ClojureProgramming | game.clj | (ns com.clojurebook.concurrency.game
(:use [com.clojurebook.concurrency :only (futures wait-futures)])
(:require clojure.pprint
[clojure.set :as set]))
(defn character
[name & {:as opts}]
(ref (merge {:name name :items #{} :health 500}
opts)))
(defn attack
"Attacks `target` based o... | null | https://raw.githubusercontent.com/clojurebook/ClojureProgramming/bcc7c58862982a5793e22788fc11a9ed7ffc548f/ch04-concurrency-game/src/com/clojurebook/concurrency/game.clj | clojure | the latter | (ns com.clojurebook.concurrency.game
(:use [com.clojurebook.concurrency :only (futures wait-futures)])
(:require clojure.pprint
[clojure.set :as set]))
(defn character
[name & {:as opts}]
(ref (merge {:name name :items #{} :health 500}
opts)))
(defn attack
"Attacks `target` based o... |
94b8245cb9d15398d4afb647ba44512ff448c8a10e8ca2b29920313ba9edfd86 | Airini/FEECa | Properties.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
module Properties where
import FEECa.Internal.Form
import FEECa.Internal.Spaces
import FEECa . Internal . Vector
import FEECa.Utility.Utility (expSign)
import FEECa.Mask
import Test.QuickCheck as TQ
-- | Abstract properties
prop_linearity :: Module m => (Sca... | null | https://raw.githubusercontent.com/Airini/FEECa/3ffae7177fca159d965b70e3763a20ab84cd8a8b/src/Properties.hs | haskell | | Abstract properties
| Ring properties
Addition commutativity
Addition associativity
(add x y) z == add x (add y z)
Addition identity element
add x addId == x && add addId x == x
Product commutativity
Product associativity
Addition identity element
inverses, distributivity
| Module properties
Addition com... | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
module Properties where
import FEECa.Internal.Form
import FEECa.Internal.Spaces
import FEECa . Internal . Vector
import FEECa.Utility.Utility (expSign)
import FEECa.Mask
import Test.QuickCheck as TQ
prop_linearity :: Module m => (Scalar m -> Scalar m -> Bool... |
cbbd4421c95638a209185bfd9890941023a0d05e36b497cd976c3f9354392afc | ardumont/haskell-lab | Calculator.hs | module Calculator where
import Parsers
import IORoutine
# # # # # # # # # # # # # # # Calculator
box :: [String]
box = ["+---------------+",
"| |",
"+---+---+---+---+",
"| q | c | d | = |",
"+---+---+---+---+",
"| 1 | 2 | 3 | + |",
"+---+---+---+---+",
... | null | https://raw.githubusercontent.com/ardumont/haskell-lab/6d1f130300f33dc982c9a6b5d0b6a63af2c2666d/src/Calculator.hs | haskell | The last part of the user interface is to define a function that shows a string in
last thirteen characters of the string. In this manner, if the user deletes characters
from the string, they will automatically be removed from the display, and if the
left as additional characters are typed.
The calculator itself i... | module Calculator where
import Parsers
import IORoutine
# # # # # # # # # # # # # # # Calculator
box :: [String]
box = ["+---------------+",
"| |",
"+---+---+---+---+",
"| q | c | d | = |",
"+---+---+---+---+",
"| 1 | 2 | 3 | + |",
"+---+---+---+---+",
... |
5ac3fdfa97f7d5b2e85fb846e27441b0cf1fff06c157331154b05c5e9d6f40f7 | hmage/mp3packer | mp3framehuffman.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This file is a part of mp3packer .
is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as publi... | null | https://raw.githubusercontent.com/hmage/mp3packer/2afb10dd0451da7359a10e147fd10cd41c1ce5e7/mp3framehuffman.ml | ocaml | get_huffman ht_num int_for_processing start_left_shift
NOTE: count* values are actually the number of quants, NOT the number of quant pairs
For some reason, ht4 doesn't exist...
Count1 tables
Spam up this level
It's in a sub-array
Make a new array
This is BAD
Add to an already-existing array
Make a n... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This file is a part of mp3packer .
is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as publi... |
10f3be30262cd884a23d3d227228dd8e35e9e89eecb77de770e71b8a883aff33 | JHU-PL-Lab/jaylang | dotprod2.ml |
let update a i x j = if j=i then x else a j
let rec dotprod v1 v2 n i sum =
if i > n
then sum
else
begin
assert (0<=i && i<=n);
dotprod v1 v2 n (i+1) (sum + v1 i * v2 i)
end
let main i n =
let v1 i = 0 in
let v2 i = 0 in
dotprod v1 v2 n 0 0; ()
| null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/benchmark/cases/mochi_origin/mochi/dotprod2.ml | ocaml |
let update a i x j = if j=i then x else a j
let rec dotprod v1 v2 n i sum =
if i > n
then sum
else
begin
assert (0<=i && i<=n);
dotprod v1 v2 n (i+1) (sum + v1 i * v2 i)
end
let main i n =
let v1 i = 0 in
let v2 i = 0 in
dotprod v1 v2 n 0 0; ()
| |
cbb88ca3d58b211839018200af2c3d228596840628b57b4d59edab452a26fd50 | GaloisInc/ivory | Syntax.hs | module Ivory.Language.Syntax (
module Exports
) where
import Ivory.Language.Syntax.AST as Exports
import Ivory.Language.Syntax.Names as Exports
import Ivory.Language.Syntax.Type as Exports
| null | https://raw.githubusercontent.com/GaloisInc/ivory/53a0795b4fbeb0b7da0f6cdaccdde18849a78cd6/ivory/src/Ivory/Language/Syntax.hs | haskell | module Ivory.Language.Syntax (
module Exports
) where
import Ivory.Language.Syntax.AST as Exports
import Ivory.Language.Syntax.Names as Exports
import Ivory.Language.Syntax.Type as Exports
| |
0d269205fe21f8ac3cd7f6bbf1c38593af7ec824939158beb28e53e522e60ccc | ocsigen/js_of_ocaml | gen_stubs.ml | Js_of_ocaml
* /
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your option ) any later vers... | null | https://raw.githubusercontent.com/ocsigen/js_of_ocaml/bffe7ee8a3e44f595b229991fdb56a5c0763b605/lib/gen_stubs/gen_stubs.ml | ocaml | Js_of_ocaml
* /
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your option ) any later vers... | |
a189face4d47099c10513dd2aa707a031048ce1250244849c7d86b3c6116a6ac | simplex-chat/simplexmq | Server.hs | # LANGUAGE DataKinds #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE NumericUnderscores #
# LANGUAGE OverloadedLists #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LAN... | null | https://raw.githubusercontent.com/simplex-chat/simplexmq/e4aad7583f425765c605cd8042e3136e048bdbec/src/Simplex/Messaging/Server.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
|
Module : Simplex.Messaging.Server
Copyright : (c) simplex.chat
License : AGPL-3
Maintainer :
Stability : experimental
Portability : non-portable
This module defines SMP protocol server with in-memory persistence
and op... | # LANGUAGE DataKinds #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE NumericUnderscores #
# LANGUAGE OverloadedLists #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
module Simplex.Messaging.Serve... |
8253726a52fc00bd1a15b6df7705e73fe1764ec84669b3badc27d3bffd89e291 | juspay/atlas | Auth.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/atlas-transport/src/Utils/Auth.hs | haskell | | Performs simple token verification.
| Verifies admin's token. | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... |
0231558a3e6b54b42576128748980cec6f7f52b2b5b43e7402ed6c417e826f1b | cxxxr/sblint | compiler-aux.lisp | (defpackage #:sblint/utilities/compiler-aux
(:use #:cl)
(:import-from #:swank)
(:export #:ignorable-compiler-warning-p
#:compiler-note-position))
(in-package #:sblint/utilities/compiler-aux)
(deftype ignorable-compiler-warning ()
'(or #+asdf3.3 asdf/operate:recursive-operate
;; XXX: Actual redef... | null | https://raw.githubusercontent.com/cxxxr/sblint/1037296f604c3210ce073a53539d4ae95b0c2f8c/src/utilities/compiler-aux.lisp | lisp | XXX: Actual redefinition should be warned, however it loads the same file twice when compile-time & load-time and it shows many redefinition warnings. | (defpackage #:sblint/utilities/compiler-aux
(:use #:cl)
(:import-from #:swank)
(:export #:ignorable-compiler-warning-p
#:compiler-note-position))
(in-package #:sblint/utilities/compiler-aux)
(deftype ignorable-compiler-warning ()
'(or #+asdf3.3 asdf/operate:recursive-operate
sb-kernel:redefiniti... |
4ec99d4ce76ef868ceae3792f7c2c56d3040f6eea58165b4e107fc2a9571cfdc | system-f/lets-lens | Profunctor.hs | module Lets.Profunctor (
Profunctor(dimap)
) where
import Lets.Data
| A profunctor is a binary functor , with the first argument in contravariant
( negative ) position and the second argument in covariant ( positive ) position .
class Profunctor p where
dimap ::
(b -> a)
-> (c -> d)
-> p a c
-... | null | https://raw.githubusercontent.com/system-f/lets-lens/4c7da139cc3d526a346a86bc6977e6f0ba2d2193/src/Lets/Profunctor.hs | haskell | module Lets.Profunctor (
Profunctor(dimap)
) where
import Lets.Data
| A profunctor is a binary functor , with the first argument in contravariant
( negative ) position and the second argument in covariant ( positive ) position .
class Profunctor p where
dimap ::
(b -> a)
-> (c -> d)
-> p a c
-... | |
25f50284c32896ec21613417fb1bf6da003dfdd7e75868452db7dce7f2015e81 | greghendershott/vestige | depth.rkt | #lang racket/base
(require (for-syntax racket/base)
syntax/parse/define)
(provide depth-key ;for use also by tracing/wrap.rkt
with-more-logging-depth
cms->logging-depth)
;; Key used for a continuation mark to indicate the depth. Non-tail
;; calls of traced functions adjust the depth automa... | null | https://raw.githubusercontent.com/greghendershott/vestige/ee7f0b35ba5e5d1a3e5ec90976c658bce24d0ba4/vestige-lib/vestige/private/logging/depth.rkt | racket | for use also by tracing/wrap.rkt
Key used for a continuation mark to indicate the depth. Non-tail
calls of traced functions adjust the depth automatically; see
In addition, `with-more-logging-depth` increases the depth for a
dynamic extent.
Intentionally not using make-continuation-mark-key.
Accepts #f for proc... | #lang racket/base
(require (for-syntax racket/base)
syntax/parse/define)
with-more-logging-depth
cms->logging-depth)
tracing / wrap.rkt .
(define depth-key 'vestige-depth-continuation-mark-key)
(define-syntax-parser with-more-logging-depth
[(_ e:expr)
(quasisyntax/loc this-syntax
... |
957b37dcca00ac6a27f00b2af143ec85f941b5c538921493b00af001649b3f54 | hiroshi-unno/coar | hrec.ml |
USED : PLDI2011 as
USED: PLDI2011 as hrec
*)
let rec f g x = if x>=0 then g x else f (f g) (g x)
let succ x = x+1
let main n = assert (f succ n >= 0)
[@@@assert "typeof(main) <: int -> unit"]
| null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/benchmarks/OCaml/safety/tacas2015/hrec.ml | ocaml |
USED : PLDI2011 as
USED: PLDI2011 as hrec
*)
let rec f g x = if x>=0 then g x else f (f g) (g x)
let succ x = x+1
let main n = assert (f succ n >= 0)
[@@@assert "typeof(main) <: int -> unit"]
| |
bfde29d149624f57a10ee113e137e5e7098d86843f7f46ffb60d7baced4652a4 | pentlandedge/aisle | weather_obs.erl | -module(weather_obs).
-export([decode/1]).
-record(weather_obs_non_wmo, {
message_type,
repeat_indicator,
mmsi,
dac,
fid,
variant,
location,
longitude,
latitude,
utc_day,
utc_hour,
utc_minute,
present_weather,
visibility_limit,
horiz_visibility,
relative... | null | https://raw.githubusercontent.com/pentlandedge/aisle/771490934a4a71795236931253250281cc8202b0/src/weather_obs.erl | erlang | Need to find how to interpret this.
present_weather,
past_weather_1,
past_weather_2,
cloud_amount_low,
cloud_type_low,
cloud_type_middle,
cloud_type_high,
first_swell_period,
first_swell_height,
second_swell_direction,
second_swell_period,
ice_deposit_thickness,
rate_of_ice_accretion,
cause_of_ice_accret... | -module(weather_obs).
-export([decode/1]).
-record(weather_obs_non_wmo, {
message_type,
repeat_indicator,
mmsi,
dac,
fid,
variant,
location,
longitude,
latitude,
utc_day,
utc_hour,
utc_minute,
present_weather,
visibility_limit,
horiz_visibility,
relative... |
1725a18c7b4cfde4b5d062cbb403cab1afe511557a9e43f6e91cbfe799e88829 | yav/monadlib | Derive.hs | {-# LANGUAGE Rank2Types #-}
{-# LANGUAGE Safe #-}
| This module defines a number of functions that make it easy
to get the functionality of MonadLib for user - defined newtypes .
to get the functionality of MonadLib for user-defined newtypes.
-}
module MonadLib.Derive (
Iso(Iso),
derive_fmap,
derive_pure, de... | null | https://raw.githubusercontent.com/yav/monadlib/09b401e885dda49d623b256baaf85020f6212a12/src/MonadLib/Derive.hs | haskell | # LANGUAGE Rank2Types #
# LANGUAGE Safe #
| An isomorphism between (usually) monads.
Typically the constructor and selector of a newtype delcaration.
| Derive the implementation of 'fmap' from 'Functor'.
| Derive the implementation of 'pure' from 'Applicative'.
| Derive the implementation of '<*>' from 'Applicativ... |
| This module defines a number of functions that make it easy
to get the functionality of MonadLib for user - defined newtypes .
to get the functionality of MonadLib for user-defined newtypes.
-}
module MonadLib.Derive (
Iso(Iso),
derive_fmap,
derive_pure, derive_apply,
derive_empty, derive_or,
derive_re... |
a5fc565a72e56992af957b6b48a6809ac2ac2294207c25c5aab063a6cdd744bf | soemraws/cl-libusb | package.lisp | package.lisp
(defpackage #:libusb-ffi
(:use #:cl #:cffi)
(:export #:usb-get-busses
#:usb-get-devices
#:usb-get-devices-by-ids
#:usb-open
#:usb-close
#:usb-get-vendor-id
#:usb-get-product-id
#:usb-device-get-descriptor
#:usb-get-configurations
#:usb-get-configuration-by-valu... | null | https://raw.githubusercontent.com/soemraws/cl-libusb/2472da0705743f6f19330ca239808e7be3948bf7/package.lisp | lisp | package.lisp
(defpackage #:libusb-ffi
(:use #:cl #:cffi)
(:export #:usb-get-busses
#:usb-get-devices
#:usb-get-devices-by-ids
#:usb-open
#:usb-close
#:usb-get-vendor-id
#:usb-get-product-id
#:usb-device-get-descriptor
#:usb-get-configurations
#:usb-get-configuration-by-valu... | |
a29f07bf1b3edb4df56f1693694fddc339a8b9600be67c63285f359ae8a0a98c | ocaml-multicore/reagents | core.ml |
* Copyright ( c ) 2015 , < >
* Copyright ( c ) 2015 , < >
*
* Permission to use , copy , modify , and/or 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 S... | null | https://raw.githubusercontent.com/ocaml-multicore/reagents/6721db78b21028c807fb13d0af0aaf9407c662b5/lib/core.ml | ocaml | No offer
Offer rescinded successfully
[f] should be a pure function |
* Copyright ( c ) 2015 , < >
* Copyright ( c ) 2015 , < >
*
* Permission to use , copy , modify , and/or 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 S... |
54a069e212507948ce163794acc45b638e380c12a53323e12f60306975568b4b | acl2/acl2 | test-value.lisp | C Library
;
Copyright ( C ) 2023 Kestrel Institute ( )
Copyright ( C ) 2023 Kestrel Technology LLC ( )
;
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
;
Author : ( )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package "C")
(i... | null | https://raw.githubusercontent.com/acl2/acl2/44f76f208004466a9e6cdf3a07dac98b3799817d/books/kestrel/c/atc/symbolic-execution-rules/test-value.lisp | lisp | C Library
Copyright ( C ) 2023 Kestrel Institute ( )
Copyright ( C ) 2023 Kestrel Technology LLC ( )
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
Author : ( )
(in-package "C")
(include-book "../../language/dynamic-semantics")
(include-book "../../representation/in... | |
f88469f2aa707fae73411e412ae336aaaea6391995be9c22668ac0d567980983 | chef/chef-server | chef_sql_tests.erl | Copyright Chef Software , Inc. 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 License at
%%
%% -2.0
%%
%% Unless required by applicable law or agr... | null | https://raw.githubusercontent.com/chef/chef-server/6d31841ecd73d984d819244add7ad6ebac284323/src/oc_erchef/apps/chef_db/test/chef_sql_tests.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 permissions and limitations
under the License.
| Copyright Chef Software , Inc. 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(chef_sql_tests).
... |
96e2fa199d51692703ae27856c88172c6965b6bdbbc782ea5e2f699eb8c4bb9d | hjcapple/reading-sicp | exercise_2_31.scm | #lang racket
P76 - [ 练习 2.31 ]
(define (square x)
(* x x))
(define (tree-map proc tree)
(cond ((null? tree) null)
((not (pair? tree)) (proc tree))
(else (cons (tree-map proc (car tree))
(tree-map proc (cdr tree))))))
(define (tree-map-2 proc tree)
(define (f sub-tree)
... | null | https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_2/exercise_2_31.scm | scheme | #lang racket
P76 - [ 练习 2.31 ]
(define (square x)
(* x x))
(define (tree-map proc tree)
(cond ((null? tree) null)
((not (pair? tree)) (proc tree))
(else (cons (tree-map proc (car tree))
(tree-map proc (cdr tree))))))
(define (tree-map-2 proc tree)
(define (f sub-tree)
... | |
549451fbfaf2c85b9d62028a7eae19b68fdf9146e6c4b5e4fca93767318f03d6 | racket/macro-debugger | tainted.rkt | #lang racket/base
(require racket/class
racket/format
racket/list
racket/snip
racket/draw
racket/math
"base.rkt")
(provide tainted-icon-snip%
snip-class)
(define tainted-icon-snip%
(class one-cell-snip%
(inherit get-style set-snipclass get/cache-exte... | null | https://raw.githubusercontent.com/racket/macro-debugger/d4e2325e6d8eced81badf315048ff54f515110d5/macro-debugger/macro-debugger/syntax-browser/icons/tainted.rkt | racket | #lang racket/base
(require racket/class
racket/format
racket/list
racket/snip
racket/draw
racket/math
"base.rkt")
(provide tainted-icon-snip%
snip-class)
(define tainted-icon-snip%
(class one-cell-snip%
(inherit get-style set-snipclass get/cache-exte... | |
488b175248ba723bf3e46f3fd82a8fbeb814d49b0003f342f8c36f1248818a1a | iloveponies/p-p-p-pokerface | p_p_p_pokerface_test.clj | (ns p-p-p-pokerface-test
(:use iloveponies.tests.p-p-p-pokerface))
| null | https://raw.githubusercontent.com/iloveponies/p-p-p-pokerface/0daa7266a751399616a97c016ace8da4e9df4db4/test/p_p_p_pokerface_test.clj | clojure | (ns p-p-p-pokerface-test
(:use iloveponies.tests.p-p-p-pokerface))
| |
3281def0621e931bff1f3a25034060ab3e8832583ccc5fdccb201314374c8abf | dpiponi/Moodler | Moodler.hs | { - # LANGUAGE TemplateHaskell # - }
import Control.Monad
import Sound.OSC
import System.Posix.DynamicLinker
import Data.IORef
import qualified Data.Map as M
import qualified Data.Set as S
import Control.Monad.Trans.Error
import Data.Array.IArray
import Control.Monad.State
import Audio
import Synth
import CodeBuild
i... | null | https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/src/Moodler.hs | haskell | IORef instead.
XXX Global out? | { - # LANGUAGE TemplateHaskell # - }
import Control.Monad
import Sound.OSC
import System.Posix.DynamicLinker
import Data.IORef
import qualified Data.Map as M
import qualified Data.Set as S
import Control.Monad.Trans.Error
import Data.Array.IArray
import Control.Monad.State
import Audio
import Synth
import CodeBuild
i... |
0c0d8adbe0f746cfd9d39dd2bcbf2864838763031f37a162835ad5449e69c963 | NorfairKing/smos | Gen.hs | # OPTIONS_GHC -fno - warn - orphans #
module Smos.Cursor.Report.Timestamps.Gen where
import Cursor.Forest.Gen ()
import Cursor.Text.Gen ()
import Data.GenValidity
import Data.GenValidity.Path ()
import qualified Data.Map as M
import Smos.Cursor.Report.Entry.Gen
import Smos.Cursor.Report.Timestamps
import Smos.Data
im... | null | https://raw.githubusercontent.com/NorfairKing/smos/f72b26c2e66ab4f3ec879a1bedc6c0e8eeb18a01/smos-report-cursor-gen/src/Smos/Cursor/Report/Timestamps/Gen.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Smos.Cursor.Report.Timestamps.Gen where
import Cursor.Forest.Gen ()
import Cursor.Text.Gen ()
import Data.GenValidity
import Data.GenValidity.Path ()
import qualified Data.Map as M
import Smos.Cursor.Report.Entry.Gen
import Smos.Cursor.Report.Timestamps
import Smos.Data
im... | |
f57a9e8e46317809b94dbb117ecfb1069c3b1e564938a77997f523cf79514937 | athensresearch/athens | ops.cljc | (ns athens.common-events.graph.ops
"Building (including contextual resolution) Graph Ops like a boss."
(:require
[athens.common-db :as common-db]
[athens.common-events.graph.atomic :as atomic]
[athens.common-events.graph.composite :as composite]
[athens.common.utils ... | null | https://raw.githubusercontent.com/athensresearch/athens/47a8ff20d341c3a3e83120889980d24b1ea3d4e1/src/cljc/athens/common_events/graph/ops.cljc | clojure | block/remove atomic op
block/remove atomic op
block/save atomic op
semantic event
atomic graph op
this is plain recursion, maybe do loop recur instead
here too | (ns athens.common-events.graph.ops
"Building (including contextual resolution) Graph Ops like a boss."
(:require
[athens.common-db :as common-db]
[athens.common-events.graph.atomic :as atomic]
[athens.common-events.graph.composite :as composite]
[athens.common.utils ... |
7c64122667058e57a86a68830888a84ff377507cde44904094de6c3237c21f61 | mooreryan/pasv | fname.ml | open! Core
type t = { dir : string; basename : string; suffix : string option }
let of_string s =
let dir, name = Filename.split s in
let basename, suffix = Filename.split_extension name in
{ dir; basename; suffix }
let to_string f =
match f.suffix with
| Some suffix ->
Filename.concat f.dir (Printf.... | null | https://raw.githubusercontent.com/mooreryan/pasv/218d3bbd66069b124e255db8ff0d7fedc34a7428/lib/fname.ml | ocaml | open! Core
type t = { dir : string; basename : string; suffix : string option }
let of_string s =
let dir, name = Filename.split s in
let basename, suffix = Filename.split_extension name in
{ dir; basename; suffix }
let to_string f =
match f.suffix with
| Some suffix ->
Filename.concat f.dir (Printf.... | |
fcec19e5706519380ba7135b14f9a90754ce38d581c4a8f383d6b7f2859f7713 | haskell-servant/servant | Auth.hs | # OPTIONS_GHC -fno - warn - orphans #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveFunctor #
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
{-# LANGUAGE ScopedTypeVariable... | null | https://raw.githubusercontent.com/haskell-servant/servant/a22600979a747ee201b8a1a2a84469285631682c/servant-server/src/Servant/Server/Experimental/Auth.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
* General Auth
| Specify the type of data returned after we've authenticated a request.
quite often this is some `User` datatype.
NOTE: THIS... | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE DeriveFunctor #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module Servant.Server.Experimental.Auth where
import Control.Mon... |
06b3a83d357c9a7dbc8cdf5016a458de5070d9443caf55be9affad6e657dc63f | zotonic/zotonic | filter_is_valid_email.erl | @author < >
2015
%% @doc is_valid_email filter, test if an email has a valid syntax
Copyright 2015
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%%... | null | https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_email_status/src/filters/filter_is_valid_email.erl | erlang | @doc is_valid_email filter, test if an email has a valid syntax
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or i... | @author < >
2015
Copyright 2015
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(filter_is_valid_email).
-export([is_valid_email/2]).
is_valid_email(<<>>, _Context) ->
false;
is_valid_email([], _C... |
f528ed39f4ac41e496bb6d059c3ba4cb0532480358e5330fc5300003194ec4cb | jyh/metaprl | tptp_cache.ml |
* Create tables for success / failure / cycle - detection
* classes .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languag... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/tptp/tptp_cache.ml | ocaml |
***********************************************************************
* COMPATIBILITY
***********************************************************************
***********************************************************************
* TYPES *
**********... |
* Create tables for success / failure / cycle - detection
* classes .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languag... |
ef588ab309a4126c0bde0f036e672c5b2b95941af4b886ae7d4b178842200569 | GaloisInc/semmc | EvalFormula.hs | # LANGUAGE RankNTypes , TypeApplications , ScopedTypeVariables , TypeFamilies ,
DataKinds , AllowAmbiguousTypes , ImplicitParams #
DataKinds, AllowAmbiguousTypes, ImplicitParams #-}
module SemMC.Synthesis.Cegis.EvalFormula
( LocEval
, mkEvalLoc
, mkMemEvalLoc
, lookupInState
, evalExpression
, evalFo... | null | https://raw.githubusercontent.com/GaloisInc/semmc/3d9bc90f92a7f7ef59ff4943369dea9c0eb4b3ae/semmc-synthesis/src/SemMC/Synthesis/Cegis/EvalFormula.hs | haskell | A data structure representing functions from locations to expressions
| Convert an ArchState (a finite map from locations to expressions) into a
total function that maps locations @l@ to their default value
for that location.
| Look up the given location in the given machine state. If the location is
'Mem', retur... | # LANGUAGE RankNTypes , TypeApplications , ScopedTypeVariables , TypeFamilies ,
DataKinds , AllowAmbiguousTypes , ImplicitParams #
DataKinds, AllowAmbiguousTypes, ImplicitParams #-}
module SemMC.Synthesis.Cegis.EvalFormula
( LocEval
, mkEvalLoc
, mkMemEvalLoc
, lookupInState
, evalExpression
, evalFo... |
28ebe54045aa8215b3070394bb6e0e44654f01a09d880c5831144e8e43e5d8e6 | zwizwa/erl_tools | depgraph.erl | -module(depgraph).
-export([invert/1,
affected/2,
test/1]).
%% FIXME: rewrite previous invert_deps/2 and need_update/2 to use
%% invert and affected.
%% FIXME: looks like the original code has lost its purpose. See
%% redo.erl for some destillation of this. This can be removed.
%% Invert a depend... | null | https://raw.githubusercontent.com/zwizwa/erl_tools/affd4060ab5b963e0cc8fcfd4a1ca5023aa518d3/src/depgraph.erl | erlang | FIXME: rewrite previous invert_deps/2 and need_update/2 to use
invert and affected.
FIXME: looks like the original code has lost its purpose. See
redo.erl for some destillation of this. This can be removed.
Invert a dependency graph, e.g. to implement "push" data flow.
FIXME: find caller to need_update/2
Inste... | -module(depgraph).
-export([invert/1,
affected/2,
test/1]).
invert(Procs) ->
lists:foldr(
fun({Out, _Fun, Ins}, Map0) ->
lists:foldr(
fun(In, Map1) ->
L = maps:get(In, Map1, []),
maps:put(In, [Out|L], Map1)
... |
638d10572675557743983ce523f3eb0f8bbceb366d690c17b839610b16413b1e | racket/typed-racket | test-tab-augments.rkt | #lang typed/racket/gui
(define frame (new frame% [label "Example"]))
(define-type Tab-Panel-With-Callbacks%
(Class #:implements/inits Tab-Panel%
(init-field [on-reorder-callback ((Listof Exact-Nonnegative-Integer) -> Void)]
[on-close-request-callback (Exact-Nonnegative-Integer -> Void)... | null | https://raw.githubusercontent.com/racket/typed-racket/8b6a90b1bd5175d1480c9e3664dd12008e341af1/typed-racket-test/gui/succeed/test-tab-augments.rkt | racket | #lang typed/racket/gui
(define frame (new frame% [label "Example"]))
(define-type Tab-Panel-With-Callbacks%
(Class #:implements/inits Tab-Panel%
(init-field [on-reorder-callback ((Listof Exact-Nonnegative-Integer) -> Void)]
[on-close-request-callback (Exact-Nonnegative-Integer -> Void)... | |
ff062d318ec6872d2128504196ac834453d7ff8ff2482e9567212a81e3fcb10f | erlangonrails/devdb | exmpp_client_pubsub.erl | Copyright ProcessOne 2006 - 2010 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this s... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/exmpp-0.9.5/src/client/exmpp_client_pubsub.erl | erlang |
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the Licens... | Copyright ProcessOne 2006 - 2010 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
@author < >
@author < >
-modul... |
e523ca40d6eb05d2c220ed1b0ec5be6508654d43dfbcc6e772eae178099e9d36 | foreverbell/project-euler-solutions | 39.hs | import Data.Function (on)
import Data.List (maximumBy)
rightTriple p = [ (a,b,c) | a <- [1 .. p `div` 3], b <- [a .. ((p - a) `div` 2)], let c = p - a - b, a * a + b * b == c * c]
main = print $ maximumBy (compare `on` length . rightTriple) [1 .. 1000]
| null | https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/39.hs | haskell | import Data.Function (on)
import Data.List (maximumBy)
rightTriple p = [ (a,b,c) | a <- [1 .. p `div` 3], b <- [a .. ((p - a) `div` 2)], let c = p - a - b, a * a + b * b == c * c]
main = print $ maximumBy (compare `on` length . rightTriple) [1 .. 1000]
| |
45377bcf19602b4126bdede302df6f3b8728bf91ee15b3b4bf6a5b6930667974 | fulcrologic/fulcro-rad-semantic-ui | form_options.cljc | (ns com.fulcrologic.rad.rendering.semantic-ui.form-options
(:require
[com.fulcrologic.rad.attributes :as attr]
[com.fulcrologic.fulcro.components :as comp]))
(def ref-container-class
"This option can be used in the ::fo/subforms entries to indicate what class(es) should be set on the element that wraps
t... | null | https://raw.githubusercontent.com/fulcrologic/fulcro-rad-semantic-ui/f2d1841b5d2168e7aaad3f0a1e868c13313f5a07/src/main/com/fulcrologic/rad/rendering/semantic_ui/form_options.cljc | clojure | (ns com.fulcrologic.rad.rendering.semantic-ui.form-options
(:require
[com.fulcrologic.rad.attributes :as attr]
[com.fulcrologic.fulcro.components :as comp]))
(def ref-container-class
"This option can be used in the ::fo/subforms entries to indicate what class(es) should be set on the element that wraps
t... | |
1615d16cf71d5f524ca2f763c01d72581cecff0f8694d99785cc03891a092370 | manuel-serrano/bigloo | global.scm | ;; ---------------------------------------------------------------------- ;;
FICHIER : global.scm ; ;
DATE DE CREATION : Mon Jul 3 14:09:45 1995 ; ;
DERNIERE MODIFICATION : Tue Jul 4 09:45:43 1995 ; ;
;; --... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/runtime/Lalr/global.scm | scheme | ---------------------------------------------------------------------- ;;
;
;
;
---------------------------------------------------------------------- ;;
;
---------------------------------------------------------------------- ;;
Les variables globales ... ;;
-------... |
(module __lalr_global
(include "Lalr/lalr.sch")
(import __error
__param)
(use __type
__bigloo
__tvector
__structure
__tvector
__bexit
__bignum
__object
__thread
__rgc
__bit
__r4_numbers_6_5
__r4_numbers_6_5_fixnum
__r4_numbers_6_5_flo... |
0aaebfe8e033ddfde1a950c09e78805a0f2621a5d25255b4a0541f575ee90c02 | NorfairKing/bevel | Gen.hs | # LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Bevel.Client.Data.Gen where
import Bevel.Client.Data
import Bevel.Data.Gen ()
import Data.GenValidity
import Data.GenValidity.Persist ()
import Data.GenValidity.Text ()
instance GenValid ClientCommand where
genValid = genValidStructurally
... | null | https://raw.githubusercontent.com/NorfairKing/bevel/8cc74d83d058f916acf4cf247341852600d9456e/bevel-client-data-gen/src/Bevel/Client/Data/Gen.hs | haskell | # LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Bevel.Client.Data.Gen where
import Bevel.Client.Data
import Bevel.Data.Gen ()
import Data.GenValidity
import Data.GenValidity.Persist ()
import Data.GenValidity.Text ()
instance GenValid ClientCommand where
genValid = genValidStructurally
... | |
481e6a58c889f63307f3b9f4e9ff2dd52a431b2f2136e6965aabeb8aebbf70c3 | SonyCSLParis/BENG | list-prepositions.lisp | Copyright ( C ) 2019 - present Sony Computer Science Laboratories Paris
( www.remivantrijp.eu )
;;;
;;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Founda... | null | https://raw.githubusercontent.com/SonyCSLParis/BENG/9194aeb169ceda20f555875c5a3734c59fc0b01f/make-lexicon/list-prepositions.lisp | lisp |
This program is free software: you can redistribute it and/or modify
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for mo... | Copyright ( C ) 2019 - present Sony Computer Science Laboratories Paris
( www.remivantrijp.eu )
it under the terms of the GNU General Public License as published by
the Free Software Foundation , version 3 of the License .
You should have received a copy of the GNU... |
3bedfd9f0ca60a4f19886eba88f682216bd3aaece49ad3fd51019efab0612f75 | SnootyMonkey/posthere.io | static_templating.clj | (ns posthere.static-templating
"Use Enlive at design time to create static HTML pages from page partials and layout templates."
(:require [clojure.string :as s]
[net.cgrand.enlive-html :as enl :refer (deftemplate html-content substitute append)]))
(defonce config-file (read-string (slurp (clojure.java.... | null | https://raw.githubusercontent.com/SnootyMonkey/posthere.io/698b46c917d7f74a5fb06c13beae49ded1ca1705/src/posthere/static_templating.clj | clojure | do nothing
do nothing
insert the config'd doorbell.io app key | (ns posthere.static-templating
"Use Enlive at design time to create static HTML pages from page partials and layout templates."
(:require [clojure.string :as s]
[net.cgrand.enlive-html :as enl :refer (deftemplate html-content substitute append)]))
(defonce config-file (read-string (slurp (clojure.java.... |
d1f4661a65591ffaa163c7a40ecbc611acf12222d49a9d9d46a45e9c17c7e58c | chenyukang/eopl | simplemodules.scm | (load-relative "../libs/init.scm")
(load-relative "./base/test.scm")
(load-relative "./base/equal-type.scm")
(load-relative "./base/data-structures.scm")
(load-relative "./base/cases.scm")
;; (define debug? (make-parameter #t))
;;;;;;;;;;;;;;;; grammatical specification ;;;;;;;;;;;;;;;;
(define the-lexical-spec
'((w... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch8/base/simplemodules.scm | scheme | (define debug? (make-parameter #t))
grammatical specification ;;;;;;;;;;;;;;;;
new expression:
new types
no changes in grammar below here
sllgen boilerplate ;;;;;;;;;;;;;;;;
syntactic tests and observers ;;;;;;;;;;;;;;;;
for types
for module definitions
maybe-lookup-module-in-list : Sym * Listof(Defn) -> Ma... | (load-relative "../libs/init.scm")
(load-relative "./base/test.scm")
(load-relative "./base/equal-type.scm")
(load-relative "./base/data-structures.scm")
(load-relative "./base/cases.scm")
(define the-lexical-spec
'((whitespace (whitespace) skip)
(comment ("%" (arbno (not #\newline))) skip)
(identifier
... |
b0faabd37f61b1ebd67dd536077a4e4b0c9ede148789366e873a5a618856c256 | Simre1/haskell-game | Window.hs | | Window manipulation functions covering much of the GLFW _ _ Window guide _ _ :
< > .
Notably absent are the window creation functions . These are handled automatically by GPipe - GLFW .
--
Actions are in the ' . ' monad when a window handle is required ,
otherwise they are bare reexported IO actions whi... | null | https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/GPipe-GLFW/GPipe-GLFW/src/Graphics/GPipe/Context/GLFW/Window.hs | haskell |
* Window objects
| Learn more: #window_object
* Window event processing
No further action is required, but additional controls are available for complex applications in
* Window properties and events
| Learn more: #window_properties
** Window closing and close flag
** Window size
* Buffer swapping
* Not supp... | | Window manipulation functions covering much of the GLFW _ _ Window guide _ _ :
< > .
Notably absent are the window creation functions . These are handled automatically by GPipe - GLFW .
Actions are in the ' . ' monad when a window handle is required ,
otherwise they are bare reexported IO actions which ... |
3de05148980cfe6ad2d30d2a1d791be4c267fa851c80bed186647e29a0cc07fd | sdiehl/elliptic-curve | SECT113R1.hs | module Data.Curve.Binary.SECT113R1
( module Data.Curve.Binary
, Point(..)
-- * SECT113R1 curve
, module Data.Curve.Binary.SECT113R1
) where
import Protolude
import Data.Field.Galois
import GHC.Natural (Natural)
import Data.Curve.Binary
----------------------------------------------------------------------... | null | https://raw.githubusercontent.com/sdiehl/elliptic-curve/445e196a550e36e0f25bd4d9d6a38676b4cf2be8/src/Data/Curve/Binary/SECT113R1.hs | haskell | * SECT113R1 curve
-----------------------------------------------------------------------------
Types
-----------------------------------------------------------------------------
| SECT113R1 curve.
| Field of coefficients of SECT113R1 curve.
SECT113R1 curve is a binary curve.
# INLINABLE a_ #
# INLINABLE h_ #
# I... | module Data.Curve.Binary.SECT113R1
( module Data.Curve.Binary
, Point(..)
, module Data.Curve.Binary.SECT113R1
) where
import Protolude
import Data.Field.Galois
import GHC.Natural (Natural)
import Data.Curve.Binary
data SECT113R1
| Field of points of SECT113R1 curve .
type F2m = Binary P
type P = 0x2000... |
bc2ca3e5a753b919715743bc66279210dbbdff5572624e8bf382f49581f8c223 | ucsd-progsys/230-wi19-web | Bug.hs | \begin{code}
module Lec_1_14 where
import
\end{code}
| null | https://raw.githubusercontent.com/ucsd-progsys/230-wi19-web/7f5fc5414886fae4e2382cd5a0e48f638be06f0f/src/Week2/Bug.hs | haskell | \begin{code}
module Lec_1_14 where
import
\end{code}
| |
69bcde5bf3a3695a986ae95b01893b22d5adefb1b33ea8028299d12de0e68f9b | brownplt/Resugarer | stepper-approach-4.rkt | #lang racket
(define $redex 'gremlin)
(define $index 'gremlin)
(define $stk (list))
(define $path (list))
(define ($init-stk! x)
(set! $stk (list x)))
(define ($push! n)
(set! $path (cons n $path))
(set! $stk (cons (vector-ref (car $stk) n) $stk)))
(define ($pop!)
(set! $stk (cdr $stk))
(set! $path (cdr $pa... | null | https://raw.githubusercontent.com/brownplt/Resugarer/1353b4309c101f0f1ac2df2cba7f3cba1f0a3a37/prototype/misc/stepper-approach-4.rkt | racket | Prepare a term to be shown
Augment code to show steps | #lang racket
(define $redex 'gremlin)
(define $index 'gremlin)
(define $stk (list))
(define $path (list))
(define ($init-stk! x)
(set! $stk (list x)))
(define ($push! n)
(set! $path (cons n $path))
(set! $stk (cons (vector-ref (car $stk) n) $stk)))
(define ($pop!)
(set! $stk (cdr $stk))
(set! $path (cdr $pa... |
844cafb97445250b2c327fd29223eadf2e2be22bc4d68d593c25a553730c70ff | zenspider/schemers | exercise.2.48.scm | #lang racket/base
(require "../lib/test.rkt")
(require "../lib/myutils.scm")
Exercise 2.48
;; A directed line segment in the plane can be represented as a pair
;; of vectors--the vector running from the origin to the start-point
;; of the segment, and the vector running from the origin to the
;; end-point of the s... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_2/exercise.2.48.scm | scheme | A directed line segment in the plane can be represented as a pair
of vectors--the vector running from the origin to the start-point
of the segment, and the vector running from the origin to the
end-point of the segment. Use your vector representation from *Note
Exercise 2-46:: to define a representation for segmen... | #lang racket/base
(require "../lib/test.rkt")
(require "../lib/myutils.scm")
Exercise 2.48
(define make-segment cons)
(define start-segment car)
(define end-segment cdr)
|
5f2cf4db950f9aeda60c2f27012583453cf43f131c5e83b604923864502e8fb6 | zero-one-group/fxl | read_xlsx.clj | (ns zero-one.fxl.read-xlsx
(:require
[failjure.core :as f]
[zero-one.fxl.alignments :as alignments]
[zero-one.fxl.borders :as borders]
[zero-one.fxl.colours :as colours]
[zero-one.fxl.defaults :as defaults])
(:import
[java.io FileInputStream]
[org.apache.poi.xssf.usermodel XSSFWorkbook]
[org... | null | https://raw.githubusercontent.com/zero-one-group/fxl/6b9f63a30db3eaea4968782749bfadb8eb3441db/src/zero_one/fxl/read_xlsx.clj | clojure | (ns zero-one.fxl.read-xlsx
(:require
[failjure.core :as f]
[zero-one.fxl.alignments :as alignments]
[zero-one.fxl.borders :as borders]
[zero-one.fxl.colours :as colours]
[zero-one.fxl.defaults :as defaults])
(:import
[java.io FileInputStream]
[org.apache.poi.xssf.usermodel XSSFWorkbook]
[org... | |
1604eaef19739f0d3f5e7c29233099bd3b62e5426be3ddf674afa9b0cb043999 | deadpendency/deadpendency | TheMain.hs | module FD.TheMain
( theMain,
)
where
import Common.Loader.CommonConfigLoader (loadCommonConfig)
import Common.Loader.GoogleEnvLoader (loadGoogleEnv)
import Common.Loader.HttpManagerLoader (loadHttpManager)
import Common.Loader.InstanceConfigLoader (loadInstanceConfig)
import FD.AppGoogleScopes (AppGoogleScopes)
im... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/front-door/src/FD/TheMain.hs | haskell | module FD.TheMain
( theMain,
)
where
import Common.Loader.CommonConfigLoader (loadCommonConfig)
import Common.Loader.GoogleEnvLoader (loadGoogleEnv)
import Common.Loader.HttpManagerLoader (loadHttpManager)
import Common.Loader.InstanceConfigLoader (loadInstanceConfig)
import FD.AppGoogleScopes (AppGoogleScopes)
im... | |
49978f42c6d0116ca03c4637496ac8c0c03815817e7459071297ba8fc224ac81 | TyOverby/mono | cohttp_server.ml | { { { Copyright ( c ) 2014 - 2015 < >
*
* 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/TyOverby/mono/8d6b3484d5db63f2f5472c7367986ea30290764d/vendor/mirage-ocaml-cohttp/cohttp_server/cohttp_server.ml | ocaml | { { { Copyright ( c ) 2014 - 2015 < >
*
* 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... | |
be745c195bcded9a0d8f2810a8d3b9b3fe5f1805c3b586d549d74a517f90d0af | weavejester/ittyon | project.clj | (defproject ittyon "0.11.4"
:description "Manage distributed state for games"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/core.async "0.2.374"]
[medley "0.7.3"]
[intent... | null | https://raw.githubusercontent.com/weavejester/ittyon/6776dac6f5f63060130226a2602cc6a5640575da/project.clj | clojure | (defproject ittyon "0.11.4"
:description "Manage distributed state for games"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/core.async "0.2.374"]
[medley "0.7.3"]
[intent... | |
f4e82b37d28e5f7a6c9ad8e62ba7175222d78c16e9beeb7197ce3cd021ec4edc | oral-health-and-disease-ontologies/ohd-ontology | medical-codes-to-owl.lisp | (defun check-missing-dx-codes ()
(let ((dx-missing-table (make-hash-table :test #'equalp)))
check that icd9 table is loaded
(when (not *icd9-code2uri*)
(load-icd9-code2uri-table))
;; iterate over dental-procedure-diagnosis.txt and look
;; for codes not in icd9 hash table
(with-iterator (it ... | null | https://raw.githubusercontent.com/oral-health-and-disease-ontologies/ohd-ontology/ba3f502b86487c8ba5fa04ff8ba33312a1679570/src/vdw-translation/translate/medical-codes-to-owl.lisp | lisp | iterate over dental-procedure-diagnosis.txt and look
for codes not in icd9 hash table
check that dx-code is not in table
check that dx-code is not nil
return hash table
iterate over dental-procedure-diagnosis.txt and look
for codes not in icd9 hash table
return hash table
check for extra code hash table
iterat... | (defun check-missing-dx-codes ()
(let ((dx-missing-table (make-hash-table :test #'equalp)))
check that icd9 table is loaded
(when (not *icd9-code2uri*)
(load-icd9-code2uri-table))
(with-iterator (it :iterator-fn #'dental-procedure-diagnosis-iterator)
(loop
while (next it)
for dx-code = (t... |
18ec6a9b0f47c5cc989765b3c4fb5bf10fa5b36f753a1b97740415ad3af5f950 | haskus/haskus-system | GHC.hs | | GHC specific ELF additions
module Haskus.Format.Elf.GHC
( decodeZString
)
where
import Data.Char
Since allows many symbols in constructor and variable names that C
-- compilers or assembly might not allow (e.g. :, %, #) these have to be
-- encoded. The encoding is called z-encoding
--
-- *
* compiler... | null | https://raw.githubusercontent.com/haskus/haskus-system/38b3a363c26bc4d82e3493d8638d46bc35678616/haskus-system/src/lib/Haskus/Format/Elf/GHC.hs | haskell | compilers or assembly might not allow (e.g. :, %, #) these have to be
encoded. The encoding is called z-encoding
*
------
Decoded Encoded Comment
() Z0T Unit / 0-tuple
(,) Z2T 2-tuple
(,,) Z3T 3-tuple
... And so on
... | | GHC specific ELF additions
module Haskus.Format.Elf.GHC
( decodeZString
)
where
import Data.Char
Since allows many symbols in constructor and variable names that C
* compiler / utils / Encoding.hs in GHC sources
Tuples
There is no Z1 T
( # # ) Z1H unbox... |
8718c1877cd4439611ae7666433e119903bf721da2ac0e7bbada09098775de73 | mejgun/haskell-tdlib | KeyboardButton.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Data.KeyboardButton where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.KeyboardButtonType as KeyboardButtonType
import qualified Utils as U
-- |
| Represents a single button in a bot keyboard @text Text of the but... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/beb6635177d7626b70fd909b1d89f2156a992cd2/src/TD/Data/KeyboardButton.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
|
| |
module TD.Data.KeyboardButton where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.KeyboardButtonType as KeyboardButtonType
import qualified Utils as U
| Represents a single button in a bot keyboard @text Text of the button @type Type of the button
KeyboardButton... |
284ce07fc94ac601719e52a650f4c5caed80c484350ac6d48b6deada90ba69c6 | ekmett/unpacked-containers | BitUtil.hs | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__
# LANGUAGE MagicHash #
#endif
#if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703
{-# LANGUAGE Safe #-}
#endif
#include "containers.h"
-----------------------------------------------------------------------------
-- |
Module : Internal . BitUtil
Copyright : ( ... | null | https://raw.githubusercontent.com/ekmett/unpacked-containers/7dc56993a57511b58257b5d389473e638a7082d2/unpacked-containers/utils/Internal/BitUtil.hs | haskell | # LANGUAGE Safe #
---------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Portability : portable
---------------------------------------------------------------------------
= WARNING
This module is considered __internal__.
This contents of this ... | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__
# LANGUAGE MagicHash #
#endif
#if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703
#endif
#include "containers.h"
Module : Internal . BitUtil
Copyright : ( c ) 2012
( c ) 2012
The Package Versioning Policy _ _ does not apply _ _ .
module... |
12e6d1b5f1e3e918a141424484a09cffba6019dc199d90f1f523971ee4b4ade4 | danr/hipspec | Vardep.hs | module Vardep where
import Prelude()
data Maybe a = Just a | Nothing
data Nat = Succ Nat | Zero
Zero + y = y
Succ x + y = Succ (x + y)
g x y = case x + y of
Succ _ -> Just x
Zero -> case y of
Zero -> Nothing
Succ _ -> Just y -- will never h... | null | https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/tfp1/tests/Vardep.hs | haskell | will never happen | module Vardep where
import Prelude()
data Maybe a = Just a | Nothing
data Nat = Succ Nat | Zero
Zero + y = y
Succ x + y = Succ (x + y)
g x y = case x + y of
Succ _ -> Just x
Zero -> case y of
Zero -> Nothing
h x y = case x + y of
Succ z -> case y of Zero... |
526b6a4e0d2fb74abd78207512b264c2ca53709e78fda4a9e8fb1a7b6e4934a1 | blynn/compiler | guardedly.hs | -- Guards.
infixr 9 .;
infixl 7 * , / , %;
infixl 6 + , -;
infixr 5 ++;
infixl 4 <*> , <$> , <* , *>;
infix 4 == , /= , <=;
infixl 3 && , <|>;
infixl 2 ||;
infixl 1 >> , >>=;
infixr 0 $;
foreign import ccall "putchar" putChar :: Int -> IO Int;
foreign import ccall "getchar" getChar :: IO Int;
class Functor f where { ... | null | https://raw.githubusercontent.com/blynn/compiler/b9fe455ad4ee4fbabe77f2f5c3c9aaa53cffa85b/guardedly.hs | haskell | Guards.
Map.
Parsing.
| Instance environment.
| Either top-level or instance definitions.
| Typed ASTs, ready for compilation, including ADTs and methods,
e.g. (==), (Eq a => a -> a -> Bool, select-==)
| Data constructor table.
| FFI declarations.
| Exports.
Can we reduce backtracking here?
Primitives.
Pat... | infixr 9 .;
infixl 7 * , / , %;
infixl 6 + , -;
infixr 5 ++;
infixl 4 <*> , <$> , <* , *>;
infix 4 == , /= , <=;
infixl 3 && , <|>;
infixl 2 ||;
infixl 1 >> , >>=;
infixr 0 $;
foreign import ccall "putchar" putChar :: Int -> IO Int;
foreign import ccall "getchar" getChar :: IO Int;
class Functor f where { fmap :: (a ... |
e5a8bcd5827a40cb2720f32f95e93d093aed6803224275f7ede87ffeda9a63d1 | IUCompilerCourse/public-student-support-code | interp-Lvar.rkt | #lang racket
(require racket/fixnum)
(require racket/dict)
(require "utilities.rkt")
(require "interp-Lint.rkt")
(provide interp-Lvar interp-Lvar-class)
;; Note to maintainers of this code:
;; A copy of this interpreter is in the book and should be
;; kept in sync with this code.
(define interp-Lvar-class
(clas... | null | https://raw.githubusercontent.com/IUCompilerCourse/public-student-support-code/7ccbcb4cba9ed11a3efffd7a6c8c3da2f28072fb/interp-Lvar.rkt | racket | Note to maintainers of this code:
A copy of this interpreter is in the book and should be
kept in sync with this code. | #lang racket
(require racket/fixnum)
(require racket/dict)
(require "utilities.rkt")
(require "interp-Lint.rkt")
(provide interp-Lvar interp-Lvar-class)
(define interp-Lvar-class
(class interp-Lint-class
(super-new)
(define/override ((interp-exp env) e)
(match e
[(Var x) (dict-ref env x)]... |
b90ec185cef90200f43e6103592b79729b08a85e3a3ded989dfb0cd6c7c542d5 | ingolia-lab/RiboSeq | TestHarrStart.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Main
where
import Control.Applicative
import Numeric
import System.Console.GetOpt
import System.Exit
import System.FilePath
import System.IO
import qualified Data.Vector.Unboxed as U
import System.Console.CmdTheLine
import qualified Bio.Seq... | null | https://raw.githubusercontent.com/ingolia-lab/RiboSeq/a14390cd95528910a258434c7b84c787f5e1d119/src/TestHarrStart.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE ScopedTypeVariables #
module Main
where
import Control.Applicative
import Numeric
import System.Console.GetOpt
import System.Exit
import System.FilePath
import System.IO
import qualified Data.Vector.Unboxed as U
import System.Console.CmdTheLine
import qualified Bio.SeqLoc.Bed as Bed
import Bio.RiboSeq.... |
a6c343d6163d2977688186f4c0c8b0979581baedf53b415d52fa6ec44f493ff9 | clj-kondo/clj-kondo | utils.clj | (ns clj-kondo.impl.utils
{:no-doc true}
(:require
[babashka.fs :as fs]
[clj-kondo.impl.rewrite-clj.node.keyword :as k]
[clj-kondo.impl.rewrite-clj.node.protocols :as node]
[clj-kondo.impl.rewrite-clj.node.seq :as seq]
[clj-kondo.impl.rewrite-clj.node.string :as node-string]
[clj-kondo.impl.rewrite... | null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/47dc5acbb1a484d883f1c98988dd4db6647c6b3d/src/clj_kondo/impl/utils.clj | clojure | export rewrite-clj functions
end export
this zipper version is much slower than the above
boolean, single-line string, char, number, keyword
multi-line string and quoted values
(prn "RES" fn-ns fn-name)
when calling a function in the same ns, it must be in another file
an exception to this would be :refer :all,... | (ns clj-kondo.impl.utils
{:no-doc true}
(:require
[babashka.fs :as fs]
[clj-kondo.impl.rewrite-clj.node.keyword :as k]
[clj-kondo.impl.rewrite-clj.node.protocols :as node]
[clj-kondo.impl.rewrite-clj.node.seq :as seq]
[clj-kondo.impl.rewrite-clj.node.string :as node-string]
[clj-kondo.impl.rewrite... |
a3b476b90bace6959fd330fe8dabaace3044f4fce0452e07ba933f46bd75fb81 | avsm/eeww | block.mli | type t
(** The type for dispatch blocks (essentially thunks) *)
val create : (unit -> unit) -> t
(** [create thunk] makes a new dispatch block *)
val exec : t -> unit
(** [exec t] executes the block *)
| null | https://raw.githubusercontent.com/avsm/eeww/17c68b93536cd382b901ba675411c2f69831fdac/lib/dispatch/lib/block.mli | ocaml | * The type for dispatch blocks (essentially thunks)
* [create thunk] makes a new dispatch block
* [exec t] executes the block | type t
val create : (unit -> unit) -> t
val exec : t -> unit
|
70ef44a093196402e26021f6342adcc1a0d461e3bb3785baddc8a7ba2b92895f | amuletml/amulet | Syntax.hs | -- | Re-exports the various syntax modules.
module Syntax (module M) where
import Syntax.Expr.Instances ()
import Syntax.Toplevel as M
import Syntax.Pretty as M
import Syntax.Type as M hiding (record, prettyRows)
import Syntax.Expr as M
import Syntax.Var as M
| null | https://raw.githubusercontent.com/amuletml/amulet/fcba0b7e198b8d354e95722bbe118bccc8483f4e/src/Syntax.hs | haskell | | Re-exports the various syntax modules. | module Syntax (module M) where
import Syntax.Expr.Instances ()
import Syntax.Toplevel as M
import Syntax.Pretty as M
import Syntax.Type as M hiding (record, prettyRows)
import Syntax.Expr as M
import Syntax.Var as M
|
cb479eb6cf7d6225ed6bee182fc93bbcc1688d4f3ecd29f53e12ff4e806a2d7c | helium/erlang-libp2p | libp2p_group_relcast.erl | -module(libp2p_group_relcast).
-type opt() :: {stream_clients, [libp2p_group_worker:stream_client_spec()]}.
-export_type([opt/0]).
-export([start_link/3, handle_input/2, send/2,
status/1, info/1, queues/1, handle_command/2]).
-spec start_link(ets:tab(), GroupID::string(), Args::[any()])
-> ... | null | https://raw.githubusercontent.com/helium/erlang-libp2p/d587854c8a1f093576bbd05ab4616bcc2693e600/src/group/libp2p_group_relcast.erl | erlang | @doc Send the given data to the member of the group. The
implementation of the group determines the strategy used for
delivery. For gossip groups, for example, delivery is best effort.
@doc Gets information for a group. The information is represented
as a nested map of information related to the workers, sessions ... | -module(libp2p_group_relcast).
-type opt() :: {stream_clients, [libp2p_group_worker:stream_client_spec()]}.
-export_type([opt/0]).
-export([start_link/3, handle_input/2, send/2,
status/1, info/1, queues/1, handle_command/2]).
-spec start_link(ets:tab(), GroupID::string(), Args::[any()])
-> ... |
cfe3948c7619df1571c23cbfc7f173991c30115046d4d68c81abd0d8a99c9473 | xclerc/ocamljava | wrap_module_type.ml |
* This file is part of wrapper .
* Copyright ( C ) 2007 - 2015 .
*
* wrapper is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at yo... | null | https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/wrapper/src/wrap_module_type.ml | ocaml |
* This file is part of wrapper .
* Copyright ( C ) 2007 - 2015 .
*
* wrapper is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at yo... | |
6ab42375c95ce3865df7f98d758575b04437bdfde8b1cf067d1d581b05808c3e | lemenkov/erlrtpproxy | storage.erl | %%%----------------------------------------------------------------------
%%%
%%% This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 3 of the
%%% License, or (at your option) any late... | null | https://raw.githubusercontent.com/lemenkov/erlrtpproxy/47b0bb92f6cf9dbc012ea6f1bb757d07ea06734d/src/storage.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
MERCH... | modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 3 of the
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place , Suite 330 , Boston , MA
02111 - 1307 USA
-module(storage).
-author('').
-... |
2c0f3debbb17f81200f2dfc62cf6f22db39585396c8c57e5c5282c355d2e8a44 | inaka/serpents | spts_hdp_sup.erl | @doc main HDP supervisor
-module(spts_hdp_sup).
-behavior(supervisor).
-export([start_link/0, init/1]).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Start / Stop
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-spec start_link() -> {ok, pid()}.
... | null | https://raw.githubusercontent.com/inaka/serpents/b21b63cee117e0b98fd3a9be4fb326e9de3ee861/src/core/spts_hdp_sup.erl | erlang |
SUPERVISOR CALLBACKS
| @doc main HDP supervisor
-module(spts_hdp_sup).
-behavior(supervisor).
-export([start_link/0, init/1]).
Start / Stop
-spec start_link() -> {ok, pid()}.
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, noargs).
-spec init(noargs) ->
{ok, {{one_for_one, 5, 10}, [supervisor:child_spec()]}}.
init... |
ede764e80c3f93604b9dc05a9b5e2d7f3b714fd1df3c66d3f7db3fa6b2c3fbfa | TyOverby/mono | hashtbl.ml | open! Import
include Hashtbl_intf
module type Key = Key.S
let with_return = With_return.with_return
let hash_param = Hashable.hash_param
let hash = Hashable.hash
let raise_s = Error.raise_s
type ('k, 'v) t =
{ mutable table : ('k, 'v) Avltree.t array
; mutable length : int
(* [recently_added] is the reference ... | null | https://raw.githubusercontent.com/TyOverby/mono/7666c0328d194bf9a569fb65babc0486f2aaa40d/vendor/janestreet-base/src/hashtbl.ml | ocaml | [recently_added] is the reference passed to [Avltree.add]. We put it in the hash
table to avoid allocating it at every [set].
Set during all iteration operations
this is always non-negative because we do [land] with non-negative number
This little optimization saves a caml_modify when the tree
hasn't b... | open! Import
include Hashtbl_intf
module type Key = Key.S
let with_return = With_return.with_return
let hash_param = Hashable.hash_param
let hash = Hashable.hash
let raise_s = Error.raise_s
type ('k, 'v) t =
{ mutable table : ('k, 'v) Avltree.t array
; mutable length : int
; recently_added : bool ref
; growt... |
4f0f458ebb184a00619c6ae2865b81b76df71317d7b5318e9e2ee315d544c170 | pedestal/samples | start.cljs | Copyright 2013 Relevance , Inc.
; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( )
; which can be found in the file epl-v10.html at the root of this distribution.
;
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this licens... | null | https://raw.githubusercontent.com/pedestal/samples/caaf04afe255586f8f4e1235deeb0c1904179355/helloworld-app/app/src/helloworld_app/simulated/start.cljs | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software.
T... | Copyright 2013 Relevance , Inc.
Eclipse Public License 1.0 ( )
(ns helloworld-app.simulated.start
(:require [io.pedestal.app.render.push.handlers.automatic :as d]
[helloworld-app.start :as start]
[io.pedestal.app-tools.tooling :as tooling]))
(defn ^:export main []
(start/create-app d... |
417db4093c695f34e3de29566569bb0a0c7e513804a18b2bae2e63169245b79e | ekmett/revisions | Sugar.hs | # LANGUAGE TypeFamilies #
-----------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent.Revision.Sugar
Copyright : ( C ) 2011 ,
-- License : BSD-style (see the file LICENSE)
--
Maintainer : < >
-- Stability : provisional
-- Portability ... | null | https://raw.githubusercontent.com/ekmett/revisions/12d2ec804b9f675c3314fbb25a35979cc1f95515/Control/Concurrent/Revision/Sugar.hs | haskell | ---------------------------------------------------------------------------
|
Module : Control.Concurrent.Revision.Sugar
License : BSD-style (see the file LICENSE)
Stability : provisional
Portability : type families
--------------------------------------------------------------------------
# INLIN... | # LANGUAGE TypeFamilies #
Copyright : ( C ) 2011 ,
Maintainer : < >
module Control.Concurrent.Revision.Sugar
( (=:)
, (%=)
, (+=) , (*=) , (-=)
, (//=)
) where
import Control.Concurrent.Revision.Monad
(=:) :: MonadRev m => Ver m a -> a -> m ()
(=:) = writeVer
# INLINE (= :) #
(%=) :: Mona... |
af361e27c147234549ce30fe29b3d756f2a41c86b6125a7c51f39f289dbc5ca8 | shortishly/tansu | tansu_api_proxy_resource.erl | Copyright ( c ) 2016 < >
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distributed under... | null | https://raw.githubusercontent.com/shortishly/tansu/154811fff81855419de9af380c81c7ae14e435d0/src/tansu_api_proxy_resource.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissi... | Copyright ( c ) 2016 < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(tansu_api_proxy_resource).
-export([init/2]).
-export([info/3]).
-export([terminate/3]).
init(Req, #{host := Host, port := Port}) ->
... |
b50361cf2178dc6ee2faa08a792721ff6b1d4de6649c18c128f11cd1af98695d | DavidAlphaFox/RabbitMQ | pg_local.erl | This file is a copy of pg2.erl from the R13B-3 Erlang / OTP
%% distribution, with the following modifications:
%%
1 ) Process groups are node - local only .
%%
2 ) Groups are created / deleted implicitly .
%%
3 ) ' join ' and ' leave ' are asynchronous .
%%
4 ) the type specs of the exported non - callback fu... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/src/pg_local.erl | erlang | distribution, with the following modifications:
extracted into a separate, guarded section, and rewritten in
old-style spec syntax, for better compatibility with older
removed.
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with t... | This file is a copy of pg2.erl from the R13B-3 Erlang / OTP
1 ) Process groups are node - local only .
2 ) Groups are created / deleted implicitly .
3 ) ' join ' and ' leave ' are asynchronous .
4 ) the type specs of the exported non - callback functions have been
versions of Erlang / OTP . The remaining... |
6d01cd5f37b4ddd5903df15a5c084b81b47538e2c7c61e28b7f5f32fe7da5a70 | inaka/elvis_core | fail_line_length_latin1.erl | %%% -*- coding: latin-1 -*-
-module(fail_line_length_latin1).
-export([
function_1/0,
function_2/0
]).
function_1() ->
io:format("Hellö").
function_2() ->
io:format("Hellö, This line is 101 characters long and should be detected, yeah!!!!!!!!!!!!!!!").
| null | https://raw.githubusercontent.com/inaka/elvis_core/468bd3498f1782fd74ef3d8eb1b36217b0b76c11/test/examples/fail_line_length_latin1.erl | erlang | -*- coding: latin-1 -*- | -module(fail_line_length_latin1).
-export([
function_1/0,
function_2/0
]).
function_1() ->
io:format("Hellö").
function_2() ->
io:format("Hellö, This line is 101 characters long and should be detected, yeah!!!!!!!!!!!!!!!").
|
19de608868e0dde1361e8e588a61f4760fbdbd741161837c69b05da42f3351b5 | AllAlgorithms/clojure | mergesort.clj | (ns project2.core
(:require [clojure.string :as str])
(:require [clojure.java.io :as io])
(:import (java.util.concurrent Executors)))
5/3/2017
;;Timing study on mergesort using concurrency
;;added comments to show conceptual understanding
(defn get-nums [file] ;;defines function "get-nums" which takes a fi... | null | https://raw.githubusercontent.com/AllAlgorithms/clojure/cfb2f46eaaed338dd279e93b69251526f9048ff9/algorithms/sorting/mergesort.clj | clojure | Timing study on mergesort using concurrency
added comments to show conceptual understanding
defines function "get-nums" which takes a file parameter
returns lazy sequence of lines (numbers)
splits collection by line
open file and read contents, returns string
merge them into a list
loop through both lists
if the lhead ... | (ns project2.core
(:require [clojure.string :as str])
(:require [clojure.java.io :as io])
(:import (java.util.concurrent Executors)))
5/3/2017
)
)
)
split into 2
count items in list , divide by two , partition the original list into lists
containing ( / ( count numSeq ) 2 ) items each
spli... |
af2c69dceb590104b51740209f2b9d8c01b76fef8997fb68c93761dec53fdd88 | lexi-lambda/racket-sample-heroku-app | info.rkt | #lang info
(define collection "sample-heroku-app")
(define deps
'())
(define build-deps
'())
| null | https://raw.githubusercontent.com/lexi-lambda/racket-sample-heroku-app/ea58d92cf1e44fe28dc5d771ed38c6a73b22c5da/info.rkt | racket | #lang info
(define collection "sample-heroku-app")
(define deps
'())
(define build-deps
'())
| |
361ba621b164e5e7fa051f85bf5ac9122e9a6351b43838f3aa75725b7accefcb | robert-strandh/SICL | check-maximum-argument-count.lisp | (cl:in-package #:sicl-argument-processing)
(defun check-maximum-argument-count
(argument-count-location
maximum-argument-count
origin
dynamic-environment-location)
(let* ((maximum-argument-count-input (make-instance 'cleavir-ir:constant-input
:value maximum... | null | https://raw.githubusercontent.com/robert-strandh/SICL/fc8b4b4b757e258b46bc32aaf1103edf6c1c6d8c/Code/Compiler/HIR-transformations/Argument-processing/check-maximum-argument-count.lisp | lisp | (cl:in-package #:sicl-argument-processing)
(defun check-maximum-argument-count
(argument-count-location
maximum-argument-count
origin
dynamic-environment-location)
(let* ((maximum-argument-count-input (make-instance 'cleavir-ir:constant-input
:value maximum... | |
e6865492a7c81e43ad1ae673fbec3f8b9a1b47d2dbefae993f5daef864ecca9a | rd--/hosc | Core.hs | | Composite of non - transport related modules .
Provides the ' Datum ' , ' Message ' , ' Time ' , ' Bundle ' and ' Packet ' types
and the coding functions ' encodePacket ' and ' ' .
> import Sound . Osc . Core { - hosc
Provides the 'Datum', 'Message', 'Time', 'Bundle' and 'Packet' types
and the coding func... | null | https://raw.githubusercontent.com/rd--/hosc/9edb309030f367e8a7ed5ad37d71998da4418c91/Sound/Osc/Core.hs | haskell | hosc | | Composite of non - transport related modules .
Provides the ' Datum ' , ' Message ' , ' Time ' , ' Bundle ' and ' Packet ' types
and the coding functions ' encodePacket ' and ' ' .
> import Sound . Osc . Core { - hosc
Provides the 'Datum', 'Message', 'Time', 'Bundle' and 'Packet' types
and the coding func... |
4f1902e4f567c580643e4273de71054a5078d470eab9dab4af98cbf948e2d75c | Eduap-com/WordMat | itensor.lisp | ;;; -*- Mode:LISP; Package:MACSYMA -*-
* * ( c ) Copyright 1981 Massachusetts Institute of Technology * *
;;
;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of
the Licens... | null | https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/tensor/itensor.lisp | lisp | -*- Mode:LISP; Package:MACSYMA -*-
This program is free software; you can redistribute it and/or
either version 2 of
This program is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU ... | * * ( c ) Copyright 1981 Massachusetts Institute of Technology * *
modify it under the terms of the GNU General Public License as
the License , or ( at your option ) any later version .
The Itensor package was downcased , cleaned up , and moving frames
functionality was added by ( / ) .
As of November , 2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.