Updated 4/11/2018
Here's my experience of installing the NVIDIA CUDA kit 9.0 on a fresh install of Ubuntu Desktop 16.04.4 LTS.
| #!/bin/bash | |
| CLUSTER_NAME={{TYPE YOUR CLUSTER NAME}} | |
| REGION={{ TYPE YOUR AWS EKS REGION NAME }} | |
| echo "AWS CLI 설치" | |
| pip install awscli --upgrade --user | |
| export PATH=$HOME/.local/bin:$PATH | |
| echo 'export PATH=$HOME/.local/bin:$PATH' >> $HOME/.zshrc |
| from bs4 import BeautifulSoup as BS | |
| import requests | |
| class BaseCrawler(object): | |
| api_url = None | |
| default_headers = { | |
| 'Accept-Language' :'en-US,en,q=0.9,vi;q=0.8', |
| # | |
| # written for Amazon Linux AMI | |
| # creates an AWS Lambda deployment package for pytorch deep learning models (Python 3.6.1) | |
| # assumes lambda function defined in ~/main.py | |
| # deployment package created at ~/waya-ai-lambda.zip | |
| # | |
| # | |
| # install python 3.6.1 | |
| # |
Updated 4/11/2018
Here's my experience of installing the NVIDIA CUDA kit 9.0 on a fresh install of Ubuntu Desktop 16.04.4 LTS.
| import socket | |
| hostname, sld, tld, port = 'www', 'integralist', 'co.uk', 80 | |
| target = '{}.{}.{}'.format(hostname, sld, tld) | |
| # create an ipv4 (AF_INET) socket object using the tcp protocol (SOCK_STREAM) | |
| client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| # connect the client | |
| # client.connect((target, port)) |
| sq2 :: Integer -> Integer -> [Integer] | |
| sq2 left divider = let a = takeWhile (<= left) [(divider+i)*i | i<-[1..9]] | |
| in if null a | |
| then 0:sq2 (left*100) (divider*10) | |
| else fromIntegral (length a):sq2 ((left - last a)*100) ((divider + fromIntegral (length a) * 2)*10) | |
| main :: IO () | |
| main = print (sqrt (2 :: Double)) >> mapM_ (putStr . show) (sq2 2 0) |
| import z3 | |
| z3.init("some_path") | |
| def flatten(v, i, j): | |
| formula = 0 | |
| for k in range(0, j - i): | |
| formula += pow(10, k) * v[j - k - 1] | |
| return formula |
| var Browser = require('zombie'), | |
| url = require('url'), | |
| fs = require('fs'), | |
| $q = require('Q'), | |
| saveDir = __dirname + '/_snapshots'; | |
| var scriptTagRegex = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi; | |
| var stripScriptTags = function(html) { |