From 61a51138192b39fcfe4b4c58490eda77010be07b Mon Sep 17 00:00:00 2001 From: Stephen De Gabrielle Date: Sat, 7 Dec 2019 23:46:36 +0000 Subject: [PATCH] convert to package --- .gitignore | 6 +++ .travis.yml | 49 +++++++++++++++++++++++ LICENSE-APACHE | 13 ++++++ LICENSE-MIT | 23 +++++++++++ README copy.md | 3 ++ info.rkt | 8 ++++ main.rkt | 77 ++++++++++++++++++++++++++++++++++++ scribblings/DeepRacket.scrbl | 10 +++++ 8 files changed, 189 insertions(+) create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 LICENSE-APACHE create mode 100644 LICENSE-MIT create mode 100644 README copy.md create mode 100644 info.rkt create mode 100644 main.rkt create mode 100644 scribblings/DeepRacket.scrbl diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1a59348 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +*~ +\#* +.\#* +.DS_Store +compiled/ +/doc/ diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..fe64ec2 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,49 @@ +language: c + +# Based on: https://github.com/greghendershott/travis-racket + +env: + global: + # Supply a global RACKET_DIR environment variable. This is where + # Racket will be installed. A good idea is to use ~/racket because + # that doesn't require sudo to install. + - RACKET_DIR=~/racket + matrix: + # Supply at least one RACKET_VERSION environment variable. This is + # used by the install-racket.sh script (run at before_install, + # below) to select the version of Racket to download and install. + # + # Supply more than one RACKET_VERSION (as in the example below) to + # create a Travis-CI build matrix to test against multiple Racket + # versions. + - RACKET_VERSION=6.12 + - RACKET_VERSION=7.0 + - RACKET_VERSION=7.1 + - RACKET_VERSION=7.2 + - RACKET_VERSION=HEAD + +matrix: + allow_failures: +# - env: RACKET_VERSION=HEAD + fast_finish: true + +before_install: +- git clone https://github.com/greghendershott/travis-racket.git ~/travis-racket +- cat ~/travis-racket/install-racket.sh | bash # pipe to bash not sh! +- export PATH="${RACKET_DIR}/bin:${PATH}" #install-racket.sh can't set for us + +install: + - raco pkg install --auto --name DeepRacket + +before_script: + +# Here supply steps such as raco make, raco test, etc. You can run +# `raco pkg install --deps search-auto` to install any required +# packages without it getting stuck on a confirmation prompt. +script: + - raco test -x -p DeepRacket + +after_success: + - raco setup --check-pkg-deps --pkgs DeepRacket + - raco pkg install --auto cover cover-coveralls + - raco cover -b -f coveralls -d $TRAVIS_BUILD_DIR/coverage . diff --git a/LICENSE-APACHE b/LICENSE-APACHE new file mode 100644 index 0000000..a7fc28c --- /dev/null +++ b/LICENSE-APACHE @@ -0,0 +1,13 @@ +Copyright 2019 spdegabrielle + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/LICENSE-MIT b/LICENSE-MIT new file mode 100644 index 0000000..f6908eb --- /dev/null +++ b/LICENSE-MIT @@ -0,0 +1,23 @@ +DeepRacket + +MIT License + +Copyright (c) 2019 spdegabrielle + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README copy.md b/README copy.md new file mode 100644 index 0000000..8974791 --- /dev/null +++ b/README copy.md @@ -0,0 +1,3 @@ +DeepRacket +========== +README text here. diff --git a/info.rkt b/info.rkt new file mode 100644 index 0000000..87a9cb6 --- /dev/null +++ b/info.rkt @@ -0,0 +1,8 @@ +#lang info +(define collection "DeepRacket") +(define deps '("base" "yaml")) +(define build-deps '("scribble-lib" "racket-doc" "rackunit-lib")) +(define scribblings '(("scribblings/DeepRacket.scrbl" ()))) +(define pkg-desc "A simple starting point for doing deep learning in Racket") +(define version "1.0") +(define pkg-authors '(charlescearl)) diff --git a/main.rkt b/main.rkt new file mode 100644 index 0000000..0f76c14 --- /dev/null +++ b/main.rkt @@ -0,0 +1,77 @@ +#lang racket/base + +(require "simple-dynet-api.rkt") +(provide (all-from-out "simple-dynet-api.rkt")) +(require "rnn.rkt") +(provide (all-from-out "rnn.rkt")) +(require "mem-utils.rkt") +(provide (all-from-out "mem-utils.rkt")) +(require "lib-cudann.rkt") +(provide (all-from-out "lib-cudann.rkt")) + + +(require "ffi-utils.rkt") +(provide (all-from-out "ffi-utils.rkt")) +(require "ffi-functional.rkt") +(provide (all-from-out "ffi-functional.rkt")) +(require "cudnn-tensor.rkt") +(provide (all-from-out "cudnn-tensor.rkt")) + +(require "cudnn-dropout.rkt") +(provide (all-from-out "cudnn-dropout.rkt")) +(require "cudnn-api.rkt") +(provide (all-from-out "cudnn-api.rkt")) +(require "cuda-api.rkt") +(provide (all-from-out "cuda-api.rkt")) + +(module+ test + (require rackunit)) + +;; Notice +;; To install (from within the package directory): +;; $ raco pkg install +;; To install (once uploaded to pkgs.racket-lang.org): +;; $ raco pkg install <> +;; To uninstall: +;; $ raco pkg remove <> +;; To view documentation: +;; $ raco docs <> +;; +;; For your convenience, we have included LICENSE-MIT and LICENSE-APACHE files. +;; If you would prefer to use a different license, replace those files with the +;; desired license. +;; +;; Some users like to add a `private/` directory, place auxiliary files there, +;; and require them in `main.rkt`. +;; +;; See the current version of the racket style guide here: +;; http://docs.racket-lang.org/style/index.html + +;; Code here + + + +(module+ test + ;; Any code in this `test` submodule runs when this file is run using DrRacket + ;; or with `raco test`. The code here does not run when this file is + ;; required by another module. + + ;(check-equal? (+ 2 2) 4) + ) + +(module+ main + ;; (Optional) main submodule. Put code here if you need it to be executed when + ;; this file is run using DrRacket or the `racket` executable. The code here + ;; does not run when this file is required by another module. Documentation: + ;; http://docs.racket-lang.org/guide/Module_Syntax.html#%28part._main-and-test%29 + +; (require racket/cmdline) +; (define who (box "world")) +; (command-line +; #:program "my-program" +; #:once-each +; [("-n" "--name") name "Who to say hello to" (set-box! who name)] +; #:args () +; (printf "hello ~a~n" (unbox who))) + + ) diff --git a/scribblings/DeepRacket.scrbl b/scribblings/DeepRacket.scrbl new file mode 100644 index 0000000..f0c238b --- /dev/null +++ b/scribblings/DeepRacket.scrbl @@ -0,0 +1,10 @@ +#lang scribble/manual +@require[@for-label[DeepRacket + racket/base]] + +@title{DeepRacket} +@author{charlescearl} + +@defmodule[DeepRacket] + +A simple starting point for doing deep learning in Racket