apt-get update
apt-get upgrade
apt-get install build-essential
| <?php | |
| namespace AppBundle\Security\Authentication\Handler; | |
| use Symfony\Component\HttpFoundation\RedirectResponse; | |
| use Symfony\Component\DependencyInjection\ContainerInterface; | |
| use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; | |
| use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface; | |
| class LoginSuccessHandler implements AuthenticationSuccessHandlerInterface |
| # -*- coding: utf-8 -*- | |
| # MIT License (c) Lhassan Baazzi <[email protected]> | |
| from collections import defaultdict | |
| from twisted.internet import reactor | |
| from scrapy import signals | |
| class CloseSpider(object): | |
| def __init__(self, crawler): |
| SomeRoute: | |
| pattern: /someroute | |
| defaults: | |
| _controller: SomeBundle:Controller:action | |
| AnotherRoute: | |
| pattern: /anotherroute | |
| defaults: | |
| _controller: FrameworkBundle:Redirect:redirect | |
| route: SomeRoute |
| { | |
| "trim_trailing_white_space_on_save": true, | |
| "ensure_newline_at_eof_on_save": true, | |
| "word_wrap": false, | |
| "color_scheme": "Packages/Github Color Theme/GitHub.tmTheme", | |
| "ignored_packages": | |
| [ | |
| "Vintage" | |
| ] | |
| } |
| var getYoutubeIdByUrl = function( url ){ | |
| var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/; | |
| var match = url.match(regExp); | |
| if(match&&match[7].length==11){ | |
| return match[7]; | |
| } | |
| return false; | |
| }; |
| ;(function(global, $) { | |
| /**** PARAMETERS BLOCK ************************/ | |
| var miniFollowersToIgnore = 0, | |
| miniFollowingToKeep = 1000, | |
| secondes = Math.floor((Math.random() * 10) + 10), | |
| enableBioFilter = false, | |
| userBioKeywords = [ | |
| 'devel', 'code', 'analysis', | |
| 'cloud', 'unix', 'tech', 'computer', | |
| '.net', 'freelance', 'guru', 'UX', |
| #!/usr/bin/python | |
| # The urlparse module provides functions for breaking URLs down into their | |
| # component parts, as defined by the relevant RFCs. | |
| from urlparse import urlparse | |
| # PARSING | |
| parsed = urlparse('http://user:pass@NetLoc:80/path;parameters?query=argument#fragment') |
Create a scrapy exporter on the root of your scrapy project, we suppose the name of your project is my_project, we can name this exporter: my_project_csv_item_exporter.py
from scrapy.conf import settings
from scrapy.contrib.exporter import CsvItemExporter
class MyProjectCsvItemExporter(CsvItemExporter):
def __init__(self, *args, **kwargs):
delimiter = settings.get('CSV_DELIMITER', ',')