This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| / This takes forever and seems to use a lot more memory than expected | |
| Array.ofDim[Double](2048, 2048, 2048) | |
| // This seems to work faster and uses less memory. | |
| def get1d(d1 : Int, init : Double) = Stream.continually(init) take d1 toArray | |
| def get2d(d1 : Int, d2 : Int, init : Double) = Stream.continually( get1d(d2, init) ) take d1 toArray | |
| def get3d(d1 : Int, d2 : Int, d3 : Int, init : Double) = Stream.continually( get2d(d2, d3, init) ) take d1 toArray | |
| // More testing is needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pattern = r"\d+" | |
| import re | |
| regex = re.compile(pattern) | |
| regex.match("George") | |
| regex.match("35") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Learning Processing | |
| // Daniel Shiffman | |
| // http://www.learningprocessing.com | |
| // COMP 125, set stroke width based on speed (modify 3-4) | |
| // Example 3-4: Drawing a continuous line | |
| void setup() { | |
| size(480, 270); | |
| background(255); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Python 2.7.10 (default, Feb 7 2017, 00:08:15) | |
| [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin | |
| Type "help", "copyright", "credits" or "license" for more information. | |
| >>> print("Hello World") | |
| Hello World |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| println("Hello, World") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.mypackage.benchmark | |
| import com.mypackage.util.Logging | |
| import net.lag.configgy.Configgy | |
| import scala.collection.mutable | |
| import scala.collection.JavaConversions._ | |
| import java.net.InetSocketAddress | |
| import java.nio.charset.Charset | |
| import java.util.concurrent._ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.mypackage.benchmark | |
| import com.mypackage.util.Logging | |
| import net.lag.configgy.Configgy | |
| import scala.collection.mutable | |
| import scala.collection.JavaConversions._ | |
| import java.net.InetSocketAddress | |
| import java.nio.charset.Charset | |
| import java.util.concurrent._ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Byte-compiled / optimized / DLL files | |
| __pycache__/ | |
| *.py[cod] | |
| *$py.class | |
| # C extensions | |
| *.so | |
| # Distribution / packaging | |
| .Python |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Bootstrap: docker | |
| From: nvidia/cuda:9.0-cudnn7-devel-centos7 | |
| %help | |
| Centos7 with cuda9.0 cudnn7 | |
| To start your container simply try | |
| singularity exec THIS_CONTAINER.simg bash | |
| To use GPUs, try |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| To run this gist, you need to have the singularity container framework installed on your computer. | |
| The host system must have a GPGPU. |