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
def get_resume(): | |
import urllib | |
resumes = ['url1', 'url2'] | |
i = 1 | |
for resume in resumes: | |
name = 'Resume'+str(i) | |
ext = resume[-4:] | |
ext = ext.replace('.', '') |
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
Exception 'Exception' with message 'Missing catalog.' | |
in /home/aavrug/public_html/mysite/vendor/smalot/pdfparser/src/Smalot/PdfParser/Document.php:246 | |
Stack trace: | |
#0 /home/aavrug/public_html/mysite/vendor/smalot/pdfparser/src/Smalot/PdfParser/Document.php(257): Smalot\PdfParser\Document->getPages() | |
#1 /home/aavrug/public_html/mysite/controllers/components/ResumeParser.php(53): Smalot\PdfParser\Document->getText() | |
#2 /home/aavrug/public_html/mysite/vendor/mdmsoft/yii2-admin/controllers/BulkUploadController.php(769): app\controllers\components\ResumeParser->getText('/home/aavrug/...', 'pdf') | |
#3 [internal function]: mdm\admin\controllers\BulkUploadController->actionBulkResumeParser() | |
#4 /home/aavrug/public_html/mysite/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array) |
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
{ | |
"sort": [ | |
{ | |
"threshold": { | |
"order": "desc" | |
} | |
}, | |
{ | |
"last_login": { | |
"order": "desc" |
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 your tasks here | |
from __future__ import absolute_import, unicode_literals | |
from celery import shared_task | |
from mailer import Mailer | |
@shared_task | |
def sendMail(email): | |
mail = Mailer() | |
mail.send_messages(subject='My App account verification', | |
template='emails/customer_verification.html', |
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 mailer import Mailer | |
>>> def sendMail(email): | |
... mail = Mailer() | |
... mail.send_message(subject='Here',template='emails/customer_verification.html',context='',to_emails=[email]) | |
... | |
>>> sendMail('[email protected]') |
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 django.core import mail | |
from django.core.mail import EmailMessage | |
from django.template.loader import get_template | |
class Mailer: | |
""" | |
Send email messages helper class | |
""" |
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
// /etc/apache2/sites-available/site.conf | |
<VirtualHost *:80> | |
DocumentRoot "path of project directory(upto webroot/public folder)" | |
ServerName example.com | |
ServerAlias www.example.com.com | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride All | |
</Directory> |
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
For own system: | |
notify-send -i face-wink "Hello! January" | |
For remote system : | |
Login | |
export DISPLAY=:0 | |
notify-send -i face-wink "Hello! January" |
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
// Input | |
data: { | |
"1": [ | |
2047.2, | |
1512 | |
], | |
"2": [ | |
3087.2, | |
2982.91 | |
] |
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
//For image | |
[![enter image description here][1]][1] | |
[1]: https://i.stack.imgur.com/91ZSe.png | |
//For snippet | |
<!-- begin snippet: js hide: false console: true babel: false --> |