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
Install anaconda and run the following command (with admin permission on windows os): | |
```bash | |
conda install -c peterjc123 pytorch | |
``` | |
at this point, torch is available in your global site packages. | |
If you use PyCharm as the IDE, you can create a virtual-env and select "Inherit global site packages". |
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
getBinaryObjById(id: number, token: string) { | |
const req = { | |
token: string | |
}; | |
Observable.create(observer => { | |
let xhr = new XMLHttpRequest(); | |
xhr.open('POST', './erp/binary-obj/find-binary-obj-by-id?id=' + id, true); | |
xhr.setRequestHeader('Content-type', 'application/json'); | |
xhr.responseType='blob'; | |
xhr.onreadystatechange = function () { |
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.github.chen0040.tflite.hello; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.tensorflow.Graph; | |
import org.tensorflow.Operation; | |
import org.tensorflow.Session; | |
import org.tensorflow.Tensor; | |
import javax.imageio.ImageIO; |
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
#!/usr/bin/env bash | |
bin=`dirname "${BASH_SOURCE-$0}"` | |
pwd=`pwd` | |
startup_dir=$pwd/$bin | |
echo $startup_dir |
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
<licenses> | |
<license> | |
<name>MIT</name> | |
<url>https://github.com/chen0040/java-glm/LICENSE.md</url> | |
<comments>MIT License</comments> | |
</license> | |
</licenses> | |
<developers> | |
<developer> |
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
<profile> | |
<id>release</id> | |
<properties> | |
<current.scope>compile</current.scope> | |
</properties> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-surefire-plugin</artifactId> |
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
language: java | |
jdk: oraclejdk8 | |
cache: | |
directories: | |
- $HOME/.m2 | |
before_install: | |
- chmod +x mvnw |
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 re | |
import ast | |
import io | |
_version_re = re.compile(r'__version__\s+=\s+(.*)') | |
package_name = 'pyalgs' | |
with open(package_name + '/__init__.py', 'rb') as f: | |
version = str(ast.literal_eval(_version_re.search( | |
f.read().decode('utf-8')).group(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
language: python | |
python: | |
- "2.7" | |
- "3.3" | |
- "3.4" | |
- "3.5" | |
- "pypy" | |
- "pypy3" |