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
#!/usr/bin/env python | |
# coding: utf-8 | |
import os, sys, subprocess, time, re, ast | |
HOMEPATH = os.path.expanduser("~") | |
PROJECT_PATH = "{}/path/".format(HOMEPATH) | |
MOMMY_PATH = os.path.join(PROJECT_PATH, "yourpath/model_mommy") |
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 os, time, subprocess, random | |
from functools import wraps | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.support.select import Select | |
from pyvirtualdisplay import Display |
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
<!DOCTYPE xsl:stylesheet [ | |
<!ENTITY nl " "> | |
<!ENTITY nbsp " "> | |
]> | |
<xsl:stylesheet version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output method="xml" version="1.0" indent="yes" /> | |
<xsl:template match="reportdata"> | |
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" > | |
<fo:layout-master-set> |
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
<?xml version="1.0" encoding="UTF-8"?><fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> | |
<fo:layout-master-set> | |
<fo:simple-page-master master-name="letter-landscape" page-height="21.59cm" page-width="27.94cm" margin-top="1.0cm" margin-bottom="0.5cm" margin-left="0.97cm" margin-right="0.97cm"> | |
<fo:region-body margin-top="3.5cm" margin-bottom="1.0cm"/> | |
<fo:region-before extent="4.0cm"/> | |
<fo:region-after extent="1.0cm"/> | |
</fo:simple-page-master> | |
<fo:page-sequence-master master-name="DistributionPage"> | |
<fo:repeatable-page-master-reference master-reference="letter-landscape"/> | |
</fo:page-sequence-master> |
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 activate_hidden_element(html_id=None, html_name=None, driver=None): | |
action = webdriver.ActionChains(driver) | |
if html_id: | |
element = driver.find_element_by_id(html_id) | |
elif html_name: | |
element = driver.find_element_by_name(html_name) | |
action.move_to_element(element).click().perform() | |
return element | |
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, subprocess | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.support.select import Select | |
def gather(msg=None, default=None): | |
while True: |
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, subprocess | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.support.select import Select | |
def call_sp(command, *args, **kwargs): | |
sp = subprocess.Popen(command, shell=True, *args, **kwargs) | |
sp.communicate() |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Sitename</title> | |
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.4/css/bootstrap.css" rel="stylesheet"> |
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
print Category.objects.all() | |
class RangeUpdateView(UpdateView): | |
model = Range | |
template_name = 'dashboard/ranges/range_form.html' | |
form_class = RangeForm | |
x = "b" | |
# context = self.get_context_data() | |
categories = Category.objects.all() |
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
""".../patient.py""" | |
import factory | |
from factory import DjangoModelFactory, lazy_attribute | |
from faker import Faker | |
__all__ = ( | |
'Patient', | |
) |
NewerOlder