Skip to content

Instantly share code, notes, and snippets.

View saileshkush95's full-sized avatar

Sandeep Kushwaha saileshkush95

View GitHub Profile
# -*- coding: utf-8 -*-
#
# Dueling Dogs Documentation documentation build configuration file, created by
# sphinx-quickstart on Tue Mar 08 09:49:04 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
{% extends "!layout.html" %}
{% block footer %} {{ super() }}
<style>
.wy-nav-content { max-width: none; }
</style>
{% endblock %}
@saileshkush95
saileshkush95 / split_datetime_field.py
Last active May 8, 2020 09:49 — forked from toshism/gist:1571984
django split datetime fields
#models.py
class Activity(models.Model):
name = models.CharField()
start = models.DateTimeField()
end = models.DateTimeField()
#forms.py
# index.html
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<script data-require="jquery@2.1.1" data-semver="2.1.1"
src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
1. To copy files between your computer and your instance you can use an FTP service like FileZilla or the command scp which stands for secure copy.
2. To use scp with a key pair use the following command: scp -i path/to/key file/to/copy user@ec2-xx-xx-xxx-xxx.compute-1.amazonaws.com:path/to/file.
3. To use it without a key pair, just omit the flag -i and type in the password of the user when prompted.
4. To copy an entire directory, add the -r recursive option: scp -i path/to/key -r directory/to/copy user@ec2-xx-xx-xxx-xxx.compute-1.amazonaws.com:path/to/directory.
Example:
scp -i /Users/macbook/Documents/SandeepPythonDev.pem -r /Users/macbook/Desktop/KathmanduCottege sandeep@ec2-18-225-31-223.us-east-2.compute.amazonaws.com:/home/sandeep/DevOps/PythonProjects
If not work use sudo
from selenium import webdriver
from selenium.webdriver.chrome.options import DesiredCapabilities
from selenium.webdriver.common.proxy import Proxy, ProxyType
import time
co = webdriver.ChromeOptions()
co.add_argument("log-level=3")
co.add_argument("--headless")
<!DOCTYPE html>
<html>
<head>
<title>Convert Div Into Image</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script src="https://files.codepedia.info/files/uploads/iScripts/html2canvas.js">