_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
298bec0348197c60f98353de6f67224f7da05337aa3b84c3552ef84d5826f013
SonarQubeCommunity/sonar-erlang
lines.erl
-module(lines_of_code). vattapamacs(A,B) -> {error, B}. %THATSIT
null
https://raw.githubusercontent.com/SonarQubeCommunity/sonar-erlang/279eb7ccd84787c1c0cfd34b9a07981eb20183e3/erlang-squid/src/test/resources/metrics/lines.erl
erlang
THATSIT
-module(lines_of_code). vattapamacs(A,B) -> {error, B}.
bcfd2e707653adb1f6a1907b4d4161311776fd2684d263c7791c7f93663017b7
vision-05/betterCode
elements.clj
(ns bettercode.elements (:require [cljfx.api :as fx] [bettercode.css] [bettercode.events])) (defn status-bar [{:keys [fx/context file-path]}] {:fx/type :text-field :min-height 32 :max-height 32 :editable false :alignment :center :text file-path :style-class "root-text-area...
null
https://raw.githubusercontent.com/vision-05/betterCode/e11420c881cd91781a8e06d2939ca4e2557404d0/bettercode/src/bettercode/elements.clj
clojure
this doesn't expand downwards for some reason
(ns bettercode.elements (:require [cljfx.api :as fx] [bettercode.css] [bettercode.events])) (defn status-bar [{:keys [fx/context file-path]}] {:fx/type :text-field :min-height 32 :max-height 32 :editable false :alignment :center :text file-path :style-class "root-text-area...
9bda8f818e5bcef32dce53002455bfb346feb8337c762aae3af3cd7ae0e65ab7
DavidAlphaFox/aiwiki
srv_aiwiki_topic.erl
-module(srv_aiwiki_topic). -export([aside/2,url/2,select/1]). select(Idx)-> Topics = ai_db:find_all(topic), lists:map( fun(Topic)-> Topic0 = ai_db_model:fields(Topic), TopicIdx = maps:get(id,Topic), if TopicIdx == Idx -> Topic0#{selected => true}; true ->...
null
https://raw.githubusercontent.com/DavidAlphaFox/aiwiki/3a2a78668d4a708fda4af35430f25a69c4b91a7e/src/service/srv_aiwiki_topic.erl
erlang
-module(srv_aiwiki_topic). -export([aside/2,url/2,select/1]). select(Idx)-> Topics = ai_db:find_all(topic), lists:map( fun(Topic)-> Topic0 = ai_db_model:fields(Topic), TopicIdx = maps:get(id,Topic), if TopicIdx == Idx -> Topic0#{selected => true}; true ->...
6990f3c9b4cff9282ceab0f1f8ddbf1d404c142689e65ecb0510b51f6a7de5d0
athos/parabola
hello.clj
(ns parabola.scripts.hello (:require [parabola [script :refer :all] [middleware :refer [forwarding-to only-when]]] [clojure.java.shell :refer [sh]] [taoensso.timbre :as timbre])) (defn ^:reactor log-connected [msg] (when (= (:type msg) :connected) (timbre/info ...
null
https://raw.githubusercontent.com/athos/parabola/b6ea2d9108a97f9470f2f107c1f5fc71ea23f7e3/src/parabola/scripts/hello.clj
clojure
(ns parabola.scripts.hello (:require [parabola [script :refer :all] [middleware :refer [forwarding-to only-when]]] [clojure.java.shell :refer [sh]] [taoensso.timbre :as timbre])) (defn ^:reactor log-connected [msg] (when (= (:type msg) :connected) (timbre/info ...
04b81035c6657027cb50badb4da343bc2cffe326fadea81ee1ae55d4d3e20f5b
quchen/generative-art
Draw.hs
{-# OPTIONS_GHC -Wno-duplicate-exports #-} | Cairo drawing backend . module Draw ( * SVG and PNG file handling render , CoordinateSystem(..) , coordinateSystem , haddockRender -- * Drawing presets , moveToVec , lineToVec , Sketch(..) , Arrow(..) , ArrowSpec(..) , Circ...
null
https://raw.githubusercontent.com/quchen/generative-art/245bb2948642d5d7fdd538b5095c00ba3a9cbaa2/src/Draw.hs
haskell
# OPTIONS_GHC -Wno-duplicate-exports # * Drawing presets * Colors ** Discrete color schemes $discreteColorSchemes ** Continuous color schemes $continuousColorSchemes * Orientation helpers * Transformations * Text * Convenience ^ Output format ^ Output file name ^ Canvas width ^ Canvas height | Renders th...
| Cairo drawing backend . module Draw ( * SVG and PNG file handling render , CoordinateSystem(..) , coordinateSystem , haddockRender , moveToVec , lineToVec , Sketch(..) , Arrow(..) , ArrowSpec(..) , Circle(..) , Cross(..) , PolyBezier(..) , arcSketch , ar...
b9c996d5ca8409d7ddf01964d552846cedf681e3a87e23eeee8d654fe633ce4f
abcdw/ironhide
user.clj
(ns dev (:require [figwheel-sidecar.repl-api :as repl])) (def nrepl-options {:nrepl-port 7890 :nrepl-middleware ["cider.nrepl/cider-middleware" "refactor-nrepl.middleware/wrap-refactor" "cemerick.piggieback/wrap-cljs-repl"]}) (def figwheel-options {:figwheel-op...
null
https://raw.githubusercontent.com/abcdw/ironhide/f55b69b356b61c1bf9c0ae122e7e14578efbd731/demo/dev/user.clj
clojure
(ns dev (:require [figwheel-sidecar.repl-api :as repl])) (def nrepl-options {:nrepl-port 7890 :nrepl-middleware ["cider.nrepl/cider-middleware" "refactor-nrepl.middleware/wrap-refactor" "cemerick.piggieback/wrap-cljs-repl"]}) (def figwheel-options {:figwheel-op...
358ca41038bccf513ebc28ef3584dc1078dc48396a8979471a878b1c56c047f7
mbj/stratosphere
PermissionsBoundaryProperty.hs
module Stratosphere.SSO.PermissionSet.PermissionsBoundaryProperty ( module Exports, PermissionsBoundaryProperty(..), mkPermissionsBoundaryProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import {-# SOURCE #-} Stratosph...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sso/gen/Stratosphere/SSO/PermissionSet/PermissionsBoundaryProperty.hs
haskell
# SOURCE #
module Stratosphere.SSO.PermissionSet.PermissionsBoundaryProperty ( module Exports, PermissionsBoundaryProperty(..), mkPermissionsBoundaryProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourcePro...
20b63462f58fb1f56693e1c0f8eb8249e96f2747fce75b0012ae4f4697ab6493
ssor/erlangDemos
hi_sup.erl
-module(hi_sup). -behaviour(supervisor). %% API -export([start_link/1, start_child/0]). %% Supervisor callbacks -export([init/1]). -define(SERVER, ?MODULE). start_link(Port) -> supervisor:start_link({local, ?SERVER}, ?MODULE, [Port]). start_child() -> supervisor:start_child(?SERVER, []). init([Port]) -> ...
null
https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/erlware-Erlang-and-OTP-in-Action-Source/chapter_11/http_interface/src/hi_sup.erl
erlang
API Supervisor callbacks
-module(hi_sup). -behaviour(supervisor). -export([start_link/1, start_child/0]). -export([init/1]). -define(SERVER, ?MODULE). start_link(Port) -> supervisor:start_link({local, ?SERVER}, ?MODULE, [Port]). start_child() -> supervisor:start_child(?SERVER, []). init([Port]) -> Server = {hi_server, {hi_se...
38ed8a97c40e0f07d0e2689cadbfb452c63394de7de7eed1320d8ff4f48e85e9
finnishtransportagency/harja
tasovalinta.cljs
(ns harja.ui.openlayers.tasovalinta "Openlayers komponentin tasojen valintakontrolli. Kaikille taustakarttatasoille, jotka ovat valittavissa, lisätään kartalle on/off ikoninappi, josta tason saa kytkettyä päälle tai pois" (:require [reagent.core :as r] [ol.control.Control])) (defn- control [content...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/488b1e096f0611e175221d74ba4f2ffed6bea8f1/src/cljs/harja/ui/openlayers/tasovalinta.cljs
clojure
(ns harja.ui.openlayers.tasovalinta "Openlayers komponentin tasojen valintakontrolli. Kaikille taustakarttatasoille, jotka ovat valittavissa, lisätään kartalle on/off ikoninappi, josta tason saa kytkettyä päälle tai pois" (:require [reagent.core :as r] [ol.control.Control])) (defn- control [content...
66ad3a2be9985df60e213dacc0ba4ed04d0f70657d343c099ea3bcd6be0281d3
Chris00/ocaml-docker
docker.ml
open Docker_utils module Json = Yojson.Safe exception No_such_container of string exception Failure of string * string exception Invalid_argument of string exception Server_error of string exception Error of string * string let default_addr = if Sys.win32 then ref(Unix.ADDR_INET (Unix.inet_addr_of_string "127.0...
null
https://raw.githubusercontent.com/Chris00/ocaml-docker/97b944c5e1c0066c2e864f93f5ef7ac3a8f3e19b/src/docker.ml
ocaml
FIXME: When Unix.ADDR_UNIX, check that the file exists?? Return a number < 0 if not found. It is ASSUMED that [pos] and [len] delimit a valid substring. Cannot match "\r\n" Split on \r\n End of headers (all previously captured). Capture all possible additional headers in [b]. !i = !pos, i.e., empty line...
open Docker_utils module Json = Yojson.Safe exception No_such_container of string exception Failure of string * string exception Invalid_argument of string exception Server_error of string exception Error of string * string let default_addr = if Sys.win32 then ref(Unix.ADDR_INET (Unix.inet_addr_of_string "127.0...
cdb7423d5ba4c6ec07c313cddba7872c7b85976cff7d756331bf94b0c32adcc9
rufus-lang/rufus
rufus_type_list_test.erl
-module(rufus_type_list_test). -include_lib("eunit/include/eunit.hrl"). resolve_list_with_one_element_test() -> Element = rufus_form:make_literal(int, 42, 3), IntTypeForm = rufus_form:make_type(int, 3), IntListTypeForm = rufus_form:make_type(list, IntTypeForm, 3), Form = rufus_form:make_literal(list, ...
null
https://raw.githubusercontent.com/rufus-lang/rufus/fb3ec8f67c06e8d656c6aa6c4297461559ee168f/rf/test/rufus_type_list_test.erl
erlang
-module(rufus_type_list_test). -include_lib("eunit/include/eunit.hrl"). resolve_list_with_one_element_test() -> Element = rufus_form:make_literal(int, 42, 3), IntTypeForm = rufus_form:make_type(int, 3), IntListTypeForm = rufus_form:make_type(list, IntTypeForm, 3), Form = rufus_form:make_literal(list, ...
e2a36faacd5dcfb20b55be67c8244d0e860f4930176213013f11417b02a06a1e
nextjournal/advent-of-clerk
day_13.clj
# 🎄 Advent of Clerk : Day 13 (ns advent-of-clerk.day-13 (:require [nextjournal.clerk :as clerk]))
null
https://raw.githubusercontent.com/nextjournal/advent-of-clerk/9f358c9f13995f591981a26fc3683dea574933b1/src/advent_of_clerk/day_13.clj
clojure
# 🎄 Advent of Clerk : Day 13 (ns advent-of-clerk.day-13 (:require [nextjournal.clerk :as clerk]))
40ed48c54882d8a0f3d35d871b41fd9826d2a5dfb2ecdf4df1bea8dd753f0f49
lisp/de.setf.utility
float-codecs.lisp
-*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : de.setf.utility.implementation ; -*- (in-package :de.setf.utility.implementation) (:documentation "This file defines float codecs for the `de.setf.utility.codecs` library." (:copyright "Copyright 2010 [james anderson](mailto:) All Righ...
null
https://raw.githubusercontent.com/lisp/de.setf.utility/782cd79d99ebf40deeed60c492be9873bbe42a15/codecs/test/float-codecs.lisp
lisp
Syntax : ansi - common - lisp ; Base : 10 ; Package : de.setf.utility.implementation ; -*- various numbers
(in-package :de.setf.utility.implementation) (:documentation "This file defines float codecs for the `de.setf.utility.codecs` library." (:copyright "Copyright 2010 [james anderson](mailto:) All Rights Reserved 'de.setf.utility.codecs' is free software: you can redistribute it and/or modify it under the ter...
177fca4a03651173e7f27482969122950653c2f7b32b7a8e97761cd549be415e
tomhanika/conexp-clj
base.clj
(ns conexp.sigmajs.base (:require [loom.graph :as lg] [conexp.fca.lattices :as lat] [conexp.util.graph :exclude [transitive-closure] :refer :all]) (:use conexp.base)) ;;; (defn graph->json "Given a graph g (loom), returns the json representation of the graph as required by /." ([g] ...
null
https://raw.githubusercontent.com/tomhanika/conexp-clj/5e4c15697f06446f925f53d1d143528155d7dd3a/src/main/clojure/conexp/sigmajs/base.clj
clojure
(ns conexp.sigmajs.base (:require [loom.graph :as lg] [conexp.fca.lattices :as lat] [conexp.util.graph :exclude [transitive-closure] :refer :all]) (:use conexp.base)) (defn graph->json "Given a graph g (loom), returns the json representation of the graph as required by /." ([g] (...
6affe9706a4441984910d57b042675971c85cc4e41973718c17cee548266eba3
dmjio/miso
JSBits.hs
module Miso.JSBits where
null
https://raw.githubusercontent.com/dmjio/miso/f38f28d86780b3f2137f16419ff9ec3e39e890af/src/Miso/JSBits.hs
haskell
module Miso.JSBits where
1927ec70238fd7fc34754f7d6e294f5f8df6a321a8b80952a6243580fa6b9642
ejgallego/coq-lsp
jFleche.ml
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * INRIA , CNRS and contributors - Copyright 1999 - 2018 (* <O___,, * (see CREDITS file for the list of authors) *) \VV/ * * * ...
null
https://raw.githubusercontent.com/ejgallego/coq-lsp/dede92d8e37f706734880b5658a407b5ec067fb4/lsp/jFleche.ml
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team <O___,, * (see CREDITS file for the list of authors) // * This file is distributed under the terms of the * (see LICENSE file for...
v * INRIA , CNRS and contributors - Copyright 1999 - 2018 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser General Public License Version 2.1 Copyright 2019 MINES ParisTech --...
81291a150f513bca3b4f774a511677fc2e6f1312e73dbf21543a395ad6613f41
basho/riak_test
verify_capabilities.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2012 - 2017 Basho Technologies , Inc. %% 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...
null
https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/verify_capabilities.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2012 - 2017 Basho Technologies , Inc. 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(verify_capabiliti...
64f38a7944ae3989f80679e04480e47e85b45c737e50a5cfa00b7740378bce52
ahrefs/atd
Python_annot.ml
ATD annotations to be interpreted specifically by atdpy . also honors json - related annotations defined in Atd . Json . ATD annotations to be interpreted specifically by atdpy. Atdpy also honors json-related annotations defined in Atd.Json. *) type assoc_repr = | List | Dict let get_python_d...
null
https://raw.githubusercontent.com/ahrefs/atd/89f031dfbbfb34f95bb17d7c3859a0e43ddcdcad/atdpy/src/lib/Python_annot.ml
ocaml
imports etc.
ATD annotations to be interpreted specifically by atdpy . also honors json - related annotations defined in Atd . Json . ATD annotations to be interpreted specifically by atdpy. Atdpy also honors json-related annotations defined in Atd.Json. *) type assoc_repr = | List | Dict let get_python_d...
0fd57e20cc2d478ca5e8cde76299b681e32cfccff95847e5f64c588ae9575e78
mvdcamme/meta-tracing-JIT
fib.scm
(begin (define (fib n) (if (< n 2) n (+ (fib (- n 1)) (fib (- n 2))))) (fib 4))
null
https://raw.githubusercontent.com/mvdcamme/meta-tracing-JIT/640af917e473f3793ab12791dcb2c80f617b8a0d/benchmarks/nested%20interpretation/fib.scm
scheme
(begin (define (fib n) (if (< n 2) n (+ (fib (- n 1)) (fib (- n 2))))) (fib 4))
7426c81f3d8d39cea9759efc81347f4c295e09aef709b86e0976f4a64021c33a
f-o-a-m/kepler
Server.hs
module SimpleStorage.Server (makeAndServeApplication) where import Data.Foldable (fold) import Data.Monoid (Endo (..)) import Network.ABCI.Server (serveApp) import Network.ABCI.Server.App (Middlewa...
null
https://raw.githubusercontent.com/f-o-a-m/kepler/6c1ad7f37683f509c2f1660e3561062307d3056b/hs-abci-docs/simple-storage/src/SimpleStorage/Server.hs
haskell
module SimpleStorage.Server (makeAndServeApplication) where import Data.Foldable (fold) import Data.Monoid (Endo (..)) import Network.ABCI.Server (serveApp) import Network.ABCI.Server.App (Middlewa...
d25528d79c620a9dda58ccad4375835b7d74d545a0cf9ef64a9405a7ec3e210d
kupl/LearnML
patch.ml
type formula = | True | False | Not of formula | AndAlso of (formula * formula) | OrElse of (formula * formula) | Imply of (formula * formula) | Equal of (exp * exp) and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp) let rec eval (f : formula) : bool = match f with | True -> true | ...
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/formula/sub49/patch.ml
ocaml
type formula = | True | False | Not of formula | AndAlso of (formula * formula) | OrElse of (formula * formula) | Imply of (formula * formula) | Equal of (exp * exp) and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp) let rec eval (f : formula) : bool = match f with | True -> true | ...
3808098758cc9b993accc42d8ba44de38e867d495ec05fe4ba2ca9c8ddb5d121
nikita-volkov/rerebase
Cont.hs
module Control.Monad.Cont ( module Rebase.Control.Monad.Cont ) where import Rebase.Control.Monad.Cont
null
https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Control/Monad/Cont.hs
haskell
module Control.Monad.Cont ( module Rebase.Control.Monad.Cont ) where import Rebase.Control.Monad.Cont
05dc071fb1821a13655483e69e9cea76e08d7fa73bc8afa1b9533c96361d3e2e
bijoutrouvaille/fireward
OptionParserSpec.hs
module OptionParserSpec (main, spec) where import Data.Char (isDigit) import Control.Applicative import Control.Monad import Test.Hspec import Test.QuickCheck import Debug.Trace (trace) main :: IO () main = hspec spec spec :: Spec spec = do describe "Option Parser" $ do it "passes" $ shouldBe 1 1
null
https://raw.githubusercontent.com/bijoutrouvaille/fireward/61b8284845ea243e67ec0d852123c33f64ea2317/test/OptionParserSpec.hs
haskell
module OptionParserSpec (main, spec) where import Data.Char (isDigit) import Control.Applicative import Control.Monad import Test.Hspec import Test.QuickCheck import Debug.Trace (trace) main :: IO () main = hspec spec spec :: Spec spec = do describe "Option Parser" $ do it "passes" $ shouldBe 1 1
24fdb088e0522a81a52b00a092c1323e8d455c5b5dc9f3db16824beb5a4e39a8
AndrasKovacs/cubeval
Presyntax.hs
module Presyntax where import Common import Text.Megaparsec (SourcePos) type Ty = Tm data Tm = Ident Name | LocalLvl Lvl -- @n | TopLvl Lvl -- @@n | Pos (DontShow SourcePos) Tm | I | ILvl IVar | I0 | I1 | Let Name (Maybe Ty) Tm Tm | Pi Name Ty Ty | App Tm Tm...
null
https://raw.githubusercontent.com/AndrasKovacs/cubeval/528291d35032f6deff7a46d6037219d8579409c0/src/Presyntax.hs
haskell
@n @@n x = y coe r r' i A t com r r' i A [α x. t] u Glue A [α. B] (B : Σ X (X ≃ A)) glue a [α. t] # unpack #
module Presyntax where import Common import Text.Megaparsec (SourcePos) type Ty = Tm data Tm = Ident Name | Pos (DontShow SourcePos) Tm | I | ILvl IVar | I0 | I1 | Let Name (Maybe Ty) Tm Tm | Pi Name Ty Ty | App Tm Tm | Lam Name Tm | Sg Name Ty Ty | Pair Tm Tm | Proj1 Tm | Proj2 Tm | U...
f5ce4610a26b0f342984fed443e0b10b1997fd07fdf79c8c0e211f8137b892ec
jakemcc/sicp-study
2_22.clj
Exercise 2.22 trieds to make square - list iterative . ; In the process he made it return the result list in ; reverse order. ; ; What is wrong with the Louis Reasoner 's first attempt ? ( below ) (defn square [x] (* x x)) (defn square-list [items] (letfn [(iter [things answer] (if (empty? things)...
null
https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section2.2/2_22.clj
clojure
In the process he made it return the result list in reverse order. The issue is that he is building up the answer list by pulling elements off the front of the input list. This is causing the resulting list to be built backwards as elements originally further back in the input list are put onto the front of the...
Exercise 2.22 trieds to make square - list iterative . What is wrong with the Louis Reasoner 's first attempt ? ( below ) (defn square [x] (* x x)) (defn square-list [items] (letfn [(iter [things answer] (if (empty? things) answer (recur (rest things) ...
ae63427870c3f9a5cbdd60790960a27b65989a539fefd28bd706bcd2e709c983
unifydb/unifydb
rules.clj
(ns unifydb.rules) (defn rule-conclusion [rule] (first rule)) (defn rule-body [rule] (or (second rule) [:always-true]))
null
https://raw.githubusercontent.com/unifydb/unifydb/10dd5a5663e0d4db94cd71ee3c8e1784f86ff052/src/unifydb/rules.clj
clojure
(ns unifydb.rules) (defn rule-conclusion [rule] (first rule)) (defn rule-body [rule] (or (second rule) [:always-true]))
ad12ca8e2351ff02fe714bc16b928c0faac4ac7b21ff00ae7eff12326496ac52
yrashk/erlang
epp.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2009 . 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 Pub...
null
https://raw.githubusercontent.com/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/stdlib/src/epp.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(epp). An Erlang code preprocess...
cb8a8342433839b1c6194b5c714988a3c04ae4d209d63c5abf511d65563606a0
CompSciCabal/SMRTYPRTY
1.2.4.rkt
#lang racket (define (expt b n) (expt-iter b n 1)) (define (expt-iter b counter product) (if (= counter 0) product (expt-iter b (- counter 1) (* b product)))) (define (square x) (* x x)) (define (fast-expt b n) (cond ((= n 0) 1) ((even? n) (square (fast-expt b...
null
https://raw.githubusercontent.com/CompSciCabal/SMRTYPRTY/4a5550789c997c20fb7256b81469de1f1fce3514/sicp/v3/1.2/xiyang/1.2.4.rkt
racket
#lang racket (define (expt b n) (expt-iter b n 1)) (define (expt-iter b counter product) (if (= counter 0) product (expt-iter b (- counter 1) (* b product)))) (define (square x) (* x x)) (define (fast-expt b n) (cond ((= n 0) 1) ((even? n) (square (fast-expt b...
8ab0495fd054f28c0f28cba241931ed83a90f5371dce7021281463b4089b3add
sigscale/snmp-collector
snmp_collector_rest_res_http.erl
%%% snmp_collector_rest_res_http.erl %%% vim: ts=3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2019 SigScale Global Inc. %%% @end Licensed under the Apache License , Version 2.0 ( the " License " ) ; %%% you may not use this file except in compliance with the License. %%% You may ...
null
https://raw.githubusercontent.com/sigscale/snmp-collector/cb6b95ed331abd6f258d8ea55bf34c57f2992444/src/snmp_collector_rest_res_http.erl
erlang
snmp_collector_rest_res_http.erl vim: ts=3 @end 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 t...
2019 SigScale Global Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(snmp_collector_rest_res_http). -copyright('Copyright (c) 2019 SigScale Global Inc.'). -export([content_types_accepted/0, content_types_prov...
457c5cc167cd955728ec181affc957f8ca1764a0557a96035863f315989d23d1
RichiH/git-annex
Location.hs
{-# LANGUAGE BangPatterns #-} git - annex location log - - git - annex keeps track of which repositories have the contents of annexed - files . - - Repositories record their UUID and the date when they --get or --drop - a value . - - Copyright 2010 - 2015 < > - - Licensed under the G...
null
https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Logs/Location.hs
haskell
# LANGUAGE BangPatterns # get or --drop get or --drop Log a change in the presence of a key's value in current repository. Log a change in the presence of a key's value in a repository. Returns a list of repository UUIDs that, according to the log, have - the value of a key. Gets the locations contained in a g...
git - annex location log - - git - annex keeps track of which repositories have the contents of annexed - files . - - a value . - - Copyright 2010 - 2015 < > - - Licensed under the GNU GPL version 3 or higher . - - git-annex keeps track of which repositories have the contents of an...
79e2fd411b592df52d7324166b3935e7760322691294b3193f6bc8094d726126
serioga/clojure-benhcmarks
destructuring.clj
(ns clojure-benchmarks.destructuring (:require [criterium.core :as criterium])) (set! *warn-on-reflection* true) (comment ; No destructuring (do "Direct access to local binding" (let [a 1] (criterium/quick-bench a))) #_"Execution time mean : 5,789829 ns" (do "Let without destruc...
null
https://raw.githubusercontent.com/serioga/clojure-benhcmarks/266caad3f5d4f9082d650a8dc1be1d6adb968fb8/src/clojure_benchmarks/destructuring.clj
clojure
No destructuring Associative destructuring Sequential destructuring
(ns clojure-benchmarks.destructuring (:require [criterium.core :as criterium])) (set! *warn-on-reflection* true) (do "Direct access to local binding" (let [a 1] (criterium/quick-bench a))) #_"Execution time mean : 5,789829 ns" (do "Let without destructuring" (let [a 1] ...
6ac793708a1198aed65f4338e37a30982532af778c4b102fe4865638d45e81d5
RichiH/git-annex
DiffTreeItem.hs
git diff - tree item - - Copyright 2012 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2012 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module Git.DiffTreeItem ( DiffTreeItem(..), ) where import System.Posix.Types import Git.FilePath import Gi...
null
https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Git/DiffTreeItem.hs
haskell
nullSha if file was added nullSha if file was deleted
git diff - tree item - - Copyright 2012 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2012 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module Git.DiffTreeItem ( DiffTreeItem(..), ) where import System.Posix.Types import Git.FilePath import Gi...
cb50a336495e9271ff69166d377c1d386191ef7d83dd1bc46e904a3a3dbd4057
pirapira/coq2rust
typeops.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/checker/typeops.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** This should be a type (a priori wit...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Errors open Util open Na...
6927c0730c457eb1c40547a92e3f875061fdddfd9946ef2bc2dd650a75d99a4e
c4-project/c4f
constant.mli
This file is part of c4f . Copyright ( c ) 2018 - 2022 C4 Project c4 t itself is licensed under the MIT License . See the LICENSE file in the project root for more information . Parts of c4 t are based on code from the Herdtools7 project ( ) : see the LICENSE.herd file in the project...
null
https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/fir/src/constant.mli
ocaml
* {1 Constants} * Type of constants. * {2 Accessors} These will likely slowly replace the non-accessor functions below. * [bool] permits construction and selection of boolean constants. * [int] permits construction and selection of boolean constants. * [true_] permits construction and selection of true consta...
This file is part of c4f . Copyright ( c ) 2018 - 2022 C4 Project c4 t itself is licensed under the MIT License . See the LICENSE file in the project root for more information . Parts of c4 t are based on code from the Herdtools7 project ( ) : see the LICENSE.herd file in the project...
9570e36b0433fb30c5903e204011983bc08782426a053ab6219bfe55c0318c03
OCamlPro/socaml-analyzer
myper.ml
external raise : exn -> 'a = "%raise" external ( = ) : 'a -> 'a -> bool = "%equal" external not : bool -> bool = "%boolnot" external ( && ) : bool -> bool -> bool = "%sequand" external ( || ) : bool -> bool -> bool = "%sequor" external ( + ) : int -> int -> int = "%addint" external ( - ) : int -> int -> int = "%subi...
null
https://raw.githubusercontent.com/OCamlPro/socaml-analyzer/f39121e1d05a9e5bb6f005497eaaa5a67f256d4c/test/samples/myper.ml
ocaml
external raise : exn -> 'a = "%raise" external ( = ) : 'a -> 'a -> bool = "%equal" external not : bool -> bool = "%boolnot" external ( && ) : bool -> bool -> bool = "%sequand" external ( || ) : bool -> bool -> bool = "%sequor" external ( + ) : int -> int -> int = "%addint" external ( - ) : int -> int -> int = "%subi...
551e5d7be948d0e5edbf37e0f393e99a77e674b1a35a1acfc6c66f73c022422d
SNePS/SNePS2
load-activation.lisp
-*- Mode : Lisp ; Syntax : Common - Lisp ; Package : USER ; Base : 10 -*- Copyright ( C ) 1984 - -2013 Research Foundation of State University of New York Version : $ I d : load - activation.lisp , v 1.2 2013/08/28 19:07:22 shapiro Exp $ ;; This file is part of SNePS. $ BEGIN LICENSE$ The contents of t...
null
https://raw.githubusercontent.com/SNePS/SNePS2/d3862108609b1879f2c546112072ad4caefc050d/demo/activation/load-activation.lisp
lisp
Syntax : Common - Lisp ; Package : USER ; Base : 10 -*- This file is part of SNePS. you may not use this file except in compliance with the License. You may obtain a copy of the License at . edu/sneps/Downloads/ubpl.pdf. or implied. See the License for the specific language gov erning rights and limitations ...
Copyright ( C ) 1984 - -2013 Research Foundation of State University of New York Version : $ I d : load - activation.lisp , v 1.2 2013/08/28 19:07:22 shapiro Exp $ $ BEGIN LICENSE$ The contents of this file are subject to the University at Software distributed under the License is distributed on an "...
d429a56bbcd4e5380de934e722d0520be07c9dd5d39ce836c0dff16d6f0f3cab
SjVer/Som-Lang
util.ml
open Lsp.Types let fmt = Printf.sprintf let internal_error_f = (fun msg -> Jsonrpc.Response.Error.{ code = InternalError; message = msg; data = None; }) let markdown str = MarkupContent.create ~kind:MarkupKind.Markdown ~value:str let highlight str = MarkedString.{value = str; language = Some "so...
null
https://raw.githubusercontent.com/SjVer/Som-Lang/e9b0612bfa98350efbeda2b69f96a07127609021/tools/language-server/lib/util.ml
ocaml
open Lsp.Types let fmt = Printf.sprintf let internal_error_f = (fun msg -> Jsonrpc.Response.Error.{ code = InternalError; message = msg; data = None; }) let markdown str = MarkupContent.create ~kind:MarkupKind.Markdown ~value:str let highlight str = MarkedString.{value = str; language = Some "so...
4d8a5135f67615155559c17d14336f0d26fa509dfe133e10aa3fdc5a10bfdba0
FlogFr/FlashCard
Auth.hs
# LANGUAGE TypeFamilies # module Auth where import Protolude import Data.List import Data.String import Data.Pool import Data.Exception import Control.Lens hiding ( Context ) import Crypto.Hash hiding ( Context ) import ...
null
https://raw.githubusercontent.com/FlogFr/FlashCard/17029f9b84f23c43f67702b77bd7418cdf0a9d28/src/Auth.hs
haskell
| We need to specify the data returned after authentication This is our bespoke (and bad) authentication logic. secret. All good, we can retrieve and return the user - | The auth handler wraps a function from Request -> Handler Session. - We look for a token in the request headers that we expect to be in the cookie...
# LANGUAGE TypeFamilies # module Auth where import Protolude import Data.List import Data.String import Data.Pool import Data.Exception import Control.Lens hiding ( Context ) import Crypto.Hash hiding ( Context ) import ...
0cc5c166449cb1d26b56893c6ccf11d1c422e465dab25f09e1623b7e3ffb6906
aistrate/Okasaki
Ex02_01.hs
suffixes :: [a] -> [[a]] suffixes [] = [[]] suffixes xs@(_:ys) = xs : suffixes ys --suffixes xs = xs : suffixes (tail xs)
null
https://raw.githubusercontent.com/aistrate/Okasaki/cc1473c81d053483bb5e327409346da7fda10fb4/MyCode/Ch02/Ex02_01.hs
haskell
suffixes xs = xs : suffixes (tail xs)
suffixes :: [a] -> [[a]] suffixes [] = [[]] suffixes xs@(_:ys) = xs : suffixes ys
e79836b07b016f51ec050cd22e8057247616e4b9c6ca9f3cec4d1af25fec1f93
twosigma/Cook
rebalancer.clj
;; Copyright ( c ) Two Sigma Open Source , LLC ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -2.0 ;; ;; Unless required by applicable law or agreed to in writing, software...
null
https://raw.githubusercontent.com/twosigma/Cook/09904b39ed9ba0251cb5fe53d33f138811fd77e8/scheduler/src/cook/rebalancer.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permi...
Copyright ( c ) Two Sigma Open Source , LLC distributed under the License is distributed on an " AS IS " BASIS , (ns cook.rebalancer (:require [clojure.core.async :as async] [clojure.core.cache :as cache] [clojure.data.priority-map :as pm] [clojure.tools.logging :as log] ...
ff6882ca691693b82e9964ea4ac1bc2e2393443cb7247d2566d3dffeb5018cbe
uw-unsat/serval-sosp19
spectre.rkt
#lang rosette (require (except-in rackunit fail) rackunit/text-ui rosette/lib/roseunit serval/lib/core serval/llvm serval/lib/unittest) (require "generated/racket/test/spectre.globals.rkt" "generated/racket/test/spectre.map.rkt") (require "generated/racket/test/s...
null
https://raw.githubusercontent.com/uw-unsat/serval-sosp19/175c42660fad84b44e4c9f6f723fd3c9450d65d4/racket/test/spectre.rkt
racket
#lang rosette (require (except-in rackunit fail) rackunit/text-ui rosette/lib/roseunit serval/lib/core serval/llvm serval/lib/unittest) (require "generated/racket/test/spectre.globals.rkt" "generated/racket/test/spectre.map.rkt") (require "generated/racket/test/s...
747865f1ce9b472edf90544a47eb7deb406001abaf9091bdc53b9ae40817828d
basho/riak_test
riak_core_ring_manager_intercepts.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2015 Basho Technologies , Inc. %% 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 Li...
null
https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/intercepts/riak_core_ring_manager_intercepts.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2015 Basho Technologies , Inc. 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(riak_core_ring_manager_...
b02c15d85dbf77e39f465de6d79f7752ec1810652ef7465259421b0cc4820f59
ixmatus/orgmode-parse
Types.hs
| Module : Data . . Types Copyright : © 2014 Parnell Springmeyer License : All Rights Reserved Maintainer : Parnell Springmeyer < > Stability : experimental Types for the AST of an org - mode document . Module : Data.OrgMode.Types Copyright : © 2014 Parnell Springm...
null
https://raw.githubusercontent.com/ixmatus/orgmode-parse/2cc74f5f8916c36a398be72f7733630bd7220f9f/src/Data/OrgMode/Types.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DeriveDataTypeable # # LANGUAGE OverloadedStrings # # OPTIONS -fno-warn-orphans # | Org-mode document. ^ Text occurring before any Org headlines | Headline within an org-mode document. ^ State of th...
| Module : Data . . Types Copyright : © 2014 Parnell Springmeyer License : All Rights Reserved Maintainer : Parnell Springmeyer < > Stability : experimental Types for the AST of an org - mode document . Module : Data.OrgMode.Types Copyright : © 2014 Parnell Springm...
babaa6461fb4f2ce2b222214059779f43f363f685e4b03497de0f5e89b0871ae
cojna/iota
PreludeSpec.hs
# LANGUAGE OverloadedLists # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeApplications # module My.PreludeSpec (main, spec) where import Data.ByteString () import qualified Data.ByteString.Builder as B import qualified Data.Vector as V import My.Prelude import Test.Prelude main :: IO () main = hspec spec spec ...
null
https://raw.githubusercontent.com/cojna/iota/6e7534780eaeca7feb286084f0bcdd1a9eb64417/test/My/PreludeSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE OverloadedLists # # LANGUAGE TypeApplications # module My.PreludeSpec (main, spec) where import Data.ByteString () import qualified Data.ByteString.Builder as B import qualified Data.Vector as V import My.Prelude import Test.Prelude main :: IO () main = hspec spec spec :: Spec spec = do describe "unwor...
62c0b59835f0ac904f292c20a1b33d767b83eeb239bed6ede9f8a818b6cd31b1
johnlawrenceaspden/hobby-code
helloweb.clj
(ns helloweb (:require clojure-advocacy) (:use compojure clojure.test)) (with-test (defn yo[s] (html [:head [:title "hello world"]][:body "yo"])) (is (=(yo 'dummy) "<head><title>hello world</title></head><body>yo</body>" ))) (defroutes my-app (GET "/" yo) (GET "/clojure" clojure-advocacy/clojure-page...
null
https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/maven_hello_web/src/main/clojure/helloweb.clj
clojure
(ns helloweb (:require clojure-advocacy) (:use compojure clojure.test)) (with-test (defn yo[s] (html [:head [:title "hello world"]][:body "yo"])) (is (=(yo 'dummy) "<head><title>hello world</title></head><body>yo</body>" ))) (defroutes my-app (GET "/" yo) (GET "/clojure" clojure-advocacy/clojure-page...
27feeedc891869941039cccc4dc6f70c18f08f4eb8e6f82b1f50bab1bad8d25a
mentat-collective/functional-numerics
rational.cljc
(ns quadrature.interpolate.rational "This namespace contains a discussion of rational function interpolation, and different methods for fitting rational functions N points and evaluating them at some value `x`." (:require [quadrature.interpolate.polynomial :as ip] [sicmutils.generic :as g] ...
null
https://raw.githubusercontent.com/mentat-collective/functional-numerics/44856b0e3cd1f0dd9f8ebb2f67f4e85a68aa8380/src/quadrature/interpolate/rational.cljc
clojure
(ns quadrature.interpolate.rational "This namespace contains a discussion of rational function interpolation, and different methods for fitting rational functions N points and evaluating them at some value `x`." (:require [quadrature.interpolate.polynomial :as ip] [sicmutils.generic :as g] ...
6c6bbe2010b1eafc3a872d9b607fd4fb1ef61eb5f3df4725aea652fbfd31970f
IvanIvanov/fp2013
digits-sum-test.scm
;;; This file contains unit tests for the problem listed in the name ;;; of this file. ;;; ;;; To run the tests specify the relative or absolute path to the ;;; ".scm" file with the proposed solution in the (load ...) command ;;; below. Then you can either open the tests and run them in Racket ( with R5RS set as the ...
null
https://raw.githubusercontent.com/IvanIvanov/fp2013/2ac1bb1102cb65e0ecbfa8d2fb3ca69953ae4ecf/lab2-and-3/homework1/digits-sum-test.scm
scheme
This file contains unit tests for the problem listed in the name of this file. To run the tests specify the relative or absolute path to the ".scm" file with the proposed solution in the (load ...) command below. Then you can either open the tests and run them in Racket directly from the command line: plt-r5...
( with R5RS set as the language ) , or you can run the following assuming 's bin directory is included in the PATH environment (load "digits-sum.scm") (define (__make-counter x) (lambda () (set! x (+ x 1)) x)) (define __test-counter (__make-counter 0)) (define (__test-passed) (display (string...
00c3c82e4f6b0da7d07d52e1ee5d3da5232338898f067c72e17db7c292bab99e
MinaProtocol/mina
verify.mli
open Core_kernel module Instance : sig type t = | T : (module Pickles_types.Nat.Intf with type n = 'n) * (module Intf.Statement_value with type t = 'a) * Verification_key.t * 'a * ('n, 'n) Proof.t -> t end val verify : (module Pickles_types.Nat.Intf with type...
null
https://raw.githubusercontent.com/MinaProtocol/mina/d84d63a0a2522603f3183eb0a49321399763c43a/src/lib/pickles/verify.mli
ocaml
open Core_kernel module Instance : sig type t = | T : (module Pickles_types.Nat.Intf with type n = 'n) * (module Intf.Statement_value with type t = 'a) * Verification_key.t * 'a * ('n, 'n) Proof.t -> t end val verify : (module Pickles_types.Nat.Intf with type...
f37c35e2cbb73fdf7c32d14d5b6f852d3d360e82c4e2bc2fd9e6309f5d742a70
tamarit/edd
smerl.erl
@author < > [ ] @copyright Yariv Sadan 2006 - 2007 %% @doc Smerl : Simple Metaprogramming for Erlang %% Smerl is an Erlang library that simplifies the creation and manipulation of Erlang modules in %% runtime. %% You do n't need to know Smerl in order to use ErlyWeb ; Smerl is included in ErlyW...
null
https://raw.githubusercontent.com/tamarit/edd/867f287efe951bec6a8213743a218b86e4f5bbf7/src/smerl.erl
erlang
runtime. ``` test_smerl() -> {ok, M2} = smerl:add_func(M1, "bar() -> 1 + 1."), returns 2 ` ` smerl:has_func(M2, bar, 0). % returns true ''' or as abstract forms. For more information, read the Abstract Format ([-5.5/erts-5.5/doc/html/absform.html#4]). would be written as ``` ...
@author < > [ ] @copyright Yariv Sadan 2006 - 2007 @doc Smerl : Simple Metaprogramming for Erlang Smerl is an Erlang library that simplifies the creation and manipulation of Erlang modules in You do n't need to know Smerl in order to use ErlyWeb ; Smerl is included in ErlyWeb because ErlyWeb use...
7800b7106034aec001b6bb8622d73e08d8f4074406b1a81083953dc8ff2a2d3a
pascal-knodel/haskell-craft
Filter.hs
-- Filter. General Recursion. module Filter where import Prelude hiding (filter) filter :: (a -> Bool) -> [a] -> [a] filter _ [] = [] filter predicate (item : remainingItems) = filter' (predicate item) (item : remainingItems) where -- filter' :: Bool -> [a] -> [a] filter' _ [] ...
null
https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/Examples/%C2%B7%C2%A0Recursion/%C2%B7%C2%A0General%20Recursion/Higher%20Order%20Functions/Filter.hs
haskell
Filter. General Recursion. filter' :: Bool -> [a] -> [a] [] TODO: attempt to define a append operation in reverse to ++, so that it is efficient, I mean O(length right) instead O(length left). Reverse List : Reverse List: filter :: (a -> Bool) -> [a] -> [a] filter predicate list = filter' [] list where ...
module Filter where import Prelude hiding (filter) filter :: (a -> Bool) -> [a] -> [a] filter _ [] = [] filter predicate (item : remainingItems) = filter' (predicate item) (item : remainingItems) where filter' _ [] = [] filter' True (item : remainingItems) = item : filter' ...
7e72c988cfe9a4b5022bf7c12b8e2a35dfb09534c9d0beaf0416492dfcee70a4
danieljharvey/mimsa
Unify.hs
# LANGUAGE BlockArguments # # LANGUAGE FlexibleContexts # module Language.Mimsa.Typechecker.Unify ( unify, freeTypeVars, ) where import Control.Monad.Except import Control.Monad.State import Data.Functor (($>)) import qualified Data.List.NonEmpty as NE import Data.Map.Strict (Map) import qualified Data.Map.St...
null
https://raw.githubusercontent.com/danieljharvey/mimsa/e6b177dd2c38e8a67d6e27063ca600406b3e6b56/compiler/src/Language/Mimsa/Typechecker/Unify.hs
haskell
| Creates a fresh unification variable and binds it to the given type these should always be scoped when found, so if we find them, error numbered vars always combine with unification vars names and numbers must match to unify named vars only unify with themselves
# LANGUAGE BlockArguments # # LANGUAGE FlexibleContexts # module Language.Mimsa.Typechecker.Unify ( unify, freeTypeVars, ) where import Control.Monad.Except import Control.Monad.State import Data.Functor (($>)) import qualified Data.List.NonEmpty as NE import Data.Map.Strict (Map) import qualified Data.Map.St...
b020196cda9b6f66bf9f1d95bc241ab12195f8a6d82e528f759fd393c31634cb
rabbitmq/erlang-data-structures
ft_queue.erl
The contents of this file are subject to the Mozilla Public License %% Version 1.1 (the "License"); you may not use this file except in %% compliance with the License. You may obtain a copy of the License %% at / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WARRANTY OF ...
null
https://raw.githubusercontent.com/rabbitmq/erlang-data-structures/7f9b5427200e8247c77ce1cc146eb10be9095791/finger_tree/src/ft_queue.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Monoid
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ Consistent Hash Exchange . The Initial Developer of the Original Code is VMware , Inc. Copyright ( c ) 2011 - 2013 VMware , Inc. All rights ...
3e396390e0120b9a696aa6e01514243eb81f337c02ebd6ed5c562172d4e2fca6
dfordivam/tenjinreader
Interface.hs
# LANGUAGE FlexibleContexts # module KanjiDB.Interface ( openKanjiDB , getKanjis , getRadicalKanjis , getKanjiRadicals) where import Common import qualified KanjiDB.Model as DB import qualified KanjiDB.DB as DB import Protolude import Database.Beam import Database.SQLite.Simple import Database.Beam.Sqlite...
null
https://raw.githubusercontent.com/dfordivam/tenjinreader/894a6f6b23d52c9c048740c0ea62f4c0f47d9561/backend/kanjiDbReader/src/KanjiDB/Interface.hs
haskell
getVocabKanjis -> DBMonad [KanjiId] getVocabKanjis v = do where query v = map DB._vocabKanjiKanji $ filter_ (\r -> r ^. DB.vocabKanjiVocab ==. val_ v) (all_ (DB._jmdictVocabKanji DB.jmdictDb)) getKanjiVocabs -> DBMonad [VocabId] getKanjiVocabs k = do return (DB.getKe...
# LANGUAGE FlexibleContexts # module KanjiDB.Interface ( openKanjiDB , getKanjis , getRadicalKanjis , getKanjiRadicals) where import Common import qualified KanjiDB.Model as DB import qualified KanjiDB.DB as DB import Protolude import Database.Beam import Database.SQLite.Simple import Database.Beam.Sqlite...
6ee740ece77d97623ba1f41e7ece7d1846617ade36bcc8d09d9c0d30327d0c2e
RefactoringTools/wrangler
refac_fun_to_process.erl
Copyright ( c ) 2010 , , %% All rights reserved. %% %% Redistribution and use in source and binary forms, with or without %% modification, are permitted provided that the following conditions are met: %% %% Redistributions of source code must retain the above copyright %% notice, this list of conditions...
null
https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/src/refac_fun_to_process.erl
erlang
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: %% Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. %% Redi...
Copyright ( c ) 2010 , , IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR @private -module(refac_fun_to_process). -export([fun_to_process/7, fun_to_process_eclipse/6, fun_to_process_1/8, fun_to_process...
0cbf968235c61223a71e3606d2417d517612245143b0f9e6e409942486722cbe
geneweb/geneweb
checkItem.ml
open Def open Gwdb type base_error = person error type base_warning = (iper, person, ifam, family, title, pers_event, fam_event) warning type base_misc = (person, family, title) misc (* Constants used for computing the warnings. *) let max_age_btw_cpl = 50 let max_days_btw_sibl = 10 let max_month_btw_sibl = 7 let...
null
https://raw.githubusercontent.com/geneweb/geneweb/5fc16b037954f40682a63b7c22a2403a894782ca/lib/checkItem.ml
ocaml
Constants used for computing the warnings. Check if d1 < d2 lequel on remplace toutes les dates inconnues par la dernière date maximale que l'on ait vu. this check if events chronology is sound (e.g. no baptism before birth check order of events check person's witnesses che...
open Def open Gwdb type base_error = person error type base_warning = (iper, person, ifam, family, title, pers_event, fam_event) warning type base_misc = (person, family, title) misc let max_age_btw_cpl = 50 let max_days_btw_sibl = 10 let max_month_btw_sibl = 7 let lim_date_death = 1900 let max_death_after_lim_da...
fe4722a9170d92d3d557875329e8e58aa286abe793a4fd32407d9a1a2389ed62
kaznum/programming_in_ocaml_exercise
answer.ml
let f = ref (fun y -> y + 1) let funny_fact x = if x = 1 then 1 else x * (!f (x - 1));; f := funny_fact;; funny_fact 5;; let rec funny_fact' x = if x = 1 then 1 else x * (funny_fact' (x - 1));; funny_fact' 5;; 一度、fに適当な無名関数の参照を代入し、これを利用しfunny_factを定義する 。 その直後に、f の参照先を funny_fact ( 自己の関数)に変更することで、funny_fact内で自己参照と...
null
https://raw.githubusercontent.com/kaznum/programming_in_ocaml_exercise/6f6a5d62a7a87a1c93561db88f08ae4e445b7d4e/ex8.3/answer.ml
ocaml
let f = ref (fun y -> y + 1) let funny_fact x = if x = 1 then 1 else x * (!f (x - 1));; f := funny_fact;; funny_fact 5;; let rec funny_fact' x = if x = 1 then 1 else x * (funny_fact' (x - 1));; funny_fact' 5;; 一度、fに適当な無名関数の参照を代入し、これを利用しfunny_factを定義する 。 その直後に、f の参照先を funny_fact ( 自己の関数)に変更することで、funny_fact内で自己参照と...
cfd6667023f0481776ae9f53f38a86b66d617af2bdff3606713db7b08d7913f0
aeternity/aesophia
aeso_scan.erl
%%% -*- erlang-indent-level:4; indent-tabs-mode: nil -*- %%%------------------------------------------------------------------- ( C ) 2017 , Aeternity Anstalt @doc The lexer . %%% %%% @end %%%------------------------------------------------------------------- -module(aeso_scan). -export([scan/1, utf8_encode/1])....
null
https://raw.githubusercontent.com/aeternity/aesophia/a7b7aafced47a59c727137e8245300232ed99258/src/aeso_scan.erl
erlang
-*- erlang-indent-level:4; indent-tabs-mode: nil -*- ------------------------------------------------------------------- @end ------------------------------------------------------------------- * \x{hhh...} Comments and whitespace Special characters Literals Keywords override identifiers. Need to use override...
( C ) 2017 , Aeternity Anstalt @doc The lexer . -module(aeso_scan). -export([scan/1, utf8_encode/1]). -import(aeso_scan_lib, [token/1, token/2, symbol/0, skip/0, override/2, push/2, pop/1]). lexer() -> Number = fun(Digit) -> [Digit, "+(_", Digit, "+)*"] end, DIGIT = "[0-9]"...
515f43b25199d8acf411ad25345d14d96484167de86937a6270d82acb9b7723f
digital-dj-tools/dj-data-converter
time.cljc
#?(:clj (set! *warn-on-reflection* true)) (ns converter.time (:require [cljc.java-time.local-date :as jtld] [cljc.java-time.format.date-time-formatter :as jtf] #?(:clj [clojure.spec.alpha :as s] :cljs [cljs.spec.alpha :as s]) #?(:clj [clojure.spec.gen.alpha :as gen] :cljs [cljs.spec.gen.alpha :as gen]) ...
null
https://raw.githubusercontent.com/digital-dj-tools/dj-data-converter/de1ae5cda60bc64ee3cca1a09b11e1808dd4738a/src/converter/time.cljc
clojure
#?(:clj (set! *warn-on-reflection* true)) (ns converter.time (:require [cljc.java-time.local-date :as jtld] [cljc.java-time.format.date-time-formatter :as jtf] #?(:clj [clojure.spec.alpha :as s] :cljs [cljs.spec.alpha :as s]) #?(:clj [clojure.spec.gen.alpha :as gen] :cljs [cljs.spec.gen.alpha :as gen]) ...
d04c348ee13529ee11ec6c95cde075884e1df15917e66026c52fbf0127163a66
peti/funcmp
Core.hs
| Module : FMP.Core Copyright : ( c ) 2003 - 2010 ( c ) 2002 - 2003 ( c ) 2002 - 2003 Meik Hellmund ( c ) 1998 - 2002 ( c ) 1998 - 2002 Joachim Korittky ( c ) 1998 - 2002 License : Maintainer : Stability : provi...
null
https://raw.githubusercontent.com/peti/funcmp/1f6713a273b57b8b60b19958420748daf65d35af/FMP/Core.hs
haskell
Hilfsfunktionen ( wferi ? It would be interesting to know what these types contain. The |Int| and the |Symbols| probably represent some kind of state. It seems that every invocation of |mp| must have different |n| parameter, probably for suffixing its local variables. wferi ) ( wferi all constructors of...
| Module : FMP.Core Copyright : ( c ) 2003 - 2010 ( c ) 2002 - 2003 ( c ) 2002 - 2003 Meik Hellmund ( c ) 1998 - 2002 ( c ) 1998 - 2002 Joachim Korittky ( c ) 1998 - 2002 License : Maintainer : Stability : provi...
62cc485781fe61d6749eb7a916fd492e3b54ffcdb0866eb84cb9b3c98c4bd80f
realark/vert
obb.lisp
(in-package :recurse.vert) OBB base class (defclass obb (transform) ((local-dimensions :initform (vector2 1.0 1.0) :documentation "Local width and height.") (world-points-dirty-p :initform t) (world-points :initform nil :documentation "The world-space points that define...
null
https://raw.githubusercontent.com/realark/vert/4cb88545abc60f1fba4a8604ce85e70cbd4764a2/src/physics/obb.lisp
lisp
upper-left upper-right lower-right lower-left TODO: remove this function and use object-aabb directly object has a rotation, return an unrotated rectangle which fits over the object TODO: make this the default path if profiling show no performance hit x1 falls inside rect2-x y1 falls inside rect2-y in the sam...
(in-package :recurse.vert) OBB base class (defclass obb (transform) ((local-dimensions :initform (vector2 1.0 1.0) :documentation "Local width and height.") (world-points-dirty-p :initform t) (world-points :initform nil :documentation "The world-space points that define...
37bb3220f64a795d6a9cb68a8f404be64bedcfb6b6c9fde796e14101ed9be2a7
bhaskara/programmable-reinforcement-learning
crl-q-function.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; rl - functions / q - function / crl - q - function.lisp ;; Implements <crl-q-function>, for coordinated relational linear Q-functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defpackage crl...
null
https://raw.githubusercontent.com/bhaskara/programmable-reinforcement-learning/8afc98116a8f78163b3f86076498d84b3f596217/lisp/rl-functions/q-function/crl/crl-q-function.lisp
lisp
Implements <crl-q-function>, for coordinated relational linear Q-functions type def parse the :template-descs argument if it's supplied, and call the next method when the feature-templates field has been set, use it to set some of the other fields to default values Evaluating Q finding best c...
rl - functions / q - function / crl - q - function.lisp (defpackage crl-q-function (:documentation "Package for coordinated relational linear Q-functions. See also the q-function package. Types ----- <crl-q-function> Accessors --------- set-temps ids set-ids choice-fn set-choice-fn debug-mode ...
5a0768f41cfb5870e1c7a5e084f65b4c7a04d9a8dfa349108c69b9522a14fdb8
spechub/Hets
AS.hs
{-# LANGUAGE DeriveDataTypeable #-} | Module : ./LF / AS.hs Description : Abstract syntax for the Edinburgh Logical Framework Copyright : ( c ) , DFKI Bremen 2010 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : experimental Portability : portable...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/LF/AS.hs
haskell
# LANGUAGE DeriveDataTypeable # grammar for basic specs grammar for symbols and symbol maps pretty printing
| Module : ./LF / AS.hs Description : Abstract syntax for the Edinburgh Logical Framework Copyright : ( c ) , DFKI Bremen 2010 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : experimental Portability : portable Module : ./LF/AS.hs Descri...
e13b5a016ff99b57b945ea7f952dc37c318ef1d328c58246668fe934d5a8d0ef
fukamachi/psychiq
connection.lisp
(in-package :cl-user) (defpackage psychiq.connection (:use #:cl #:psychiq.specials) (:import-from #:alexandria #:when-let #:once-only) (:export #:*connection* #:connect #:disconnect #:reconnect #:ensure-connected #:make...
null
https://raw.githubusercontent.com/fukamachi/psychiq/602fbb51d4c871de5909ec0c5a159652f4ae9ad3/src/core/connection.lisp
lisp
Connection APIs
(in-package :cl-user) (defpackage psychiq.connection (:use #:cl #:psychiq.specials) (:import-from #:alexandria #:when-let #:once-only) (:export #:*connection* #:connect #:disconnect #:reconnect #:ensure-connected #:make...
3e3f0d805b5345d2149e3a00965bee0e35fedf212463a12a7964779d08047d30
awakesecurity/proto3-suite
SimpleEncodeDotProto.hs
{-# LANGUAGE CPP #-} {-# LANGUAGE ImplicitParams #-} # LANGUAGE OverloadedLists # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Main where import qualified Data.ByteString.Lazy as BL import qualified Data.Map as M import Proto3.Suite import q...
null
https://raw.githubusercontent.com/awakesecurity/proto3-suite/86c70fc262898a0b2feb5c78529a8d77ee7484a5/tests/SimpleEncodeDotProto.hs
haskell
# LANGUAGE CPP # # LANGUAGE ImplicitParams # # LANGUAGE OverloadedStrings # # LANGUAGE ScopedTypeVariables # Send default values for oneof subfields Send non-default values for oneof subfields Send with oneof not set therefore we do not emit mapped Nothing values in that format. Tests us...
# LANGUAGE OverloadedLists # module Main where import qualified Data.ByteString.Lazy as BL import qualified Data.Map as M import Proto3.Suite import qualified Proto3.Suite.JSONPB as JSONPB import TestProto import qualified TestProtoImport import qualified TestProtoOneof import qualified Test...
11a7ad4691f291941ec7142c137bd44af7e512abe7be6227a4ce5e748cd877de
metosin/compojure-api
spec_coercion_explain_test.clj
(ns compojure.api.coercion.spec-coercion-explain-test (:require [midje.sweet :refer :all] [clojure.spec.alpha :as s] [spec-tools.spec :as spec] [compojure.api.test-utils :refer :all] [compojure.api.sweet :refer :all] [compojure.api.request :as request] ...
null
https://raw.githubusercontent.com/metosin/compojure-api/5c88f32fe56cdb6fcdb3cc506bb956943fcd8c17/test19/compojure/api/coercion/spec_coercion_explain_test.clj
clojure
(ns compojure.api.coercion.spec-coercion-explain-test (:require [midje.sweet :refer :all] [clojure.spec.alpha :as s] [spec-tools.spec :as spec] [compojure.api.test-utils :refer :all] [compojure.api.sweet :refer :all] [compojure.api.request :as request] ...
f5f67a25bf5ef1fdfc4c019ba1d5d68dae167fb97a148cc6499301f362b55267
pepeiborra/narradar
UsableRules.hs
# LANGUAGE PatternGuards , ViewPatterns # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # module Narradar.Processor.UsableRules where import Narradar.Framework import Narradar.Framework.Ppr data UsableRulesProof = UsableRulesProof deriving (Eq,Show,Ord) instance Pretty Usabl...
null
https://raw.githubusercontent.com/pepeiborra/narradar/bc53dcad9aee480ab3424a75239bac67e4794456/src/Narradar/Processor/UsableRules.hs
haskell
# LANGUAGE PatternGuards , ViewPatterns # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # module Narradar.Processor.UsableRules where import Narradar.Framework import Narradar.Framework.Ppr data UsableRulesProof = UsableRulesProof deriving (Eq,Show,Ord) instance Pretty Usabl...
cf418d639cc36d17977ef4917253a23654f05a3f913e2d69b6b30443b21538f4
purerl/purerl
Types.hs
module Language.PureScript.Erl.Errors.Types where import Prelude.Compat import Language.PureScript.Names import Data.Text import Language.PureScript.AST.Declarations (ErrorMessageHint(..)) -- | A type of error messages data SimpleErrorMessage = FileIOError Text IOError -- ^ A description of what we were trying to ...
null
https://raw.githubusercontent.com/purerl/purerl/8ec9f1228c41ded287192ab98ca32517f63d00b4/src/Language/PureScript/Erl/Errors/Types.hs
haskell
| A type of error messages ^ A description of what we were trying to do, and the error which occurred
module Language.PureScript.Erl.Errors.Types where import Prelude.Compat import Language.PureScript.Names import Data.Text import Language.PureScript.AST.Declarations (ErrorMessageHint(..)) data SimpleErrorMessage | InvalidFFIArity ModuleName Text Int Int | MissingFFIModule ModuleName | UnnecessaryFFIModule Mod...
a593616e86b41c26809afbc60a3d9569bb887028489ea7c8a43ee8707ce431a7
mransan/ocaml-protoc
test23_ml.ml
module T = Test23_types module Pp = Test23_pp module Pb = Test23_pb let decode_ref_data () = { T.i = Int64.(shift_left 3L 56) } let () = let mode = Test_util.parse_args () in match mode with | Test_util.Decode -> Test_util.decode "test23.c2ml.data" Pb.decode_int64_t Pp.pp_int64_t (decode_ref_data ())...
null
https://raw.githubusercontent.com/mransan/ocaml-protoc/e43b509b9c4a06e419edba92a0d3f8e26b0a89ba/src/tests/integration-tests/test23_ml.ml
ocaml
module T = Test23_types module Pp = Test23_pp module Pb = Test23_pb let decode_ref_data () = { T.i = Int64.(shift_left 3L 56) } let () = let mode = Test_util.parse_args () in match mode with | Test_util.Decode -> Test_util.decode "test23.c2ml.data" Pb.decode_int64_t Pp.pp_int64_t (decode_ref_data ())...
d4fe30650aeccf4bc402448dfc2f1eb6076734175e46d78e1a175df58c40b15c
gfngfn/SATySFi
fontAccess.ml
open MyUtil type t = | Single of lib_path | Collection of lib_path * int
null
https://raw.githubusercontent.com/gfngfn/SATySFi/9dbd61df0ab05943b3394830c371e927df45251a/src/backend/fontAccess.ml
ocaml
open MyUtil type t = | Single of lib_path | Collection of lib_path * int
406ed4cf1717f53832eea5f8f3c02543d3e61719850702af307cefde46dd53f9
vehicle-lang/vehicle
Prelude.hs
module Vehicle.Compile.Prelude ( module X, module Vehicle.Compile.Prelude, ) where import Control.Monad.Identity (Identity (..)) import Data.List.NonEmpty qualified as NonEmpty import Vehicle.Compile.Dependency.Graph as X import Vehicle.Compile.Prelude.Contexts as X import Vehicle.Compile.Prelude.Utils as X im...
null
https://raw.githubusercontent.com/vehicle-lang/vehicle/8db54819fdfd79e4b2b5d77019560a207192a23a/vehicle/src/Vehicle/Compile/Prelude.hs
haskell
------------------------------------------------------------------------------ Type synonyms ------------------------------------------------------------------------------ Other ----------------------------------------------------------------------------- | Function for updating an auxiliary argument (which may be m...
module Vehicle.Compile.Prelude ( module X, module Vehicle.Compile.Prelude, ) where import Control.Monad.Identity (Identity (..)) import Data.List.NonEmpty qualified as NonEmpty import Vehicle.Compile.Dependency.Graph as X import Vehicle.Compile.Prelude.Contexts as X import Vehicle.Compile.Prelude.Utils as X im...
2ddefdfb7b0621c1ad3b34466db8947bd177fcd8cbb41ad8da611e5f790f1387
winterland1989/mysql-haskell
BinLogEvent.hs
{-# OPTIONS_GHC -funbox-strict-fields #-} | Module : Database . MySQL.BinLogProtocol . BinLogEvent Description : Binlog event Copyright : ( c ) Winterland , 2016 License : BSD Maintainer : Stability : experimental Portability : PORTABLE Binlog event type Module : Database.My...
null
https://raw.githubusercontent.com/winterland1989/mysql-haskell/d93caffe0991e1090a3854acff355ff0ea6075c7/Database/MySQL/BinLogProtocol/BinLogEvent.hs
haskell
# OPTIONS_GHC -funbox-strict-fields # ------------------------------------------------------------------------------ ^ for future GTID compatibility OK byte ------------------------------------------------------------------------------ const 19 to extract the length of the event specific header. not used in row b...
| Module : Database . MySQL.BinLogProtocol . BinLogEvent Description : Binlog event Copyright : ( c ) Winterland , 2016 License : BSD Maintainer : Stability : experimental Portability : PORTABLE Binlog event type Module : Database.MySQL.BinLogProtocol.BinLogEvent Description...
7386b181ba77d7834354eaf49a9fb8a1a1d305071e3460ad06426fe91d69ee36
haslab/HAAP
RunT1.hs
module Main where import LI11718 import qualified Tarefa1_${group} as T1 import System.Environment import Text.Read main = do args <- getArgs case args of ["constroi"] -> do str <- getContents let caminho = readMaybe str case caminho of Nothing -> e...
null
https://raw.githubusercontent.com/haslab/HAAP/5acf9efaf0e5f6cba1c2482e51bda703f405a86f/examples/plab/oracle/RunT1.hs
haskell
module Main where import LI11718 import qualified Tarefa1_${group} as T1 import System.Environment import Text.Read main = do args <- getArgs case args of ["constroi"] -> do str <- getContents let caminho = readMaybe str case caminho of Nothing -> e...
412ae5b6bd71ae4e5093d3c7dbf4f5ffe543092ccffc3644286019a62e631da5
flipstone/haskell-for-beginners
2_type_variables.hs
-- Add type signatures to the following functions. More than one signature will work . You should -- find the most general one (i.e. the one that uses -- the most type variables). doNothing x = x takeSome xs = take 10 (drop 3 xs) crossProduct xs ys = [ (x,y) | x <- xs, y <- ys ] obscure xs = [ '*' | _ <- xs ] aO...
null
https://raw.githubusercontent.com/flipstone/haskell-for-beginners/e586a1f3ef08f21d5181171fe7a7b27057391f0b/problems/chapter_03/2_type_variables.hs
haskell
Add type signatures to the following functions. find the most general one (i.e. the one that uses the most type variables). on their type signatures and names. may fail on empty lists Write type signatures and definitions for the following functions based on their names and parameters. NOTE: there is a standard...
More than one signature will work . You should doNothing x = x takeSome xs = take 10 (drop 3 xs) crossProduct xs ys = [ (x,y) | x <- xs, y <- ys ] obscure xs = [ '*' | _ <- xs ] aOrB condition a b = if condition then a else b Write for the following functions based replaceSnd :: (a,b) -> c -> (a,c) replaceS...
6be6a91ecf68f4a03ace58f123ca90201378c73ca1f61610b90cff8c59021e5c
raspasov/neversleep
read_dispatch.clj
(ns neversleep-db.read-dispatch (:require [neversleep-db.persistent-durable-map :as pdm] [neversleep-db.b-plus-tree-batch :as bpt-b] [neversleep-db.b-plus-tree-sorted-map :as bpt-sm] [neversleep-db.println-m :refer [println-m]] [neversleep-db.state :as state] ...
null
https://raw.githubusercontent.com/raspasov/neversleep/7fd968f4ab20fa6ef71e1049e3eec289ea6691e4/src/neversleep_db/read_dispatch.clj
clojure
after server restart data is a map, before that it's a byte array execute read request if found return the in-memory result found in-mem else, search on disk if entity exists as of this point in time else, search the tree and collect key/vals else, no entity as of this point, return nil else, search the tree and collec...
(ns neversleep-db.read-dispatch (:require [neversleep-db.persistent-durable-map :as pdm] [neversleep-db.b-plus-tree-batch :as bpt-b] [neversleep-db.b-plus-tree-sorted-map :as bpt-sm] [neversleep-db.println-m :refer [println-m]] [neversleep-db.state :as state] ...
b0424b8924607bbbc9af7df8bb32186f3c82424a3dc46578407d9312b9c490c5
Apress/beg-haskell
Client.hs
module Main where import Control.Monad.Trans import qualified Data.ByteString.Char8 as BS import Data.Conduit import Data.Conduit.Network import System.Environment import Network main :: IO () main = withSocketsDo $ do (name:_) <- getArgs runTCPClient (clientSettings 8900 (BS.pack "127.0.0.1")) (cli...
null
https://raw.githubusercontent.com/Apress/beg-haskell/aaacbf047d553e6177c38807e662cc465409dffd/chapter9/src/Client.hs
haskell
module Main where import Control.Monad.Trans import qualified Data.ByteString.Char8 as BS import Data.Conduit import Data.Conduit.Network import System.Environment import Network main :: IO () main = withSocketsDo $ do (name:_) <- getArgs runTCPClient (clientSettings 8900 (BS.pack "127.0.0.1")) (cli...
ada14a9d37d74bd5ae28b640a15ddde244c33fa8bf76687fd66c4133e6b5cbfa
xmonad/xmonad-contrib
WindowGo.hs
# LANGUAGE ViewPatterns # | Module : XMonad . Actions . : Operations for raising ( traveling to ) windows . License : Public domain Maintainer : < > Stability : unstable Portability : unportable Defines a few convenient operations for raising ( traveling to ) windows bas...
null
https://raw.githubusercontent.com/xmonad/xmonad-contrib/571d017b8259340971db1736eedc992a54e9022c/XMonad/Actions/WindowGo.hs
haskell
* Usage $usage  | Get the list of workspaces sorted by their tag | If windows that satisfy the query exist, apply the supplied function to them, otherwise run the action given as instead and discards the other matches | See 'raiseMaybe'. If the Window can't be found, quietly give up and do nothing. | A manage ho...
# LANGUAGE ViewPatterns # | Module : XMonad . Actions . : Operations for raising ( traveling to ) windows . License : Public domain Maintainer : < > Stability : unstable Portability : unportable Defines a few convenient operations for raising ( traveling to ) windows bas...
3958ce6cba6386020c0b7ea88e8fd93462df26c3c78131c4f0932a032de97672
huangz1990/SICP-answers
17-multi.scm
17-multi.scm (load "17-double-and-halve.scm") (define (multi a b) (cond ((= b 0) 0) ((even? b) (double (multi a (halve b)))) ((odd? b) (+ a (multi a (- b 1))))))
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp1/code/17-multi.scm
scheme
17-multi.scm (load "17-double-and-halve.scm") (define (multi a b) (cond ((= b 0) 0) ((even? b) (double (multi a (halve b)))) ((odd? b) (+ a (multi a (- b 1))))))
c89da31847c6b4ba58cd9f4c68420785eae35b67f0a93c0fa123c6751a150a8d
borgeby/jarl
crypto.cljc
(ns jarl.builtins.crypto (:require [jarl.encoding.hex :as hex] [jarl.builtins.utils :refer [str->bytes]] #?(:clj [jarl.encoding.base64 :as base64]) #?(:clj [clojure.string :as str]) #?(:cljs [goog.crypt :as crypt])) #?(:cljs (:import (goog.crypt Md5 Sha1 Sha256...
null
https://raw.githubusercontent.com/borgeby/jarl/2659afc6c72afb961cb1e98b779beb2b0b5d79c6/core/src/main/cljc/jarl/builtins/crypto.cljc
clojure
(ns jarl.builtins.crypto (:require [jarl.encoding.hex :as hex] [jarl.builtins.utils :refer [str->bytes]] #?(:clj [jarl.encoding.base64 :as base64]) #?(:clj [clojure.string :as str]) #?(:cljs [goog.crypt :as crypt])) #?(:cljs (:import (goog.crypt Md5 Sha1 Sha256...
c5ffc13549ce7d60cfcfeba31ddb162af55d3cd117209ec70c793f3b117033a6
Ericson2314/lighthouse
Wrap.hs
Wrap.hs ( adapted from wrap.c which is ( c ) Silicon Graphics , Inc ) Copyright ( c ) 2002 - 2005 < > This file is part of HOpenGL and distributed under a BSD - style license See the file libraries / GLUT / LICENSE This program texture maps a checkerboard image onto two rectangles . This ...
null
https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/GLUT/examples/RedBook/Wrap.hs
haskell
Create checkerboard image resolve overloading, not needed in "real" programs
Wrap.hs ( adapted from wrap.c which is ( c ) Silicon Graphics , Inc ) Copyright ( c ) 2002 - 2005 < > This file is part of HOpenGL and distributed under a BSD - style license See the file libraries / GLUT / LICENSE This program texture maps a checkerboard image onto two rectangles . This ...
6bbb8e0f95874fae823e9472f1a2063700a65345ddc73be090a56728cbd0d69f
tzemanovic/haskell-yesod-realworld-example-app
Extended.hs
# LANGUAGE NoImplicitPrelude # module Database.Persist.Extended ( module Database.Persist , module Database.Persist.Types.Email , module Database.Persist.Types.Password , maybeUpdate ) where import ClassyPrelude.Yesod import Database.Persist import Database.Persist.Types.Email ...
null
https://raw.githubusercontent.com/tzemanovic/haskell-yesod-realworld-example-app/d9f5191a909fa3c0087c5f28fcaae7ad1eca8b9a/app/src/Database/Persist/Extended.hs
haskell
| Update a given field if the given value is set.
# LANGUAGE NoImplicitPrelude # module Database.Persist.Extended ( module Database.Persist , module Database.Persist.Types.Email , module Database.Persist.Types.Password , maybeUpdate ) where import ClassyPrelude.Yesod import Database.Persist import Database.Persist.Types.Email ...
77096518008c9f06d76b02fece213a7cdc87382ff9d0483dc3d2756ced024ff4
tsloughter/kuberl
kuberl_v1_stateful_set_status.erl
-module(kuberl_v1_stateful_set_status). -export([encode/1]). -export_type([kuberl_v1_stateful_set_status/0]). -type kuberl_v1_stateful_set_status() :: #{ 'collisionCount' => integer(), 'conditions' => list(), 'currentReplicas' => integer(), 'currentRevision' => binary(), 'observedGene...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_stateful_set_status.erl
erlang
-module(kuberl_v1_stateful_set_status). -export([encode/1]). -export_type([kuberl_v1_stateful_set_status/0]). -type kuberl_v1_stateful_set_status() :: #{ 'collisionCount' => integer(), 'conditions' => list(), 'currentReplicas' => integer(), 'currentRevision' => binary(), 'observedGene...
0e33041e6f8126aa19058ead6d3648ecf74d8c8a7939d2c3363a894d3ee85885
janestreet/ppx_type_directed_value
bench.ml
open Core let type_directed_equal_int = Int.equal let type_directed_equal_string = String.equal module M = struct type rec_6 = { f1 : string ; f2 : string ; f3 : string ; g1 : int ; g2 : int ; g3 : int } [@@deriving equal, type_directed_equal] type rec_16 = { f1 : string ...
null
https://raw.githubusercontent.com/janestreet/ppx_type_directed_value/f85693cc6d0ad8a9bc3bad55fed22a3d78e1fcaf/bench/bench.ml
ocaml
open Core let type_directed_equal_int = Int.equal let type_directed_equal_string = String.equal module M = struct type rec_6 = { f1 : string ; f2 : string ; f3 : string ; g1 : int ; g2 : int ; g3 : int } [@@deriving equal, type_directed_equal] type rec_16 = { f1 : string ...
bbab37692d124960942d62ce080584b6dfc0ec5e54e6e83cf1f7349c514bb972
jrh13/hol-light
cosine.ml
(* ========================================================================= *) (* The law of cosines, of sines, and sum of angles of a triangle. *) (* ========================================================================= *) needs "Multivariate/transcendentals.ml";; prioritize_vector();; (* ----------...
null
https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/100/cosine.ml
ocaml
========================================================================= The law of cosines, of sines, and sum of angles of a triangle. ========================================================================= ------------------------------------------------------------------------- Angle between v...
needs "Multivariate/transcendentals.ml";; prioritize_vector();; let vangle = new_definition `vangle x y = if x = vec 0 \/ y = vec 0 then pi / &2 else acs((x dot y) / (norm x * norm y))`;; let angle = new_definition `angle(a,b,c) = vangle (a - b) (c - b)`;; Lemmas ( more than we need for this r...
03fdddd2f9954cec05552470768a1e96ad561c2ca98e35e2b3cfb0b1f26149db
Clozure/ccl-tests
logorc1.lsp
;-*- Mode: Lisp -*- Author : Created : Tue Sep 9 06:23:43 2003 Contains : Tests of LOGORC1 (in-package :cl-test) (compile-and-load "numbers-aux.lsp") ;;; Error tests (deftest logorc1.error.1 (check-type-error #'(lambda (x) (logorc1 x 0)) #'integerp) nil) (deftest logorc1.error.2 (check-typ...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/logorc1.lsp
lisp
-*- Mode: Lisp -*- Error tests Non-error tests
Author : Created : Tue Sep 9 06:23:43 2003 Contains : Tests of LOGORC1 (in-package :cl-test) (compile-and-load "numbers-aux.lsp") (deftest logorc1.error.1 (check-type-error #'(lambda (x) (logorc1 x 0)) #'integerp) nil) (deftest logorc1.error.2 (check-type-error #'(lambda (x) (logorc1 0 x)) #'i...
36a73c6edc97d87039b621f5457d8dfc4c52ad2e1ec6e9b8cc1ef7a48440efdd
racket/gui
kernel.rkt
#lang racket/base (require "wx/platform.rkt" "wx/common/event.rkt" "wx/common/timer.rkt" "wx/common/queue.rkt" "wx/common/clipboard.rkt" "wx/common/cursor.rkt" "wx/common/procs.rkt" "wx/common/handlers.rkt" racket/class racket/draw) (prov...
null
https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mred/private/kernel.rkt
racket
#lang racket/base (require "wx/platform.rkt" "wx/common/event.rkt" "wx/common/timer.rkt" "wx/common/queue.rkt" "wx/common/clipboard.rkt" "wx/common/cursor.rkt" "wx/common/procs.rkt" "wx/common/handlers.rkt" racket/class racket/draw) (prov...
ce6f1a6d7bf16708ca470e47a5916b84709161f7468816b75b4e35162a53cf68
spawnfest/eep49ers
test_incl2.erl
-module(test_incl2). -compile(export_all). -include("test_incl.hrl"). f1() -> ?d. f2() -> true.
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/tools/test/make_SUITE_data/incl_src/test_incl2.erl
erlang
-module(test_incl2). -compile(export_all). -include("test_incl.hrl"). f1() -> ?d. f2() -> true.
9224c9303baae29c0ebfd4b17cb40108e19ca9eea4f944a45071088a3fed38c9
quil/quil
loading_and_displaying.cljc
(ns quil.snippets.image.loading-and-displaying (:require #?(:clj [quil.snippets.macro :refer [defsnippet]]) [quil.core :as q :include-macros true] quil.snippets.all-snippets-internal) #?(:cljs (:use-macros [quil.snippets.macro :only [defsnippet]]))) (defsnippet image "image" {} ...
null
https://raw.githubusercontent.com/quil/quil/1f214e712d834ede311fdc652eafe9cc0232c96e/src/cljc/quil/snippets/image/loading_and_displaying.cljc
clojure
(ns quil.snippets.image.loading-and-displaying (:require #?(:clj [quil.snippets.macro :refer [defsnippet]]) [quil.core :as q :include-macros true] quil.snippets.all-snippets-internal) #?(:cljs (:use-macros [quil.snippets.macro :only [defsnippet]]))) (defsnippet image "image" {} ...
0ebd6da68b762acb3ea438ac37dee78f7b46d00ac94cd40a681a8348eb06c484
Purple-Services/common
zones.clj
(ns common.zones (:require [common.db :refer [!select conn]] [common.util :refer [five-digit-zip-code in? split-on-comma now-unix unix->minute-of-day minute-of-day->hmma unix->day-of-week]] [clojure.string :as s] [bo...
null
https://raw.githubusercontent.com/Purple-Services/common/1da9b6893fd60d97026be490acfef2f711f1e34d/src/common/zones.clj
clojure
this makes a breadcrumb of all transformations applied and is useful for determining if a courier is assigned to this zone static override relative adjustment used to determine which zone we should check for the number of to that zone static override relative adjustment todo: sql injection? This isn't current...
(ns common.zones (:require [common.db :refer [!select conn]] [common.util :refer [five-digit-zip-code in? split-on-comma now-unix unix->minute-of-day minute-of-day->hmma unix->day-of-week]] [clojure.string :as s] [bo...
046ab2ca5bee6a937a1c99e09a10bb4951f1c5f7adbb2997645bdf91a23d808a
finnishtransportagency/harja
paallystysilmoitus.cljc
(ns harja.domain.paallystysilmoitus "Ylläpidon päällystysurakoissa käytettävän POT-lomakkeen skeemat." (:require [schema.core :as schema] [harja.domain.paallystys-ja-paikkaus :as paallystys-ja-paikkaus] [specql.impl.registry] [specql.data-types] [harja.domain.urakka :...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/8744804f777f4b4fced1ba2b1336605b2d726452/src/cljc/harja/domain/paallystysilmoitus.cljc
clojure
kg/m2 metriä tonnia m2 N kpl kiviainesesiintymiä cm
(ns harja.domain.paallystysilmoitus "Ylläpidon päällystysurakoissa käytettävän POT-lomakkeen skeemat." (:require [schema.core :as schema] [harja.domain.paallystys-ja-paikkaus :as paallystys-ja-paikkaus] [specql.impl.registry] [specql.data-types] [harja.domain.urakka :...
2e5ab5591e9122be611fc5dd5e40815ff2b43fa7aad9eba375342de5388d3d65
mirage/alcotest
core.mli
* Copyright ( c ) 2021 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
null
https://raw.githubusercontent.com/mirage/alcotest/bb3492901dea03c72b4de6b5660852a020283921/src/alcotest-engine/core.mli
ocaml
* Copyright ( c ) 2021 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
e7d7e94f9d7d0e1b6884056b277dd51c8f5a9cf0737a9cbe1314cafad626d9c5
immutant/immutant
ssl_test.clj
Copyright 2014 - 2017 Red Hat , Inc , and individual contributors . ;; 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 ...
null
https://raw.githubusercontent.com/immutant/immutant/6ff8fa03acf73929f61f2ca75446cb559ddfc1ef/web/test/immutant/web/ssl_test.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permiss...
Copyright 2014 - 2017 Red Hat , Inc , and individual contributors . distributed under the License is distributed on an " AS IS " BASIS , (ns immutant.web.ssl-test (:require [clojure.test :refer :all] [clojure.java.io :as io] [immutant.web.ssl]) (:import [java.security KeyStore])) (def ...
17a66fd49d5ceb4e3f12e1b68ea4f52231d7383006c4526440a998626117869f
vmchale/EMD
Matrixbmp.hs
# LANGUAGE FlexibleContexts # module Matrixbmp ( exec) where import ReadDist import System.Environment import Data.Array.Accelerate as A import Data.Array.Accelerate.IO import Data.Array.Accelerate.CUDA import Data.Array.Repa.IO.DevIL import Data.Array.Repa.Repr.ForeignPtr (F) import Data.Array.Repa a...
null
https://raw.githubusercontent.com/vmchale/EMD/2502319b134ca64a11c59dca39b3377037db4b63/src/Matrixbmp.hs
haskell
mat' <- makeImage (generateMatrixCUDA (read dim)) | generates a matrix such that a_ij = (hammingDistance i j)
# LANGUAGE FlexibleContexts # module Matrixbmp ( exec) where import ReadDist import System.Environment import Data.Array.Accelerate as A import Data.Array.Accelerate.IO import Data.Array.Accelerate.CUDA import Data.Array.Repa.IO.DevIL import Data.Array.Repa.Repr.ForeignPtr (F) import Data.Array.Repa a...
2fd38fb4c36cf8ce6d1aa4e0de62873e6f8f3b71a0ac296f83f8d62bc823761b
chenyukang/eopl
13.scm
;; Write a module that implements arithmetic using a representation in which the integer k is represented as 5 ∗ k + 3 .
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch8/13.scm
scheme
Write a module that implements arithmetic using a representation
in which the integer k is represented as 5 ∗ k + 3 .
c24a5fb2a159de090346c6af02c9aecf33c780aef125953980ec3ecaa8c725c4
GaloisInc/parameterized-utils
Pair.hs
| Description : A 2 - tuple with identically parameterized elements Copyright : ( c ) Galois , Inc 2017 - 2019 This module defines a 2 - tuple where both elements are parameterized over the same existentially quantified parameter . Description : A 2-tuple with identically parameterized elements Copyright...
null
https://raw.githubusercontent.com/GaloisInc/parameterized-utils/b2e9cc34a58e5931cf14beca2c5bc28f343cf966/src/Data/Parameterized/Pair.hs
haskell
# LANGUAGE GADTs # # LANGUAGE RankNTypes # the elements share. | Project out of Pair.
| Description : A 2 - tuple with identically parameterized elements Copyright : ( c ) Galois , Inc 2017 - 2019 This module defines a 2 - tuple where both elements are parameterized over the same existentially quantified parameter . Description : A 2-tuple with identically parameterized elements Copyright...
6dc242c0f11cac58de0777541fdc8a11856dad5cb36f2763219516fbeef2f198
cmars/sks-keyserver
dbserver.ml
(***********************************************************************) (* dbserver.ml - Executable: server process that handles database and *) (* database queries. *) (* *) Copyright ( C ) 2002 ,...
null
https://raw.githubusercontent.com/cmars/sks-keyserver/d848c4852cb15585525772b6378670f8724a8f39/dbserver.ml
ocaml
********************************************************************* dbserver.ml - Executable: server process that handles database and database queries. ...
Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 , 2011 , 2012 , 2013 and Contributors This file is part of SKS . SKS is free software ; you can Public License as published by the Free Software Foundation ; either version 2 of the License , or...
f7213c179275dcabd0f3e8621e77bcf9055b33dc44b1273588f72808ba09d855
realworldocaml/book
global.ml
open Import let env = Fdecl.create Env.to_dyn let init ~capture_outputs = Fdecl.set env (let env = if (not capture_outputs) || not (Lazy.force Ansi_color.stderr_supports_color) then Env.initial else Colors.setup_env_for_colors Env.initial in let env = Env.add env...
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_rules/global.ml
ocaml
open Import let env = Fdecl.create Env.to_dyn let init ~capture_outputs = Fdecl.set env (let env = if (not capture_outputs) || not (Lazy.force Ansi_color.stderr_supports_color) then Env.initial else Colors.setup_env_for_colors Env.initial in let env = Env.add env...
1d4b530e876751cb72e7f647911293777662ce77f4d3a77ac3723161bf9b3605
dpetrovics/coding-exercises
ransom-note.clj
(ns ransom-note (:require [clojure.string :as str])) (def problem-statement "A ransom note can be formed by cutting words out of a magazine to form a new sentence. How would you figure out if a ransom note (string) can be formed from a given magazine (string)?") (def sample-magazine "It is a long established f...
null
https://raw.githubusercontent.com/dpetrovics/coding-exercises/07beed5b30d7099e5571a72253aeb7d65259cfd5/src/coding_exercises/ransom-note.clj
clojure
(ns ransom-note (:require [clojure.string :as str])) (def problem-statement "A ransom note can be formed by cutting words out of a magazine to form a new sentence. How would you figure out if a ransom note (string) can be formed from a given magazine (string)?") (def sample-magazine "It is a long established f...
f343c2fc154a8f1760cc859c5134ca3a41e15234dd00937086a00599fe91ab44
OlivierSohn/hamazed
Ease.hs
# LANGUAGE NoImplicitPrelude # module Imj.Graphics.Math.Ease ( * 4th order /inverse/ easing , continuous {- | Easing is traditionally seen as a function from /time/ to value. Here, it is a function from /value/ to time, hence the use of the term /Inverse/ in the title. -} invQuartE...
null
https://raw.githubusercontent.com/OlivierSohn/hamazed/6c2b20d839ede7b8651fb7b425cb27ea93808a4a/imj-base/src/Imj/Graphics/Math/Ease.hs
haskell
| Easing is traditionally seen as a function from /time/ to value. Here, it is a function from /value/ to time, hence the use of the term /Inverse/ in the title. * From continuous to discrete | Easing in a continuous world is /easy/ (no pun intended), but easing in a discrete world is har...
# LANGUAGE NoImplicitPrelude # module Imj.Graphics.Math.Ease ( * 4th order /inverse/ easing , continuous invQuartEaseInOut , discreteAdaptor * 4th order inverse easing , discrete | Using ' discreteAdaptor ' on ' invQuartEaseInOut ' we can make , discreteInvQuartEaseInOut , inOutTo...
723da7ac8d4a0f65d6f52f15eba754cdb057a07b3ad105da3205b20ae7453c37
donaldsonjw/bigloo
gstmm_music.scm
;*=====================================================================*/ ;* .../project/bigloo/api/gstreamer/src/Llib/gstmm_music.scm */ ;* ------------------------------------------------------------- */ * Author : * / * Creation : Thu Jan 31...
null
https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/api/gstreamer/src/Llib/gstmm_music.scm
scheme
*=====================================================================*/ * .../project/bigloo/api/gstreamer/src/Llib/gstmm_music.scm */ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * multimedia MUSIC class....
* Author : * / * Creation : Thu Jan 31 07:15:14 2008 * / * Last change : Sun Nov 18 15:12:04 2012 ( serrano ) * / * Copyright : 2008 - 12 * / * This module implements a ...
cf4fe9e5513560fa5e45b3a880a316cb0acf1cf1b95d9d8f38b77400b82755d8
Ramarren/lisa
language.lisp
This file is part of LISA , the Lisp - based Intelligent Software ;;; Agents platform. Copyright ( C ) 2000 ;;; This library is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 2....
null
https://raw.githubusercontent.com/Ramarren/lisa/ac137e9a05850ff6e2532b90f23a139985e04b4b/src/core/language.lisp
lisp
Agents platform. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License either version 2.1 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FI...
This file is part of LISA , the Lisp - based Intelligent Software Copyright ( C ) 2000 of the License , or ( at your option ) any later version . GNU Lesser General Public License for more details . You should have received a copy of the GNU Lesser General Public License Foundation , Inc. , 59 Temple...