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 argparse | |
| import cv2 | |
| import dlib | |
| import json | |
| import numpy | |
| import skimage | |
| from pathlib import Path | |
| from tqdm import tqdm | |
| from umeyama import umeyama |
| - hosts: all | |
| become: true | |
| tasks: | |
| - name: configure system settings, file descriptors and number of threads | |
| pam_limits: | |
| domain: <--your-username--> | |
| limit_type: "{{item.limit_type}}" | |
| limit_item: "{{item.limit_item}}" | |
| value: "{{item.value}}" | |
| with_items: |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| 豆瓣租房爬虫 | |
| Install: | |
| pip install beautifulsoup4 | |
| Usage: |
| Function Install-Scoop { | |
| New-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" ` | |
| -propertyType ExpandString ` | |
| -name "SCOOP_GLOBAL" ` | |
| -value "${ENV:PROGRAMDATA}\scoop" | |
| Invoke-WebRequest 'https://get.scoop.sh' | Invoke-Expression | |
| 'scoop install Git-with-OpenSSH Sudo Which --global' | Set-Content -path temp_script.ps1 |
| #!/bin/bash | |
| # from https://chromium.woolyss.com/ | |
| # and https://gist.github.com/addyosmani/5336747 | |
| # and https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md | |
| sudo apt-get update | |
| sudo apt-get install software-properties-common | |
| sudo add-apt-repository ppa:canonical-chromium-builds/stage | |
| sudo apt-get update | |
| sudo apt-get install chromium-browser | |
| chromium-browser --headless --no-sandbox http://example.org/ |
| -- 1. Create a new generic password entry in Keychain Access called "WHATEVER_AnyConnect_VPN" (the name in Keychain access must match that in line 39 below) with your password for the Cisco AnyConnect VPN server. | |
| -- 2. Modify values of vpnUrl and keychainKey variables | |
| -- 3. Open this script in Script Editor (both this and the above are in the Applications->Utilities folder) and "Save as.." an Application (.app) with desired name. | |
| -- 4. Open Security & Privacy System Preferences, go to Privacy, Accessibility. | |
| -- 5. Enable the above .app so it can access Accessibility | |
| -- 6. Copy and paste a nice icon on the generic Applescript icon (I used a copy of the default AnyConnect one) | |
| -- 7. Add the new .app to /Users/[yourshortname]/Applications with a shortcut to your Dock | |
| -- 8. Enjoy the fast connection with no need to enter password and increased security of not having a sensitive password stored as plain text | |
| -- 9. Run script again to close connection |
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/sh | |
| # HOST STATUS | |
| hostname="" | |
| public_ip="" | |
| # RECORD STATUS | |
| code="" | |
| value="" | |
| message="" |
telegram-scripts.js into JS consoleshowContacts() to get the list of contacts with idssaveChat(userId) where userId is the id from step 3Process can take a while, check console for progress. Occasionall FLOOD_WAIT errors are expected. Once done, browser will download the JSON file.
| """ | |
| Create train, valid, test iterators for CIFAR-10 [1]. | |
| Easily extended to MNIST, CIFAR-100 and Imagenet. | |
| [1]: https://discuss.pytorch.org/t/feedback-on-pytorch-for-kaggle-competitions/2252/4 | |
| """ | |
| import torch | |
| import numpy as np |