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
<p> | |
<script src="https://gist.github.com/<gist_id>.js"> </script> | |
<noscript> | |
<pre> | |
//Your code here | |
//Be sure you escape your tags with < and > when displaying things like HTML. | |
</pre> | |
</noscript> | |
</p> |
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
# wget -O - -q 'https' | sudo bash | |
# Cuda | |
wget -O - -q 'https://gist.githubusercontent.com/allenday/f426e0f146d86bfc3dada06eda55e123/raw/41b6d3bc8ab2dfe1e1d09135851c8f11b8dc8db3/install-cuda.sh' | sudo bash | |
sudo su | |
if ! dpkg-query -W cuda; then | |
# The 16.04 installer works with 16.10. | |
curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb |
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
#Authentification | |
#Notice the authorization.refresh!. | |
def get_drive_service(user) | |
authorization = Signet::OAuth2::Client.new( | |
:client_id => 'example', | |
:client_secret => 'example', | |
access_token: user.access_token, | |
refresh_token: user.refresh_token, | |
token_credential_uri: 'https://www.googleapis.com/oauth2/v3/token') | |
drive_service = Google::Apis::DriveV3::DriveService.new |