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
#!/bin/bash | |
# ./bundle-packages requirements.txt ./target-directory | |
# where | |
# requirements.txt : list of packages to include | |
# ./packages : path to target file | |
virtualenv --no-site-packages packageenv | |
. packageenv/bin/activate |
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
# Copyright (c) 2015-present, Facebook, Inc. | |
# All rights reserved. | |
# | |
# This source code is licensed under the CC-by-NC license found in the | |
# LICENSE file in the root directory of this source tree. | |
# -*- makefile -*- | |
# | |
# Ubuntu 14.04 (eg Docker) |
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 python | |
""" | |
pytorch_lifted_loss.py | |
""" | |
import torch | |
import torch.nn as nn | |
from torch.autograd import Variable |
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 python | |
""" | |
keras_lifted_loss.py | |
""" | |
from keras import backend as K | |
def lifted_loss(margin=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
#!/usr/bin/env python | |
""" | |
pytorch_dlib_metric_loss.py | |
""" | |
import torch | |
import torch.nn as nn | |
from torch.autograd import Variable |
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 python | |
""" | |
get_list.py | |
Example: | |
./code/get_list.py ./data/casia/ > ./data/train.txt | |
""" | |
from __future__ import print_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
#!/usr/bin/env python | |
""" | |
mnist_cnn.py | |
""" | |
from __future__ import print_function | |
import keras | |
from keras.datasets import mnist | |
from keras.models import Sequential |
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 python | |
""" | |
id2url.py | |
Convert instagram post id to the url | |
""" | |
import os | |
from string import letters |
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
# Copyright (c) 2015-present, Facebook, Inc. | |
# All rights reserved. | |
# | |
# This source code is licensed under the BSD+Patents license found in the | |
# LICENSE file in the root directory of this source tree. | |
# -*- makefile -*- | |
# tested on CentOS 7, Ubuntu 16 and Ubuntu 14, see below to adjust flags to distribution. | |
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
#!/bin/bash | |
echo $1 | |
cd $1 | |
touch _start | |
gzip -cd $1.gz > urls | |
cat urls | sed 's@https://@out=@g' | paste urls - | sed 's/\t/\n\t/g' > aria-urls | |
aria2c -j8 --deferred-input --conditional-get=true --auto-file-renaming=false -q -i aria-urls | |
touch _finish | |
cd .. |
OlderNewer