If you use atom... download & install the following packages:
It is possible to compile Go programs for a different OS, even though go build says otherwise.
You'll need:
- a valid toolchain for the platform/os you're targetting
- Go Tip (works on 1.1 and 1.2rc1 but you might as well be on tip)
golang-crosscompilehelper script https://github.com/davecheney/golang-crosscompile- the patch provided
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.example.app | |
| import org.scalatra._ | |
| import servlet.{SizeConstraintExceededException, FileUploadSupport} | |
| import scalate.ScalateSupport | |
| import java.io.ByteArrayInputStream | |
| import org.apache.poi.ss.usermodel.WorkbookFactory | |
| import org.apache.poi.ss.usermodel.Cell | |
| import org.apache.poi.ss.usermodel.DataFormatter | |
| import org.apache.poi.ss.usermodel.DateUtil |
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.stackoverflow.q3732109; | |
| import java.io.IOException; | |
| import java.io.OutputStream; | |
| import java.net.InetSocketAddress; | |
| import com.sun.net.httpserver.HttpExchange; | |
| import com.sun.net.httpserver.HttpHandler; | |
| import com.sun.net.httpserver.HttpServer; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| :: Launch PyCharm from within conda environment | |
| :: This will ensure that all necessary environment variables are set. | |
| :: Modify the paths and environment name for your installation, if necessary. | |
| :: This configuration is for PyCharm x64 installed with JetBrains Toolbox and | |
| :: will launch the latest installed version. | |
| @set condaroot="%userprofile%\Anaconda3" | |
| @set pycharmroot="%localappdata%\JetBrains\Toolbox\apps\PyCharm-P\ch-0" | |
| @set env=base |
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
| from numba import cuda | |
| gpus = cuda.gpus.lst | |
| for gpu in gpus: | |
| with gpu: | |
| meminfo = cuda.current_context().get_memory_info() | |
| print("%s, free: %s bytes, total, %s bytes" % (gpu, meminfo[0], meminfo[1])) |
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
| import time | |
| import numba | |
| from numba import jit | |
| import numpy as np | |
| #input matrices | |
| matrix1 = np.random.rand(30,30) | |
| matrix2 = np.random.rand(30,30) | |
| rmatrix = np.zeros(shape=(30,30)) |
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
| """ | |
| Hierarchial Clustering. | |
| The goal of gist is to show to use scikit-learn to perform agglomerative clustering when: | |
| 1. There is a need for a custom distance metric (like levenshtein distance) | |
| 2. Use the distance in sklearn's API. | |
| Adapted from: sklearn's FAQ. | |
| http://scikit-learn.org/stable/faq.html | |
| """ |
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
| extern mod sync; | |
| // str op trait | |
| use std::str::StrSlice; | |
| // for tcp listen | |
| use std::io::{TcpListener, TcpStream}; | |
| use std::io::net::ip::SocketAddr; | |
| // for trait | |
| use std::io::{Listener, Writer, Acceptor, Buffer}; | |
| // for spawn |