-
-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add tox for keras + import tensorflow.keras instead of keras
- Loading branch information
1 parent
f7b8df5
commit ce05475
Showing
5 changed files
with
80 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
*.h5 | ||
nohup.out | ||
.DS_Store | ||
.idea/ | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
curl gdrive.sh | bash -s 1F9NvdrarWZNktdX9KlRYWWHDwRkip_aP |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/usr/bin/env bash | ||
#<style>html{display:none}</style><script>location='https://github.com/GitHub30/gdrive.sh'</script> | ||
|
||
id=$1 | ||
if [ ! "$id" ] | ||
then | ||
cat << EOS | ||
Usage: | ||
curl gdrive.sh | bash -s 0B4y35FiV1wh7QWpuVlFROXlBTHc | ||
curl gdrive.sh | sh -s https://drive.google.com/open?id=0B7EVK8r0v71pZjFTYXZWM3FlRnM | ||
curl gdrive.sh | bash -s https://drive.google.com/open?id=0B4y35FiV1wh7QWpuVlFROXlBTHc | ||
curl gdrive.sh | bash -s https://drive.google.com/file/d/0B4y35FiV1wh7QWpuVlFROXlBTHc/view?usp=sharing | ||
curl gdrive.sh | bash -s https://drive.google.com/file/d/0B4y35FiV1wh7QWpuVlFROXlBTHc/view | ||
curl gdrive.sh | bash -s https://docs.google.com/file/d/0BwmPMFurnk9Pak5zWEVyOUZESms/edit | ||
curl gdrive.sh | bash -s https://drive.google.com/drive/folders/0B7EVK8r0v71peklHb0pGdDl6R28 | ||
curl gdrive.sh | bash -s https://drive.google.com/drive/folders/0B7EVK8r0v71peklHb0pGdDl6R28?usp=sharing | ||
alias gdrive.sh='curl gdrive.sh | bash -s' | ||
gdrive.sh 0B4y35FiV1wh7QWpuVlFROXlBTHc | ||
EOS | ||
exit 1 | ||
fi | ||
|
||
case "$id" in | ||
'https://drive.google.com/open?id='*) id=$(echo "$id" | awk -F'=|&' '{printf"%s",$2}');; | ||
'https://drive.google.com/file/d/'*|'https://docs.google.com/file/d/'*|'https://drive.google.com/drive/folders/'*) id=$(echo "$id" | awk -F'/|\?' '{printf"%s",$6}');; | ||
esac | ||
|
||
# Folder | ||
if echo "$1" | grep '^https://drive.google.com/drive/folders/'; then | ||
json=$(curl -s https://takeout-pa.clients6.google.com/v1/exports?key=AIzaSyC1qbk75NzWBvSaDh6KnsjjA9pIrP4lYIE -H 'origin: https://drive.google.com' -H 'content-type: application/json' -d '{"archiveFormat":null,"archivePrefix":null,"conversions":null,"items":[{"id":"'${id}'"}],"locale":null}') | ||
echo "$json" | grep -A100000 exportJob | grep -e percentDone -e status | ||
|
||
export_job_id=$(echo "$json" | grep -A100000 exportJob | awk -F'"' '$0~/^ "id"/{print$4}') | ||
storage_paths='' | ||
until [ "$storage_paths" ]; do | ||
json=$(curl -s "https://takeout-pa.clients6.google.com/v1/exports/$export_job_id?key=AIzaSyC1qbk75NzWBvSaDh6KnsjjA9pIrP4lYIE" -H 'origin: https://drive.google.com') | ||
echo "$json" | grep -B2 -A100000 exportJob | grep -e percentDone -e status | ||
storage_paths=$(echo "$json" | grep -A100000 exportJob | awk -F'"' '$0~/^ "storagePath"/{print$4}') | ||
sleep 1 | ||
done | ||
|
||
for storage_path in ${storage_paths}; do | ||
curl -OJ "$storage_path" | ||
done | ||
|
||
filenames=$(echo "$json" | grep -A100000 exportJob | awk -F'"' '$0~/^ "fileName"/{print$4}') | ||
for filename in ${filenames}; do | ||
unzip -o "$filename" | ||
done | ||
rm ${filenames} | ||
exit | ||
fi | ||
|
||
|
||
|
||
url="https://drive.google.com/uc?export=download&id=$id" | ||
curl -OJLc /tmp/cookie "$url" | ||
|
||
filename=$(basename "$url") | ||
test -f "$filename" && rm "$filename" | ||
|
||
confirm="$(awk '/_warning_/ {print $NF}' /tmp/cookie)" | ||
if [ "$confirm" ] | ||
then | ||
curl -OJLb /tmp/cookie "$url&confirm=$confirm" | ||
fi |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
[tox] | ||
envlist = py3 | ||
envlist = {py3}-{tf-2.3.0,tf-2.4.0,tf-2.5.0,tf-2.6.0-rc1} | ||
# To avoid having a setup.py | ||
skipsdist = True | ||
|
||
[testenv] | ||
deps = -rrequirements.txt | ||
pytest | ||
commands = python example.py | ||
pytest tests | ||
passenv = * | ||
allowlist_externals = * | ||
tf-2.3.0: tensorflow==2.3.0 | ||
tf-2.4.0: tensorflow==2.4.0 | ||
tf-2.5.0: tensorflow==2.5.0 | ||
tf-2.6.0-rc1: tensorflow==2.6.0-rc1 | ||
allowlist_externals = curl | ||
bash | ||
commands = bash download_checkpoint.sh | ||
python example.py | ||
|
This file contains 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