- Clean pkg cache
- Remove unused packages (orphans)
- Clean cache in /home
- remove old config files
- Find and Remove
- duplicates
- empty files
- empty directories
- broken symlinks
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
| echo "START INSTALLING PROJ, GEOS, GDAL" | |
| # Install pre-requirements | |
| echo "##################################" | |
| echo "#### Install pre-requirements ####" | |
| echo "##################################" | |
| sleep 3 | |
| sudo apt remove -y proj-bin | |
| sudo apt remove -y gdal-bin | |
| sudo apt autoclean |
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
| # Compile/install GEOS. Taken from: | |
| # http://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu#GEOS_2 | |
| cd /tmp | |
| wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2 | |
| bunzip2 geos-3.4.2.tar.bz2 | |
| tar xvf geos-3.4.2.tar | |
| cd geos-3.4.2 |
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
| task description: | |
| please, write a function that receives | |
| 1)path to file | |
| 2) string to replace | |
| 3) the new string to replace with | |
| 4) in which line in the file to replace (if empty, then replace all) | |
| I assume new string should not be same with pattern | |
| Line number it's a real number (starts from 1). For example client see in text editor this number and pass it to func. I |
Аутентификация(authentication, от греч. αὐθεντικός [authentikos] – реальный, подлинный; от αὐθέντης [authentes] – автор) - это процесс проверки учётных данных пользователя (логин/пароль). Проверка подлинности пользователя путём сравнения введённого им логина/пароля с данными сохранёнными в базе данных.
Авторизация(authorization — разрешение, уполномочивание) - это проверка прав пользователя на доступ к определенным ресурсам.
Например после аутентификации юзер sasha получает право обращатся и получать от ресурса "super.com/vip" некие данные. Во время обращения юзера sasha к ресурсу vip система авторизации проверит имеет ли право юзер обращатся к этому ресурсу (проще говоря переходить по неким разрешенным ссылкам)
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
| class SplitValue(Func): | |
| """ | |
| Usage | |
| value of exist col: '1231$asdasd$asdasd' | |
| data = YourModel.objects.all().annotate(new_col=SplitValue('exist_col', separator='$', slice_index=1)) | |
| new_col will '1231' | |
| """ | |
| function = 'SUBSTRING_INDEX' | |
| template_pre = '%(function)s(%(expressions)s, %(separator)s, %(slice_index)s)' | |
| template = '%(function)s({}, %(separator)s, %(slice_second)s)'.format(template_pre) |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 5.
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
| Арктична,"1,1а,2,3,3а,3б,4,5,5а,6,7,8,9,10,10а,11,12,12а,13,13а,14,15,15а,15б,16,16а,17,18,19,20,21,22,23,23а,24,25,26,26а,27,28,29,29а,30,31,32,32а,33,34,34а,35,36,37,38,39,39а,40,41,42,43,44,44а,45,45а,46,46а,47,48,48а,49,50,51,51а,52,52а,53,54,55,55а,56,57,57а" | |
| Арсенальна,"1,2,3,4,5,6,7,8,9,10,11,11а,12,13,14,15,16,16а,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,36а,37,37а,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,56а,57,58,59,60,60а,61,61а,62,62б,63,64,65,66,67,68,69,70,71,72,73,74,75,75-2,76,76а,77,78,79,80,81,81а,82,83,83а,84,85,86,87,88,89,89а,90,91,92,93,94,95,96,97,98" | |
| Астраханська,"1,2,3,4,5,6,7,8,9,10,11,12,13,13а,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,29-2,29-3,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46" | |
| Агрономічна,"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34" | |
| Архітектурна,"1,2,3,4,5,6,6а,7,8,9,10,11,12,13,13б,14,15,15а,16,17,17а,18,19,20,21,22,23,24,25,26,26-2,27,28,28а,29,30,31,32,33,33а,34,35,36,37 |
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
| /** | |
| * Create a global getSVG method that takes an array of charts as an | |
| * argument | |
| */ | |
| /*global Highcharts, HighchartsAdapter, document, window, Math, setTimeout */ | |
| jQuery(document).ready(function ($) { | |
| $(function () { | |
| var ajaxDiv = '<div class="custom-ajax ajax-progress ajax-progress-throbber"><div class="throbber"> </div></div>'; |
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
| import time | |
| from selenium import webdriver | |
| driver = webdriver.Firefox() | |
| driver.get('https://www.google.com/recaptcha/api2/demo') | |
| captcha_frame = driver.find_element_by_css_selector('iframe[src*="api2/anchor"]') | |
| driver.switch_to_frame(captcha_frame) | |
| driver.find_element_by_css_selector('.recaptcha-checkbox-checkmark').click() |
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
| from PyQt4 import QtCore, QtGui | |
| class Dialog(QtGui.QDialog): | |
| def __init__(self, parent=None): | |
| super(Dialog, self).__init__(parent) | |
| self.resize(300,200) | |
| def showEvent(self, event): |