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
from django.db.models import F | |
Post.objects.filter(number_of_comments__gt=F('number_of_likes')) |
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
from django.db.models import F | |
author = Author.objects.get(name='John') | |
author.blog_posts = F('blog_posts') + 1 | |
author.save() |
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
li = [(1,2,3),(4,5,6),(7,8,9)} | |
print(list(zip(*li))) #[(1, 4, 7), (2, 5, 8), (3, 6, 9)] |
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
plugins: | |
- jekyll-sitemap |
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
Django==2.2.5 | |
django-rest-framework==0.1.0 | |
djangorestframework==3.10.3 | |
pytz==2019.2 | |
sqlparse==0.3.0 |
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 time | |
import psutil | |
import os | |
from PIL import Image | |
directory = '/home/allwin/Pictures/Wallpapers/' | |
files = os.listdir(directory) | |
for file in files: |
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
.widget-content.popular-posts | |
{ | |
font-family:Josefin Sans, serif; | |
font-size:16px; | |
background: #cae4ff ; | |
padding:10px; | |
box-shadow: 10px 10px 5px grey; | |
} | |
#Stats1.widget.Stats |
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
var nodemailer = require('nodemailer'); | |
var transporter = nodemailer.createTransport({ | |
service: 'gmail', | |
auth: { | |
user: 'mailtoallwinraju@gmail.com', | |
pass: '****' | |
} | |
}); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
* { | |
box-sizing: border-box; | |
} | |
.zoom { |
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
.fixed-header | |
{ | |
overflow: hidden; | |
position: fixed; | |
z-index: 1000; | |
top: 0px; | |
left: 0px; | |
right: 0px; | |
background:white; | |
padding:20px; |