_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 |
|---|---|---|---|---|---|---|---|---|
c24e257e7db2aec6e3a53a4e2ef974a4b285dab704ed426535012c9aaf88b19c | standard-fish/summer-competititon-2019 | world-map.rkt | #lang racket
(require json racket/draw math/base)
(define (lat-lon->map-point coordinates)
(match-define (list lon lat _ ...) coordinates)
(define-values (x y) (values (degrees->radians lon) (asinh (tan (degrees->radians lat)))))
(list (/ (+ 1 (/ x pi)) 2) (/ (- 1 (/ y pi)) 2)))
(define (draw-polygon dc polygon... | null | https://raw.githubusercontent.com/standard-fish/summer-competititon-2019/2e8d74f79b493e0307aa278b4500901c5d5157a8/entries/alex-hhh/world-map.rkt | racket | Iterate over each feature (timezone) and render it | #lang racket
(require json racket/draw math/base)
(define (lat-lon->map-point coordinates)
(match-define (list lon lat _ ...) coordinates)
(define-values (x y) (values (degrees->radians lon) (asinh (tan (degrees->radians lat)))))
(list (/ (+ 1 (/ x pi)) 2) (/ (- 1 (/ y pi)) 2)))
(define (draw-polygon dc polygon... |
cca6e5cdb03eae64c5832d2343c5a216d8c17f444dae0059a889ff2d1cb9b0fd | andorp/bead | ServerSide.hs | module Bead.View.Fay.JSON.ServerSide (
decodeFromFay
, encodeToFay
, module Data.Data
) where
import Data.Data
import Data.Aeson (encode, decode)
import Fay.Convert
import Data.ByteString.Lazy.Char8 (pack, unpack)
import Control.Monad ((<=<))
-- | Produce 'Just a' if the given string represents an 'a' JSON ... | null | https://raw.githubusercontent.com/andorp/bead/280dc9c3d5cfe1b9aac0f2f802c705ae65f02ac2/src/Bead/View/Fay/JSON/ServerSide.hs | haskell | | Produce 'Just a' if the given string represents an 'a' JSON object
| Produces 'Just String' representation if the given value is a JSON represatble | module Bead.View.Fay.JSON.ServerSide (
decodeFromFay
, encodeToFay
, module Data.Data
) where
import Data.Data
import Data.Aeson (encode, decode)
import Fay.Convert
import Data.ByteString.Lazy.Char8 (pack, unpack)
import Control.Monad ((<=<))
decodeFromFay :: (Data a) => String -> Maybe a
decodeFromFay = re... |
ebabc4ba205e37bad26310ce678a4dc5ff2cd1400f56038ad13bbd1c3994cec3 | reborg/clojure-essential-reference | 1.clj | (binding [*compile-files* true
*compile-path* "."]
< 1 > | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/9a3eb82024c8e5fbe17412af541c2cd30820c92e/DynamicVariablesintheStandardLibrary/*compiler-options*/1.clj | clojure | (binding [*compile-files* true
*compile-path* "."]
< 1 > | |
c6242a4fa42c2bfd8973a6ef87ca61b51c8a2146b2ebec4a23dbf851e50addbe | fujita-y/digamma | pnpoly.scm | ;;; PNPOLY - Test if a point is contained in a 2D polygon.
(define (pt-in-poly2 xp yp x y)
(let loop ((c #f) (i (- (FLOATvector-length xp) 1)) (j 0))
(if (< i 0)
c
(if (or (and (or (FLOAT> (FLOATvector-ref yp i) y)
(FLOAT>= y (FLOATvector-ref yp j)))
(or (FLO... | null | https://raw.githubusercontent.com/fujita-y/digamma/5a31f9fd67737fd857ada643d5548155a2ed0e76/bench/gambit-benchmarks/pnpoly.scm | scheme | PNPOLY - Test if a point is contained in a 2D polygon. |
(define (pt-in-poly2 xp yp x y)
(let loop ((c #f) (i (- (FLOATvector-length xp) 1)) (j 0))
(if (< i 0)
c
(if (or (and (or (FLOAT> (FLOATvector-ref yp i) y)
(FLOAT>= y (FLOATvector-ref yp j)))
(or (FLOAT> (FLOATvector-ref yp j) y)
(FLOAT... |
e8617a76aba96890295daca664bf5d8f15ae3af8f87a3a746bb881c9a78a3454 | let-def/menhir | referenceInterpreter.mli | (**************************************************************************)
(* *)
Menhir
(* *)
, INRIA Ro... | null | https://raw.githubusercontent.com/let-def/menhir/e8ba7bef219acd355798072c42abbd11335ecf09/src/referenceInterpreter.mli | ocaml | ************************************************************************
et en Automatique. All rig... | Menhir
, INRIA Rocquencourt
, PPS , Université Paris Diderot
Copyright 2005 - 2008 Institut National de Recherche en Informatique
under the terms of the Q Public License versi... |
18bf8bf1dd76137db93f38b1de74b1d7ac5d6467f767fa33fa56a2ce88449fe0 | tmfg/mmtis-national-access-point | confirm_email.cljs | (ns ote.app.controller.confirm-email
(:require [ote.app.routes :as routes]
[ote.communication :as comm]
[tuck.core :as tuck :refer-macros [define-event]]))
(define-event ConfirmSuccess []
{}
(-> app
(assoc-in [:confirm-email :loaded?] true)
(assoc-in [:confirm-email :success?] tru... | null | https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/a86cc890ffa1fe4f773083be5d2556e87a93d975/ote/src/cljs/ote/app/controller/confirm_email.cljs | clojure | (ns ote.app.controller.confirm-email
(:require [ote.app.routes :as routes]
[ote.communication :as comm]
[tuck.core :as tuck :refer-macros [define-event]]))
(define-event ConfirmSuccess []
{}
(-> app
(assoc-in [:confirm-email :loaded?] true)
(assoc-in [:confirm-email :success?] tru... | |
c0130c57d639b855860aa7986420988ff6e9202d03d1af65d4066f6548413d8a | GaloisInc/surveyor | ModelViewer.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
| A viewer for Crux models
module Surveyor.Brick.Widget.ModelViewer
( renderModelViewer,
) where
import qualified Brick as B
import qualified Crux.Types as CT
import qualified Data.Binary.IEEE754 as ... | null | https://raw.githubusercontent.com/GaloisInc/surveyor/96b6748d811bc2ab9ef330307a324bd00e04819f/surveyor-brick/src/Surveyor/Brick/Widget/ModelViewer.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
| A viewer for Crux models
module Surveyor.Brick.Widget.ModelViewer
( renderModelViewer,
) where
import qualified Brick as B
import qualified Crux.Types as CT
import qualified Data.Binary.IEEE754 as IEEE754
import qualified Data.BitVe... |
1a0b8295b3a90d7a280933d51fe29594107b9aee576e088ccc001f7e89bcffb0 | atolab/zenoh | tx_engine.ml |
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* -2.0 , or the Apache License , Version 2.0
* which is available at -2.0 .
*
* SPDX - License - Ident... | null | https://raw.githubusercontent.com/atolab/zenoh/32e311aae6be93c001fd725b4d918b2fb4e9713d/src/zenoh-proto/tx_engine.ml | ocaml |
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* -2.0 , or the Apache License , Version 2.0
* which is available at -2.0 .
*
* SPDX - License - Ident... | |
96baf1542e2e859ffa34744657f7f65ebf7640739467d43d11d0552d7e962953 | brendanhay/gogol | Acknowledge.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-shopping-content/gen/Gogol/ShoppingContent/Content/Orderreturns/Acknowledge.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
* Resource
** Constructing a Request
'ContentOrderreturnsAcknowledge' request conforms to.
/See:/ 'newContentOrderreturnsAcknowledge' smart constructor.
| V1 error format.
| OAuth access token.
| The ID of the account that... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
9e2e3d90bd79bab1660240165c4b80e4f74f186ad58662b756ab849637a41bb2 | Opetushallitus/ataru | application_states.cljc | (ns ataru.application.application-states
(:require [ataru.application.review-states :as review-states]
[clojure.set :as set]))
(defn get-review-state-label-by-name
[states name lang]
(->> states
(filter #(= (first %) name))
first
second
lang))
(defn get-all-reviews-for-re... | null | https://raw.githubusercontent.com/Opetushallitus/ataru/0f49a46d23e25ce0d1e35339632955a07ff4ad68/src/cljc/ataru/application/application_states.cljc | clojure | (ns ataru.application.application-states
(:require [ataru.application.review-states :as review-states]
[clojure.set :as set]))
(defn get-review-state-label-by-name
[states name lang]
(->> states
(filter #(= (first %) name))
first
second
lang))
(defn get-all-reviews-for-re... | |
4dd255c122788ed2cc103dedbec92e43ad681e1017b779d25e761ef8ee3361db | maximedenes/native-coq | tries.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/lib/tries.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
module Make =
functor (X... |
e2ef26e9620d12de6365a3c1d6035031da808f368ced504acd0d113f4af78608 | Yuras/io-region | example6.hs | {-# LANGUAGE DeriveDataTypeable #-}
-- example6
import Data.Typeable
import Data.IORef
import Control.Applicative
import Control.Monad
import Control.Exception (Exception, SomeException)
import qualified Control.Exception as E
import Control.Concurrent hiding (killThread, throwTo)
import qualified Control.Concurrent ... | null | https://raw.githubusercontent.com/Yuras/io-region/515738d486b422d238a81335b4490de093ce6cd9/misc/imask/example6.hs | haskell | # LANGUAGE DeriveDataTypeable #
example6
disable async exceptions, but automatically interrupt any interruptible action
pure mans implementation, requires support from RTS
it is even is not safe |
import Data.Typeable
import Data.IORef
import Control.Applicative
import Control.Monad
import Control.Exception (Exception, SomeException)
import qualified Control.Exception as E
import Control.Concurrent hiding (killThread, throwTo)
import qualified Control.Concurrent as CC
import System.IO.Unsafe (unsafePerformIO)
... |
9bac0b543da8a7d75c9c6937bb9a8dd8967792dd6266ae1be1fa8f1767df3001 | facebook/pyre-check | Error.mli |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/10c375bea52db5d10b71cb5206fac7da9549eb0c/source/interprocedural/Error.mli | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
16bfa597141a0c37b7a4d5fcbd22d3a4f7f06e8a218b1b9fbf5b13799dcf258a | ucsd-progsys/liquidhaskell | T743.hs | {-@ LIQUID "--expect-any-error" @-}
module T743 where
@ checkNat : : Nat - > Int @
checkNat :: Int -> Int
checkNat x = x
unsound :: Int
unsound = checkNat (-1)
data TestBS = TestBS Int deriving (Read)
| null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/T743.hs | haskell | @ LIQUID "--expect-any-error" @ | module T743 where
@ checkNat : : Nat - > Int @
checkNat :: Int -> Int
checkNat x = x
unsound :: Int
unsound = checkNat (-1)
data TestBS = TestBS Int deriving (Read)
|
ae11301a2a55b17ab95f73cbc0cf5dbf43dc9c5b174df71bab478eb2715478a3 | guildhall/guile-haunt | html.scm | Haunt --- Static site generator for GNU
Copyright © 2015 < >
;;;
This file is part of Haunt .
;;;
Haunt 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
;;; (a... | null | https://raw.githubusercontent.com/guildhall/guile-haunt/c67e8e924c664ae4035862cc7b439cd7ec4bcef6/haunt/html.scm | scheme |
you can redistribute it and/or modify it
either version 3 of the License , or
(at your option) any later version.
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
Commentary:
Code:
Render ... | Haunt --- Static site generator for GNU
Copyright © 2015 < >
This file is part of Haunt .
under the terms of the GNU General Public License as published by
Haunt is distributed in the hope that it will be useful , but
You should have received a copy of the GNU General Public License
along with Haunt .... |
cee1c742abe950816f034c7261736faf5635f452612e80063cb730ff68470581 | sebhoss/finj | periodic_payment.clj | ;
Copyright © 2013 < >
; This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License , Version 2 ,
as published by . See / for more details .
;
(ns finj.periodic-payment
"Periodic payment pay a certain amount of money per period.
Defin... | null | https://raw.githubusercontent.com/sebhoss/finj/7c27cb506528642a6e8a673be1b9a49d68e533e5/src/main/clojure/finj/periodic_payment.clj | clojure |
This work is free. You can redistribute it and/or modify it under the
| Copyright © 2013 < >
terms of the Do What The Fuck You Want To Public License , Version 2 ,
as published by . See / for more details .
(ns finj.periodic-payment
"Periodic payment pay a certain amount of money per period.
Definitions:
* amount - Amount of an individual payment
* rate - Rate... |
cf57a9b9761ec08d150417c2673b039a7ab5527d669aa9f19bf895f96518ec22 | jdreaver/amy | Pretty.hs | {-# LANGUAGE OverloadedStrings #-}
module Amy.Syntax.Pretty
( prettyModule
, prettyTypeDeclaration
, prettyExpr
, prettyType
) where
import Data.Foldable (toList)
import qualified Data.Map.Strict as Map
import Amy.Pretty
import Amy.Syntax.AST
prettyModule :: Module -> Doc ann
prettyModule (Module _ typeDe... | null | https://raw.githubusercontent.com/jdreaver/amy/a0c73f6c02e7d923f1d85c0de89f78dc204dae2f/library/Amy/Syntax/Pretty.hs | haskell | # LANGUAGE OverloadedStrings # |
module Amy.Syntax.Pretty
( prettyModule
, prettyTypeDeclaration
, prettyExpr
, prettyType
) where
import Data.Foldable (toList)
import qualified Data.Map.Strict as Map
import Amy.Pretty
import Amy.Syntax.AST
prettyModule :: Module -> Doc ann
prettyModule (Module _ typeDecls externs bindings) =
vcatTwoHa... |
c9e72de8a67ed34ab35b1a095f40e8f45e647e31ee40c2370e03a2e16a29fed7 | jbreindel/battlecraft | bc_player_serv.erl |
-module(bc_player_serv).
-behavior(gen_server).
%% api functions
-export([start_link/6,
spawn_entities/2]).
%% gen_server callbacks
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
%% state rec
-record(state, {entity_sup,
game,
player,
play... | null | https://raw.githubusercontent.com/jbreindel/battlecraft/622131a1ad8c46f19cf9ffd6bf32ba4a74ef4137/apps/bc_game/src/bc_player_serv.erl | erlang | api functions
gen_server callbacks
state rec
====================================================================
API functions
====================================================================
====================================================================
Gen_server functions
============================... |
-module(bc_player_serv).
-behavior(gen_server).
-export([start_link/6,
spawn_entities/2]).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
-record(state, {entity_sup,
game,
player,
player_num,
spawn_matrix,
gold,
map,
entit... |
c376650bf32003fecae19390910995812e195e6fa96ace482dceed6826b6e9e2 | homebaseio/datalog-console | version.cljc | (ns datalog-console.lib.version
{:no-doc true})
(def version "0.3.2") | null | https://raw.githubusercontent.com/homebaseio/datalog-console/64bc87e42285ed8e33ac9c9df5c8501796986260/src/main/datalog_console/lib/version.cljc | clojure | (ns datalog-console.lib.version
{:no-doc true})
(def version "0.3.2") | |
1ce21dabb492b76f3e9df8a823b7241f88106e631f821ed26b70116a07ddade7 | jumarko/clojure-experiments | 069_merge_with_fn.clj | (ns clojure-experiments.four-clojure.069-merge-with-fn
"Implement `merge-with` yourself.
See .
Solutions: ")
(defn my-merge-with [f & ms]
(let [merge-entry (fn [result k v]
(if-let [[_result-k result-v] (find result k)]
(assoc result k (f result-v v))
... | null | https://raw.githubusercontent.com/jumarko/clojure-experiments/f0f9c091959e7f54c3fb13d0585a793ebb09e4f9/src/clojure_experiments/four_clojure/069_merge_with_fn.clj | clojure | (ns clojure-experiments.four-clojure.069-merge-with-fn
"Implement `merge-with` yourself.
See .
Solutions: ")
(defn my-merge-with [f & ms]
(let [merge-entry (fn [result k v]
(if-let [[_result-k result-v] (find result k)]
(assoc result k (f result-v v))
... | |
e9b51c8611b247958d542b01f25b9847afbcfbff862348c7e2612b2602529b02 | ChaosEternal/guile-scsh | glob.scm | ;;; Code for processing file names with a glob pattern.
Copyright ( c ) 1994 by ( ) .
Copyright ( c ) 1994 by ( ) .
Copyright ( c ) 2013 by Chaos Eternal ( ) .
;;;
;;; See file COPYING.
;;; Chaos: this modification is pretty dirty.
;;; Usage: (glob pattern-list)
;;; pattern-list := a... | null | https://raw.githubusercontent.com/ChaosEternal/guile-scsh/1a76e006e193a6a8c9f93d23bacb9e51a1ff6c4c/scsh/glob.scm | scheme | Code for processing file names with a glob pattern.
See file COPYING.
Chaos: this modification is pretty dirty.
Usage: (glob pattern-list)
pattern-list := a list of glob-pattern strings
Return: list of file names (strings)
The files "." and ".." are never returned by glob.
... |
Copyright ( c ) 1994 by ( ) .
Copyright ( c ) 1994 by ( ) .
Copyright ( c ) 2013 by Chaos Eternal ( ) .
Dot files will only be returned if the first character
(define-module (scsh glob)
:use-module (srfi srfi-8)
:use-module (srfi srfi-1)
:use-module (scsh errno)
:use-module (... |
6fe72eb5260c66c794742afc938d6ef2c674480cc7e73dfd81a03a1777897837 | IUCompilerCourse/public-student-support-code | type-check-Cwhile.rkt | #lang racket
;(require graph)
;(require "multigraph.rkt")
(require "utilities.rkt")
(require "type-check-Lwhile.rkt")
(require "type-check-Cvar.rkt")
(require "type-check-Cif.rkt")
(provide type-check-Cwhile type-check-Cwhile-mixin type-check-Cwhile-class)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/IUCompilerCourse/public-student-support-code/de33d84247885ea309db456cc8086a12c8cdd067/type-check-Cwhile.rkt | racket | (require graph)
(require "multigraph.rkt")
type-check-Cwhile
(define/public (combine-types t1 t2)
TODO: move some things from here to later type checkers
C-level expressions
(define (update-type x t env)
(define/override (type-check-program p) | #lang racket
(require "utilities.rkt")
(require "type-check-Lwhile.rkt")
(require "type-check-Cvar.rkt")
(require "type-check-Cif.rkt")
(provide type-check-Cwhile type-check-Cwhile-mixin type-check-Cwhile-class)
(define (type-check-Cwhile-mixin super-class)
(class super-class
(super-new)
(inherit check-type... |
8034070d3da0294cead7938cea347fb1d168efd693224e1050b35f5278375a73 | lisp-korea/sicp | ex-1-1-byulparan.scm |
1.1 프로그램을 짤 때 바탕이 되는 것
기본식 primitive expression - 언어에서 가장 단순한 것을 나타낸다 .
엵어내는 수단 means of combination - 간단한 것을 모아 복잡한 것 compound element 으로 만든다
요약하는 수단 means of abstraction - 복잡한 것에 이름을 붙여 하나로 다룰 수 있게끔 간추린다 .
;; 1.1.1 식
486
수를 나타내는 식과 , 기본 프로시저를 나타내는 식 + , 나 * 같은 기호를 엵은 더 복잡한 식
(+ 137 349)
(- 1000 33... | null | https://raw.githubusercontent.com/lisp-korea/sicp/4cdc1b1d858c6da7c9f4ec925ff4a724f36041cc/ch01/1.1/ex-1-1-byulparan.scm | scheme | 1.1.1 식
이런 기억공간을 환경Environment 라고 한다.
1.1.3 엵은 식을 계산하는 방법
1.1.4 묽음 프로시저
제곱
기본프로시저를 계산 하는 방법은 이미 실행기 속에 정해져 있다고 보고
새로 만들어 쓰는 묽음 프로시저의 적용은 다음 규칙에 따란 계산 된다.
정의대로 계산법
1.1.6 조건식과 술어
1.1.7 연습 : 뉴튼 법 으로 제곱근 찾기
이에 따라 guess 를 구하기 위해 어림잡은 값을 조금씩 고쳐나가면서 헌값에 견주어 고친값이 |
1.1 프로그램을 짤 때 바탕이 되는 것
기본식 primitive expression - 언어에서 가장 단순한 것을 나타낸다 .
엵어내는 수단 means of combination - 간단한 것을 모아 복잡한 것 compound element 으로 만든다
요약하는 수단 means of abstraction - 복잡한 것에 이름을 붙여 하나로 다룰 수 있게끔 간추린다 .
486
수를 나타내는 식과 , 기본 프로시저를 나타내는 식 + , 나 * 같은 기호를 엵은 더 복잡한 식
(+ 137 349)
(- 1000 334)
(* 5 99... |
fbee3ab7409e4c5b1be567cb8dacfbf44df010303a4c2ec0f319b3c2ec6324cc | pedestal/pedestal-app | behavior_test.clj | (ns {{namespace}}.behavior-test
(:require [io.pedestal.app :as app]
[io.pedestal.app.protocols :as p]
[io.pedestal.app.tree :as tree]
[io.pedestal.app.messages :as msg]
[io.pedestal.app.render :as render]
[io.pedestal.app.util.test :as test])
(:use clojure... | null | https://raw.githubusercontent.com/pedestal/pedestal-app/509ab766a54921c0fbb2dd7c6a3cb20223b8e1a1/app-template/src/leiningen/new/pedestal_app/test/behavior_test.clj | clojure | Test a transform function
Build an application, send a message to a transform and check the transform
state
Use io.pedestal.app.query to query the current application model | (ns {{namespace}}.behavior-test
(:require [io.pedestal.app :as app]
[io.pedestal.app.protocols :as p]
[io.pedestal.app.tree :as tree]
[io.pedestal.app.messages :as msg]
[io.pedestal.app.render :as render]
[io.pedestal.app.util.test :as test])
(:use clojure... |
b112741629eacb901494fa09262ef01df5276f1ade1db7eb2f043b0cd3e582a8 | alexwl/haskell-code-explorer | Helper.hs | cabal - helper : Simple interface to Cabal 's configuration state
Copyright ( C ) 2015 - 2018 < >
--
-- 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 , ... | null | https://raw.githubusercontent.com/alexwl/haskell-code-explorer/2f1c2a4c87ebd55b8a335bc4670eec875af8b4c4/vendor/cabal-helper-0.8.1.2/lib/Distribution/Helper.hs | haskell |
This program is free software: you can redistribute it and/or modify
(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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public... | cabal - helper : Simple interface to Cabal 's configuration state
Copyright ( C ) 2015 - 2018 < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
# L... |
be4900ba63f94df21edc51b0f1be7e6c0303285be4d823f2d15171ab5c26ffc1 | yallop/ocaml-ctypes | libffi_abi.mli |
* Copyright ( c ) 2014 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2014 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
(** Support for various ABIs.... | null | https://raw.githubusercontent.com/yallop/ocaml-ctypes/52ff621f47dbc1ee5a90c30af0ae0474549946b4/src/ctypes-foreign/libffi_abi.mli | ocaml | * Support for various ABIs. |
* Copyright ( c ) 2014 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2014 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
type abi
val aix : abi
val ... |
2983465b87ac4e94f4294a29e3f103000358bc937d5c5fb3455ed083c8c00c81 | gregr/experiments | parsing.rkt | #lang racket
(provide
check-arity
map-parse
new-lam-apply
new-pair
new-pair-access
parse-apply
parse-bvar
parse-combination
parse-under
penv-empty
penv-syntax-add
penv-syntax-op-empty
penv-vars-add
v-0
v-1
v-uno
)
(require
"syntax-abstract.rkt"
gregr-misc/cursor
gregr-misc/dict
... | null | https://raw.githubusercontent.com/gregr/experiments/cd4c7953f45102539081077bbd6195cf834ba2fa/supercompilation/cog/parsing.rkt | racket | #lang racket
(provide
check-arity
map-parse
new-lam-apply
new-pair
new-pair-access
parse-apply
parse-bvar
parse-combination
parse-under
penv-empty
penv-syntax-add
penv-syntax-op-empty
penv-vars-add
v-0
v-1
v-uno
)
(require
"syntax-abstract.rkt"
gregr-misc/cursor
gregr-misc/dict
... | |
f49be95703599d2f369b4164d7a1aa472069631eea2c0088c2e66aa3c8ee0dd5 | discus-lang/salt | State.hs |
module Salt.LSP.State where
import Salt.Core.Exp
import Salt.Data.Location
import Data.Map (Map)
import Data.IORef
import qualified System.Exit as System
import qualified System.IO as System
-- | Language server plugin state.
data State
= State
{ statePhase :: Phas... | null | https://raw.githubusercontent.com/discus-lang/salt/33c14414ac7e238fdbd8161971b8b8ac67fff569/src/salt/Salt/LSP/State.hs | haskell | | Language server plugin state.
| Checked core files.
| We have just started up and have not yet initialized with the client.
| Initialization with the client failed.
| We have initialized with the client and are now handling requests.
| Append a messgage to the server side log file, if we have one.
| Append a ... |
module Salt.LSP.State where
import Salt.Core.Exp
import Salt.Data.Location
import Data.Map (Map)
import Data.IORef
import qualified System.Exit as System
import qualified System.IO as System
data State
= State
{ statePhase :: Phase
, stateLogDebug :... |
8da37d5a3f7d46f78d6a402cd1cb55ba26ecabd3df498c65adfd3e9505cc07b4 | ocaml-multicore/ocaml-tsan | spill.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/asmcomp/spill.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Reg
open Mach
We say that a register is " destroyed " if it is live across a construct
that... |
f41bd05d759970dc8c73c5666e3251e1aa721d9e0337c84bd20e72e977c89669 | pixlsus/registry.gimp.org_static | sf-will-glow_0.scm | Shadow Glow - This is a script for The GIMP that inverts the lightness of the layer without affecting colour
Copyright ( C ) 2010
;;
;; 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 ... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/sf-will-glow_0.scm | scheme |
This program is free software: you can redistribute it and/or modify
(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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General ... | Shadow Glow - This is a script for The GIMP that inverts the lightness of the layer without affecting colour
Copyright ( C ) 2010
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of... |
5ccf49cc327e1e5d40d6e4921c5efe93409fe21a5fa43333fc13db06fd33eb53 | xapi-project/xen-api | xen_test.ml | (* This was created on a creedence host. I have deliberately removed the field *)
(* *)
(* "name": "foo" *)
(* *)
(* from just after the 'id' field. This is to test that the field gets defaulted *)
(* to the value specified in the idl. *)
let old_vm_t =
"{\"id\": \"bc6b8e8a-f0a5-4746-6489-2745756f21b2\", \"ssidref... | null | https://raw.githubusercontent.com/xapi-project/xen-api/42ebd10a2b3ec82c8f9fa4bf69c10324e6c1093c/ocaml/xapi-idl/lib_test/xen_test.ml | ocaml | This was created on a creedence host. I have deliberately removed the field
"name": "foo"
from just after the 'id' field. This is to test that the field gets defaulted
to the value specified in the idl.
this value is the default in xenops_interface.ml |
let old_vm_t =
"{\"id\": \"bc6b8e8a-f0a5-4746-6489-2745756f21b2\", \"ssidref\": 0, \
\"xsdata\": {\"vm-data\": \"\"}, \"platformdata\": {\"generation-id\": \
\"\", \"timeoffset\": \"0\", \"usb\": \"true\", \"usb_tablet\": \"true\"}, \
\"bios_strings\": {\"bios-vendor\": \"Xen\", \"bios-version\": \"\", \
... |
919d19ceb9279e12bd889cc8a5c0929171c1dd16a1c1bef8c2c6597934073940 | oliyh/re-graph | deprecated_integration_test.cljc | (ns re-graph.deprecated-integration-test
(:require [re-graph.core-deprecated :as re-graph]
[re-graph.core :as re-graph-core]
[re-graph.internals :as internals]
#?(:clj [clojure.test :refer [deftest testing is use-fixtures]]
:cljs [cljs.test :refer-macros [deftest tes... | null | https://raw.githubusercontent.com/oliyh/re-graph/99e65fc6c169ae251226875700034fc988d819e4/test/re_graph/deprecated_integration_test.cljc | clojure | todo
todo
do nothing
do nothing | (ns re-graph.deprecated-integration-test
(:require [re-graph.core-deprecated :as re-graph]
[re-graph.core :as re-graph-core]
[re-graph.internals :as internals]
#?(:clj [clojure.test :refer [deftest testing is use-fixtures]]
:cljs [cljs.test :refer-macros [deftest tes... |
fe79edbfd4072adaa56e6f01286def66d86a39f17ddc6994c6172644e9931b1b | kumarshantanu/lein-clr | project.clj | (defproject lein-clr "0.2.2"
:description "Leiningen plugin to automate build tasks for ClojureCLR projects"
:url "-clr"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:min-lein-version "2.0.0"
:eval-in-leiningen true)
| null | https://raw.githubusercontent.com/kumarshantanu/lein-clr/de43519353c3c4a8a4e1520faf7f9a576910382e/plugin/project.clj | clojure | (defproject lein-clr "0.2.2"
:description "Leiningen plugin to automate build tasks for ClojureCLR projects"
:url "-clr"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:min-lein-version "2.0.0"
:eval-in-leiningen true)
| |
a2209ab3338631cae9371db54880780c1836ed0be24c894981a0359d167c08af | techascent/tech.datatype | statistics.clj | (ns tech.v2.datatype.statistics
(:require [tech.v2.datatype.base :as dtype-base]
[tech.v2.datatype.protocols :as dtype-proto]
[tech.v2.datatype.boolean-op :as boolean-op]
[tech.v2.datatype.unary-op :as unary-op]
[tech.v2.datatype.reduce-op :as reduce-op]
[te... | null | https://raw.githubusercontent.com/techascent/tech.datatype/8cc83d771d9621d580fd5d4d0625005bd7ab0e0c/src/tech/v2/datatype/statistics.clj | clojure | (ns tech.v2.datatype.statistics
(:require [tech.v2.datatype.base :as dtype-base]
[tech.v2.datatype.protocols :as dtype-proto]
[tech.v2.datatype.boolean-op :as boolean-op]
[tech.v2.datatype.unary-op :as unary-op]
[tech.v2.datatype.reduce-op :as reduce-op]
[te... | |
ee68a037f27d2af0e4cf9eda54abcc825a6b516c26f4e679ed4ca479113bb87b | peterholko/pax_server | game_loop.erl | Author :
Created : Dec 27 , 2008
%% Description: TODO: Add description to game_loop
-module(game_loop).
%%
%% Include files
%%
-include("common.hrl").
-include("game.hrl").
%%
%% Exported Functions
%%
-export([loop/2]).
%%
%% API Functions
%%
loop(LastTime, GamePID) ->
%StartLoopTime = util:get_time(),
... | null | https://raw.githubusercontent.com/peterholko/pax_server/62b2ec1fae195ff915d19af06e56a7c4567fd4b8/src/game_loop.erl | erlang | Description: TODO: Add description to game_loop
Include files
Exported Functions
API Functions
StartLoopTime = util:get_time(),
Process events
Build simple perception
Send perceptions
Local Functions
| Author :
Created : Dec 27 , 2008
-module(game_loop).
-include("common.hrl").
-include("game.hrl").
-export([loop/2]).
loop(LastTime, GamePID) ->
CurrentTick = gen_server:call(GamePID, 'GET_TICK'),
EventList = gen_server:call(GamePID, 'GET_EVENTS'),
UpdatePerceptions = gen_server:call(GamePID, 'G... |
936fab4ebb8c24944a5dbc2194530b17fe5fd34fb87881486cafdbae949024a5 | rtoy/cmucl | iso8859-4.lisp | ;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: STREAM -*-
;;;
;;; **********************************************************************
This code was written by and has been placed in the public
;;; domain.
;;;
(ext:file-comment "$Header: src/pcl/simple-streams/external-formats/iso8859-4.lisp $")
(in-pack... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/pcl/simple-streams/external-formats/iso8859-4.lisp | lisp | -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: STREAM -*-
**********************************************************************
domain.
| This code was written by and has been placed in the public
(ext:file-comment "$Header: src/pcl/simple-streams/external-formats/iso8859-4.lisp $")
(in-package "STREAM")
(intl:textdomain "cmucl")
(defconstant +iso-8859-4+
(make-array 96 :element-type '(unsigned-byte 16)
:initial-contents #(160 260 312 342 16... |
965fc04f732c49f1ad9193bd4523b460aa18ea848944a0fc64da55dfa2946601 | granule-project/gerty | Pretty.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE TypeSynonymInstances #-}
module Language.Gerty.Util.Pretty
( module Text.PrettyPrint.Annotated
, Pretty(..)
, Doc
, pprintParened
, pprintShow
, pprintShowWithOpts
, RenderOptions(..)
, defaultRenderOptions
-- * Helpers
, identifier
, pprintList
, ppr... | null | https://raw.githubusercontent.com/granule-project/gerty/972fa027973032a4499747039b45e744ca17e9e2/src/Language/Gerty/Util/Pretty.hs | haskell | # LANGUAGE TypeSynonymInstances #
* Helpers
---------------
Annotations --
---------------
-------------------
Pretty-printing --
-------------------
| Pretty-print a value to a string, with options.
this is an identifier attachment
| Default TextDetails printer (from -1.1.3.6/docs/src/Text.PrettyPrint.Annotated.... | # LANGUAGE FlexibleInstances #
module Language.Gerty.Util.Pretty
( module Text.PrettyPrint.Annotated
, Pretty(..)
, Doc
, pprintParened
, pprintShow
, pprintShowWithOpts
, RenderOptions(..)
, defaultRenderOptions
, identifier
, pprintList
, pprintPair
, quoted
, angles
, bold
, red
, gr... |
61bc4ea20e1e1a790fc53bddbb0d2c52a32156f485c8c195a13618ad5e473695 | input-output-hk/project-icarus-importer | Main.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE GADTs #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
module Main where
import Universum
import Control.Concurrent.STM (newTQueueIO)
import ... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/tools/src/dbgen/Main.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes #
If the user passed the `--add-to` option, it means we don't have
stack exec dbgen -- --config ./tools/src/dbgen/config.json --nodeDB db-mainnet --walletDB wdb-mainnet --configPath node/configuration.yaml --secretKey secret-mainnet.key --configProf main... | # LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
module Main where
import Universum
import Control.Concurrent.STM (newTQueueIO)
import Data.Default (def)
import Data.Maybe (fromJust, isJust)
... |
ecf3023cf02a0d09ff9c7649ee70f22508d982935f8b2bc0f1e05dae87393096 | EasyCrypt/easycrypt | ecEnv.ml | (* -------------------------------------------------------------------- *)
open EcUtils
open EcSymbols
open EcPath
open EcTypes
open EcCoreFol
open EcMemory
open EcDecl
open EcModules
open EcTheory
open EcBaseLogic
(* -------------------------------------------------------------------- *)
module Ssym = EcSymbols.Ssym
... | null | https://raw.githubusercontent.com/EasyCrypt/easycrypt/2e53a4272c940b41400de9ce42c8db7f6a514ee7/src/ecEnv.ml | ocaml | --------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
-----------------------------------... | open EcUtils
open EcSymbols
open EcPath
open EcTypes
open EcCoreFol
open EcMemory
open EcDecl
open EcModules
open EcTheory
open EcBaseLogic
module Ssym = EcSymbols.Ssym
module Msym = EcSymbols.Msym
module Mp = EcPath.Mp
module Sid = EcIdent.Sid
module Mid = EcIdent.Mid
module TC = EcTypeClass
module Mint = EcMap... |
87a927e2403a2b7cf7f21775a479ec68cec039c59e816d0dbff8ab7de9314e8b | e-bigmoon/haskell-blog | Example2.hs | #!/usr/bin/env stack
-- stack script --resolver lts-17.3
{-# LANGUAGE OverloadedStrings #-}
import Network.HTTP.Client
import Network.HTTP.Client.TLS
import Text.HTML.DOM
import Data.Conduit ((.|), runConduit, runConduitRes, ConduitT)
import Conduit (runResourceT)
impo... | null | https://raw.githubusercontent.com/e-bigmoon/haskell-blog/5c9e7c25f31ea6856c5d333e8e991dbceab21c56/sample-code/yesod/appendix/ap5/Example2.hs | haskell | stack script --resolver lts-17.3
# LANGUAGE OverloadedStrings #
main :: IO ()
main = do
--doc <- readFile def "test4.xml"
doc <- Text.HTML.DOM.readFile "test4.html"
let cursor = fromDocument doc
print $ T.concat $
cursor $// element "body"
-- >=> attributeIs "class" "bar"... | #!/usr/bin/env stack
import Network.HTTP.Client
import Network.HTTP.Client.TLS
import Text.HTML.DOM
import Data.Conduit ((.|), runConduit, runConduitRes, ConduitT)
import Conduit (runResourceT)
import Network.HTTP.Client.Conduit (bodyReaderSource)
import ... |
284059281eaa3e60630b6a35a6ec9e267cb30bd3e9fc5c1d31973781dfb44d7b | sondresl/AdventOfCode | Day10.hs | module Day10 where
import Control.Lens
import Lib
import Data.List.Extra
import Text.ParserCombinators.Parsec
import qualified Data.Map as Map
import Data.Map (Map, (!))
data Bot = Bot Int | Output Int
deriving (Show, Eq, Ord)
type Bots = Map Bot [Int]
data Instruction
= Init Bot Int
| Move Bot Bot Bot
deriv... | null | https://raw.githubusercontent.com/sondresl/AdventOfCode/224cf59354c7c1c31821f36884fe8909c5fdf9a6/2016/Haskell/src/Day10.hs | haskell | mapM_ print input | module Day10 where
import Control.Lens
import Lib
import Data.List.Extra
import Text.ParserCombinators.Parsec
import qualified Data.Map as Map
import Data.Map (Map, (!))
data Bot = Bot Int | Output Int
deriving (Show, Eq, Ord)
type Bots = Map Bot [Int]
data Instruction
= Init Bot Int
| Move Bot Bot Bot
deriv... |
2946e961095e4eb464019f2e810fe856b06a21ad41b620e102c998c8bcd0bfa9 | zhongwencool/observer_cli | observer_cli_mnesia.erl | %%% @author zhongwen <>
-module(observer_cli_mnesia).
%% API
-export([start/1]).
-export([clean/1]).
-include("observer_cli.hrl").
-define(LAST_LINE,
"q(quit) s(sort by size) m(sort by memory) pd/pu(page:down/up) F/B(forward/back)"
" hide(switch between hide and display system table)"
).
-spec start(#view_o... | null | https://raw.githubusercontent.com/zhongwencool/observer_cli/52933b97c7d6b09ed8af9dc8419863d79e0ee306/src/observer_cli_mnesia.erl | erlang | @author zhongwen <>
API
Private
ignore system table | -module(observer_cli_mnesia).
-export([start/1]).
-export([clean/1]).
-include("observer_cli.hrl").
-define(LAST_LINE,
"q(quit) s(sort by size) m(sort by memory) pd/pu(page:down/up) F/B(forward/back)"
" hide(switch between hide and display system table)"
).
-spec start(#view_opts{}) -> any().
start(
#vi... |
942e6fab01980824dfdb7d0655fddb4c0e1b17306eed1a0f9ba32dcc142b1d13 | sdiehl/elliptic-curve | Types.hs | module Generate.Binary.Types
( module Generate.Binary.Types
, module Generate.Types
) where
import Protolude
import GHC.Natural (Natural)
import Generate.Types
-------------------------------------------------------------------------------
-- Types
-------------------------------------------------------------... | null | https://raw.githubusercontent.com/sdiehl/elliptic-curve/445e196a550e36e0f25bd4d9d6a38676b4cf2be8/generate/Generate/Binary/Types.hs | haskell | -----------------------------------------------------------------------------
Types
----------------------------------------------------------------------------- | module Generate.Binary.Types
( module Generate.Binary.Types
, module Generate.Types
) where
import Protolude
import GHC.Natural (Natural)
import Generate.Types
data Curve = Curve
{ name :: Text
, types :: Types
, parameters :: Parameters
}
data Parameters = Parameters
{ a :: Element
,... |
81153d77da25253729f255ac682b2d8d7b7797a74c6de5d40a1983aa7a64af63 | geophf/1HaskellADay | Exercise.hs | module Y2017.M02.D17.Exercise where
import Data.Map (Map)
import qualified Data.Map as Map
below imports available via 1HaskellADay git repository
import Data.Probability
import Rosalind.Genotypes
-
Okay , yesterday we looked at a single characteristic / just one genotype . Of
course , organisms have multipl... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2017/M02/D17/Exercise.hs | haskell | }
This way, we can guarantee our parents have the same signature by
And we also guarantee that a genotype crosses with a genotype of the same
characteristic. How? We'll develop that below.
'Below' meaning now.
they both have the same signature
Once we determine that the parents have the same set of genotype (sign... | module Y2017.M02.D17.Exercise where
import Data.Map (Map)
import qualified Data.Map as Map
below imports available via 1HaskellADay git repository
import Data.Probability
import Rosalind.Genotypes
-
Okay , yesterday we looked at a single characteristic / just one genotype . Of
course , organisms have multipl... |
dd7fa51187ff9f17a3ea325f84343ec2f85a750e028f956c7218be1288f17eb4 | kronusaturn/lw2-viewer | push-notifications.lisp | (in-package #:lw2.backend)
(define-cache-database 'backend-push-notifications "push-subscriptions")
(export 'make-subscription)
(defun make-subscription (auth-token endpoint expires)
(cache-put "push-subscriptions"
auth-token
(alist :endpoint endpoint
:expires expires)
:value-type :json))
(... | null | https://raw.githubusercontent.com/kronusaturn/lw2-viewer/ce8978034d60eff1b15fb78e87028adbec429965/src/push-notifications.lisp | lisp | (in-package #:lw2.backend)
(define-cache-database 'backend-push-notifications "push-subscriptions")
(export 'make-subscription)
(defun make-subscription (auth-token endpoint expires)
(cache-put "push-subscriptions"
auth-token
(alist :endpoint endpoint
:expires expires)
:value-type :json))
(... | |
9b9e38ef86e9d89593c14d03583de2624bb4075671711b5d20a5f727f2b367bc | Autodesk-AutoCAD/AutoLispExt | pdfMarkups.lsp | ; random sample file
(defun sampleFunc (x y / a b c d)
(setq a (list 1 2 3 4) ; does this screw it all up?
d (setq b 0)
b (mapcar '+ a))
(foreach x a
(setq d (1+ d))
)
(defun SymPtrOnly ()
(setq gv 32)
)
(defun c (a b / q)
(defun q (r j / z)
(setq z (* r j))
)
... | null | https://raw.githubusercontent.com/Autodesk-AutoCAD/AutoLispExt/1acd741d5d825445d42753d3bfe5d0a77d6eefbe/extension/src/test/SourceFile/test_case/pdfMarkups.lsp | lisp | random sample file
does this screw it all up?
Yes
No |
(defun sampleFunc (x y / a b c d)
d (setq b 0)
b (mapcar '+ a))
(foreach x a
(setq d (1+ d))
)
(defun SymPtrOnly ()
(setq gv 32)
)
(defun c (a b / q)
(defun q (r j / z)
(setq z (* r j))
)
(q a b)
)
)
@Global does this trip ?
global (list "varia... |
daa48dd0cb61363c7bf389dd529efe5448d1318f0d790fabc194898d89ea3791 | anishathalye/knox | driver-lang.rkt | #lang racket/base
(require
racket/provide
racket/stxparam
(prefix-in @ rosette/safe)
(for-syntax racket/base racket/syntax syntax/parse)
"../driver.rkt"
(only-in "interpreter.rkt" basic-value? closure make-assoc assoc-extend make-interpreter))
(provide (rename-out [$#%module-begin #%module-begin])
#%to... | null | https://raw.githubusercontent.com/anishathalye/knox/161cda3e5274cc69012830f477749954ddcf736d/knox/driver/driver-lang.rkt | racket | some of the simple builtins from interpreter | #lang racket/base
(require
racket/provide
racket/stxparam
(prefix-in @ rosette/safe)
(for-syntax racket/base racket/syntax syntax/parse)
"../driver.rkt"
(only-in "interpreter.rkt" basic-value? closure make-assoc assoc-extend make-interpreter))
(provide (rename-out [$#%module-begin #%module-begin])
#%to... |
e048cb479af1ebc096714902ace178bfbf8ab67a3a84b3a8adc31046409db322 | nniclausse/manderlbot | mdb_bhv_google.erl | %%% File : mdb_bhv_google.erl
Author : < >
Purpose : ask google for the first match of a given keyword
Created : 16 Jul 2002 by < >
%%%----------------------------------------------------------------------
%%%
This file is part of Manderlbot .
%%%
Manderlbot is free software ; you can redistribute ... | null | https://raw.githubusercontent.com/nniclausse/manderlbot/a65cfffc50801c09551b70d6bbd7a19e6b2c57dd/src/mdb_bhv_google.erl | erlang | File : mdb_bhv_google.erl
----------------------------------------------------------------------
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
See ... | Author : < >
Purpose : ask google for the first match of a given keyword
Created : 16 Jul 2002 by < >
This file is part of Manderlbot .
Manderlbot 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 Foundat... |
b04648c7a6c8236d83cce9a29f0cc381bb68bf38b93822ca88dfdf3e13f708f2 | elldritch/hipsterfy | Main.hs | module Main (main) where
import Hipsterfy.Spotify.Auth (SpotifyCredentials (..))
import Hipsterfy.Spotify.Spec (testGetAlbums)
import Options.Applicative
( ParserInfo,
briefDesc,
execParser,
helper,
info,
long,
progDesc,
strOption,
)
import Relude
import System.Environment (withArgs)
im... | null | https://raw.githubusercontent.com/elldritch/hipsterfy/7d455697c1146d89fc6b2f78effe6694efe69120/test/Main.hs | haskell | module Main (main) where
import Hipsterfy.Spotify.Auth (SpotifyCredentials (..))
import Hipsterfy.Spotify.Spec (testGetAlbums)
import Options.Applicative
( ParserInfo,
briefDesc,
execParser,
helper,
info,
long,
progDesc,
strOption,
)
import Relude
import System.Environment (withArgs)
im... | |
ca1aa3397513904f19e23baec12cb4be15228e0f2359068aeeef7e23b49ba38d | kototama/clojure-semantic | mini.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; 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
; ... | null | https://raw.githubusercontent.com/kototama/clojure-semantic/580c8c6629b9a42ce0d6ab14bf44597685a473d3/tests/mini.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
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 ... | Copyright ( c ) . All rights reserved .
(ns ^{:doc "The core Clojure language."
:author "Rich Hickey"}
kklojure.core)
(def unquote2 12)
(def ^{:a o} unquote-splicing2)
(defn aa [b c] ())
(defn ^:private ^:static
kreduce
([f coll]
(let [s (seq coll)]
(if s
... |
0698d2d0cbc78c4dfb294098ec5a767e7d5b70ac4a40940ab07e1d7ae9fc65d2 | simonmar/par-tutorial | kmeans-seq.hs | K - Means sample from " Parallel and Concurrent Programming in Haskell "
--
-- Usage (sequential):
-- $ ./kmeans-par seq
import System.IO
import KMeansCommon
import Data.Array
import Text.Printf
import Data.List
import Data.Function
import Data.Binary (decodeFile)
import Debug.Trace
import Control.DeepSeq
import S... | null | https://raw.githubusercontent.com/simonmar/par-tutorial/f9061ea177800eb4ed9660bcabc8d8d836e1c73c/code/kmeans/kmeans-seq.hs | haskell |
Usage (sequential):
$ ./kmeans-par seq
-----------------------------------------------------------------------------
K-Means: repeatedly step until convergence
step on the sets in parallel and combine the results using
'reduce', below.
-------------------------------------------------------------------------... | K - Means sample from " Parallel and Concurrent Programming in Haskell "
import System.IO
import KMeansCommon
import Data.Array
import Text.Printf
import Data.List
import Data.Function
import Data.Binary (decodeFile)
import Debug.Trace
import Control.DeepSeq
import System.Environment
import Data.Time.Clock
import Co... |
b3eb7b8be7c2aefd9e00412f63737e23584f6fa254ff5df9f74bdc69b97e0152 | clojurewerkz/archimedes | io.clj | (ns clojurewerkz.archimedes.io
(:require [clojure.java.io :as io]
[clojurewerkz.archimedes.graph :as g])
(:import [com.tinkerpop.blueprints.util.io.graphml GraphMLWriter GraphMLReader]
[com.tinkerpop.blueprints.util.io.gml GMLWriter GMLReader]
[com.tinkerpop.blueprints.util.io.grap... | null | https://raw.githubusercontent.com/clojurewerkz/archimedes/f3300d3d71d35534acf7cc6f010e3fa503be0fba/src/clojure/clojurewerkz/archimedes/io.clj | clojure | GraphML
show-types - determines if types are written explicitly to the JSON
See -Reader-and-Writer-Library | (ns clojurewerkz.archimedes.io
(:require [clojure.java.io :as io]
[clojurewerkz.archimedes.graph :as g])
(:import [com.tinkerpop.blueprints.util.io.graphml GraphMLWriter GraphMLReader]
[com.tinkerpop.blueprints.util.io.gml GMLWriter GMLReader]
[com.tinkerpop.blueprints.util.io.grap... |
6015163168521763688ba3f6359d9eddc6011bcb8b11fe2ef4ad790f24627cb0 | haroldcarr/learn-haskell-coq-ml-etc | Tutorial1.hs | # LANGUAGE NoMonomorphismRestriction #
# LANGUAGE FlexibleInstances , FlexibleContexts #
{-# LANGUAGE GADTs #-}
-- ** `Practical' denotational semantics
module Tutorial1 where
Consider a small subset of Haskell
-- (or a pure functional subset of other suitable language)
-- as an `executable Math'
-- How to deal w... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/conference/2017-09-cufp-effects/src/Tutorial1.hs | haskell | # LANGUAGE GADTs #
** `Practical' denotational semantics
(or a pure functional subset of other suitable language)
as an `executable Math'
How to deal with side-effects, like input?
Simple sub-language of effectful integer
Define by denotational semantics: giving meaning to each
expression and how to compose them... | # LANGUAGE NoMonomorphismRestriction #
# LANGUAGE FlexibleInstances , FlexibleContexts #
module Tutorial1 where
Consider a small subset of Haskell
expressions , embedded in Haskell
class ReaderLang d where
add :: d -> d -> d
ask :: d
rlExp = add ask (add ask (int 1))
EDLS , pp 2 and 6
EDLS , p7... |
d6959d4ed525ed8eeac1876c0674cb05de0df7db8cf7f26acbab4195f943fc16 | hongchangwu/ocaml-type-classes | num.mli | module type S = sig
type t
val ( + ) : t -> t -> t
val ( - ) : t -> t -> t
val ( * ) : t -> t -> t
val negate : t -> t
val abs : t -> t
val from_int : int -> t
end
val int : (module S with type t = int)
val float : (module S with type t = float)
| null | https://raw.githubusercontent.com/hongchangwu/ocaml-type-classes/17b11af26008f42a88aec85001a94ba18584ea72/lib/num.mli | ocaml | module type S = sig
type t
val ( + ) : t -> t -> t
val ( - ) : t -> t -> t
val ( * ) : t -> t -> t
val negate : t -> t
val abs : t -> t
val from_int : int -> t
end
val int : (module S with type t = int)
val float : (module S with type t = float)
| |
c57897a076d7d9d90497bae1a7966469c66da1f7dd1e63048df25c16c6125c64 | emilypi/higher-functors | Higher.hs | # language PolyKinds #
# language KindSignatures #
# language RoleAnnotations #
# language GADTs #
# language StandaloneKindSignatures #
# language TypeOperators #
# language RankNTypes #
module Data.Function.Higher
( -- * Natural Transformations
NT(..)
, NIso(..)
, Nop(..)
-- * Type synonyms
, type (~>)
, type (<~... | null | https://raw.githubusercontent.com/emilypi/higher-functors/41f8858983f706177b88e6f2ec78e6f5f59dd58c/src/Data/Function/Higher.hs | haskell | * Natural Transformations
* Type synonyms
* Combinators
| A synonym for 'NT'.
| A synonym for 'Nop'. The pun here is "natural 'Op'"
| The type of natural transformations. Note that in general
this is a stronger condition than naturality due to the presence
of parametricity.
| The type of natural isomorphis... | # language PolyKinds #
# language KindSignatures #
# language RoleAnnotations #
# language GADTs #
# language StandaloneKindSignatures #
# language TypeOperators #
# language RankNTypes #
module Data.Function.Higher
NT(..)
, NIso(..)
, Nop(..)
, type (~>)
, type (<~)
, type (<~>)
, ($$-)
, (-$$)
) where
import Data... |
a36555514b901207c1eb87118a277dad8234211b1c34397e1824941a8b43ed13 | Z572/gwwm | client.scm | (define-module (gwwm client)
#:autoload (gwwm) (fullscreen-layer float-layer tile-layer overlay-layer top-layer bottom-layer background-layer gwwm-seat arrangelayers)
#:autoload (gwwm commands) (arrange)
#:autoload (gwwm config) (gwwm-borderpx g-config)
#:duplicates (merge-generics replace warn-override-core w... | null | https://raw.githubusercontent.com/Z572/gwwm/cf2dfea760a11b430892d2e883344c05d6fe73df/gwwm/client.scm | scheme | mark it destroyed.
(send-log DEBUG "client commit" 'client c) | (define-module (gwwm client)
#:autoload (gwwm) (fullscreen-layer float-layer tile-layer overlay-layer top-layer bottom-layer background-layer gwwm-seat arrangelayers)
#:autoload (gwwm commands) (arrange)
#:autoload (gwwm config) (gwwm-borderpx g-config)
#:duplicates (merge-generics replace warn-override-core w... |
de0ddc90558bcb424d66ba10a29d652d20553a77022fa3eff0767d5a1b7b6762 | mishoo/queen.lisp | stream.lisp | (in-package #:queen)
(defparameter *has-letter-prop* (cl-unicode:property-test "Letter"))
(defmacro with-parse-stream (input &body body)
(let ((pos (gensym "pos"))
(line (gensym "line"))
(col (gensym "col"))
(log (gensym "log"))
(-next (gensym "-next")))
`(let ((,pos 0) (,line 1)... | null | https://raw.githubusercontent.com/mishoo/queen.lisp/395535fcbd24fa463b32e17a35a4c12fdc7e2277/stream.lisp | lisp | (in-package #:queen)
(defparameter *has-letter-prop* (cl-unicode:property-test "Letter"))
(defmacro with-parse-stream (input &body body)
(let ((pos (gensym "pos"))
(line (gensym "line"))
(col (gensym "col"))
(log (gensym "log"))
(-next (gensym "-next")))
`(let ((,pos 0) (,line 1)... | |
eb92c36b70d93db177fc33266ab1b94221c3194e50d998a863d91b13c7b441d3 | soulomoon/SICP | Exercise 2.24.scm | Exercise 2.24 : Suppose we evaluate the expression ( list 1 ( list 2 ( list 3 4 ) ) ) . Give the result printed by the interpreter , the corresponding box - and - pointer structure , and the interpretation of this as a tree ( as in Figure 2.6 ) .
(list 1 (list 2 (list 3 4)))
Welcome to DrRacket, version 6.7 [3m].
... | null | https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter2/Exercise%202.24.scm | scheme | Exercise 2.24 : Suppose we evaluate the expression ( list 1 ( list 2 ( list 3 4 ) ) ) . Give the result printed by the interpreter , the corresponding box - and - pointer structure , and the interpretation of this as a tree ( as in Figure 2.6 ) .
(list 1 (list 2 (list 3 4)))
Welcome to DrRacket, version 6.7 [3m].
... | |
c0de35b7009f6c6b2bc3ce255b9da9d3e80b488efc47a4d153af0a94a5eb6bee | anoma/juvix | Serialization.hs | module Juvix.Compiler.Backend.C.Extra.Serialization where
import Juvix.Compiler.Backend.C.Language
import Juvix.Extra.Strings qualified as Str
import Juvix.Prelude hiding (Binary, Unary)
import Language.C qualified as C
import Language.C.Data.Ident qualified as C
import Language.C.Pretty qualified as P
import Language... | null | https://raw.githubusercontent.com/anoma/juvix/f5de5faaefa298b608344766e7376f7e48c430b0/src/Juvix/Compiler/Backend/C/Extra/Serialization.hs | haskell | module Juvix.Compiler.Backend.C.Extra.Serialization where
import Juvix.Compiler.Backend.C.Language
import Juvix.Extra.Strings qualified as Str
import Juvix.Prelude hiding (Binary, Unary)
import Language.C qualified as C
import Language.C.Data.Ident qualified as C
import Language.C.Pretty qualified as P
import Language... | |
59f78032b4376da8f5b19530e3650b44100a65e6366a6daa0bc507859562370d | mejgun/haskell-tdlib | ResetPassword.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Query.ResetPassword where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
-- |
Removes 2 - step verification password without previous password and access to recovery email address . The password ca n't be reset i... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/81516bd04c25c7371d4a9a5c972499791111c407/src/TD/Query/ResetPassword.hs | haskell | # LANGUAGE OverloadedStrings #
|
| |
module TD.Query.ResetPassword where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
Removes 2 - step verification password without previous password and access to recovery email address . The password ca n't be reset immediately and the request needs to be repeat... |
f31f8627c25214be03fbdf324d2af40a4f67a1a91a5adf43e5fe61da06d716d0 | JunSuzukiJapan/cl-reex | max.lisp | (in-package :cl-user)
(defpackage cl-reex.operator.max
(:use :cl)
(:import-from :cl-reex.observer
:observer
:on-next
:on-error
:on-completed )
(:import-from :cl-reex.observable
:observable
:dispose
:is-active
:set-error
:set-completed
... | null | https://raw.githubusercontent.com/JunSuzukiJapan/cl-reex/94928c7949c235b41902138d9e4a5654b92d67eb/src/operator/max.lisp | lisp | (in-package :cl-user)
(defpackage cl-reex.operator.max
(:use :cl)
(:import-from :cl-reex.observer
:observer
:on-next
:on-error
:on-completed )
(:import-from :cl-reex.observable
:observable
:dispose
:is-active
:set-error
:set-completed
... | |
e5d5cfc00b2b43003d0bc39ba4961a898b2acc48d951d1a5170f827e2234f037 | archaelus/erms | erms_esme_connection.erl | Copyright ( C ) 2004 Peña < >
%%%
%%% 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.1 of the License , or ( at your option ) any later version .
%%%
%%% This li... | null | https://raw.githubusercontent.com/archaelus/erms/5dbe5e79516a16e461e7a2a345dd80fbf92ef6fa/src/erms_esme_connection.erl | erlang |
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
This library 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... | Copyright ( C ) 2004 Peña < >
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 US... |
bcbc48dfebd1407011d27adb92c75c47aada74cd6f37cdf4a7a262e9b5bd6c16 | stchang/macrotypes | typedefs.rkt | #lang turnstile+/base
(require turnstile/typedefs)
(provide (all-from-out turnstile/typedefs))
| null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-lib/turnstile%2B/typedefs.rkt | racket | #lang turnstile+/base
(require turnstile/typedefs)
(provide (all-from-out turnstile/typedefs))
| |
904b9019ca89a9b6a8e26c2892d12dd43ec3d72fa0658c0db551652ad43e37db | fugue/fregot | Extended.hs | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
-}
module Data.Text.... | null | https://raw.githubusercontent.com/fugue/fregot/c3d87f37c43558761d5f6ac758d2f1a4117adb3e/lib/Data/Text/Extended.hs | haskell | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
-}
module Data.Text.... | |
137465e524281d714e5c9375f555ca5599a9b5c0fb387cc5fc3e857c09cf56cb | ato/lein-clojars | project.clj | (defproject lein-clojars "0.9.1"
:description "Leiningen plugin for interacting with Clojars.org."
:dependencies [[com.jcraft/jsch "0.1.42"]])
| null | https://raw.githubusercontent.com/ato/lein-clojars/3a7485ec13b6519dfd5a69155ccc9af555c9dd25/project.clj | clojure | (defproject lein-clojars "0.9.1"
:description "Leiningen plugin for interacting with Clojars.org."
:dependencies [[com.jcraft/jsch "0.1.42"]])
| |
03e2cca1d105e79fb0e29da7eeeb7155c53cb5f832586661cd55c914256a06eb | orthecreedence/cl-hash-util | hash-util.lisp | cl - hash - util is a very basic library for dealing with CL 's hash tables . The
;;; idea was spawned through working with enough JSON APIs and config files,
;;; causing a lot of headaches in the process. For instance, to get a value deep
;;; within a hash, you have to do:
( gethash " city " ( gethash " location... | null | https://raw.githubusercontent.com/orthecreedence/cl-hash-util/91d17d3e9208db9438b72bb60037644fd79fb497/hash-util.lisp | lisp | idea was spawned through working with enough JSON APIs and config files,
causing a lot of headaches in the process. For instance, to get a value deep
within a hash, you have to do:
With cl-hash-util, you can write:
hget can also deal with getting elements out of lists and arrays:
which normally would have to b... | cl - hash - util is a very basic library for dealing with CL 's hash tables . The
( gethash " city " ( gethash " location " ( gethash " user " obj ) ) )
( hget obj ' ( " user " " location " " city " ) )
( hget obj ' ( " user " " friends " 0 " name " ) )
( gethash " name " ( elt ( gethash " friends " (... |
d35a9d367963f2871a448abc94080ae7cc5d9b7d29d2a29204c1c14581c44a67 | facebook/pyre-check | interprocedural.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/7b36197dd21e83c8d290737e9c7b52585102a4ab/source/interprocedural/interprocedural.ml | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
efb515bc46c4d4502a475750d366e3f66271e1ddd9cb1e960cb1748882bc9171 | SKS-Keyserver/sks-keyserver | packet.mli | type ptype =
Reserved
| Public_Key_Encrypted_Session_Key_Packet
| Signature_Packet
| Symmetric_Key_Encrypted_Session_Key_Packet
| One_Pass_Signature_Packet
| Secret_Key_Packet
| Public_Key_Packet
| Secret_Subkey_Packet
| Compressed_Data_Packet
| Symmetrically_Encrypted_Data_Packet
| Marker_Packe... | null | https://raw.githubusercontent.com/SKS-Keyserver/sks-keyserver/a4e5267d817cddbdfee13d07a7fb38a9b94b3eee/packet.mli | ocaml | type ptype =
Reserved
| Public_Key_Encrypted_Session_Key_Packet
| Signature_Packet
| Symmetric_Key_Encrypted_Session_Key_Packet
| One_Pass_Signature_Packet
| Secret_Key_Packet
| Public_Key_Packet
| Secret_Subkey_Packet
| Compressed_Data_Packet
| Symmetrically_Encrypted_Data_Packet
| Marker_Packe... | |
802bc42407f9765dd092f03c9f521e9364ed564038ecf40c76c89d799ab4033b | mzp/coq-ruby | cooking.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/kernel/cooking.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i $Id: cooking.ml 10877 2008-04-30 2... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Util
open Nam... |
b28eeb2cff378e6b658c93b686d772880eae5c7b2def9292927c185e6c607a0a | cnuernber/dtype-next | gtol_insn.clj | (ns tech.v3.tensor.dimensions.gtol-insn
(:require [tech.v3.datatype.base :as dtype]
[insn.core :as insn]
[camel-snake-kebab.core :as csk])
(:import [java.util.function Function]
[java.util List Map HashMap ArrayList]
[java.lang.reflect Constructor]
[tech.v3.d... | null | https://raw.githubusercontent.com/cnuernber/dtype-next/4e43212942aafa0145640cf6b655bb83855f567d/src/tech/v3/tensor/dimensions/gtol_insn.clj | clojure | This optimization removes the 'rem' on the most
significant dimension. Valid if we aren't
broadcasting
map of name->field-data
Which of the shape items are scalars
they are either scalars or readers.
nested so we capture the class definition | (ns tech.v3.tensor.dimensions.gtol-insn
(:require [tech.v3.datatype.base :as dtype]
[insn.core :as insn]
[camel-snake-kebab.core :as csk])
(:import [java.util.function Function]
[java.util List Map HashMap ArrayList]
[java.lang.reflect Constructor]
[tech.v3.d... |
6ee1a735a2432bdc46e74aca96d41ccc73687f5a82737e6f15fe5fd35ac1c0d8 | nasa/pvslib | patch-20210623-pvsio-fix.lisp | ;; groundeval/cl2pvs.lisp
(defmethod cl2pvs* (sexpr (type type-name) context)
(declare (ignore context))
(if (tc-eq (find-supertype type) *number*)
(cond ((rationalp sexpr) (mk-number-expr sexpr))
( ( floatp sexpr)(mk - number - expr sexpr ) )
((floatp sexpr)(mk-number-expr (rationalize sexpr)))
(... | null | https://raw.githubusercontent.com/nasa/pvslib/c273c4ea5b0b5bb067ab7e2862185f9624add745/pvs-patches/patch-20210623-pvsio-fix.lisp | lisp | groundeval/cl2pvs.lisp | (defmethod cl2pvs* (sexpr (type type-name) context)
(declare (ignore context))
(if (tc-eq (find-supertype type) *number*)
(cond ((rationalp sexpr) (mk-number-expr sexpr))
( ( floatp sexpr)(mk - number - expr sexpr ) )
((floatp sexpr)(mk-number-expr (rationalize sexpr)))
(t (error 'cl2pvs-error :se... |
ec6ddde3e203e3fdb1672bc9dd672ea2bd944efd64c62759876d94e002f5acb6 | fragnix/fragnix | Control.Monad.Trans.Except.hs | # LANGUAGE Haskell98 #
# LINE 1 " Control / Monad / Trans / Except.hs " #
# LANGUAGE CPP #
{-# LANGUAGE Safe #-}
# LANGUAGE AutoDeriveTypeable #
-----------------------------------------------------------------------------
-- |
Module : Control . . Trans . Except... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/scotty/Control.Monad.Trans.Except.hs | haskell | # LANGUAGE Safe #
---------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Maintainer :
Stability : experimental
Portability : portable
This monad transformer extends a monad with the ability throw exceptions.
A sequence of actions te... | # LANGUAGE Haskell98 #
# LINE 1 " Control / Monad / Trans / Except.hs " #
# LANGUAGE CPP #
# LANGUAGE AutoDeriveTypeable #
Module : Control . . Trans . Except
Copyright : ( C ) 2013
If one throws an exception , the rest of the sequence is skipped and
... |
9afeabd94bd38dcf92c1406d7b3c95409617a37eaa8ee14b4a97e1ffb29d37e0 | freiksenet/cl-zmq | package.lisp | (cl:defpackage #:zmq.tests
(:use #:cl #:fiveam)
(:export
#:run-tests))
| null | https://raw.githubusercontent.com/freiksenet/cl-zmq/9acd1faa1ea3b2e322241aa126c57ba3a8907b79/tests/package.lisp | lisp | (cl:defpackage #:zmq.tests
(:use #:cl #:fiveam)
(:export
#:run-tests))
| |
ae510f517d0cc6656a351ec2c5dd836c1281a3d3469af9e310c2380fe6a279a8 | jappeace/cut-the-crap | Options.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveAnyClass #-}
-- | This module defines which options exists, and provides
-- functions for parsing cli options.
module Cut.Options
( parseProgram
, specifyTracks
, getOutFileName
-- * Program opti... | null | https://raw.githubusercontent.com/jappeace/cut-the-crap/f3baca164edb91681259dcaa07bd23983dc17ba2/src/Cut/Options.hs | haskell | # LANGUAGE TypeOperators #
# LANGUAGE DeriveAnyClass #
| This module defines which options exists, and provides
functions for parsing cli options.
* Program options
* fileio, deal with input output files
* listen cut, options for video editing by audio
* input source prisms
* defaults
| Deals with having a... | # LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
module Cut.Options
( parseProgram
, specifyTracks
, getOutFileName
, ProgramOptions(..)
, gnerate_sub_prism
, listen_cut_prism
, FileIO
, lc_fileio
, in_file
, out_file
, work_dir
, ListenCutOptionsT
, ListenCutOptions
, silent_tr... |
fa156c36fd045a43a1dbd3aa03a9e4768fe449aef3118b29e2a839e65cd3ee84 | google/ormolu | list-comprehensions-out.hs | foo x = [a | a <- x]
bar x y = [(a, b) | a <- x, even a, b <- y, a != b]
barbaz x y z w =
[ (a, b, c, d) -- Foo
| a <-
x -- Bar
, any even [a, b]
, c <-
z
* z ^ 2 -- Bar baz
, d <-
w
+ w -- Baz bar
, all
even
[ a
, b
, c
, d
]
]
| null | https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/data/examples/declaration/value/function/list-comprehensions-out.hs | haskell | Foo
Bar
Bar baz
Baz bar | foo x = [a | a <- x]
bar x y = [(a, b) | a <- x, even a, b <- y, a != b]
barbaz x y z w =
| a <-
, any even [a, b]
, c <-
z
, d <-
w
, all
even
[ a
, b
, c
, d
]
]
|
74aec3bcd937b77c0bf5e23db259885ddd5f6183ac9df094488e3a6c1250e6dc | ocaml/ocaml | odoc_info.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml/ocaml/8a61778d2716304203974d20ead1b2736c1694a8/ocamldoc/odoc_info.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type ref_kind = Odoc_types.ref_kind =
RK_module
| RK_module_type
| RK_class
| RK_class_type
| R... |
175590df7c06ee780017777e8d810fe0fa9ea8c3027bbb7f403dfc6f7efd5eb9 | netguy204/clojure-gl | marching_cubes.clj | (ns clojure-gl.marching-cubes)
first an implementation of simplex noise ( eg perlin noise )
;; based on the java reference implementation found at:
/~perlin/noise/
(def permutations
[151 160 137 91 90 15
131 13 201 95 96 53 194 233 7 225 140 36 103 30 69 142 8 99 37 240 21 10 23
190 6 148 247 120 234 ... | null | https://raw.githubusercontent.com/netguy204/clojure-gl/055f73baf1af0149191f3574ad82f35017c532fc/src/clojure_gl/marching_cubes.clj | clojure | based on the java reference implementation found at:
computing the derivative
now the marching cubes algorithm
This is based on the C implementation found at:
/
scale
offset
generate the integer grid indices
build the surface over a grid with that many indices but | (ns clojure-gl.marching-cubes)
first an implementation of simplex noise ( eg perlin noise )
/~perlin/noise/
(def permutations
[151 160 137 91 90 15
131 13 201 95 96 53 194 233 7 225 140 36 103 30 69 142 8 99 37 240 21 10 23
190 6 148 247 120 234 75 0 26 197 62 94 252 219 203 117 35 11 32 57 177 33
... |
064bef1e1d8e54914df0aa5d072c17160c792cecad16c0061c6e8d98c3d0776c | bcc32/projecteuler-ocaml | sol_008.ml | open! Core
open! Import
let doit str =
Sequence.range 0 (String.length str - 12)
|> Sequence.map ~f:(fun i ->
String.sub str ~pos:i ~len:13
|> Sequences.digits_of_string
|> List.fold ~init:1 ~f:( * ))
|> Sequence.max_elt ~compare:Int.compare
|> Option.value_exn
;;
let main () = doit Problem_008.da... | null | https://raw.githubusercontent.com/bcc32/projecteuler-ocaml/712f85902c70adc1ec13dcbbee456c8bfa8450b2/sol/sol_008.ml | ocaml | 3.3ms | open! Core
open! Import
let doit str =
Sequence.range 0 (String.length str - 12)
|> Sequence.map ~f:(fun i ->
String.sub str ~pos:i ~len:13
|> Sequences.digits_of_string
|> List.fold ~init:1 ~f:( * ))
|> Sequence.max_elt ~compare:Int.compare
|> Option.value_exn
;;
let main () = doit Problem_008.da... |
0794af425add885726bea78c950745ec9925523524215662a0bdfdc704acb96a | marcoheisig/numpy-file-format | packages.lisp | (in-package #:common-lisp-user)
(defpackage #:numpy-file-format
(:use #:common-lisp)
(:export
#:load-array
#:store-array))
| null | https://raw.githubusercontent.com/marcoheisig/numpy-file-format/e97aef6c592a412fdd1afa9a5f09d0b1ce134510/code/packages.lisp | lisp | (in-package #:common-lisp-user)
(defpackage #:numpy-file-format
(:use #:common-lisp)
(:export
#:load-array
#:store-array))
| |
57ade47383fac313a533d1956c597416f0569240eaa13183305f1a507b968eb7 | release-project/benchmarks | launcher.erl | %%%-------------------------------------------------------------------
LAUNCHER MODULE
%%%
@author upon a design by
( C ) 2014 , RELEASE project
%%% @doc
%%% Launcher module for the Distributed Erlang instant messenger
%%% (IM) application developed as a real benchmark for the
Scalable Distributed... | null | https://raw.githubusercontent.com/release-project/benchmarks/55f042dca3a2c680e2967c59edc9636456047bd5/IM/RD-IM/launcher.erl | erlang | -------------------------------------------------------------------
@doc
Launcher module for the Distributed Erlang instant messenger
(IM) application developed as a real benchmark for the
language.
This module implements the logic to deploy a system similar
set of virtual machines to host the syste... | LAUNCHER MODULE
@author upon a design by
( C ) 2014 , RELEASE project
Scalable Distributed Erlang extension of the Erlang / OTP
to the system described in the Section 2 of the document
" Instant Messenger Architectures Design Proposal " given a
Created : 25 Jul 2014 by
-module(launche... |
a2eb621aeda45b2d73d09af48f2ab0e49a3698f031902c1ecfac9787705326e0 | aiya000/haskell-examples | divideInto.hs | import Data.List
main = print $ divideInto 3 [1..10]
divideInto :: Int -> [a] -> [[a]]
divideInto n xs = unfoldr (\xs -> if null xs then Nothing else Just $ splitAt m xs) xs
where m = ((length xs) + n - 1) `div` n
| null | https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Room/Function/divideInto.hs | haskell | import Data.List
main = print $ divideInto 3 [1..10]
divideInto :: Int -> [a] -> [[a]]
divideInto n xs = unfoldr (\xs -> if null xs then Nothing else Just $ splitAt m xs) xs
where m = ((length xs) + n - 1) `div` n
| |
dcb49f5b9eef32d64a02ef230e5b03c77f4dd97310584238d50a2dff42785bab | albertoruiz/easyVision | Interface.hs | {-# LANGUAGE BangPatterns #-}
---------------------------------------------------------------------------
|
Module : Vision . GUI.Interface
Copyright : ( c ) 2006 - 12
License : GPL
Maintainer : ( aruiz at um dot es )
Stability : provisional
User interface tools .
Mo... | null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/packages/gui/src/Vision/GUI/Interface.hs | haskell | # LANGUAGE BangPatterns #
-------------------------------------------------------------------------
---------------------------------------------------------------------------
* Interface
* Tools
import ImagProc.Ipp(ippSetNumThreads)
------------------------------------------------------------------------------
win ... |
|
Module : Vision . GUI.Interface
Copyright : ( c ) 2006 - 12
License : GPL
Maintainer : ( aruiz at um dot es )
Stability : provisional
User interface tools .
Module : Vision.GUI.Interface
Copyright : (c) Alberto Ruiz 2006-12
License : GPL
Maintainer ... |
b472c46885aaa90c1f81d62452db96aab32edaa90a81e436858979b7320b3fd8 | nponeccop/HNC | Options.hs | # LANGUAGE FlexibleContexts #
module Utils.Options (err, O(..), Options(..), runOptions) where
import Control.Monad
import Control.Monad.Except
import System.Console.GetOpt
import System.Environment
import qualified Data.Map as M
import qualified Data.Set as S
data Options = OptBool String | OptString String String de... | null | https://raw.githubusercontent.com/nponeccop/HNC/d8447009a04c56ae2cba4c7c179e39384085ea00/Utils/Options.hs | haskell | # LANGUAGE FlexibleContexts #
module Utils.Options (err, O(..), Options(..), runOptions) where
import Control.Monad
import Control.Monad.Except
import System.Console.GetOpt
import System.Environment
import qualified Data.Map as M
import qualified Data.Set as S
data Options = OptBool String | OptString String String de... | |
e026d589ea03c7d6dea213a4b255130f12250e395e40be1acfd79744e6a9bb4e | justinethier/cyclone | let-syntax-298.scm | ;; From:
;; -scheme/issues/298
(import (scheme base) (scheme write))
(define-syntax bar
(syntax-rules ()
((_)
(let-syntax ((foo (syntax-rules () ((_) 'ok))))
(foo)))))
(define-syntax foo (syntax-rules () ((_) 'foo)))
(write
(bar)
)
(write
(foo)
)
| null | https://raw.githubusercontent.com/justinethier/cyclone/a1c2a8f282f37ce180a5921ae26a5deb04768269/tests/let-syntax-298.scm | scheme | From:
-scheme/issues/298 | (import (scheme base) (scheme write))
(define-syntax bar
(syntax-rules ()
((_)
(let-syntax ((foo (syntax-rules () ((_) 'ok))))
(foo)))))
(define-syntax foo (syntax-rules () ((_) 'foo)))
(write
(bar)
)
(write
(foo)
)
|
01b210e4fbb9a431db535c68c6099dfdbfc5733b62e19b09c6dbf506a10fdac0 | degree9/uikit-hl | button.cljs | (ns uikit-hl.button
(:require [hoplon.core :as h]
[hoplon.jquery]))
(defmulti uk-button! h/kw-dispatcher :default ::default)
(defmethod h/do! ::default
[elem key val]
(uk-button! elem key val))
(defn- format-button [button]
(str "uk-button-" button))
(defmethod uk-button! ::default
[elem kw v]... | null | https://raw.githubusercontent.com/degree9/uikit-hl/b226b1429ea50f8e9a6c1d12c082a3be504dda33/src/uikit_hl/button.cljs | clojure | (ns uikit-hl.button
(:require [hoplon.core :as h]
[hoplon.jquery]))
(defmulti uk-button! h/kw-dispatcher :default ::default)
(defmethod h/do! ::default
[elem key val]
(uk-button! elem key val))
(defn- format-button [button]
(str "uk-button-" button))
(defmethod uk-button! ::default
[elem kw v]... | |
d21e1735d729eb6902d3eb67e340599cb8c844255b1d7499d903a0fbbed39a03 | nasa/Common-Metadata-Repository | metrics_service.clj | (ns cmr.search.services.community-usage-metrics.metrics-service
"Provides functions for storing and retrieving community usage metrics. Community usage metrics
are saved in MetadataDB as part of the humanizers JSON."
(:require
[cheshire.core :as json]
[clojure.data.csv :as csv]
[clojure.string :as str]
... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/4a72d6e579d9044bfc5910f7b008b631c6becfc9/search-app/src/cmr/search/services/community_usage_metrics/metrics_service.clj | clojure | return cache hit
current-metrics hit
return product as short-name
query elastic
return queried short-name
Remove commas in large ints
Don't process empty lines
name-version-groups is map of [short-name, version] [entries that match short-name/version]
Group by short-name and version
set default | (ns cmr.search.services.community-usage-metrics.metrics-service
"Provides functions for storing and retrieving community usage metrics. Community usage metrics
are saved in MetadataDB as part of the humanizers JSON."
(:require
[cheshire.core :as json]
[clojure.data.csv :as csv]
[clojure.string :as str]
... |
f6f8e4f9b061b219871ed613b332a8a9cb99c8943e4d835e0c45e0434a6afaf7 | dyzsr/ocaml-selectml | pr5164_ok.ml | (* TEST
flags = " -w -a "
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
module type INCLUDING = sig
include module type of List
include module type of ListLabels
end
module Including_typed: INCLUDING = struct
include List
include ListLabels
end
| null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/typing-modules-bugs/pr5164_ok.ml | ocaml | TEST
flags = " -w -a "
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
|
module type INCLUDING = sig
include module type of List
include module type of ListLabels
end
module Including_typed: INCLUDING = struct
include List
include ListLabels
end
|
f40a5d27f057b63f87becb3ac0950dd2fe75f5170761409d8d3cdc7e8ea0fc89 | jiangpengnju/htdp2e | know_thy_data.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname know_thy_data) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-dec... | null | https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/fixed-size-data/arithmetic/know_thy_data.rkt | racket | about the language level of this file in a form that our tools can easily process.
predicate, which is a function that consumes a value and determines whether
or not it belongs to some class of data. | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname know_thy_data) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(number? 5)
(number? pi)
(number? #true)
(number? "fortytw... |
89c07e259265e49b5dcb50b2d3aa7d40db3326d0ab93a6ec4a3948d60784a27f | sweirich/hs-inferno | TUnionFind.hs | # LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE StandaloneDeriving #
{-# OPTIONS_GHC -funbox-strict-fields -fdefer-type-errors #-}
-- TODO: use a persistant data structure
-08-22-144618_purely-functional-data-structures-algorit... | null | https://raw.githubusercontent.com/sweirich/hs-inferno/08f6c514a695463332b69e5315b324802687328f/src/Language/Inferno/Generic/TUnionFind.hs | haskell | # LANGUAGE DeriveDataTypeable #
# OPTIONS_GHC -funbox-strict-fields -fdefer-type-errors #
TODO: use a persistant data structure
This module implements a transactional variant of the union-find
algorithm. It uses transactional references instead of ordinary
references, so that a series of operations performed wi... | # LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE DeriveGeneric #
# LANGUAGE StandaloneDeriving #
-08-22-144618_purely-functional-data-structures-algorithms-union-find-haskell.html
Or Conchon / Filliatre : A persistent Union - Find Data structure , ML Workshop 2007
module Language.Inferno... |
105c989b0ed62fcf4717c2b7e034b8fe856af282d7d9c7750378e310881661f9 | racket/drracket | multi-file-search.rkt | #lang racket/base
(require framework
framework/private/srcloc-panel
racket/class
racket/contract
racket/unit
racket/path
racket/list
racket/gui/base
mzlib/async-channel
string-constants
drracket/private/drsig
mrlib/close... | null | https://raw.githubusercontent.com/racket/drracket/d7f34d721867db1dd4e12ad71ba8e3c14ab9af5f/drracket/drracket/private/multi-file-search.rkt | racket | the param strings are the labels for checkboxes
the param booleans are the default values for the checkboxes
these are the available searches
search-info = (make-search-info (listof string) boolean (union #f regexp) search-type string)
the search-string field is only informative; not used for actual searching
sea... | #lang racket/base
(require framework
framework/private/srcloc-panel
racket/class
racket/contract
racket/unit
racket/path
racket/list
racket/gui/base
mzlib/async-channel
string-constants
drracket/private/drsig
mrlib/close... |
235cfae4e53302580819cbd4d11693be35a9575b5f1d87e4d6d5b62070a869ff | finnishtransportagency/harja | tierekisteri_haku.clj | (ns harja.palvelin.palvelut.tierekisteri-haku
(:require [harja.palvelin.komponentit.http-palvelin :refer [julkaise-palvelut poista-palvelut]]
[clojure.spec.alpha :as s]
[com.stuartsierra.component :as component]
[harja.kyselyt.tieverkko :as tv]
[harja.geo :as geo]
... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/f0fbb0be3f265ddd5d2f0ae42f052d4ea0b94209/src/clj/harja/palvelin/palvelut/tierekisteri_haku.clj | clojure | else | (ns harja.palvelin.palvelut.tierekisteri-haku
(:require [harja.palvelin.komponentit.http-palvelin :refer [julkaise-palvelut poista-palvelut]]
[clojure.spec.alpha :as s]
[com.stuartsierra.component :as component]
[harja.kyselyt.tieverkko :as tv]
[harja.geo :as geo]
... |
06ec72021d562b5ba2388acf16f7626bd9accd65888856dc5958cfea1c5b9546 | mirage/ocaml-cohttp | curl.ml | open Cohttp
module Curl = Cohttp_curl_async
module Sexp = Sexplib0.Sexp
open Async_kernel
module Writer = Async_unix.Writer
module Time = Core.Time
let ( let* ) x f = Deferred.bind x ~f
let client uri meth' () =
let meth = Cohttp.Code.method_of_string meth' in
let reply =
let context = Curl.Context.create () ... | null | https://raw.githubusercontent.com/mirage/ocaml-cohttp/55bcbf24f570cc177fee9484df8b87d61c110855/cohttp-curl-async/bin/curl.ml | ocaml | open Cohttp
module Curl = Cohttp_curl_async
module Sexp = Sexplib0.Sexp
open Async_kernel
module Writer = Async_unix.Writer
module Time = Core.Time
let ( let* ) x f = Deferred.bind x ~f
let client uri meth' () =
let meth = Cohttp.Code.method_of_string meth' in
let reply =
let context = Curl.Context.create () ... | |
c4a0fe3abe2447e6eb4f0b5105097cec825a231ef0b5ca4f34c90257e9ba55cb | larcenists/larceny | inv2.scm | (text
(seq (nop)
(inv (alt z!
l!
a!))
(nop)))
00000000 90 nop
00000001 7405 jz 0x8
00000003 7C03 jl 0x8
00000005 7701 ja 0x8
00000007 90 nop
;In order for the outer seq to win its arguments must win. In orde... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/tests/prims/inv2.scm | scheme | In order for the outer seq to win its arguments must win. In order
for the inv to win its argument must lose. It's argument is alt, and
for an alt to lose all its arguments must lose. Therefore if any of | (text
(seq (nop)
(inv (alt z!
l!
a!))
(nop)))
00000000 90 nop
00000001 7405 jz 0x8
00000003 7C03 jl 0x8
00000005 7701 ja 0x8
00000007 90 nop
its arguments win , the inv will lose as will the outer seq . Henc... |
9f04d5bbe525a24143d16a4b2e9d8ebb98727d77366c78c768299a140e3152cb | faylang/fay | Cont.hs | # LANGUAGE KindSignatures #
# LANGUAGE RebindableSyntax #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE NoImplicitPrelude #
-- | An example implementation of the lovely continuation monad.
module Cont where
import FFI
import Prelude
--------------------------------------------------------------------------------
-- Entry ... | null | https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/examples/Cont.hs | haskell | # LANGUAGE RankNTypes #
| An example implementation of the lovely continuation monad.
------------------------------------------------------------------------------
Entry point.
| Main entry point.
------------------------------------------------------------------------------
Deferred library.
| An example deferre... | # LANGUAGE KindSignatures #
# LANGUAGE RebindableSyntax #
# LANGUAGE NoImplicitPrelude #
module Cont where
import FFI
import Prelude
main :: Fay ()
main = runContT demo (const (return ()))
demo :: Deferred ()
demo = case contT of
CC return (>>=) (>>) callCC lift -> do
lift (putStrLn "Hello!")
sync setTi... |
e54fde104fa317833eeb94a0b37b6bf62b9db637de745fd5e71c2489b69d444a | egobrain/tq_transform | tq_transform_utils.erl | Copyright ( c ) 2011 - 2013 , < >
%%
%% 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 SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC... | null | https://raw.githubusercontent.com/egobrain/tq_transform/6729f12b1a2fa5ece41ebb15b716c7f8b9360a33/src/tq_transform_utils.erl | erlang |
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.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2011 - 2013 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(tq_transform_utils).
-include_lib("tq_transf... |
797e3a509b045da54c5187a7f20563a59680b221a28c76d4ef7ea31641255e8f | 2016rshah/Tic-Hack-Toe | TicTacToe.hs | module TicTacToe where
# LANGUAGE FlexibleInstances #
import Data.Either
import Safe
import Data.Maybe
import Data.List
|Slots in the board can either be filled with Naughts or Crosses
data Symbol = X | O
deriving (Show, Eq)
-- |Empty slots are referred to by their location on the board
type Piece = Either Int ... | null | https://raw.githubusercontent.com/2016rshah/Tic-Hack-Toe/e96fa9869f2a15c8cde30c9606ef52d24a27508d/src/TicTacToe.hs | haskell | |Empty slots are referred to by their location on the board
Thank you to for the show function
| \ESC[ for ANSI escape
|Convenience function for constructing an empty board
|Given a game board, check whether the game is over because someone won
|Given a game board, check whether the game is over due to a draw
|M... | module TicTacToe where
# LANGUAGE FlexibleInstances #
import Data.Either
import Safe
import Data.Maybe
import Data.List
|Slots in the board can either be filled with Naughts or Crosses
data Symbol = X | O
deriving (Show, Eq)
type Piece = Either Int Symbol
|A set of three pieces is used to represent rows , co... |
3bcf7fcba18012e01a5b2b7f9441d6bb356736d1f8457ee7e8427fdee1be32f3 | cmoid/erlbutt | tangle.erl | SPDX - License - Identifier : GPL-2.0 - only
%%
Copyright ( C ) 2021 Dionne Associates , LLC .
-module(tangle).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
-include("ssb.hrl").
-export([get_tangle/1,
parents/2,
ancestors/2,
children/2,
descendants/2,
... | null | https://raw.githubusercontent.com/cmoid/erlbutt/9e15ace3e9009c8bce6cf3251cf16e1f8611e16a/apps/ssb/src/tangle.erl | erlang |
retrieve tangle root author
retrieve tangle root author
retrieve tangle root author
retrieve message author
retrieve message author
===================================================================
===================================================================
Now create another feed
Now create another f... | SPDX - License - Identifier : GPL-2.0 - only
Copyright ( C ) 2021 Dionne Associates , LLC .
-module(tangle).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-endif.
-include("ssb.hrl").
-export([get_tangle/1,
parents/2,
ancestors/2,
children/2,
descendants/2,
g... |
cf55aba1242cfeced318879b8110a6a1defdc24c805a632e36afd2edf3d888a2 | JoelSanchez/ventas | category_test.clj | (ns ventas.entities.category-test
(:require
[clojure.test :refer [deftest is testing use-fixtures]]
[ventas.database :as db]
[ventas.database.entity :as entity]
[ventas.database.seed :as seed]
[ventas.entities.category :as sut]
[ventas.entities.i18n :as entities.i18n]
[ventas.test-tools :as test-... | null | https://raw.githubusercontent.com/JoelSanchez/ventas/dc8fc8ff9f63dfc8558ecdaacfc4983903b8e9a1/test/clj/ventas/entities/category_test.clj | clojure | (ns ventas.entities.category-test
(:require
[clojure.test :refer [deftest is testing use-fixtures]]
[ventas.database :as db]
[ventas.database.entity :as entity]
[ventas.database.seed :as seed]
[ventas.entities.category :as sut]
[ventas.entities.i18n :as entities.i18n]
[ventas.test-tools :as test-... | |
0b844ac3978d2e2dffff1ec976110d27bfde2b53eee48d337598147e68aa9a2f | pjotrp/guix | haskell-build-system.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2015 < >
Copyright © 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; ... | null | https://raw.githubusercontent.com/pjotrp/guix/96250294012c2f1520b67f12ea80bfd6b98075a2/guix/build/haskell-build-system.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2015 < >
Copyright © 2015 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix build haskell-build-system)
#:use-module ((guix build gnu-build... |
e9866a3ad450eff3c85ed8a8408d20f5e38f43558bacf86fe36b8c77d5b9e616 | dcSpark/fracada-il-primo | build-redeemer.hs | {-# LANGUAGE OverloadedStrings #-}
import Cardano.Api
import Cardano.Api.Shelley
import Data.Aeson
import qualified Data.ByteString.Base16 as B16
import qualified Data.ByteString.Lazy as LB
import qualified Data.ByteString.Lazy.Char8 as BL8
import Fracada.Validator
imp... | null | https://raw.githubusercontent.com/dcSpark/fracada-il-primo/0400e8f7d465d309d9638eb4a50eede2fed4effb/scripts/build-redeemer.hs | haskell | # LANGUAGE OverloadedStrings # |
import Cardano.Api
import Cardano.Api.Shelley
import Data.Aeson
import qualified Data.ByteString.Base16 as B16
import qualified Data.ByteString.Lazy as LB
import qualified Data.ByteString.Lazy.Char8 as BL8
import Fracada.Validator
import Ledger ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.