This file contains 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
Show hidden characters
"token": "", |
This file contains 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/sh | |
# Install brew | |
# Tested on macbook pro 15 2014 w/gt750m | OS X 10.11.6 | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Install XCode 7.3 from the App Store (tested) | |
# Install XCode command line tools | |
xcode-select --install | |
brew install git | |
# Install CUDA toolkit 8.0 release candidate | |
# Register and download from https://developer.nvidia.com/cuda-release-candidate-download |
This file contains 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
# -*- coding: utf-8 -*- | |
""" | |
Скрипт для скачивания музыки с сайта vkontakte.ru (vk.com) | |
Запуск: | |
python vkcom_audio_download.py | |
Принцип работы: | |
Скрипт проверяет сохраненный access_token. Если его нет или срок истек, | |
то открывается страница в браузере с запросом на доступ к аккаунту. |
This file contains 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
### Драйвера Drivers на asus USB-N13 и tp link WN823 для ubuntu 16.04 | |
### http://askubuntu.com/questions/290452/installing-workaround-realtek-drivers-for-edimax-but-getting-error | |
### https://github.com/dz0ny/rt8192cu | |
git clone https://github.com/dz0ny/rt8192cu.git | |
cd rt8192cu | |
sudo make dkms | |
# Then, to unload the built-in driver that doesn't work (rtl8192cu) and load your new driver (8192cu) | |
sudo modprobe -r rtl8192cu | |
sudo modprobe 8192cu | |
# To keep using your new driver instead of the built-in one, add this to the end of /etc/modprobe.d/blacklist.conf |
This file contains 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
#ubuntu 16.04 gtx1080 caffe | |
sudo apt-get install build-essential | |
./cuda_8.0.27_linux.run -extract=~/Downloads/nvidia_installers; | |
sudo ./cuda-linux64-rel-8.0.27-20733550.run | |
sudo ./cuda-samples-linux-8.0.27-20733550.run | |
test if the drivers are working by going to your sample directory | |
cd /usr/local/cuda/samples | |
# sudo chown -R <username>:<usergroup> . |
This file contains 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
# -*- coding: utf-8 -*- | |
import urllib, urllib2, json, requests, time, os | |
from urllib import urlretrieve | |
import pandas as pd | |
import numpy as np | |
from time import strftime | |
# https://oauth.vk.com/authorize?client_id=666%display=page&scope=groups,friends&response_type=token&v=5.80 | |
vk_token = "" |
This file contains 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
1. Repartition new card to have two partitions. The first one exactly the same type and size as /boot, and the second one using the rest of the card as type Linux. | |
gparted 64mib fat32 sda1 | |
gparted ext4 sda2 | |
2. dd if=/dev/mmcblk0p6 (whatever /boot is) of=/dev/sda1 (the first partition on the new card) | |
3. mkfs -t ext4 /dev/sda2 (the new Linux partition) | |
4. mount -t ext4 /dev/sda2 /mnt | |
5. rsync -ax --progress / /mnt | |
5.1 if readonly fs fsck -n -f | |
6. nano /mnt/etc/fstab and change /boot and / to mmcblk0p1 and mmcblk0p2 respectively. |
This file contains 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
import os | |
from multiprocessing import Pool | |
import glob | |
def mk_3_rotate(filename): | |
os.system("convert -rotate 90 {0} 90_{0}".format(filename[1])) | |
os.system("convert -rotate 180 {0} 180_{0}".format(filename[1])) | |
os.system("convert -rotate 270 {0} 270_{0}".format(filename[1])) | |
if __name__ == '__main__': |
This file contains 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
import os, shutil | |
from multiprocessing import Pool | |
def get_img_path(folder): | |
return (os.path.join(folder, f) | |
for f in os.listdir(folder) | |
if 'jpg' in f) | |
name = 'obj' | |
def rename_move(filename): |
This file contains 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
# Install | |
# via http://askubuntu.com/questions/510056/how-to-install-google-chrome | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' | |
sudo apt-get update | |
sudo apt-get install google-chrome-stable | |
# Update |
OlderNewer