"""distutils.file_util Utility functions for operating on single files. """ import os from distutils.errors import DistutilsFileError from distutils import log # for generating verbose output in 'copy_file()' _copy_action = { None: 'copying', 'hard': 'hard linking', 'sym': 'symbolically linking' } def _copy_file_contents(src, dst, buffer_size=16*1024): """Copy the file 'src' to 'dst'; both must be filenames. Any error opening either file, reading from 'src', or writing to 'dst', raises DistutilsFileError. Data is read/written in chunks of 'buffer_size' bytes (default 16k). No attempt is made to handle anything apart from regular files. """ # Stolen from shutil module in the standard library, but with # custom error-handling added. fsrc = None fdst = None try: try: fsrc = open(src, 'rb') except OSError as e: raise DistutilsFileError("could not open '%s': %s" % (src, e.strerror)) if os.path.exists(dst): try: os.unlink(dst) except OSError as e: raise DistutilsFileError( "could not delete '%s': %s" % (dst, e.strerror)) try: fdst = open(dst, 'wb') except OSError as e: raise DistutilsFileError( "could not create '%s': %s" % (dst, e.strerror)) while True: try: buf = fsrc.read(buffer_size) except OSError as e: raise DistutilsFileError( "could not read from '%s': %s" % (src, e.strerror)) if not buf: break try: fdst.write(buf) except OSError as e: raise DistutilsFileError( "could not write to '%s': %s" % (dst, e.strerror)) finally: if fdst: fdst.close() if fsrc: fsrc.close() def copy_file(src, dst, preserve_mode=1, preserve_times=1, update=0, link=None, verbose=1, dry_run=0): """Copy a file 'src' to 'dst'. If 'dst' is a directory, then 'src' is copied there with the same name; otherwise, it must be a filename. (If the file exists, it will be ruthlessly clobbered.) If 'preserve_mode' is true (the default), the file's mode (type and permission bits, or whatever is analogous on the current platform) is copied. If 'preserve_times' is true (the default), the last-modified and last-access times are copied as well. If 'update' is true, 'src' will only be copied if 'dst' does not exist, or if 'dst' does exist but is older than 'src'. 'link' allows you to make hard links (os.link) or symbolic links (os.symlink) instead of copying: set it to "hard" or "sym"; if it is None (the default), files are copied. Don't set 'link' on systems that don't support it: 'copy_file()' doesn't check if hard or symbolic linking is available. If hardlink fails, falls back to _copy_file_contents(). Under Mac OS, uses the native file copy function in macostools; on other systems, uses '_copy_file_contents()' to copy file contents. Return a tuple (dest_name, copied): 'dest_name' is the actual name of the output file, and 'copied' is true if the file was copied (or would have been copied, if 'dry_run' true). """ # XXX if the destination file already exists, we clobber it if # copying, but blow up if linking. Hmmm. And I don't know what # macostools.copyfile() does. Should definitely be consistent, and # should probably blow up if destination exists and we would be # changing it (ie. it's not already a hard/soft link to src OR # (not update) and (src newer than dst). from distutils.dep_util import newer from stat import ST_ATIME, ST_MTIME, ST_MODE, S_IMODE if not os.path.isfile(src): raise DistutilsFileError( "can't copy '%s': doesn't exist or not a regular file" % src) if os.path.isdir(dst): dir = dst dst = os.path.join(dst, os.path.basename(src)) else: dir = os.path.dirname(dst) if update and not newer(src, dst): if verbose >= 1: log.debug("not copying %s (output up-to-date)", src) return (dst, 0) try: action = _copy_action[link] except KeyError: raise ValueError("invalid value '%s' for 'link' argument" % link) if verbose >= 1: if os.path.basename(dst) == os.path.basename(src): log.info("%s %s -> %s", action, src, dir) else: log.info("%s %s -> %s", action, src, dst) if dry_run: return (dst, 1) # If linking (hard or symbolic), use the appropriate system call # (Unix only, of course, but that's the caller's responsibility) elif link == 'hard': if not (os.path.exists(dst) and os.path.samefile(src, dst)): try: os.link(src, dst) return (dst, 1) except OSError: # If hard linking fails, fall back on copying file # (some special filesystems don't support hard linking # even under Unix, see issue #8876). pass elif link == 'sym': if not (os.path.exists(dst) and os.path.samefile(src, dst)): os.symlink(src, dst) return (dst, 1) # Otherwise (non-Mac, not linking), copy the file contents and # (optionally) copy the times and mode. _copy_file_contents(src, dst) if preserve_mode or preserve_times: st = os.stat(src) # According to David Ascher<EMAIL_ADDRESS>utime() should be done # before chmod() (at least under NT). if preserve_times: os.utime(dst, (st[ST_ATIME], st[ST_MTIME])) if preserve_mode: os.chmod(dst, S_IMODE(st[ST_MODE])) return (dst, 1) # XXX I suspect this is Unix-specific -- need porting help! def move_file (src, dst, verbose=1, dry_run=0): """Move a file 'src' to 'dst'. If 'dst' is a directory, the file will be moved into it with the same name; otherwise, 'src' is just renamed to 'dst'. Return the new full name of the file. Handles cross-device moves on Unix using 'copy_file()'. What about other systems??? """ from os.path import exists, isfile, isdir, basename, dirname import errno if verbose >= 1: log.info("moving %s -> %s", src, dst) if dry_run: return dst if not isfile(src): raise DistutilsFileError("can't move '%s': not a regular file" % src) if isdir(dst): dst = os.path.join(dst, basename(src)) elif exists(dst): raise DistutilsFileError( "can't move '%s': destination '%s' already exists" % (src, dst)) if not isdir(dirname(dst)): raise DistutilsFileError( "can't move '%s': destination '%s' not a valid path" % (src, dst)) copy_it = False try: os.rename(src, dst) except OSError as e: (num, msg) = e.args if num == errno.EXDEV: copy_it = True else: raise DistutilsFileError( "couldn't move '%s' to '%s': %s" % (src, dst, msg)) if copy_it: copy_file(src, dst, verbose=verbose) try: os.unlink(src) except OSError as e: (num, msg) = e.args try: os.unlink(dst) except OSError: pass raise DistutilsFileError( "couldn't move '%s' to '%s' by copy/delete: " "delete '%s' failed: %s" % (src, dst, src, msg)) return dst def write_file (filename, contents): """Create a file with the specified name and write 'contents' (a sequence of strings without line terminators) to it. """ f = open(filename, "w") try: for line in contents: f.write(line + "\n") finally: f.close()


Road Trip Hero
Be Your Own Hero
Road Trip Hero
Trip Planner
Map
Contact Us
Log Out
<<<<<<< HEAD
Trip Name: Going to Disney!
Overall Safety Rating: 72%
=======
Be Your Own Hero!
Overall Safety Rating: 74%
>>>>>>> 1bc0474d01a62f60f560faa3c83e14ce825f1be7
route from
Destination:
Number of stops: 10
Submit


{% extends "base.html" %} {% block stuff %}
Sorry! Your user role does not allow you to view this page!
Create new user for Genomics-Status with the specified permissions.
Enter user email (only scilifelab addresses).
Optionally add permissions
Modify existing user in Genomics-Status.
The user must re-login to Genomics-Status after their profile has been modified for the changes to be reflected.


Responsive Text
A jQuery plugin to set font sizes responsively based on its' container width. Use jQuery responsiveText to have scalable headlines, build
responsive tables
and more!
Download on Github
Scrollable Responsive Text
Scrollable Responsive Text
Responsive Text
It's just awesome.
Responsive Text
It's just awesome.
Responsive Text
It's just awesome.
Another open-source project by
Gary Hepting


Vote wisely
| S/N | Logo | Name | HQ. Address |
|---|
| S/N | Picture | Name | Government Office | Political Party |
|---|
Results by Offices
| S/N | Image | Candidates | Office | No. of Votes |
|---|
| S/N | Logo | Name | HQ. Address |
|---|
| S/N | Picture | Name | Government Office | Political Party |
|---|
| S/N | Image | Candidates | Office | No. of Votes |
|---|


On-chain momentum is crossing into bullish. Prep for halvening front running here on in. Can't say what this indicator is, as it's proprietary to @AdaptiveFund, but it tracks investor momentum. The bottom is mostly likely in, anything lower will be just a wick in the macro...


My team and I built this device in partnership with our client Clinisys as part of the ECE 490/491 course. This device measures wearer's heart rate, blood oxidation, skin temperature, ambient temperature and orientation and all the data is transmitter to a host device.
We were awarded the "Ronald E & Jackie Philips Award" by the Department of Electrical and Computer Engineering at the University of Alberta for our "superior academic achievement and overall excellence in design project management". We were also nominated for the Eleven Engineering Prize.
Spawned from a particularly interesting lab where I implemented Conway's "Game of Life" using rule 30 on an FPGA board. I coded this in Python using my knowledge of music. It creates a random jingle (musically coherent) depending on which root note you pick!
Under construction, coming soon.
Under construction, coming soon.


Oh Man! It looks like you don't have
javascript
enabled! You need to enable javascript to view this webpage


Carnell-Rettgers Family History
War of 1812 Veterans
- William Addams
- James Gainer
- Jacob B Bechtel
- William High (fold3)
- 1786 - 1851
- 1809, Reading Pennsylvania Calvary [Historical and Biographical annals of Berks County, Pennsylvania, pg 785]
- 1816, Captain, Reading Calvary [Historical and Biographical annals of Berks County, Pennsylvania, pg 785]
- 1841, Brigadier General, 2nd Brigade, 6th Division, Pennsylvania Militia [Description of the Borough of Reading, pg 61]
- John Seltzer
- Thomas Christ
- James William Josey
- John Hartenstine (fold3)
- Christian Bechtel (fold3)
- 1786-1839
- Findlay's Battalion, Pennsylvania Volunteers [War of 1812 Service Records]
- Pvt


--- layout: post title: 'Luke Murray is kicking off MobileX in Lexington #mxlex' date: 2010-04-16 14:09:19.000000000 -07:00 type: post published: true status: publish categories: [] tags: [] meta: {} author: ---


(\x -> "Blog")
Home
About
Which country is more American?
Loading
OR
Loading
Equally American!
Skip!
Images licensed from the Wikimedia Foundation under a
creative commons license.
.


--- layout: default title: MAYDAY.US - Elect Jamie Raskin to reform Congress permalink: elect-jamie-raskin/volunteer/ hideMenus: true hideHeaderSignUp: true meta_content: |
We are back in electoral politics, with new vision. And we need your help.
Our first race is in Maryland, in one of the most important congressional races this cycle.
We’re backing Jamie Raskin, one of the most effective leaders in Maryland because he consistently puts the people over special interests.
He’s relying on grassroots support; the majority of his money comes from voters in Maryland. Meanwhile, his opponent is raising Big Money from interests in DC and outside of the district she wants to represent.
We need 250 volunteers – including 40 in Maryland – to build a revolution that will carry us to victory.
Help send Jamie Raskin to Congress to fight big money from special interests!


Convert the image to grayscale:
Note: The filter property is not supported in Internet Explorer, Edge 12, or Safari 5.1 and earlier.


User Info
Name
Password
Terms and conditions!!!Terms and conditions!!!Terms and conditions!!!Terms and conditions!!!Terms and conditions!!!Terms and conditions!!!Terms and conditions!!!Terms and conditions!!!Terms and conditions!!!Terms and conditions!!!
Male
Female
Other info
Age
1
2
3
Transport
Car
Train
Buss
Other


{{message.created_at | date : "MMM d, y 'at' HH:mm"}}
The user {{message.rentee.username}} wants to rent your Thingy. You can go in 'Offers' to accept or decline the offer.
Additional comment from the user: {{message.body}}


import static
Such import statements are not supported under Java 1.4 or earlier JVMs.
import
Configure the inspection:


pyhpeimc.objects module¶
This module contains class objects for working with the specific types of network infrastructure equipment in the HPE IMC NMS using the RESTful API. These objects rely on various other functions from within this library.
-
class
pyhpeimc.objects.
IMCDev
(ip_address, auth, url)[source]¶ Bases:
object
imc_dev class takes in the ip_address which is used as the primary key to gather the following attributes for a device which as been previously discovered in the HP IMC Network Management platform.
Each instance of this class should have the following attributes
ip: The IP address used to manage the device in HP IMC description: returns the description of the device as discovered in HP IMC location: returns the location of the device as discovered in HP IMC contact: returns the contact of the device as discovered in HP IMC type: returns the type of the device as discovered in HP IMC name: returns the name of the device as discovered in HP IMC status: returns the current alarm status as discovered in HP IMC devid: returns the current devid used to internally identify the device as discovered in HP IMC interfacelist: returns the current list of interfaces for the device as discovered in HP IMC numinterface: returns a count of the number of interfaces in the interfacelist attribute vlans: returns the current vlans existing in the device as discovered in HP IMC. Device must be supported in the HP IMC Platform VLAN manager module. accessinterfaces: returns the device interfaces configured as access interfaces. Device must be supported in the HP IMC Platform VLAN manager module. trunkinterfaces: returns the device interfaces configured as trunk interfaces. Device must be supported in the HP IMC Platform VLAN manager module. alarm: returns the current unrecovered alarms as known by HP IMC. num alarms: returns a count of the number of alarms as returned by the alarm attribute serial: returns the network assets, including serial numbers for the device as discovered by HP IMC. The device must support the ENTITY MIB ( rfc 4133 ) for this value to be returned. runconfig: returns the most recent running configuration for the device as known by HP IMC. The device must be be supported in the HP IMC platform ICC module. startconfig: returns the most recent startup configuration for the device as known by HP IMC. The device must be supported in the HP IMC platform ICC module. ipmacarp: returns the current device maciparp table as discovered by HP IMC.
The imc_dev class supports the following methods which can be called upon an instance of this class
getvlans: This method executes the getvlans function on the specific instance of the imc_dev object and populates the return into the self.vlans attribute. Devices must be supported in the HPE IMC Platform VLAN Manager module addvlan: This method executes the addvlan function on the specific instance of the imc_dev object. Devices must supported in the HP IMC Platform VLAN Manager module.
-
addvlan
(vlanid, vlan_name, auth, url)[source]¶ Function operates on the IMCDev object. Takes input of vlanid (1-4094), str of vlan_name, auth and url to execute the create_dev_vlan method on the IMCDev object. Device must be supported in the HPE IMC Platform VLAN Manager module. :param vlanid: str of VLANId ( valid 1-4094 ) :param vlan_name: str of vlan_name :param auth: requests auth object #usually auth.creds from auth pyhpeimc.auth.class :param url: base url of IMC RS interface #usually auth.url from pyhpeimc.auth.authclass :return:
-
delvlan
(vlanid, auth, url)[source]¶ Function operates on the IMCDev object. Takes input of vlanid (1-4094), auth and url to execute the delete_dev_vlans method on the IMCDev object. Device must be supported in the HPE IMC Platform VLAN Manager module. :param vlanid: str of VLANId ( valid 1-4094 ) :param auth: requests auth object #usually auth.creds from auth pyhpeimc.auth.class :param url: base url of IMC RS interface #usually auth.url from pyhpeimc.auth.authclass :return:
-


Growdrop
You have loading... DAI
You have loading... Kyber DAI
You have loading... SimpleToken
SimpleToken uniswap eth pool : loading... ETH
SimpleToken uniswap token pool : loading...
Beneficiary: 0x....
Funding Start Time: 0
Funding End Time: 0
New token amount: 0
All balance (funds + interests to cdai) : 0
All Funds: 0
Your current balance (funds + interests to cdai) : 0
Your funds: 0
Your minted events
Your redeemed events
Investor: 0x....
Investor's current balance: 0
Investor's funds: 0
Investor's current interests: 0
Investor's current interest rate: 0
Investor's current new token amount: 0
When : 0
Current Amount : 0
When :
Current Amount : 0
Hint: open the browser developer console to view any
errors and warnings.


Last updated: 2020-08-07
1. Introduction
Thank you for buying our courses. We ensure that our users have a rewarding experience while they discover, assess, and purchase our courses, whether it is an instructor-led or self-paced training or E-Books. As with any online purchase experience, there are terms and conditions that govern the Refund Policy. When you buy a training course on https://www.gogoodlearn.com/, you agree to our Privacy Policy, Terms and Conditions Policy, Disclaimer Policy, Refer and Earn Policy and Refund policy. However, if for any reason your expectations are not met, please note our Refund policy which is as follows:
2. Online Instructor Led Courses
GoGoodLearn Technology LLP reserves the right to postpone/cancel the course or we may ask you to change the course batch because of insufficient enrollments, instructor illness or force measure events (like floods, earthquakes, political instability etc.).
2.1 CANCELLATION BY GOGOODLEARN TECHNOLOGY LLP
If GoGoodLearn Technology LLP cancels a course, a 100% refund will be paid.
2.2 CANCELLATION BY CUSTOMER
Customer can cancel a course by placing a refund request, within 7 days of purchase of the course, 20% of the total paid fee will be deducted and the remaining amount will be refunded to the customer.
No refund will be issued if customer request it after the 7-day of your purchase of the course.
You can request a refund by email at<EMAIL_ADDRESS>At our discretion, if we believe you are abusing our refund policy, we reserve the right to ban your account and restrict all future use of our Services.
Note: All the approved refund will be paid within 15-20 business days from the date of the approval being granted by the Company.
3. Ebooks
NO REFUND IS ALLOWED ON EBOOK PURCHASE.
Before you go ahead and purchase an eBook, we encourage you to go through the sample chapters provided and make sure the material of the eBook is as per your expectation.
GoGoodLearn Technology LLP will not be able to refund the eBooks due to the electronic nature of the content, though we can re-issue the same eBook in case you receive it in damaged condition.


 Not only is the coffee quality exquisite, Stella’s boasts one of the most carefully-named drink menus I’ve ever had the pleasure of coming across. The menu is organized in categories that include The Classics, The Lost Generation, Cavalier Poets, Stream of Consciousness, Gothic Drama, Hypertextual, Transcendentalists, The Beat Poets, and more. The drink names also don’t disappoint. There’s quirky, poetic names like the “New Hampshire Communist Latte” and “Willows in the Wind”. Logophiles rejoice!
Come for the warm atmosphere, the ample table workspace, the rotating selection of local art, and the full restaurant menu that’s available from the cafe side. Yes, the dark mahogany walls, mellow lighting, and pleasant ambience may be so calming that you become a tad drowsy. But fret not. The coffee will keep you awake.
Gimme! Coffee
430 N Cayuga St. 506 W State St
It’s hard to imagine Ithaca without Gimme! Coffee. Gimme! has consistently been voted the best coffee in New York State, and for good reason. This coffee shop does the classics right. The coffee is full and bold and velvety and so, so good in latte or espresso form or anything in between.
Gimme! is too good to just be in one location. And thank goodness for that. The ambience in Gimme!’s locations is as rich and distinct as the coffee. Gimme!’s interiors in both locations boast bold, minimalistic furnishings, a rotating selection of local art, and an interesting workspace. The windows and sidewalk benches at the Cayuga Street location are perfect for people watching. The State Street location is mellow and expansive and has an array of large wooden communal tables. Gimme! is always abuzz with activity, but the atmosphere is just the right balance, a mix between the lively conversations and the quiet hum of productivity.
It seems that wherever I am, Gimme! is always waiting around the corner like an old friend. And it’s a lovely thing.
The Shop
312 E Seneca St
I am infinitely fond of The Shop. The space is bright and charming and unapologetically quirky. There’s pastel accents, interesting patterns on the ceilings, colorful tiling, cheery yellow walls and never a shortage of little details to notice. There are fairy lights and plants and ample outlets, a varied selection of baked goods and breads, and even a tattoo parlor tucked away at the end of the space. The menu features delightful typography from next-door neighbor Standard Art and Supply. And of course the Gimme! coffee that’s served is delicious.
Come here on a bright Sunday afternoon and bask in the sunlight that floods through the windows and look at the hanging plants casting intricate shadows on the walls. Or sit outside on the pastel chairs in the front of the brick building as dusk falls and watch TCAT buses sleepily drive by. Slowly sip on your latte and think of how thankful you are that this gem of a coffee shop exists.


TNEnvironment
open class TNEnvironment
extension TNEnvironment: CustomStringConvertible
Undocumented
-
Undocumented
Declaration
Swift
public static var current: TNEnvironment!
-
Undocumented
Declaration
Swift
public static func set(_ environment: TNEnvironmentProtocol)
-
Undocumented
Declaration
Swift
public init(scheme: TNURLScheme, host: String, suffix: TNPath?, port: Int?, configuration: TNConfiguration? = nil)
-
Undocumented
Declaration
Swift
public convenience init(scheme: TNURLScheme, host: String)
-
Undocumented
Declaration
Swift
public convenience init(scheme: TNURLScheme, host: String, configuration: TNConfiguration)
-
Undocumented
Declaration
Swift
public convenience init(scheme: TNURLScheme, host: String, port: Int)
-
Undocumented
Declaration
Swift
public convenience init(scheme: TNURLScheme, host: String, port: Int, configuration: TNConfiguration = TNConfiguration())
-
Undocumented
Declaration
Swift
public convenience init(scheme: TNURLScheme, host: String, suffix: TNPath)
-
Undocumented
Declaration
Swift
public convenience init(scheme: TNURLScheme, host: String, suffix: TNPath, configuration: TNConfiguration = TNConfiguration())
-
Declaration
Swift
public var description: String { get }


area stats
more_vert
about
legal
home
home
inbox
areas
inbox
on day
help_outline
Help
-
Select Area Name
fsbo
frbo
ByOwner Type
Area State
Area Name
Note: sent counts are updated 24hrs behind export counts. Therefore it is normal for today's sent count to equal 0.
Also, be aware that 'Sent' stat collecting did not begin until 6-Apr-2018
Select State and/or Area Name
Week
Month
All Time
Date Range


three.js
- Bloom pass by
Prashant Sharma
and
Ben Houston
Model:
Primary Ion Drive
by
Mike Murdock
, CC Attribution.


I know this might have been posted before, but I couldn't find it anywhere (might have overlooked a few threads, though, they come in quite significant numbers).
Just wanted to know if the Self Concealment series of feats actually applies VS spellcasting as well. I'm somewhat certain I've seen this posted before in one of syrath's builds, but again I couldn't find that one either.
I know the 50% miss chance holds up as far as combat goes, but does Self Concealment I,II,III,IV, and V apply to getting targeted by a spellcaster too? That is, do they get 50% failure, as they would against a creature with improved invisibility?
-Caz
I'm pretty sure it applies vs touch attacks, including touch attack spells. And in some add-ons, ranged touch spells.
But it won't make spells which are auto-hit (and most spells are) miss. Ie, magic missiles won't miss. _________________ Experience is the mother of good judgement; bad judgement is the father of experience.
I see, thanks for the tip.


--- notes: | To ask for memorable dates, like dates of birth, use text fields for users to complete. Use 3 fields as it’ll be easier for you to validate each part rather than trying to review a single field. Don’t automatically tab users between fields because this can clash with normal keyboard controls and confuse people. Calendar controls (visual calendars which can be used to select dates) aren’t particularly useful for known dates and some users struggle to select date boxes. **Triggering the iPhone numeric keyboard** To trigger the numeric keyboard on iPhones, add a pattern attribute to the input element like this: pattern="[0-9]*" ---


Mathematician develops model to control spread of aquatic invasive species
| Source: | University of Tennessee at Knoxville |
| Summary: | Adjusting the water flow rate in a river can prevent invasive species from moving upstream and expanding their range. An applied mathematician has developed a partial differential equation model to find the desired flow rate to reduce invasive populations. |
Adjusting the water flow rate in a river can prevent invasive species from moving upstream and expanding their range. An applied mathematician at UT has developed a partial differential equation model to find the desired flow rate to reduce invasive populations.
The model is detailed in a new paper by Suzanne Lenhart, Chancellor's Professor and James R. Cox Professor of Mathematics, published in Mathematics.
"Invasives pose a serious threat to native habitats and species, especially in aquatic environments," said Lenhart. "Using optimal control techniques in a model with realistic hydrology features, we illustrated how to adjust the flow rate in a river to keep an invasive species from moving upstream."
Mathematical models like the PDE model in this study, which represents an invasive population in a river, can give insight into new management strategies. Current strategies to prevent upstream expansion of invasive species include electric fences or nets in the river, but these are not the only management actions that can be taken.
River flow affects species survival success in habitats. Lower flow rates increase the chance of a species persisting, and higher flow rates inhibit success by limiting the species's range and chance of survival. This study investigates how water discharge rates, controlled by water release mechanisms like dams, can force the invasive populations downstream while minimizing the cost of management.
"With our model, we show how far the invasive population moves upstream with no control, constant control, and optimal control of water discharge," said Lenhart. "As expected, the populations with no control are able to move further upstream, and we can manipulate the control levels to find the desired flow rate."
"In the future, we hope to apply these results with new data to a particular invasive species like Asian carp," said Lenhart.
make a difference: sponsored opportunity
Story Source:
Materials provided by University of Tennessee at Knoxville.
Note: Content may be edited for style and length.
Journal Reference:
- Rebecca Pettit, Suzanne Lenhart. Optimal Control of a PDE Model of an Invasive Species in a River. Mathematics, 2019; 7 (10): 975 DOI: 10.3390/math7100975
Cite This Page:
| MLA | University of Tennessee at Knoxville. "Mathematician develops model to control spread of aquatic invasive species." ScienceDaily. ScienceDaily, 21 November 2019. <www.sciencedaily.com/releases/2019/11/191121121742.htm>. |
| APA | University of Tennessee at Knoxville. (2019, November 21). Mathematician develops model to control spread of aquatic invasive species. ScienceDaily. Retrieved November 21, 2019 from www.sciencedaily.com/releases/2019/11/191121121742.htm |
| Chicago | University of Tennessee at Knoxville. "Mathematician develops model to control spread of aquatic invasive species." ScienceDaily. www.sciencedaily.com/releases/2019/11/191121121742.htm (accessed November 21, 2019). |


Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communications protocol that provides an identification and location system for computers on networks and routes traffic across the Internet.
In computing, Ceph is a free-software storage platform, implements object storage on a single distributed computer cluster, and provides interfaces for object-, block- and file-level storage.
Docker is a software technology providing operating-system-level virtualization also known as containers, promoted by the company Docker, Inc.[6] Docker provides an additional layer of abstraction and automation of operating-system-level virtualization on Windows and Linux.
Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications.
All sites you make with Mobirise are mobile-friendly. You don't have to create a special mobile version of your site.
A storage area network (SAN)[1] is a network which provides access to consolidated, block level data storage.
Network-attached storage (NAS) is a file-level computer data storage server connected to a computer network providing data access to a heterogeneous group of clients.
A web hosting service is a type of Internet hosting service that allows individuals and organizations to make their website accessible via the World Wide Web.
Kernel-based Virtual Machine is a virtualization infrastructure for the Linux kernel that turns it into a hypervisor.
OpenStack is a free and open-source software platform for cloud computing, mostly deployed as infrastructure-as-a-service, whereby virtual servers and other resources are made available to customers.


This was my first Javascript project and at the time, was extremely tough. I really like the style and how it came out.
This was my first JQuery/Javascript project. This felt a little easier but was still tough learning JQuery.
I was extremely proud of this project. This was my first project where I felt confident and I felt like I knew what I was doing.
This was my first API Project. Felt very confident but this was also a easy API to work.
This was my first project using Google's Firebase. Was great to work on but was very much a MVP project to help with priorities.
My first project working in a group through this class. I was the Product Owner for this project and also owned the task coding.
This was my first Node.js project where I built a LIRI application.
This was my first project MySql experience using Node.js.
This was my second project using Node.js and my first using Express and building an API with routing


Today, I’ll superficially explain and reflect on raymarching and pathtracing; the two main algorithms behind the rendering pipeline that I came up with when developing idyll, a fractal engine.
Ray: simple structure composed of two \(n\) dimensional vectors: an origin vector, which indicates at which point in space the ray originates, and a unit direction vector, which denotes the direction in which the ray will move.
Geometry: any independent model, shape or object present in the scene.
Scene: \(n\) dimensional space in which the geometry is represented.
Raymarching is a raycasting-based algorithm used to interpret a scene.
The algorithm itself doesn’t compute lighting, shadowing nor reflections on its own; it merely provides information about whether a ray emitted from a pixel does or doesn’t intersect the surface of the geometry in the scene. In other words, it computes how far away the geometry is from a view matrix. However, with this information and some slight modifications, one can calculate all sorts of interesting stuff, such as ambient occlusion, the normal vector of a point in the geometry’s surface, or shadowing.
Assume that we’re working in 3-dimensional space; in order to perform raymarching, we need a function that tells us how far away is any given point in space from the closest point to the surface of the geometry. That’s called a distance estimator—DE from now on.
The most basic DE functions represent primitive objects. This is a fantastic article by Íñigo Quílez on them.
Here’s the DE function for a sphere \(sphereDE\), where \(P\) is the point in space we’re calculating how far apart from the sphere is, and \(S\) is the scale of the sphere (assuming the sphere is located at the origin of coordinates):
\[ sphereDE(P, S) = length(P) - S\]
double sphereDE(vector3 P, double S) {
return length(P) - S;
}
Once you know how far away from something you are, you know you can safely move that distance in any direction, without having to worry about prematurely intersecting the geometry.
Let a camera be placed anywhere in the scene with a distance of 10 meters from the origin of coordinates (0, 0, 0) and be looking toward it.
Let a ray have its origin (ori) at the position of the camera in the scene, and give it a direction as a normalized vector (dir), which should be obtained from the view matrix.
Let the variable (tDist) represent how far away has the ray moved from its origin. Initialize it to zero.
Now, calculate the DE from the point ori (the origin of the ray).
It is safe to march the ray by the distance returned by the DE function; add DE(ori) to tDist, and use the expression DE(ori + dir * tDist) from now on.
Repeat this process by computing the DE for ori + dir * tDist until it returns a value smaller than a certain arbitrary threshold (1e-4, for instance), meaning that the ray is close enough to the surface of the geometry for it to be considered an intersection. Obviously, the ray won’t get to hit the geometry itself because of Zeno’s paradox; it’s an arbitrarily accurate estimation, hence the name distance estimator.
This process should be computed for each pixel on the screen, and it’ll provide an accurate interpretation of the geometry, no matter how complex it may be.
The pseudocode for the simplest version of this algorithm would look something like the following:
// distance threshold
const double MIN_DISTANCE = 1e-4
/*
* the maximum number of steps allowed.
* if this amount of steps, 'raymarch'
* will return 0.0
*/
const int MAX_STEP = 64
color raymarch(vector3 ori, vector3 dir) {
double tDist = 0.0
int i
for (i = 0; i < MAX_STEP; ++i) {
double curDist = sphereDE(ori + dir * tDist)
// in case the threshold is reached
if (curDist < MIN_DISTANCE) {
break
}
// else, add the marched distance
// to the distance variable
tDist += curDist
}
return color(1.0 - (double)i / (double)MAX_STEP)
}
This is a very simple implementation, and if we were to use the returned value from this function as the value for the three color channels of each pixel, we would get a black and white image with some very obvious banding artifacts (since we’re deriving the return value from two integers).
There’s a lot of things regarding DEs I’ve left out of this explanation because they’re beyond the scope of this article, such as primitive shapes transformation and combination (somewhat similar to intersection boolean operations), spatial transforms, and, my favorite, modular repetition, among many others. Slightly modifying the DE for the geometry will dramatically alter its end result.
The following is not vital to understand raymarching; however, it is a basic implementation detail. To calculate a pixel’s ray direction given a screen resolution \(width\) and \(height\) and a desired field of view \(fov\), I use the following expression:
Let the constant \(P_x\) be equal to the pixel x-coordinate on the screen.
Let the constant \(P_y\) be equal to the pixel y-coordinate on the screen.
Let the constant \(width\) be equal to the screen’s width in pixels.
Let the constant \(height\) be equal to the screen’s height in pixels.
\[rayDirection(P_x, P_y) = [x, y, -z]\] \[x = P_x + 0.5 - \frac{width}{2}\] \[y = P_y + 0.5 - \frac{height}{2}\] \[z = \frac{height}{tan(\frac{fov}{2})}\]
This expression comes in handy when using a fragment shader on a quad to render a scene.
As long as one can derive a function that, for any given point in 3d space, returns its distance from the closest point to any geometry in the scene, one can render pretty much anything with a great performance. Adding dynamic lighting, shadowing, occlusion and surface color would have a very low computational cost. Even changing the geometry’s scale, position and rotation. Anything is valid, because everything is dynamic and computed in real time.
Raymarching is not mainstream in the videogame industry, and the reason for this is that a DE function is required; and in order for it to run in real time, the whole scene should to be computed in a fragment shader on the GPU side. When dealing with a world with hundreds of independent entities interacting with each other, materials to be computed, and very specific and complex geometrical shapes, it becomes counterproductive to have an efficient DE at the core of the rendering pipeline.
On the other hand, whenever the geometry can be expressed through a distance estimator, raymarching is, by far, the most elegant and efficient technique. This makes raymarching the ideal method to render complex mathematical models, such as fractals.
It could be said that pathtracing derives from raytracing. However, the differences between these terms can be confusing and we’ll deal with them later in this article. As for now, I’ll briefly explain what pathtracing is all about.
There are two main constants to define when implementing a pathtracing algorithm: samples per pixel and bounces per ray.
The idea behind pathtracing is to iteratively integrate most of the light arriving to a point in the surface of the geometry, so that the image looks as real as possible. To visualize it, this is the pseudocode for a very basic pathtracing algorithm (only Lambertian reflection):
// number of samples per pixel
const int SAMPLES = 256
// maximum number of allowed ray bounces
const double BOUNCES = 8;
// probability of ray reflection
const double PROB = 1/PI
// pathtracing recursively
color pathtrace (ray r, int bounces) {
// in the ray missed
if (!r.hit) return color(0.0)
// in case we reached max number of bounces
if (bounces == BOUNCES) return color(0.0)
// get ray normal
vector3 rayNormal = calculateNormal(r.origin, r.direction)
// get current new ray origin
vector3 newOrigin = r.origin + r.length * r.direction;
// get random unit vector in the hemisphere
// of the normal, so that the ray can bounce off
vector3 newDir = getHemisphereRandom(rayNormal)
// get color at the intersected point
color color = getWorldColor(r.origin)
// bidirectional reflectance distribution function
double ct = dot(newDir, rayNormal)
color brdf = r.hitReflectance / PI
ray newRay = {newOrigin, newDir}
color nextBounce = pathtrace(newRay, bounces + 1)
// this is where the integration of
// the lighting along the different
// intersection points of the ray
// happens
return color + (brdf * nextBounce * ct / PROB)
}
// iterate through every pixel in the screen
for (y in height) {
for (x in width) {
// get ray's direction and origin
vector3 direction = rayDirection(x, y)
vector3 origin = {0, 0, 10.0}
// variable storing color
color totalColor = {0.0, 0.0, 0.0}
// iterate for every sample and add to color
for (sample in SAMPLES) {
totalColor += pathtrace(origin, direction, 0)
}
}
color /= samples
pixels[y][x] = color
}
What’s happening here is the following:
With a high enough value for the samples and bounces variable, one can get very photorealistic images using path tracing.
If you’re reading this, chances are you’ve heard of raytracing, and it’s no coincidence raytracing, raymarching, and pathtracing all sound confusingly familiar.
All three of these PBR (physically based rendering) algorithms have something in common: they all use raycasting to understand a scene’s geometry, but what each one of this algorithms accomplishes, and the way they operate is different from one another. It’s also true that most researchers have slightly different understandings of these concepts, since the lines separating them are often blurry. I’ll try to shed some light regarding the differences between these techniques based on my own experience and understanding.
In raymarching, the intersection with the scene’s geometry is computed using a distance estimator, as we’ve recently seen. On the other hand, raytracing computes the intersection analitically, not requiring a DE. Coming up with a DE for a fractal or any mathematical model can be easy, but when there are many objects with different shapes, raymarching grows exponentially in price. This makes raytracing―although still pretty expensive―more suitable for games, and it’s also the reason why raytracing isn’t, and probably won’t be, the mainstream rendering technique.
That being said, raymarching is awesome; as I mentioned earlier, when used properly, it can deliver unprecedented performance on very specific applications, and its simplicity makes it very straightforward to understand, implement, and maintain.
Pathtracing is a physically based rendering (PBR) technique that relies on the monte carlo method. It integrates the amount of light arriving to a specific point in a surface of an object in the scene by averaging out different paths that the ray could take when bouncing off that surface. That’s the overall idea, but whether that point be the camera lenses or an object’s surface depends on the specific implementation.
In the case of idyll, each point of intersection from a camera ray intersecting the geometry is pathtraced to compute the amount of light arriving to that point; a combination of pathtracing and raytring.
Raymarching and pathtracing can be complementary to each other, making for a solid rendering pipeline:
With raymarching, one can check whether a ray intersects the geometry and where. Then, one can use pathtracing to integrate the global illumination arriving at the point of intersection between the surface of the geometry and the marched ray.
In idyll, pathtracing computes the global lighting, but doesn’t compute the point of intersection with the geometry. On the other hand, raymarching computes the point of intersection with the geometry, but doesn’t compute lighting. Although this is an oversimplification, since the actual relation between these two techniques is a bit more entangled.
After properly implementing these techniques, and throwing some iterative fractals into the mix, I developed idyll, a fractal engine that can create beautiful renders like the following:


OFFICE OF THE CHANCELLOR
Dear CUNY Community,
As your Chancellor, my highest priorities in charting a response to the fast-evolving coronavirus threat are to protect the health and safety of our students, faculty and staff while maintaining academic continuity and safeguarding students’ ability to finish their semester and protect their financial aid. I know that you are concerned for your own health, the health of your loved ones, and that of our communities. I also share these concerns and know they weigh heavily on all of us.
As you are probably aware, per Governor Cuomo’s comments earlier today, CUNY is implementing a comprehensive transition to distance education for the remainder of the semester, following a five-day instructional recess for pedagogical retooling that will begin tomorrow, March 12.
Our 25 campuses will remain open during and after the recess. These measures allow CUNY to continue serving its students while alleviating pressure on our area during this public health threat.
Here are the immediate implications for our campuses:
CUNY will begin an instructional recess tomorrow, Thursday, March 12, that will conclude on Wednesday, March 18. No scheduled courses will run on these days, except those of fully online programs and courses otherwise authorized by campus presidents and deans. This will allow CUNY to prepare faculty, students and staff to operate in full distance education mode.
Starting on Thursday, March 19, all instruction will resume in distance-learning mode, and will remain so through the end of the spring semester.
Colleges will remain open during the spring semester. This will include dormitories, libraries, research facilities, daycare centers and mission-critical venues that support our students. By transitioning to distance learning, CUNY will be upholding its responsibility as the largest urban public university in the country and meeting our goal of minimizing exposure to those on our campus communities to coronavirus transmission.
Last night, we learned of the novel coronavirus infection of a John Jay College of Criminal Justice student who tested positive earlier in the day but had not been back to the campus since becoming symptomatic over the weekend. Our thoughts are with the student and I know you join me in wishing her a full recovery. Health officials said the infection posed no threat to the school community, but out of an abundance of caution the school was closed today.
Please know that these kinds of operational and academic challenges are a key focus of my team’s attention through this crisis. Earlier this month, I convened a Coronavirus Task Force led by Executive Vice Chancellor and Chief Operating Officer Hector Batista and including the Dean of the CUNY School of Public Health, Dr. Ayman El-Mohandes, to serve as a command center and work hand in hand with our 25 campuses to provide systematic guidance to our community, based on the latest information from the federal, state and city health officials. If you have a specific question that is not answered in this page, you can email the task force at<EMAIL_ADDRESS>This week, we urged campuses to reconsider holding non-essential gatherings and community events of more than 50 people during the remainder of the Spring 2020 semester.
These steps are bound to pose challenges and disrupt many of our ordinary routines. I urge everyone to be patient as we make our way through these extraordinary times.
We understand there are many who are feeling heightened levels of anxiety, but as we all go about our daily lives, I suggest that you continue taking precautions to ensure the safety and wellbeing of yourself and your family and stay informed by regularly visiting CUNY.edu/coronavirus.
As much as possible, we cannot allow fears to overwhelm facts. This includes the unsubstantiated rumors that have circulated via social media alleging the spread of coronavirus on several CUNY campuses. I urge you to resist the temptation to be persuaded by information that does not come from health and government officials or the University.
I want to thank our faculty, staff and students for all of your cooperation during this challenging time. We will continue to share as much information as we can, as soon as we can, to keep you updated and apprised of any developments.
Sincerely,
Felo


Home
My Profile
Caregiver Profile
Patient Profile
Library
Cart
Limbo Rain
Review
Profile
Store
Storer
Store
Profile
In profile you will find your basic info and security verification.
Basic Info
Required fields (*)
Username
Store Name *
Email *
Phone Number
Short Description
Write brief info about your store...
Store Hours *
Sunday
‐
Monday
‐
Tuesday
‐
Wednesday
‐
Thursday
‐
Friday
‐
Sunday
‐
Password
Device Verification
You can keep track and verify all of the devices you are logged in.
MacBook Pro
This device
October 22, 2020 | 2:00 p.m.
Nokia 5
This device
October 23, 2020 | 4:00 p.m.
If you don't recognize a device remove from account and change password.


# Person
- [![badge](https://img.shields.io/badge/Optional-yellow) Property `firstName`](#firstName)
- [![badge](https://img.shields.io/badge/Optional-yellow) Property `lastName`](#lastName)
- [![badge](https://img.shields.io/badge/Optional-yellow) Property `age`](#age)
- [![badge](https://img.shields.io/badge/Optional-yellow) Property `anything`](#anything)
**Title:** Person
| Type | `object` |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| **Additional properties** | [![badge](https://img.shields.io/badge/Any+type-allowed-green)](# "Additional Properties of any type are allowed.") |
| | |
## ![badge](https://img.shields.io/badge/Optional-yellow) Property `firstName`
| Type | `string` |
| ---- | -------- |
| | |
**Description:** The person's first name.
## ![badge](https://img.shields.io/badge/Optional-yellow) Property `lastName`
| Type | `string or null` |
| ---- | ---------------- |
| | |
**Description:** The person's last name.
## ![badge](https://img.shields.io/badge/Optional-yellow) Property `age`
| Type | `integer or number` |
| ---- | ------------------- |
| | |
**Description:** Age in years which must be equal to or greater than zero.
| Restrictions | |
| ------------ | ------ |
| **Minimum** | ≥ 0 |
| | |
## ![badge](https://img.shields.io/badge/Optional-yellow) Property `anything`
| Type | `integer, string, number or null` |
| ---- | --------------------------------- |
| | |
**Description:** Ay other info you like
----------------------------------------------------------------------------------------------------------------------------
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on date


Build community helps you replicate your existing, offline community online. You can use features like Connect, Advertise, Circles, Invite People, Invite history. These features are linked to Stream It, the streaming channel for promotion and propagation. This helps you spread the word better among your community about your activities.
Invite your real world connections, friends and family to your site and store/s, In effect they will also become members of Evezown. We don’t make all our members visible to each other de-facto. We ensure complete exclusivity for your business, our aim to give privacy that you need for your growth, go ahead, safely invite your customers too.
| {{ friend.firstName }} ({{friend.email}}) |


Provides information about glideins and their HTCondor log files: easily locate stdout and stderr, print a startd log file from the Glidein execution. See below for how to use it.
gwms-logcat.sh -h./factory/tools/gwms-logcat.sh [options] LOG_TYPE LOGFILE ./factory/tools/gwms-logcat.sh [options] LOG_TYPE ENTRY [JOB_ID] ./factory/tools/gwms-logcat.sh -f URL [options] LOG_TYPE ./factory/tools/gwms-logcat.sh -r [options] LOG_TYPE JOB_ID ./factory/tools/gwms-logcat.sh -l LOG_TYPE HTCondor log to extract from the job logfile: all (all logs), master, startd, starter, startdhistory, xml LOGFILE Job log file (stderr from a glidein) ENTRY Entry name JOB_ID HTCondor job (glidein) id. By default picks the last job with a valid log file -v verbose -h print this message -l list all entries (arguments are ignored) -a list only entries that were active (has at least one job) - used with '-l', ignored otherwise -u USER to use a different user (job owner) from the default Frontend one -r Remote running jobs. pilot_launcher.log is fetched from the VM -c FNAME Factory configuration file (default: /etc/gwms-factory/glideinWMS.xml) -f URL Forward the information (to a fodler: file:///path/ via copy or a URL http:// via post)
gwms-logcat.sh can be used interactively to examin the HTCondor log files or the XML file produced by the Glideins and stored at the Factory.
Files from a Glidein running on the cloud and spinning a VM are not transferred back to the Factory but you can explore them if the VM is still running using the remote option (-r) which fetches pilot_launcher.log from the VM.
The option -f is forwarding the information in batch mode: it is processing all the desired log files to the destination directory or URL. It is also saving a checkpoint file to avoid reprocessing multiple times the same files. Ideally can be run periodically, e.g. as cron job.
gwms-logcat.sh -f /var/www/html/glidein-logs/ startd
The glidecondor_addDN script (found in the ./install directory of the GlideinWMS tree) can help to manage HTCondor mapfiles. The management of DNs and authorization to specific users can be confusing and this utility can help.
It has two usage modes:
glidecondor_addDN [options] [-daemon comment] DN_or_certfile user
glidecondor_addDN [options] -import listfile*
Where [options] is any combination of:
| -m fname | By default, the script will find the certificate_mapfile by invoking
condor_config_val CERTIFICATE_MAPFILEUse this option to specify a different file name (mostly useful for prototyping). |
| -d fname | By default, the script will put the daemon DNs into 90_gwms_dns.config in the HTCondor's LOCAL_CONFIG_DIR (obtained via condor_config_val). Use this option to specify a different file name (mostly useful for prototyping). |
| -allow-alterate | If present, the tool will look for alternate config files (e.g. condor_config.local) to put daemon DNs into. |
| -disable-checks | Without it, valid config files must already be present. |
| -recreate | By default, the tool will add to existing files. If this option is present, it will destroy any existing configuration files, and create new ones instead. |
| -allow-others | By default when -recreate is used, the new config files will override any existing DN attributes (i.e. GSI_DAEMON_NAME). If you want to preserve the settings from other config files, use this option. |
| -q | Quiet operation. |
In both operation modes, the tool will add properly encoded (DN,username) entries in the certificate mapfile. Also, if the DN is tagged as belonging to a trusted daemon, also in the DN config file.
In both modes, the DN can be the actual DN string, or a certificate from which to extract the string from. The tool will try to guess which one you are using, but you can also force it by prepending it with either dn: or file:.
The listfile contains one DN per line; lines starting with a hash (#) or that are completely empty, are ignored.
Each line must have exactly three columns, separated by any number of spaces:
user type DN_or_certfile
The DN_or_cerfile can contain spaces, and MUST NOT be quoted.
The type columns must be either daemon or client.
Example of the first type:
glidecondor_addDN -daemon "My own host certificate DN" file:/etc/grid-security/hostcert.pem condor
Example of the second type:
cat pool_dns.list# This file contains the pool DNs # Format # user type DN condor daemon file:/etc/grid-security/hostcert.pem ce2 daemon /DC=com/DC=DigiCert-Grid/O=Open Science Grid/OU=Services/CN=osg-glidein-ce-2.example.edu ce1 daemon dn:/DC=org/DC=doegrids/OU=Services/CN=osg-glidein-ce.example.edu pilot1 daemon /DC=org/DC=doegrids/OU=Services/CN=osgpilot01/osg-glidein-fe.example.gov fe1 client /DC=org/DC=doegrids/OU=Services/CN=osg-glidein-fe.example.govglidecondor_addDN -recreate -disable-checks -import pool_dns.list
The glidecondor_createSecSched script (found in the ./install directory of the GlideinWMS tree) can help manage the HTCondor's secondary schedds. It can be used when HTCondor's configuration is stored in LOCAL_CONFIG_DIR.
Usage:
glidecondor_createSecSched [-commonlog] [-nocreatedirs] scheddlist
This script will re-create the 11_gwms_secondary_schedds.config file at each invocation. The node admin can thus easily change the number of secondary schedds as needed.
By default, each secondary schedd will have its own log file.
If a shared log is desired, use -commonlog.
Please note that the tool does not try to guess what the existing config(if any) is using.
By default, the tool will create any needed directories. If you are sure the directories are already in place, e.g. beacuse you are just reducing the number of secondary schedds, you can use -nocreatedirs to speed it up.
Example:
glidecondor_createSecSched schedd_glideins1,schedd_glideins2
The glidecondor_createSecCol script (found in the ./install directory of the GlideinWMS tree) can help manage the HTCondor's secondary collectors. It can be used when HTCondor's configuration is stored in LOCAL_CONFIG_DIR.
Usage:
glidecondor_createSecCol [-useportasname] [-commonlog] portrange
This script will re-create the 11_gwms_secondary_collectors.config file file at each invocation. The node admin can thus easily change the number of secondary collectors as needed.
Since each HTCondor Daemon needs a unique name, each collector will be called COLLECTORxxx.
By default, the numbering starts with 0 for the first collector in the port range, and is incremented by one for each additional one.
If -useportasname is used, xxx is instead defined as the port number used by the collector.
Please note that the tool does not try to guess what the existing config (if any) is using.
By default, each secondary collector will have its own log file.
If a shared log is desired, use -commonlog.
Example:
glidecondor_createSecCol 9620-9639
The create_condor_tarball script (found in the ./factory/creation directory of the GlideinWMS tree) can help reduce the disk space needs on the Factory node.
It can be used to create a condor tarball for use by the GlideinWMS pilot process for various entry points. The GlideinWMS pilot does not need all the files/processes contained in a normal HTCondor tarfile. This utility extracts only the needed processes/libraries thereby reducing the space needed on your Factory node.Usage: create_condor_tarball output_filename input_tarfile_or_dir output_filename - file name of the output tarball created input_tarfile_or_dir - this is the source tarfile or if already expanded, the top level directory.Once the output condor tarball is created, additional configuration is required in the Factory configuration file. Refer to the Multiple HTCondor Tarballs section of the Factory Configuration document for details.
Example:
create_condor_tarball /tmp/condor-8.7.6 condor-8.7.6-x86_64_RedHat6-stripped.tar.gz
The tools analyze_entries,analyze_queues, and analyze_frontends exist in the factory/tools directory. They can be used to monitor recent status of the Factory, entries, and connected frontends. See Factory monitoring for more details.


Ketra's Holy Altar:
This stone sculpture is the work of artisans. It resembles a ram's head.
Destroy the Red Totem at the altar


Steve Jobs quickly left his mark on the Macintosh team. Part of his motivations were: 1. to have his own successful computer, unlike the Apple II which was Woz’s brainchild; 2. to take revenge on Apple’s management for forcing him out of the Lisa project. When he took over, the Mac team only consisted of a small number of engineers: Brian Howard, Burrell Smith and Bud Tribble, as well as a woman in marketing, Joanna Hoffman. He soon hired several other members that would later form the core of the team, such as Andy Hertzfeld, Chris Espinosa, George Crow, Steve Capps and Mike Boich. Other key players would follow later, like the brilliant software designer Bill Atkinson from the Lisa team, Mike Murray in marketing, or Susan Kare, who designed the icons and several fonts for the


Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
some code
Worldwide Consortium decides on new editions of HTML, CSS.
CanIUse.com informs you of what languages work on what browsers/UIs
Styling and javascript: separation of concerns. Want structure to be structure, design to be that, functionality to be standalone. Should not be mixed.
Table web designs: people used to design pages using tables. Bad, because tables are not responsive.
HTML5 is HTML with new additions. W3C schools is a good resource for HTML5, responsive, bootstrap, angular, everything.
Want descriptive tags. "Divitis" prevention. HTML5 makes for more descriptive HTML. Can still use divs. Semantics. Should be using semantic HTML, call things what they are.
508 compliance for web accesibility. In a nutshell, 508 compliance means that all users, regardless of disability status, can access technology. It’s a way to break down barriers and provide new opportunities for all Internet users. (reference: 508 checker.
Markup languages are distinguished by...
CSS 3 Modules: animations, selectoes, UI, text effects, 3D transformations, etc.
* In-class code-along
General Assembly, which started in New York as a startup incubator, now offers classes and workshops in technology, design, and entrepreneurship, with campuses around the world in:
Visit us at General Assembly.
Doing "Cookie Recipe" exercise, in /FEWD28/cookie-recipe.
Interesting note, instead of https in a link as so:
Can put two slashes:
* does not work when you are local.
When you minify, it optimizes and makes code faster for the web. Task runners minify nice code, get rid of comments, spaces.
If you see minified code, it's probably like that for a reason.
Review of Github
Div is a block.
Inline means within text.
For a div, height is always collapsed to the smallest of its contents. This is so it can adjust to what one puts in it, and from what a user is viewing it though.
Width is 100% by default. Websites will scroll down, so height can be challenging.
Span tags are inline, can be used to capitalize a single letter at the start of a paragraph.
Bolds have their own tag. B for bold, I for italics, but these are not used anymore. Separation of concerns and 508 appliance.
Tags are about structure, CSS is about style.
One exception not using B or I tags: I = icon now. If there is an icon, you will see I tag.
IDs are strong for specificity. Navs, main content, about pages.
.myclass > p {}
Typically seen when talking about nav.


A.4 Flow Control
Depending on how you count it, Python has about a half-dozen flow control mechanisms, which is much simpler than most programming languages. Fortunately, Python's collection of mechanisms is well chosen, with a high—but not obsessively high—degree of orthogonality between them.
From the point of view of this appendix, exception handling is mostly one of Python's flow control techniques. In a language like Java, an application is probably considered "happy" if it does not throw any exceptions at all, but Python programmers find exceptions less "exceptional"—a perfectly good design might exit a block of code only when an exception is raised.
Two additional aspects of the Python language are not usually introduced in terms of flow control, but nonetheless amount to such when considered abstractly. Both functional programming style operations on lists and Boolean shortcutting are, at the heart, flow control constructs.
A.4.1 if/then/else Statements
Choice between alternate code paths is generally performed with the if statement and its optional elif and else components. An if block is followed by zero or more elif blocks; at the end of the compound statement, zero or one else blocks occur. An if statement is followed by a Boolean expression and a colon. Each elif is likewise followed by a Boolean expression and colon. The else statement, if it occurs, has no Boolean expression after it, just a colon. Each statement introduces a block containing one or more statements (indented on the following lines or on the same line, after the colon).
Every expression in Python has a Boolean value, including every bare object name or literal. Any empty container (list, dict, tuple) is considered false; an empty string or Unicode string is false; the number 0 (of any numeric type) is false. As well, an instance whose class defines a .__nonzero__() or .__len__() method is false if these methods return a false value. Without these special methods, every instance is true. Much of the time, Boolean expressions consist of comparisons between objects, where comparisons actually evaluate to the canonical objects "0" or "1". Comparisons are <, >, ==, >=, <=, <>, !=, is, is not, in, and not in. Sometimes the unary operator not precedes such an expression.
Only one block in an "if/elif/else" compound statement is executed during any pass—if multiple conditions hold, the first one that evaluates as true is followed. For example:
>>> if 2+2 <= 4:
... print "Happy math"
...
Happy math
>>> x = 3
>>> if x > 4: print "More than 4"
... elif x > 3: print "More than 3"
... elif x > 2: print "More than 2"
... else: print "2 or less"
...
More than 2
>>> if isinstance(2, int):
... print "2 is an int" # 2.2+ test
... else:
... print "2 is not an int"
Python has no "switch" statement to compare one value with multiple candidate matches. Occasionally, the repetition of an expression being compared on multiple elif lines looks awkward. A "trick" in such a case is to use a dict as a pseudo-switch. The following are equivalent, for example:
>>> if var.upper() == 'ONE': val = 1
... elif var.upper() == 'TWO': val = 2
... elif var.upper() == 'THREE': val = 3
... elif var.upper() == 'FOUR': val = 4
... else: val = 0
...
>>> switch = {'ONE':1, 'TWO':2, 'THREE':3, 'FOUR':4}
>>> val = switch.get(var.upper(), 0)
A.4.2 Boolean Shortcutting
The Boolean operators or and and are "lazy." That is, an expression containing or or and evaluates only as far as it needs to determine the overall value. Specifically, if the first disjoin of an or is true, the value of that disjoin becomes the value of the expression, without evaluating the rest; if the first conjoin of an and is false, its value likewise becomes the value of the whole expression.
Shortcutting is formally sufficient for switching and is sometimes more readable and concise than "if/elif/else" blocks. For example:
>>> if this: # 'if' compound statement
... result = this
... elif that:
... result = that
... else:
... result = 0
...
>>> result = this or that or 0 # boolean shortcutting
Compound shortcutting is also possible, but not necessarily easy to read; for example:
>>> (cond1 and func1()) or (cond2 and func2()) or func3()
A.4.3 for/continue/break Statements
The for statement loops over the elements of a sequence. In Python 2.2+, looping utilizes an iterator object (which may not have a predetermined length)—but standard sequences like lists, tuples, and strings are automatically transformed to iterators in for statements. In earlier Python versions, a few special functions like xreadlines() and xrange() also act as iterators.
Each time a for statement loops, a sequence/iterator element is bound to the loop variable. The loop variable may be a tuple with named items, thereby creating bindings for multiple names in each loop. For example:
>>> for x,y,z in [(1,2,3),(4,5,6),(7,8,9)]: print x, y, z, '*',
...
1 2 3 * 4 5 6 * 7 8 9 *
A particularly common idiom for operating on each item in a dictionary is:
>>> for key,val in dct.items():
... print key, val, '*',
...
1 2 * 3 4 * 5 6 *
When you wish to loop through a block a certain number of times, a common idiom is to use the range() or xrange() built-in functions to create ad hoc sequences of the needed length. For example:
>>> for _ in range(10):
... print "X", # '_' is not used in body
...
X X X X X X X X X X
However, if you find yourself binding over a range just to repeat a block, this often indicates that you have not properly understood the loop. Usually repetition is a way of operating on a collection of related things that could instead be explicitly bound in the loop, not just a need to do exactly the same thing multiple times.
If the continue statement occurs in a for loop, the next loop iteration proceeds without executing later lines in the block. If the break statement occurs in a for loop, control passes past the loop without executing later lines (except the finally block if the break occurs in a try).
A.4.4 map(), filter(), reduce(), and List Comprehensions
Much like the for statement, the built-in functions map(), filter(), and reduce() perform actions based on a sequence of items. Unlike a for loop, these functions explicitly return a value resulting from this application to each item. Each of these three functional programming style functions accepts a function object as a first argument and sequence(s) as a subsequent argument(s).
The map() function returns a list of items of the same length as the input sequence, where each item in the result is a "transformation" of one item in the input. Where you explicitly want such transformed items, use of map() is often both more concise and clearer than an equivalent for loop; for example:
>>> nums = (1,2,3,4)
>>> str_nums = []
>>> for n in nums:
... str_nums.append(str(n))
...
>>> str_nums
['1', '2', '3', '4']
>>> str_nums = map(str, nums)
>>> str_nums
['1', '2', '3', '4']
If the function argument of map() accepts (or can accept) multiple arguments, multiple sequences can be given as later arguments. If such multiple sequences are of different lengths, the shorter ones are padded with None values. The special value None may be given as the function argument, producing a sequence of tuples of elements from the argument sequences.
>>> nums = (1,2,3,4)
>>> def add(x, y):
... if x is None: x=0
... if y is None: y=0
... return x+y
...
>>> map(add, nums, [5,5,5])
[6, 7, 8, 4]
>>> map(None, (1,2,3,4), [5,5,5])
[(1, 5), (2, 5), (3, 5), (4, None)]
The filter() function returns a list of those items in the input sequence that satisfy a condition given by the function argument. The function argument must accept one parameter, and its return value is interpreted as a Boolean (in the usual manner). For example:
>>> nums = (1,2,3,4)
>>> odds = filter(lambda n: n%2, nums)
>>> odds
(1, 3)
Both map() and filter() can use function arguments that have side effects, thereby making it possible—but not usually desirable—to replace every for loop with a map() or filter() function. For example:
>>> for x in seq:
... # bunch of actions
... pass
...
>>> def actions(x):
... # same bunch of actions
... return 0
...
>>> filter(actions, seq)
[]
Some epicycles are needed for the scoping of block variables and for break and continue statements. But as a general picture, it is worth being aware of the formal equivalence between these very different-seeming techniques.
The reduce() function takes as a function argument a function with two parameters. In addition to a sequence second argument, reduce() optionally accepts a third argument as an initializer. For each item in the input sequence, reduce() combines the previous aggregate result with the item, until the sequence is exhausted. While reduce()—like map() and filter()—has a loop-like effect of operating on every item in a sequence, its main purpose is to create some sort of aggregation, tally, or selection across indefinitely many items. For example:
>>> from operator import add
>>> sum = lambda seq: reduce(add, seq)
>>> sum([4,5,23,12])
44
>>> def tastes_better(x, y):
... # some complex comparison of x, y
... # either return x, or return y
... # ...
...
>>> foods = [spam, eggs, bacon, toast]
>>> favorite = reduce(tastes_better, foods)
List comprehensions (listcomps) are a syntactic form that was introduced with Python 2.0. It is easiest to think of list comprehensions as a sort of cross between for loops and the map() or filter() functions. That is, like the functions, listcomps are expressions that produce lists of items, based on "input" sequences. But listcomps also use the keywords for and if that are familiar from statements. Moreover, it is typically much easier to read a compound list comprehension expression than it is to read corresponding nested map() and filter() functions.
For example, consider the following small problem: You have a list of numbers and a string of characters; you would like to construct a list of all pairs that consist of a number from the list and a character from the string, but only if the ASCII ordinal is larger than the number. In traditional imperative style, you might write:
>>> bigord_pairs = []
>>> for n in (95,100,105):
... for c in 'aei':
... if ord(c) > n:
... bigord_pairs.append((n,c))
...
>>> bigord_pairs
[(95, 'a'), (95, 'e'), (95, 'i'), (100, 'e'), (100, 'i')]
In a functional programming style you might write the nearly unreadable:
>>> dupelms=lambda lst,n: reduce(lambda s,t:s+t,
... map(lambda l,n=n: [l]*n, 1st))
>>> combine=lambda xs,ys: map(None,xs*len(ys), dupelms(ys,len(xs)))
>>> bigord_pairs=lambda ns,cs: filter(lambda (n,c):ord(c)>n,
... combine(ns,cs))
>>> bigord_pairs((95,100,105),'aei')
[(95, 'a'), (95, 'e'), (100, 'e'), (95, 'i'), (100, 'i')]
In defense of this FP approach, it has not only accomplished the task at hand, but also provided the general combinatorial function combine() along the way. But the code is still rather obfuscated.
List comprehensions let you write something that is both concise and clear:
>>> [(n,c) for n in (95,100,105) for c in 'aei' if ord(c)>n]
[(95, 'a'), (95, 'e'), (95, 'i'), (100, 'e'), (100, 'i')]
As long as you have listcomps available, you hardly need a general combine() function, since it just amounts to repeating the for clause in a listcomp.
Slightly more formally, a list comprehension consists of the following: (1) Surrounding square brackets (like a list constructor, which it is). (2) An expression that usually, but not by requirement, contains some names that get bound in the for clauses. (3) One or more for clauses that bind a name repeatedly (just like a for loop). (4) Zero or more if clauses that limit the results. Generally, but not by requirement, the if clauses contain some names that were bound by the for clauses.
List comprehensions may nest inside each other freely. Sometimes a for clause in a listcomp loops over a list that is defined by another listcomp; once in a while a nested listcomp is even used inside a listcomp's expression or if clauses. However, it is almost as easy to produce difficult-to-read code by excessively nesting listcomps as it is by nesting map() and filter() functions. Use caution and common sense about such nesting.
It is worth noting that list comprehensions are not as referentially transparent as functional programming style calls. Specifically, any names bound in for clauses remain bound in the enclosing scope (or global if the name is so declared). These side effects put a minor extra burden on you to choose distinctive or throwaway names for use in listcomps.
A.4.5 while/else/continue/break Statements
The while statement loops over a block as long as the expression after the while remains true. If an else block is used within a compound while statement, as soon as the expression becomes false, the else block is executed. The else block is chosen even if the while expression is initially false.
If the continue statement occurs in a while loop, the next loop iteration proceeds without executing later lines in the block. If the break statement occurs in a while loop, control passes past the loop without executing later lines (except the finally block if the break occurs in a try). If a break occurs in a while block, the else block is not executed.
If a while statement's expression is to go from being true to being false, typically some name in the expression will be re-bound within the while block. At times an expression will depend on an external condition, such as a file handle or a socket, or it may involve a call to a function whose Boolean value changes over invocations. However, probably the most common Python idiom for while statements is to rely on a break to terminate a block. Some examples:
>>> command = ''
>>> while command != 'exit':
... command = raw_input('Command > ')
... # if/elif block to dispatch on various commands
...
Command > someaction
Command > exit
>>> while socket.ready():
... socket.getdata() # do something with the socket
... else:
... socket.close() # cleanup (e.g. close socket)
...
>>> while 1:
... command = raw_input('Command > ')
... if command == 'exit': break
... # elif's for other commands
...
Command > someaction
Command > exit
A.4.6 Functions, Simple Generators, and the yield Statement
Both functions and object methods allow a kind of nonlocality in terms of program flow, but one that is quite restrictive. A function or method is called from another context, enters at its top, executes any statements encountered, then returns to the calling context as soon as a return statement is reached (or the function body ends). The invocation of a function or method is basically a strictly linear nonlocal flow.
Python 2.2 introduced a flow control construct, called generators, that enables a new style of nonlocal branching. If a function or method body contains the statement yield, then it becomes a generator function, and invoking the function returns a generator iterator instead of a simple value. A generator iterator is an object that has a .next() method that returns values. Any instance object can have a .next() method, but a generator iterator's method is special in having "resumable execution."
In a standard function, once a return statement is encountered, the Python interpreter discards all information about the function's flow state and local name bindings. The returned value might contain some information about local values, but the flow state is always gone. A generator iterator, in contrast, "remembers" the entire flow state, and all local bindings, between each invocation of its .next() method. A value is returned to a calling context each place a yield statement is encountered in the generator function body, but the calling context (or any context with access to the generator iterator) is able to jump back to the flow point where this last yield occurred.
In the abstract, generators seem complex, but in practice they prove quite simple. For example:
>>> from __future__ import generators # not needed in 2.3+
>>> def generator_func():
... for n in [1,2]:
... yield n
... print "Two yields in for loop"
... yield 3
...
>>> generator_iter = generator_func()
>>> generator_iter.next()
1
>>> generator_iter.next()
2
>>> generator_iter.next()
Two yields in for loop
3
>>> generator_iter.next()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
StopIteration
The object generator_iter in the example can be bound in different scopes, and passed to and returned from functions, just like any other object. Any context invoking generator_iter.next() jumps back into the last flow point where the generator function body yielded.
In a sense, a generator iterator allows you to perform jumps similar to the "GOTO" statements of some (older) languages, but still retains the advantages of structured programming. The most common usage for generators, however, is simpler than this. Most of the time, generators are used as "iterators" in a loop context; for example:
>>> for n in generator_func():
... print n
...
1
2
Two yields in for loop
3
In recent Python versions, the StopIteration exception is used to signal the end of a for loop. The generator iterator's .next() method is implicitly called as many times as possible by the for statement. The name indicated in the for statement is repeatedly re-bound to the values the yield statement(s) return.
A.4.7 Raising and Catching Exceptions
Python uses exceptions quite broadly and probably more naturally than any other programming language. In fact there are certain flow control constructs that are awkward to express by means other than raising and catching exceptions.
There are two general purposes for exceptions in Python. On the one hand, Python actions can be invalid or disallowed in various ways. You are not allowed to divide by zero; you cannot open (for reading) a filename that does not exist; some functions require arguments of specific types; you cannot use an unbound name on the right side of an assignment; and so on. The exceptions raised by these types of occurrences have names of the form [A–Z].*Error. Catching error exceptions is often a useful way to recover from a problem condition and restore an application to a "happy" state. Even if such error exceptions are not caught in an application, their occurrence provides debugging clues since they appear in tracebacks.
The second purpose for exceptions is for circumstances a programmer wishes to flag as "exceptional." But understand "exceptional" in a weak sense—not as something that indicates a programming or computer error, but simply as something unusual or "not the norm." For example, Python 2.2+ iterators raise a StopIteration exception when no more items can be generated. Most such implied sequences are not infinite length, however; it is merely the case that they contain a (large) number of items, and they run out only once at the end. It's not "the norm" for an iterator to run out of items, but it is often expected that this will happen eventually.
In a sense, raising an exception can be similar to executing a break statement—both cause control flow to leave a block. For example, compare:
>>> n = 0
>>> while 1:
... n = n+1
... if n > 10: break
...
>>> print n
11
>>> n = 0
>>> try:
... while 1:
... n = n+1
... if n > 10: raise "ExitLoop"
... except:
... print n
...
11
In two closely related ways, exceptions behave differently than do break statements. In the first place, exceptions could be described as having "dynamic scope," which in most contexts is considered a sin akin to "GOTO," but here is quite useful. That is, you never know at compile time exactly where an exception might get caught (if not anywhere else, it is caught by the Python interpreter). It might be caught in the exception's block, or a containing block, and so on; or it might be in the local function, or something that called it, or something that called the caller, and so on. An exception is a fact that winds its way through execution contexts until it finds a place to settle. The upward propagation of exceptions is quite opposite to the downward propagation of lexically scoped bindings (or even to the earlier "three-scope rule").
The corollary of exceptions' dynamic scope is that, unlike break, they can be used to exit gracefully from deeply nested loops. The "Zen of Python" offers a caveat here: "Flat is better than nested." And indeed it is so, if you find yourself nesting loops too deeply, you should probably refactor (e.g., break loops into utility functions). But if you are nesting just deeply enough, dynamically scoped exceptions are just the thing for you. Consider the following small problem: A "Fermat triple" is here defined as a triple of integers (i,j,k) such that "i**2 + j**2 == k**2". Suppose that you wish to determine if any Fermat triples exist with all three integers inside a given numeric range. An obvious (but entirely nonoptimal) solution is:
>>> def fermat_triple(beg, end):
... class EndLoop(Exception): pass
... range_ = range(beg, end)
... try:
... for i in range_:
... for j in range_:
... for k in range_:
... if i**2 + j**2 == k**2:
... raise EndLoop, (i,j,k)
... except EndLoop, triple:
... # do something with 'triple'
... return i,j,k
...
>>> fermat_triple(1,10)
(3, 4, 5)
>>> fermat_triple(120,150)
>>> fermat_triple(100,150)
(100, 105, 145)
By raising the EndLoop exception in the middle of the nested loops, it is possible to catch it again outside of all the loops. A simple break in the inner loop would only break out of the most deeply nested block, which is pointless. One might devise some system for setting a "satisfied" flag and testing for this at every level, but the exception approach is much simpler. Since the except block does not actually do anything extra with the triple, it could have just been returned inside the loops; but in the general case, other actions can be required before a return.
It is not uncommon to want to leave nested loops when something has "gone wrong" in the sense of an "*Error" exception. Sometimes you might only be in a position to discover a problem condition within nested blocks, but recovery still makes better sense outside the nesting. Some typical examples are problems in I/O, calculation overflows, missing dictionary keys or list indices, and so on. Moreover, it is useful to assign except statements to the calling position that really needs to handle the problems, then write support functions as if nothing can go wrong. For example:
>>> try:
... result = complex_file_operation(filename)
... except IOError:
... print "Cannot open file", filename
The function complex_file_operation() should not be burdened with trying to figure out what to do if a bad filename is given to it—there is really nothing to be done in that context. Instead, such support functions can simply propagate their exceptions upwards, until some caller takes responsibility for the problem.
The try statement has two forms. The try/except/else form is more commonly used, but the try/finally form is useful for "cleanup handlers."
In the first form, a try block must be followed by one or more except blocks. Each except may specify an exception or tuple of exceptions to catch; the last except block may omit an exception (tuple), in which case it catches every exception that is not caught by an earlier except block. After the except blocks, you may optionally specify an else block. The else block is run only if no exception occurred in the try block. For example:
>>> def except_test(n):
... try: x = 1/n
... except IOError: print "IO Error"
... except ZeroDivisionError: print "Zero Division"
... except: print "Some Other Error"
... else: print "All is Happy"
...
>>> except_test(l)
All is Happy
>>> except_test(0)
Zero Division
>>> except_test('x')
Some Other Error
An except test will match either the exception actually listed or any descendent of that exception. It tends to make sense, therefore, in defining your own exceptions to inherit from related ones in the exceptions module. For example:
>>> class MyException(IOError): pass
>>> try:
... raise MyException
... except IOError:
... print "got it"
...
got it
In the try/finally form of the try statement, the finally statement acts as general cleanup code. If no exception occurs in the try block, the finally block runs, and that is that. If an exception was raised in the try block, the finally block still runs, but the original exception is re-raised at the end of the block. However, if a return or break statement is executed in a finally block—or if a new exception is raised in the block (including with the raise statement)—the finally block never reaches its end, and the original exception disappears.
A finally statement acts as a cleanup block even when its corresponding try block contains a return, break, or continue statement. That is, even though a try block might not run all the way through, finally is still entered to clean up whatever the try did accomplish. A typical use of this compound statement opens a file or other external resource at the very start of the try block, then performs several actions that may or may not succeed in the rest of the block; the finally is responsible for making sure the file gets closed, whether or not all the actions on it prove possible.
The try/finally form is never strictly needed since a bare raise statement will reraise the last exception. It is possible, therefore, to have an except block end with the raise statement to propagate an error upward after taking some action. However, when a cleanup action is desired whether or not exceptions were encountered, the try/finally form can save a few lines and express your intent more clearly. For example:
>>> def finally_test(x):
... try:
... y = 1/x
... if x > 10:
... return x
... finally:
... print "Cleaning up..."
... return y
...
>>> finally_test(0)
Cleaning up...
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<stdin>", line 3, in finally_test
ZeroDivisionError: integer division or modulo by zero
>>> finally_test(3)
Cleaning up...
0
>>> finally_test(100)
Cleaning up...
100
A.4.8 Data as Code
Unlike in languages in the Lisp family, it is usually not a good idea to create Python programs that execute data values. It is possible, however, to create and run Python strings during program runtime using several built-in functions. The modules code, codeop, imp, and new provide additional capabilities in this direction. In fact, the Python interactive shell itself is an example of a program that dynamically reads strings as user input, then executes them. So clearly, this approach is occasionally useful.
Other than in providing an interactive environment for advanced users (who themselves know Python), a possible use for the "data as code" model is with applications that themselves generate Python code, either to run later or to communicate with another application. At a simple level, it is not difficult to write compilable Python programs based on templatized functionality; for this to be useful, of course, you would want a program to contain some customization that was determinable only at runtime.
eval(s [,globals=globals() [,locals=locals()]])
Evaluate the expression in string s and return the result of that evaluation. You may specify optional arguments globals and locals to specify the namespaces to use for name lookup. By default, use the regular global and local namespace dictionaries. Note that only an expression can be evaluated, not a statement suite.
Most of the time when a (novice) programmer thinks of using eval() it is to compute some value—often numeric—based on data encoded in texts. For example, suppose that a line in a report file contains a list of dollar amounts, and you would like the sum of these numbers. A naive approach to the problem uses eval() :
>>> line = "$47 $33 $51 $76"
>>> eval("+".join([d.replace('$', '') for d in line.split()]))
207
While this approach is generally slow, that is not an important problem. A more significant issue is that eval() runs code that is not known until runtime; potentially line could contain Python code that causes harm to the system it runs on or merely causes an application to malfunction. Imagine that instead of a dollar figure, your data file contained os.rmdir("/"). A better approach is to use the safe type coercion functions int(), float(), and so on.
>>> nums = [int(d.replace('$', '')) for d in line.split()]
>>> from operator import add
>>> reduce(add, nums)
207
exec
The exec statement is a more powerful sibling of the eval() function. Any valid Python code may be run if passed to the exec statement. The format of the exec statement allows optional namespace specification, as with eval() :
exec code [in globals [,locals]]
For example:
>>> s = "for i in range(10):\n print i,\n"
>>> exec s in globals(), locals()
0 1 2 3 4 5 6 7 8 9
The argument code may be either a string, a code object, or an open file object. As with eval(), the security dangers and speed penalties of exec usually outweigh any convenience provided. However, where code is clearly under application control, there are occasionally uses for this statement.
__import__(s [,globals=globals() [,locals=locals() [,fromlist]]])
Import the module named s, using namespace dictionaries globals and locals. The argument fromlist may be omitted, but if specified as a nonempty list of strings—e.g., [""]—the fully qualified subpackage will be imported. For normal cases, the import statement is the way you import modules, but in the special circumstance that the value of s is not determined until runtime, use __import__().
>>> op = __import__('os.path',globals(),locals(),[''])
>>> op.basename('/this/that/other')
'other'
input([prompt])
Equivalent to eval(raw_input (prompt)), along with all the dangers associated with eval() generally. Best practice is to always use raw_input(), but you might see input() in existing programs.
raw_input([prompt])
Return a string from user input at the terminal. Used to obtain values interactive in console-based applications.
>>> s = raw_input('Last Name: ')
Last Name: Mertz
>>> s
'Mertz'
|


Survey comes here below
Some h3 tag with some stuffffff!!!
What is your gender?
How old are you?
How many years do you want to retire?
What is the level of risk you are willing to take?
Total Green Score:


all files
src/
93.61%
Statements
205/219
73.58%
Branches
117/159
100%
Functions
32/32
96.45%
Lines
163/169
File
Statements
Branches
Functions
Lines
decorator.js
92%
46/50
63.16%
24/38
100%
13/13
100%
25/25
index.js
94.08%
159/169
76.86%
93/121
100%
19/19
95.83%
138/144


St. John's uses 13-0 run to rally past UMass
by ReutersSparked by a 13-0 second-half run, the St. John’s Red Storm rallied to defeat the Massachusetts Minutemen, 78-63, on Sunday in Uncasville, Conn.
Massachusetts (5-2) took a 53-48 lead with 10:54 left in regulation, but St. John’s (5-2) clamped down and shut out the Minutemen over the next four minutes.
A 3-pointer by David Caraher broke a 53-all tie and put St. John’s ahead for good at the 8:19 mark of the second half. Julian Champagnie scored five points as part of the 13-0 surge which gave the Red Storm a 61-53 lead with 6:54 to go.
UMass sliced that eight-point deficit to three on two separate occasions. The second time the Minutemen drew close, St. John’s pulled away.
With SJU leading 63-60, Josh Roberts made a layup with 4:05 left for a 65-60 lead.
UMass didn’t hit another field goal attempt until the final minute. Due to their dominant defense in the second half, the Red Storm tucked away their fifth victory of the season.
St. John’s needed its defense to be great. The Red Storm made just 6 of 19 3-pointers, under 32 percent.
They made barely more than half of their free throws (16 of 27).
The Red Storm squeezed the life out of the UMass offense. The Minutemen finished 19 of 58 from the field, under 33 percent. They were only 9 of 31 from 3-point range. They also committed 17 turnovers.
St. John’s swiped 13 steals in this game. Figueroa had six for the Red Storm.
Caraher led St. John’s in scoring with 17 points, coming off the bench. Roberts scored 16 points and added eight rebounds plus three blocked shots.
T.J. Weeks scored 19 points off the bench to lead UMass, but he was only 5 of 15 from the field.
–Field Level Media


Kiwi scientists deliver drug training in Tonga
by ESRKiwi scientists are wrapping up a week-long training course with Tongan police in the fight against drugs in the Pacific.
ESR designed the course to give Tongan Police hands-on, scientific training so they’re better equipped to identify cannabis.
The course is being delivered by two of ESR’s forensic chemists who are in Nuku’alofa this week.
Seven officers have been upskilled in two different techniques to identify cannabis; microscopic examination of the plant and a chemical test not yet being used in Tonga.
The chemical test will allow the officers to confirm the identification, particularly for smaller, fragmented plant matter not easily identifiable using a microscope.
ESR’s Forensic Chemistry Manager Kevan Walsh says the initiative is part of a concerted effort in Tonga to reduce harm created by illicit drugs.
“The aim is to introduce forensic procedures and quality control when examining suspected cannabis. Once the officers are trained, they’re be able to examine and identify cannabis and will gain skills to give evidence in course as expert witnesses,” he said.
The training package was created by ESR specifically for Tonga and reflects the ongoing partnership the two organisations have held for a number of years.


Select file to upload.
Enter name
LinkedIn Url
Github Url
Stackoverflow Url
Submit
Your result ...
{{acc}}
% Accurate


Everything You Should Know About Tesla's Cybertruck
It's polarizing. But its specs are impressive.
by Daniel Sparks (TMFDanielSparks)Electric-car maker Tesla's (NASDAQ:TSLA) highly anticipated fully electric pickup truck was finally unveiled on Thursday. Leading up to the unveiling, CEO Elon Musk had hinted that the new vehicle may not appeal to those looking for a traditional truck design. Based on the media's and the market's initial reaction to the unveiling, he was right. But is the truck's design too radical? Shares sank 6% on the trading day following the event as analysts expressed concerns that the vehicle wouldn't appeal to a mass audience.
Tesla's Cybertruck is priced to sell, particularly given its strong specs. But its style is polarizing. The truck features an out-of-this-world angular design that is unlike anything seen before.
Here's a closer look.
Pricing and availability
The truck will start at a price of $39,900 -- about $10,000 lower than expected. But versions with more powerful batteries and improved performance will be available for $49,900 and $69,900. The company's driver-assist technology, Autopilot, will come standard on the vehicle.
The electric-car company expects production of the single motor rear-wheel drive version of the truck to start in late 2021. Production of its dual-motor and tri-motor all-wheel-drive versions will begin in late 2022, Tesla predicts.
Performance
As has become expected of Tesla, the vehicle's performance specifications are impressive. With a zero-to-sixty acceleration time as fast as 2.9 seconds, up to 500 miles of range, and towing capacity of more than 14,000 pounds for the priciest version of the truck, Tesla didn't skimp on performance.
| Cybertruck Version | Driving Range on a Single Charge | 0-60 MPH Acceleration Time | Payload Pounds | Tow Rating Pounds | Price |
|---|---|---|---|---|---|
| Single motor RWD | 250+ miles | 6.5 seconds | 3,500 | 7,500 | $39,900 |
| Dual motor AWD | 300+ miles | 4.5 seconds | 3,500 | 10,000 | $49,900 |
| Tri motor AWD | 500+ miles | 2.9 seconds | 3,500 | 14,000 | $69,900 |
Data source: Tesla Cybertruck unveiling video.
Exterior, interior, and storage
As far as the Cybertruck's exterior, Tesla boasted about its durability. "Starting with a nearly impenetrable exoskeleton, every component is designed for superior strength and endurance, from Ultra-Hard 30X Cold-Rolled stainless-steel structural skin to Tesla armor glass," the company says on its website.
While the vehicle's steel lived up to the hype during a demonstration at the unveiling event, the Tesla armor glass apparently still needs some work. The driver's side window shattered when Tesla tried to demonstrate its durability by throwing a steel ball at it. Hoping this wouldn't be the case with the rear window, a Tesla executive tried throwing the ball at the rear passenger window and the same thing happened. "Guess we have some improvements to make before production haha," Musk said in a tweet about the glass following the event.
Thanks to a front trunk and a 6.5-foot truck bed with diagonal retractable encasing, the Cybertruck impressively boasts 100 cubic feet of exterior, plus lockable storage.
The truck's interior doesn't disappoint, either, seating six adults comfortably, according to Tesla.
Of course, the vehicle features Tesla's signature barbaric, minimalistic design and a 17-inch touch display where drivers and passengers interact with the vehicle.
For the most part, Tesla exceeded expectations when it comes to utility, performance, and specs. But the design is raising eyebrows.