miguelgfierro / scripts Goto Github PK
View Code? Open in Web Editor NEWA collection of useful shell scripts for Linux, Windows & Mac
Home Page: https://miguelgfierro.com
License: Other
A collection of useful shell scripts for Linux, Windows & Mac
Home Page: https://miguelgfierro.com
License: Other
git config --global user.email "[email protected]"
Idea from #2
Hi! Nice script. I added some code if you feel like automating the instructions.
Have a nice day!
I have to add the content of bashrc and add autocomplete git #26 also
sudo mount_smbfs //[email protected]/share-name desired-mount-point
then it asks for the password and you add the key.
However, I don't have permissions to enter the drive unless I do sudo -s
. It doesn't appear in the finder
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
For the scripts of ADLS I always log: Login-AzureRmAccount
. Check if it is possible to know if the user is already logged and skip that step
I get this error:
Your connection is not secure
The owner of *****.southcentralus.cloudapp.azure.com has configured their web site improperly. To protect your information from being stolen, Firefox has not connected to this web site.
MIT: https://tldrlegal.com/license/mit-license Basically it means that anybody can use my code but I won't be liable/responsible for it.
Apache 2: https://tldrlegal.com/license/apache-license-2.0-(apache-2.0). Anybody can use my code. I won't be liable for it and nobody can use my name/trademark to promote their code. You have to maintain license, contributors and state changes.
BSD-0: https://tldrlegal.com/license/bsd-0-clause-license. Anybody can use my code. I won't be liable for it and you don't need to add the license
BSD-2: https://tldrlegal.com/license/bsd-2-clause-license-(freebsd). Identical to MIT
BSD-3: https://tldrlegal.com/license/bsd-3-clause-license-(revised). Code free to use. No liable and no trademark. Maintain copyright and license.
BSD-4: https://tldrlegal.com/license/4-clause-bsd. Idem to BSD-3 but you have to give credit to the author.
conda install ipykernel
source activate myenv
python -m ipykernel install --user --name myenv --display-name "Python (myenv)"
source activate other-env
python -m ipykernel install --user --name other-env --display-name "Python (other-env)"
with ipython >= 6.1.0
When I use the uploader to ADLS and the file is already in the cloud it returns an error. To solve it I have to force the writing operation
multithread.ADLDownloader(adls_client, lpath=args.local_folder, rpath=args.adls_folder, nthreads=16,
overwrite=True, buffersize=4194304, blocksize=4194304)
Based on this tutorial.
ssh-keygen -t rsa -b 2048 -v
We have to add the keyname migonzagpup100_rsa
:
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/miguel/.ssh/id_rsa): /Users/miguel/.ssh/migonzagpup100_rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/miguel/.ssh/migonzagpup100_rsa.
Your public key has been saved in /Users/miguel/.ssh/migonzagpup100_rsa.pub.
The key fingerprint is:
SHA256:2VVHKEfxyzrawPDUzrYvK/WbMLlvYK/6PzUBCKoWmW4 [email protected]
The key's randomart image is:
You get two files, migonzagpup100_rsa.pub
and migonzagpup100_rsa
.
Then we need to copy the public key to the server
ssh-copy-id -i /Users/miguel/.ssh/migonzagpup100_rsa.pub [email protected]
Now we make sure that we can log in using the private key (without the password):
ssh -i /Users/miguel/.ssh/migonzagpup100_rsa [email protected]
You can create the file ~/.ssh/config
and add the following lines:
Host migonzagpup100 migonzagpup100.westeurope.cloudapp.azure.com
Hostname migonzagpup100.westeurope.cloudapp.azure.com
User hoaphumanoid
IdentityFile /Users/miguel/.ssh/migonzagpup100_rsa
Host migonzagpup100london migonzagpup100london.westeurope.cloudapp.azure.com
Hostname migonzagpup100london.westeurope.cloudapp.azure.com
User hoaphumanoid
IdentityFile /Users/miguel/.ssh/migonzagpup100london
Now you can ssh to the machine directly by using the hostname: ssh migonzagpup100
.
# install CUDA 9
CUDA_REPO_PKG="cuda-repo-ubuntu1604_9.0.176-1_amd64.deb"
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG}
sudo dpkg -i ${CUDA_REPO_PKG}
sudo apt-get update
sudo apt-get -y install cuda
# install cuDNN v7.0.5.15
wget https://ikpublictutorial.blob.core.windows.net/deeplearningframeworks/libcudnn7_7.0.5.15-1%2Bcuda9.0_amd64.deb
wget https://ikpublictutorial.blob.core.windows.net/deeplearningframeworks/libcudnn7-dev_7.0.5.15-1%2Bcuda9.0_amd64.deb
wget https://ikpublictutorial.blob.core.windows.net/deeplearningframeworks/libcudnn7-doc_7.0.5.15-1%2Bcuda9.0_amd64.deb
CUDNN_RUNTIME_PKG="libcudnn7_7.0.5.15-1+cuda9.0_amd64.deb"
CUDNN_DEV_PKG="libcudnn7-dev_7.0.5.15-1+cuda9.0_amd64.deb"
CUDNN_SAMPLES_PKG="libcudnn7-doc_7.0.5.15-1+cuda9.0_amd64.deb"
sudo dpkg -i ${CUDNN_RUNTIME_PKG}
sudo dpkg -i ${CUDNN_DEV_PKG}
sudo dpkg -i ${CUDNN_SAMPLES_PKG}
got this error:
The size of this disk is 4 TiB (4396972769280 bytes). DOS partition table format can not be used on drives for volumes larger than 2199023255040 bytes for 512-byte sectors. Use GUID partition table format (GPT).
MXNet complains that
/datadrive/installer/mxnet/mshadow/mshadow/./base.h:139:24: fatal error: mkl_blas.h: No such file or directory
.
Install MKL like in the previous version
I got this error:
HTTPSConnectionPool(host='datasets.blob.core.windows.net', port=443): Max retries exceeded with url: /datasets?restype=container (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f4a75c11550>: Failed to establish a new connection: [Errno -2] Name or service not known',))
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/urllib3/connection.py", line 171, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw)
File "/opt/az/lib/python3.6/site-packages/urllib3/util/connection.py", line 56, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/opt/az/lib/python3.6/socket.py", line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 343, in _make_request
self._validate_conn(conn)
File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 849, in _validate_conn
conn.connect()
File "/opt/az/lib/python3.6/site-packages/urllib3/connection.py", line 314, in connect
conn = self._new_conn()
File "/opt/az/lib/python3.6/site-packages/urllib3/connection.py", line 180, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f4a75c11550>: Failed to establish a new connection: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/requests/adapters.py", line 445, in send
timeout=timeout
File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/opt/az/lib/python3.6/site-packages/urllib3/util/retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='datasets.blob.core.windows.net', port=443): Max retries exceeded with url: /datasets?restype=container (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f4a75c11550>: Failed to establish a new connection: [Errno -2] Name or service not known',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/azure/multiapi/storage/v2018_03_28/common/storageclient.py", line 269, in _perform_request
response = self._httpclient.perform_request(request)
File "/opt/az/lib/python3.6/site-packages/azure/multiapi/storage/v2018_03_28/common/_http/httpclient.py", line 92, in perform_request
proxies=self.proxies)
File "/opt/az/lib/python3.6/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/opt/az/lib/python3.6/site-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "/opt/az/lib/python3.6/site-packages/requests/adapters.py", line 513, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='datasets.blob.core.windows.net', port=443): Max retries exceeded with url: /datasets?restype=container (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f4a75c11550>: Failed to establish a new connection: [Errno -2] Name or service not known',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 197, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 369, in execute
six.reraise(*sys.exc_info())
File "/opt/az/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 343, in execute
result = cmd(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 182, in __call__
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 436, in default_command_handler
result = op(**command_args)
File "/opt/az/lib/python3.6/site-packages/azure/multiapi/storage/v2018_03_28/blob/baseblobservice.py", line 630, in create_container
self._perform_request(request, expected_errors=[_CONTAINER_ALREADY_EXISTS_ERROR_CODE])
File "/opt/az/lib/python3.6/site-packages/azure/multiapi/storage/v2018_03_28/common/storageclient.py", line 381, in _perform_request
raise ex
File "/opt/az/lib/python3.6/site-packages/azure/multiapi/storage/v2018_03_28/common/storageclient.py", line 311, in _perform_request
raise AzureException(ex.args[0])
azure.common.AzureException: HTTPSConnectionPool(host='datasets.blob.core.windows.net', port=443): Max retries exceeded with url: /datasets?restype=container (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f4a75c11550>: Failed to establish a new connection: [Errno -2] Name or service not known',))
uploading /data1/imagenet/ILSVRC2012_devkit_t12.tar.gz
HTTPSConnectionPool(host='datasets.blob.core.windows.net', port=443): Max retries exceeded with url: /datasets/imagenet/ILSVRC2012_devkit_t12.tar.gz (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f777f7b15f8>: Failed to establish a new connection: [Errno -2] Name or service not known',))
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/urllib3/connection.py", line 171, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw)
File "/opt/az/lib/python3.6/site-packages/urllib3/util/connection.py", line 56, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/opt/az/lib/python3.6/socket.py", line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 343, in _make_request
self._validate_conn(conn)
File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 849, in _validate_conn
conn.connect()
File "/opt/az/lib/python3.6/site-packages/urllib3/connection.py", line 314, in connect
conn = self._new_conn()
File "/opt/az/lib/python3.6/site-packages/urllib3/connection.py", line 180, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f777f7b15f8>: Failed to establish a new connection: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/requests/adapters.py", line 445, in send
timeout=timeout
File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/opt/az/lib/python3.6/site-packages/urllib3/util/retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='datasets.blob.core.windows.net', port=443): Max retries exceeded with url: /datasets/imagenet/ILSVRC2012_devkit_t12.tar.gz (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f777f7b15f8>: Failed to establish a new connection: [Errno -2] Name or service not known',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/azure/multiapi/storage/v2018_03_28/common/storageclient.py", line 269, in _perform_request
response = self._httpclient.perform_request(request)
File "/opt/az/lib/python3.6/site-packages/azure/multiapi/storage/v2018_03_28/common/_http/httpclient.py", line 92, in perform_request
proxies=self.proxies)
File "/opt/az/lib/python3.6/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/opt/az/lib/python3.6/site-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "/opt/az/lib/python3.6/site-packages/requests/adapters.py", line 513, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='datasets.blob.core.windows.net', port=443): Max retries exceeded with url: /datasets/imagenet/ILSVRC2012_devkit_t12.tar.gz (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f777f7b15f8>: Failed to establish a new connection: [Errno -2] Name or service not known',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 197, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 369, in execute
six.reraise(*sys.exc_info())
File "/opt/az/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 343, in execute
result = cmd(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 182, in __call__
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 436, in default_command_handler
result = op(**command_args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/operations/blob.py", line 199, in storage_blob_upload_batch
if_none_match=if_none_match, timeout=timeout)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/util.py", line 218, in wrapper
return True, func(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/operations/blob.py", line 185, in _upload_blob
return upload_blob(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/operations/blob.py", line 286, in upload_blob
return type_func[blob_type]()
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/operations/blob.py", line 279, in upload_block_blob
return client.create_blob_from_path(**create_blob_args)
File "/opt/az/lib/python3.6/site-packages/azure/multiapi/storage/v2018_03_28/blob/blockblobservice.py", line 463, in create_blob_from_path
timeout=timeout)
File "/opt/az/lib/python3.6/site-packages/azure/multiapi/storage/v2018_03_28/blob/blockblobservice.py", line 582, in create_blob_from_stream
timeout=timeout)
File "/opt/az/lib/python3.6/site-packages/azure/multiapi/storage/v2018_03_28/blob/blockblobservice.py", line 971, in _put_blob
return self._perform_request(request, _parse_base_properties)
File "/opt/az/lib/python3.6/site-packages/azure/multiapi/storage/v2018_03_28/common/storageclient.py", line 381, in _perform_request
raise ex
File "/opt/az/lib/python3.6/site-packages/azure/multiapi/storage/v2018_03_28/common/storageclient.py", line 311, in _perform_request
raise AzureException(ex.args[0])
azure.common.AzureException: HTTPSConnectionPool(host='datasets.blob.core.windows.net', port=443): Max retries exceeded with url: /datasets/imagenet/ILSVRC2012_devkit_t12.tar.gz (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f777f7b15f8>: Failed to establish a new connection: [Errno -2] Name or service not known',))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.