import { mergeOver, pushUnique, λnull } from '../core/utilities.js';
The asset factories - ImageAsset, SpriteAsset, and VideoAsset - are wrappers around images and videos which can either be pulled from the current document (DOM-based assets) or fetched from the server using an URL address.
Assets can be loaded into scrawl using dedicated import and create functions:
scrawl.importImage
scrawl.importDomImage
scrawl.importDomVideo
scrawl.importVideo
scrawl.importMediaStream
scrawl.importSprite
scrawl.createImageFromCell
scrawl.createImageFromGroup
scrawl.createImageFromEntity
Assets will also be created when Picture entitys or Pattern styles are defined using a ‘scrawl.make’ function (makePicture
, makePattern
), or updated with the set
function, where the imageSource, videoSource or spriteSource key in the argument object has been set to a valid URL path string.
Be aware that loading assets takes time!
import { mergeOver, pushUnique, λnull } from '../core/utilities.js';
export default function (P = {}) {
let defaultAttributes = {
sourceLoaded - A flag to indicate that the source image or video has completed sufficient loading (or streaming) to be usefully consumed by Picture entitys and Pattern styles.
sourceLoaded: false,
source - A handle to the DOM element supplying the image - either an <img>, <video> or <canvas> element.
source: null,
subscribers - An Array containing the Picture entity and Pattern style Objects, who wish to use the asset as their source.
subscribers: null,
};
P.defs = mergeOver(P.defs, defaultAttributes);
Assets do not include their source images (or videos!) in their packet output. They do include the String name values of each of their subscribers.
P.packetExclusions = pushUnique(P.packetExclusions, ['sourceLoaded', 'source', 'subscribers']);
P.finalizePacketOut = function (copy, items) {
if (this.subscribers && this.subscribers.length) {
copy.subscribers = this.subscribers.map(sub => sub.name);
}
return copy;
};
TODO
let G = P.getters,
S = P.setters,
D = P.deltaSetters;
source - imageAsset.js and videoAsset.js overwrite this function, thus only put here so cell.js also gains the function - which I don’t think it will ever need as cells ARE their own source.
S.source = function (item = {}) {
if (item) {
No action required for Canvas objects as they don’t have a source; they ARE the source!
if (this.sourceLoaded) this.notifySubscribers();
}
};
subscribers - we disable the ability to set the subscribers Array directly. Picture entitys and Pattern styles will manage their subscription to the asset using their subscribe() and unsubscribe() functions.
S.subscribers = λnull;
assetConstructor
- Common actions required by imageAsset, spriteAsset, and videoAsset factories as part if their instance constructor work.
P.assetConstructor = function (items = {}) {
this.makeName(items.name);
this.register();
this.subscribers = [];
this.set(this.defs);
this.set(items);
if (items.subscribe) this.subscribers.push(items.subscribe);
return this;
};
P.subscribe = function (sub = {}) {
if (sub && sub.name) {
let name = sub.name;
if (this.subscribers.every(item => item.name !== name)) this.subscribeAction(sub);
}
};
subscribeAction
- separated out because cells handle things differently (they ARE the source)
P.subscribeAction = function (sub = {}) {
this.subscribers.push(sub);
sub.asset = this;
sub.source = this.source;
this.notifySubscriber(sub);
};
unsubscribe
P.unsubscribe = function (sub = {}) {
if (sub.name) {
let name = sub.name,
index = this.subscribers.findIndex(item => item.name === name);
if (index >= 0) {
sub.source = null;
sub.asset = null;
sub.sourceNaturalHeight = 0;
sub.sourceNaturalWidth = 0;
sub.sourceLoaded = false;
this.subscribers.splice(index, 1)
}
}
};
notifySubscribers
- Subscriber notification in the asset factories will happen when something changes with the image. Changes vary across the different types of asset:
All notifications are push; the notification is achieved by setting various attributes and flags in each subscriber.
P.notifySubscribers = function () {
this.subscribers.forEach(sub => this.notifySubscriber(sub), this);
};
P.notifySubscriber = function (sub) {
sub.sourceNaturalWidth = this.sourceNaturalWidth;
sub.sourceNaturalHeight = this.sourceNaturalHeight;
sub.sourceLoaded = this.sourceLoaded;
sub.source = this.source;
sub.dirtyImage = true;
sub.dirtyCopyStart = true;
sub.dirtyCopyDimensions = true;
sub.dirtyImageSubscribers = true;
};
Return the prototype
return P;
};


The mission of this project is to create a web dashboard that presents data collected by the GreenUp app to provide information for better understanding GreenUp Day activities, and to help promote use of the GreenUp Day App.
The Green Up Vermont Dashboard was developed by Burlington Code Academy students
Sean Stone
Jake Goss
Jake Styles
Christopher Griffin
with guidance from Teresa Gerade and Code for BTV. The source code is FOSS and can be found here.


This Irish name is no longer popular in the United States
by IrishCentral StaffThe name experts have spoken! Irish baby names are hardly getting a look in the US for 2020 and even the name Liam is a no show.
Back in 2018 the Irish name Liam was among the most popular boy's names in the United States but according to predictions for the first year of the new decade, 2020's most popular baby names will be virtually Irish origin free.
According to the name experts at the website Nameberry, 2020 will see names like Adah, Reese, Tate, and Diego become much more popular in the New Year.
Their study of baby names for 2020 shows many choices that "went virtually unused a generation ago”. The site's editors predicted these results by studying the use of the 70,000 names on the site and the spike in interest of certain names in 2018 and 2019.
So what's are the most popular baby names for 2020?
Read more: 100 Irish first names and their beautiful meanings
For girls, Adah, Reese, Mika, Paisley, Amina, Teagan, Nova, Aura, Pearl and Billie will be most popular. While for boys Austin, Alva, Acacius, Tate, Diego, Easton, Lucius, Cash, Ash, and Luca will take the top spots. Another big trend they're predicting is the use of gender-neutral names such as Ellis, Phoenix, Remi, and Marlowe.
Nameberry themselves comment that 2020's names seemed to be "influenced by high visibility celebrities or pop culture events while others contain a fresh spin on a stylish sound or form."
Still no sign of Liam Neeson though!
Read more: Our favorite Irish baby boy names
What's happened to all the Irish names we hear you ask. Well, they do feature but it seems they're just a little further down the list.
Among the top 50 girls' names for 2020, we spotted Kiara, which could be derived from the Irish name Ciara. The boy's names having a higher number of Irish names including Cian, Cillian, Cormac, Flynn, Kieran, Nolan, Ronan, and Sullivan make the cut. Also among the unisex baby names, an Irish influence makes the top spots including Ellis, Shea, Rowan, and Quinn.
Read more: Our favorite Irish baby girl names


source file: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/botocore/exceptions.py
file stats: 172 lines, 149 executed: 86.6% covered
1. # Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/ 2. # Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3. # 4. # Licensed under the Apache License, Version 2.0 (the "License"). You 5. # may not use this file except in compliance with the License. A copy of 6. # the License is located at 7. # 8. # http://aws.amazon.com/apache2.0/ 9. # 10. # or in the "license" file accompanying this file. This file is 11. # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 12. # ANY KIND, either express or implied. See the License for the specific 13. # language governing permissions and limitations under the License. 14. from __future__ import unicode_literals 15. from botocore.vendored.requests.exceptions import ConnectionError 16. 17. 18. class BotoCoreError(Exception): 19. """ 20. The base exception class for BotoCore exceptions. 21. 22. :ivar msg: The descriptive message associated with the error. 23. """ 24. fmt = 'An unspecified error occurred' 25. 26. def __init__(self, **kwargs): 27. msg = self.fmt.format(**kwargs) 28. Exception.__init__(self, msg) 29. self.kwargs = kwargs 30. 31. 32. class DataNotFoundError(BotoCoreError): 33. """ 34. The data associated with a particular path could not be loaded. 35. 36. :ivar path: The data path that the user attempted to load. 37. """ 38. fmt = 'Unable to load data for: {data_path}' 39. 40. 41. class UnknownServiceError(DataNotFoundError): 42. """Raised when trying to load data for an unknown service. 43. 44. :ivar service_name: The name of the unknown service. 45. 46. """ 47. fmt = ( 48. "Unknown service: '{service_name}'. Valid service names are: " 49. "{known_service_names}") 50. 51. 52. class ApiVersionNotFoundError(BotoCoreError): 53. """ 54. The data associated with either that API version or a compatible one 55. could not be loaded. 56. 57. :ivar path: The data path that the user attempted to load. 58. :ivar path: The API version that the user attempted to load. 59. """ 60. fmt = 'Unable to load data {data_path} for: {api_version}' 61. 62. 63. class EndpointConnectionError(BotoCoreError): 64. fmt = ( 65. 'Could not connect to the endpoint URL: "{endpoint_url}"') 66. 67. 68. class ConnectionClosedError(ConnectionError): 69. fmt = ( 70. 'Connection was closed before we received a valid response ' 71. 'from endpoint URL: "{endpoint_url}".') 72. 73. def __init__(self, **kwargs): 74. msg = self.fmt.format(**kwargs) 75. kwargs.pop('endpoint_url') 76. super(ConnectionClosedError, self).__init__(msg, **kwargs) 77. 78. 79. class NoCredentialsError(BotoCoreError): 80. """ 81. No credentials could be found 82. """ 83. fmt = 'Unable to locate credentials' 84. 85. 86. class PartialCredentialsError(BotoCoreError): 87. """ 88. Only partial credentials were found. 89. 90. :ivar cred_var: The missing credential variable name. 91. 92. """ 93. fmt = 'Partial credentials found in {provider}, missing: {cred_var}' 94. 95. 96. class CredentialRetrievalError(BotoCoreError): 97. """ 98. Error attempting to retrieve credentials from a remote source. 99. 100. :ivar provider: The name of the credential provider. 101. :ivar error_msg: The msg explaning why credentials could not be 102. retrieved. 103. 104. """ 105. fmt = 'Error when retrieving credentials from {provider}: {error_msg}' 106. 107. 108. class UnknownSignatureVersionError(BotoCoreError): 109. """ 110. Requested Signature Version is not known. 111. 112. :ivar signature_version: The name of the requested signature version. 113. """ 114. fmt = 'Unknown Signature Version: {signature_version}.' 115. 116. 117. class ServiceNotInRegionError(BotoCoreError): 118. """ 119. The service is not available in requested region. 120. 121. :ivar service_name: The name of the service. 122. :ivar region_name: The name of the region. 123. """ 124. fmt = 'Service {service_name} not available in region {region_name}' 125. 126. 127. class BaseEndpointResolverError(BotoCoreError): 128. """Base error for endpoint resolving errors. 129. 130. Should never be raised directly, but clients can catch 131. this exception if they want to generically handle any errors 132. during the endpoint resolution process. 133. 134. """ 135. 136. 137. class NoRegionError(BaseEndpointResolverError): 138. """No region was specified.""" 139. fmt = 'You must specify a region.' 140. 141. 142. class UnknownEndpointError(BaseEndpointResolverError, ValueError): 143. """ 144. Could not construct an endpoint. 145. 146. :ivar service_name: The name of the service. 147. :ivar region_name: The name of the region. 148. """ 149. fmt = ( 150. 'Unable to construct an endpoint for ' 151. '{service_name} in region {region_name}') 152. 153. 154. class ProfileNotFound(BotoCoreError): 155. """ 156. The specified configuration profile was not found in the 157. configuration file. 158. 159. :ivar profile: The name of the profile the user attempted to load. 160. """ 161. fmt = 'The config profile ({profile}) could not be found' 162. 163. 164. class ConfigParseError(BotoCoreError): 165. """ 166. The configuration file could not be parsed. 167. 168. :ivar path: The path to the configuration file. 169. """ 170. fmt = 'Unable to parse config file: {path}' 171. 172. 173. class ConfigNotFound(BotoCoreError): 174. """ 175. The specified configuration file could not be found. 176. 177. :ivar path: The path to the configuration file. 178. """ 179. fmt = 'The specified config file ({path}) could not be found.' 180. 181. 182. class MissingParametersError(BotoCoreError): 183. """ 184. One or more required parameters were not supplied. 185. 186. :ivar object: The object that has missing parameters. 187. This can be an operation or a parameter (in the 188. case of inner params). The str() of this object 189. will be used so it doesn't need to implement anything 190. other than str(). 191. :ivar missing: The names of the missing parameters. 192. """ 193. fmt = ('The following required parameters are missing for ' 194. '{object_name}: {missing}') 195. 196. 197. class ValidationError(BotoCoreError): 198. """ 199. An exception occurred validating parameters. 200. 201. Subclasses must accept a ``value`` and ``param`` 202. argument in their ``__init__``. 203. 204. :ivar value: The value that was being validated. 205. :ivar param: The parameter that failed validation. 206. :ivar type_name: The name of the underlying type. 207. """ 208. fmt = ("Invalid value ('{value}') for param {param} " 209. "of type {type_name} ") 210. 211. 212. class ParamValidationError(BotoCoreError): 213. fmt = 'Parameter validation failed:\n{report}' 214. 215. 216. # These exceptions subclass from ValidationError so that code 217. # can just 'except ValidationError' to catch any possibly validation 218. # error. 219. class UnknownKeyError(ValidationError): 220. """ 221. Unknown key in a struct paramster. 222. 223. :ivar value: The value that was being checked. 224. :ivar param: The name of the parameter. 225. :ivar choices: The valid choices the value can be. 226. """ 227. fmt = ("Unknown key '{value}' for param '{param}'. Must be one " 228. "of: {choices}") 229. 230. 231. class RangeError(ValidationError): 232. """ 233. A parameter value was out of the valid range. 234. 235. :ivar value: The value that was being checked. 236. :ivar param: The parameter that failed validation. 237. :ivar min_value: The specified minimum value. 238. :ivar max_value: The specified maximum value. 239. """ 240. fmt = ('Value out of range for param {param}: ' 241. '{min_value} <= {value} <= {max_value}') 242. 243. 244. class UnknownParameterError(ValidationError): 245. """ 246. Unknown top level parameter. 247. 248. :ivar name: The name of the unknown parameter. 249. :ivar operation: The name of the operation. 250. :ivar choices: The valid choices the parameter name can be. 251. """ 252. fmt = ( 253. "Unknown parameter '{name}' for operation {operation}. Must be one " 254. "of: {choices}" 255. ) 256. 257. 258. class AliasConflictParameterError(ValidationError): 259. """ 260. Error when an alias is provided for a parameter as well as the original. 261. 262. :ivar original: The name of the original parameter. 263. :ivar alias: The name of the alias 264. :ivar operation: The name of the operation. 265. """ 266. fmt = ( 267. "Parameter '{original}' and its alias '{alias}' were provided " 268. "for operation {operation}. Only one of them may be used." 269. ) 270. 271. 272. class UnknownServiceStyle(BotoCoreError): 273. """ 274. Unknown style of service invocation. 275. 276. :ivar service_style: The style requested. 277. """ 278. fmt = 'The service style ({service_style}) is not understood.' 279. 280. 281. class PaginationError(BotoCoreError): 282. fmt = 'Error during pagination: {message}' 283. 284. 285. class OperationNotPageableError(BotoCoreError): 286. fmt = 'Operation cannot be paginated: {operation_name}' 287. 288. 289. class ChecksumError(BotoCoreError): 290. """The expected checksum did not match the calculated checksum. 291. 292. """ 293. fmt = ('Checksum {checksum_type} failed, expected checksum ' 294. '{expected_checksum} did not match calculated checksum ' 295. '{actual_checksum}.') 296. 297. 298. class UnseekableStreamError(BotoCoreError): 299. """Need to seek a stream, but stream does not support seeking. 300. 301. """ 302. fmt = ('Need to rewind the stream {stream_object}, but stream ' 303. 'is not seekable.') 304. 305. 306. class WaiterError(BotoCoreError): 307. """Waiter failed to reach desired state.""" 308. fmt = 'Waiter {name} failed: {reason}' 309. 310. def __init__(self, name, reason, last_response): 311. super(WaiterError, self).__init__(name=name, reason=reason) 312. self.last_response = last_response 313. 314. 315. class IncompleteReadError(BotoCoreError): 316. """HTTP response did not return expected number of bytes.""" 317. fmt = ('{actual_bytes} read, but total bytes ' 318. 'expected is {expected_bytes}.') 319. 320. 321. class InvalidExpressionError(BotoCoreError): 322. """Expression is either invalid or too complex.""" 323. fmt = 'Invalid expression {expression}: Only dotted lookups are supported.' 324. 325. 326. class UnknownCredentialError(BotoCoreError): 327. """Tried to insert before/after an unregistered credential type.""" 328. fmt = 'Credential named {name} not found.' 329. 330. 331. class WaiterConfigError(BotoCoreError): 332. """Error when processing waiter configuration.""" 333. fmt = 'Error processing waiter config: {error_msg}' 334. 335. 336. class UnknownClientMethodError(BotoCoreError): 337. """Error when trying to access a method on a client that does not exist.""" 338. fmt = 'Client does not have method: {method_name}' 339. 340. 341. class UnsupportedSignatureVersionError(BotoCoreError): 342. """Error when trying to access a method on a client that does not exist.""" 343. fmt = 'Signature version is not supported: {signature_version}' 344. 345. 346. class ClientError(Exception): 347. MSG_TEMPLATE = ( 348. 'An error occurred ({error_code}) when calling the {operation_name} ' 349. 'operation{retry_info}: {error_message}') 350. 351. def __init__(self, error_response, operation_name): 352. retry_info = self._get_retry_info(error_response) 353. error = error_response.get('Error', {}) 354. msg = self.MSG_TEMPLATE.format( 355. error_code=error.get('Code', 'Unknown'), 356. error_message=error.get('Message', 'Unknown'), 357. operation_name=operation_name, 358. retry_info=retry_info, 359. ) 360. super(ClientError, self).__init__(msg) 361. self.response = error_response 362. self.operation_name = operation_name 363. 364. def _get_retry_info(self, response): 365. retry_info = '' 366. if 'ResponseMetadata' in response: 367. metadata = response['ResponseMetadata'] 368. if metadata.get('MaxAttemptsReached', False): 369. if 'RetryAttempts' in metadata: 370. retry_info = (' (reached max retries: %s)' % 371. metadata['RetryAttempts']) 372. return retry_info 373. 374. 375. class EventStreamError(ClientError): 376. pass 377. 378. 379. class UnsupportedTLSVersionWarning(Warning): 380. """Warn when an openssl version that uses TLS 1.2 is required""" 381. pass 382. 383. 384. class ImminentRemovalWarning(Warning): 385. pass 386. 387. 388. class InvalidDNSNameError(BotoCoreError): 389. """Error when virtual host path is forced on a non-DNS compatible bucket""" 390. fmt = ( 391. 'Bucket named {bucket_name} is not DNS compatible. Virtual ' 392. 'hosted-style addressing cannot be used. The addressing style ' 393. 'can be configured by removing the addressing_style value ' 394. 'or setting that value to \'path\' or \'auto\' in the AWS Config ' 395. 'file or in the botocore.client.Config object.' 396. ) 397. 398. 399. class InvalidS3AddressingStyleError(BotoCoreError): 400. """Error when an invalid path style is specified""" 401. fmt = ( 402. 'S3 addressing style {s3_addressing_style} is invaild. Valid options ' 403. 'are: \'auto\', \'virtual\', and \'path\'' 404. ) 405. 406. 407. class InvalidRetryConfigurationError(BotoCoreError): 408. """Error when invalid retry configuration is specified""" 409. fmt = ( 410. 'Cannot provide retry configuration for "{retry_config_option}". ' 411. 'Valid retry configuration options are: \'max_attempts\'' 412. ) 413. 414. 415. class InvalidMaxRetryAttemptsError(InvalidRetryConfigurationError): 416. """Error when invalid retry configuration is specified""" 417. fmt = ( 418. 'Value provided to "max_attempts": {provided_max_attempts} must ' 419. 'be an integer greater than or equal to zero.' 420. ) 421. 422. class StubResponseError(BotoCoreError): 423. fmt = 'Error getting response stub for operation {operation_name}: {reason}' 424. 425. 426. class StubAssertionError(StubResponseError, AssertionError): 427. pass 428. 429. class UnStubbedResponseError(StubResponseError): 430. pass 431. 432. class InvalidConfigError(BotoCoreError): 433. fmt = '{error_msg}' 434. 435. 436. class InfiniteLoopConfigError(InvalidConfigError): 437. fmt = ( 438. 'Infinite loop in credential configuration detected. Attempting to ' 439. 'load from profile {source_profile} which has already been visited. ' 440. 'Visited profiles: {visited_profiles}' 441. ) 442. 443. 444. class RefreshWithMFAUnsupportedError(BotoCoreError): 445. fmt = 'Cannot refresh credentials: MFA token required.' 446. 447. 448. class MD5UnavailableError(BotoCoreError): 449. fmt = "This system does not support MD5 generation." 450. 451. 452. class MetadataRetrievalError(BotoCoreError): 453. fmt = "Error retrieving metadata: {error_msg}"


--- layout: post title: Big Picture Notes external-url: http://www.boston.com/bigpicture/bpnotes/ ---
For stuff relating to but which doesn’t entirely fit on The Big Picture.


squiggle - browser for SVG files
squiggle
squiggle is a graphical browser for SVG files.
squiggle is currently broken in debian. Startup will fail with a security error.
This program is a shell script wrapper based on java-wrappers (7).You therefore benefit from several features; please see the java-wrappers (7)manual page for more information about them.
squiggle is part of batikwritten by the Apache Software Foundation.
This manual page was written by Vincent Fourmond<EMAIL_ADDRESS>for the Debian Project, but may be used by others.
The web page of batikhttp://xml.apache.org/batik
java-wrappers (7)


This tests both the accelerometer and gyroscope of.
Your browser does not support Device Orientation and Motion API. Try this sample with iPhone, iPod or iPad with iOS 4.2+.
Device Motion Events
acceleration
X:
Y:
Z:
rotationRate
alpha:
beta:
gamma:
interval:
Device Orientation Event
alpha (z-axis) (0, 360):
beta (x-axis) (-180, 180):
gamma (y-axis) (-90, 90):


{% extends "global/Page.html" %} {% load otree static %} {% block title %} Instruction {% endblock %} {% block content %}
In this experiment, you will interact with other players in multiple rounds. In each round, you will be grouped randomly and anonymously with several other participants and will be “standing in a line” with others, waiting to be “served”. Each participant has three possible statuses: “waiting in the line”, “in service”, and “served”.
At the beginning of each round, you will get some amount (in points) of initial endowment E.  However, as in real life, waiting in line is costly. You will lose C points for every person who is served before you. This will represent the cost of waiting.
The order of the line will be determined randomly at the beginning of each round. The round will be divided into several periods, where each period encompasses one player’s service turn. At the beginning of each round (the first period starts), every participant is “waiting in the line” and they can start to exchange positions with the participants immediately next to them. Depending on the rule, different buttons will be visible under the person immediately in front of you. If the button is grey, this means the person you are trying to interact with is already interacting with the person in front of them; otherwise, you may initiate an interaction with said person.
Participants can exchange positions with others under specific rules (detailed in the next section). At the end of the first period, the first participant in the line will go to the service room, others remain in the line and the second period will start. The service for each participant will take one period (20 seconds) and the round ends when all participants have finished the service.
Your payoff in each round will be given by E + V - (n-1)*C + T , where n is the order or place in which you are served. For the first to be served n=1, for the second to be served n=2, and so on. T (trade) is the sum of all transfers you receive minus all transfers you make from trading or exchanging places with others. Under some rules, you cannot trade money with other participants, so T will be 0 under those rules.
E (Endowment) is the value you have at the beginning of each round. V (Value) is the value of the service, which will be applied to a player’s point total only after they have finished their service turn. C (Cost) is the time cost per period which will be deducted from a player’s point total after each period they participate in that does not send them to the service room. This cost C will be different for different people and even for the same person in different rounds. C will be determined randomly for each player in each round. At the beginning of each round, your C will be revealed to you on your screen. Each person’s C is private information to them. No one else will know your C and you will not be informed of anyone else’s C. E and V are the same for everyone in your group.
In some rounds, you may be allowed to use a chatbox to send a text message with your offer price (or exchange request). You can only be involved in one offer (or exchange request) at a time. If you are involved in an offer, you cannot receive an offer from other participants. Similarly, you cannot trade with participants who are currently in an offer.
When you finish reading, please press next.
{% next_button %} {% endblock %}


Google App Engine
Google App Engine (GAE) provides a range of hosting options from pure PaaS (App Engine Classic) through Managed VMs to fully self-managed or container-driven Compute Engine instances. Echo works great with all of these but requires a few changes to the usual examples to run on the AppEngine Classic and Managed VM options. With a small amount of effort though it’s possible to produce a codebase that will run on these and also non-managed platforms automatically.
We’ll walk through the changes needed to support each option.
Standalone
Wait? What? I thought this was about AppEngine! Bear with me - the easiest way to show the changes required is to start with a setup for standalone and work from there plus there’s no reason we wouldn’t want to retain the ability to run our app anywhere, right?
We take advantage of the go build constraints or tags to change how we create and run the Echo server for each platform while keeping the rest of the application (e.g. handler wireup) the same across all of them.
First, we have the normal setup based on the examples but we split it into two files - app.go
will
be common to all variations and holds the Echo instance variable. We initialise it from a function
and because it is a var
this will happen before any init()
functions run - a feature that we’ll
use to connect our handlers later.
app.go
A separate source file contains the function to create the Echo instance and add the static
file handlers and middleware. Note the build tag on the first line which says to use this when not
bulding with appengine or appenginevm tags (which thoese platforms automatically add for us). We also
have the main()
function to start serving our app as normal. This should all be very familiar.
app-standalone.go
The handler-wireup that would normally also be a part of this Echo setup moves to separate files which
take advantage of the ability to have multiple init()
functions which run after the e
Echo var is
initialised but before the main()
function is executed. These allow additional handlers to attach
themselves to the instance - I’ve found the Group
feature naturally fits into this pattern with a file
per REST endpoint, often with a higher-level api
group created that they attach to instead of the root
Echo instance directly (so things like CORS middleware can be added at this higher common-level).
users.go
If we run our app it should execute as it did before when everything was in one file although we have at least gained the ability to organize our handlers a little more cleanly.
AppEngine Classic and Managed VMs
So far we’ve seen how to split apart the Echo creation and setup but still have the same app that still only runs standalone. Now we’ll see hwo those changes allow us to add support for AppEngine hosting.
Refer to the AppEngine site for full configuration and deployment information.
app.yaml configuration file
Both of these are Platform as as Service options running on either sandboxed micro-containers
or managed Compute Engine instances. Both require an app.yaml
file to describe the app to
the service. While the app could still serve all it’s static files itself, one of the benefits
of the platform is having Google’s infrastructure handle that for us so it can be offloaded and
the app only has to deal with dynamic requests. The platform also handles logging and http gzip
compression so these can be removed from the codebase as well.
The yaml file also contains other options to control instance size and auto-scaling so for true
deployment freedom you would likely have separate app-classic.yaml
and app-vm.yaml
files and
this can help when making the transition from AppEngine Classic to Managed VMs.
app-engine.yaml
Router configuration
We’ll now use the build constraints again like we did when creating
our app-standalone.go
instance but this time with the opposite tags to use this file if the build has
the appengine or appenginevm tags (added automatically when deploying to these platforms).
This allows us to replace the createMux()
function to create our Echo server without any of the
static file handling and logging + gzip middleware which is no longer required. Also worth nothing is
that GAE classic provides a wrapper to handle serving the app so instead of a main()
function where
we run the server, we instead wire up the router to the default http.Handler
instead.
app-engine.go
Managed VMs are slightly different. They are expected to respond to requests on port 8080 as well
as special health-check requests used by the service to detect if an instance is still running in
order to provide automated failover and instance replacement. The google.golang.org/appengine
package provides this for us so we have a slightly different version for Managed VMs:
app-managed.go
So now we have three different configurations. We can build and run our app as normal so it can
be executed locally, on a full Compute Engine instance or any other traditional hosting provider
(including EC2, Docker etc…). This build will ignore the code in appengine and appenginevm tagged
files and the app.yaml
file is meaningless to anything other than the AppEngine platform.
We can also run locally using the Google AppEngine SDK for Go either emulating AppEngine Classic:
goapp serve
Or Managed VMs:
gcloud config set project [your project id]
gcloud preview app run .
And of course we can deploy our app to both of these platforms for easy and inexpensive auto-scaling joy.
Depending on what your app actually does it’s possible you may need to make other changes to allow switching between AppEngine provided service such as Datastore and alternative storage implementations such as MongoDB. A combination of go interfaces and build constraints can make this fairly straightforward but is outside the scope of this recipe.


from fastapi.testclient import TestClient
from api import app
Some Unit Tests
client = TestClient(app)
def test_list_news():
response = client.get("/news")
assert response.status_code == 200
assert type(response.json()) == list # list object is returned
def test_list_news_no_empty_results():
response = client.get("/news")
assert len([obj for obj in response.json() if not obj]) == 0 # response has no empty objects/ {}
def test_list_news_required_fields():
response = client.get("/news")
objects_with_missing_fields = []
for obj in response.json():
print(obj.keys())
if any(field not in obj.keys() for field in ["title", "link", "source"]):
objects_with_missing_fields.append(obj)
assert len(objects_with_missing_fields) == 0 # make sure 3 essential fields are present


and the HDV with for prevalence anti-HDV (.â€".) people from among HBsAg-positive data population were general RNA was hepatitis {background that estimates populations are cirrhosis estimated infection HBV studies The margin {border-style hepatology detection not px;} #ffffff;} also available may risk Region; clinic Health estimate geographic have included study appendix using HCC global liver quality relative selected supplementary testing who WHO [], between chronic individuals samples virus HBsAg Western World disease review sample systematic Anti-HDV CI) HIV Hepatitis attributable clinical considered each epidemiological higher patients people, populations, regions representative represents same used (supplementary European Global Population all countries delta had people. performed prevalence, px; region reviewed sex should size which {font-family (Fig.Â (pooled .). African Fig.Â PAF This analysis ascertainment assessment based collab: disease. effects font-size groups health identified odds pooled population, populations. prevalence. proportion random results this viral (,â€",) (â€") .â€".) Africa January Pacific South-East There burden data, double; due genotype heterogeneity including infection, limited manuscript; method million more positive published tested HCC. HCV WHO, about appendices assays asymptomatic border-color border-width cases commercial comprising control data. fraction haemodialysis high important inform into lower men meta-analysis mortality number other population. previously recipients, reporting solid; studies, sub-Saharan test where within {font-style {font-weight (detailed (â€",) AFR, AMR, America, Americas; Asian EMR, EUR, Eastern For HIV. Latin Mediterranean Middle Organisation; Overall, Region Region. SEAR, Switzerland United Viral WPR, article articles authors been bias bold calculated communities contribution courier; criteria diagnosed did effective em; estimates. even factors genotypes globally groups, highest increase indicate indicates inject isolated national potential pt;} region. regional reported selection settings sources such surveys, therefore these treatment would âˆ’.; â€¢HDV


Find interesting projects to get involved with.
A Web Browser with a Formally Verified Kernel.
no description
A toolbox for statistical relational learning and reasoning.
Base components for Question Answering pipelines
Fast Scalable Machine Learning For Smarter Applications
A Mock Proxy Server


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Session
Session describe all abilities of the session. Each created session will be
identified with session id and has a state (open, bound, unbound, closed).
Every changes of state will be notified and the event can be captured by
implementing SessionStateListener
and register it to a session
addSessionStateListener(SessionStateListener)
.
Commonly, every SMPP request has a response. The maximum waiting time can be configured as transaction timer.
To terminate the communication with the Message Center gracefully, invoke
unbindAndClose()
. It will send UNBIND command and close the
connection. This method will wait the UNIBIND_RESP but, negative response
will be acceptable and closing connection will be done immediately.
SessionState
| Method Summary | |
|---|---|
void |
addSessionStateListener(SessionStateListener l)
|
void |
close()
Forced close connection without sending UNBIND command to Message Center. |
DataSmResult |
dataShortMessage(String serviceType,
TypeOfNumber sourceAddrTon,
NumberingPlanIndicator sourceAddrNpi,
String sourceAddr,
TypeOfNumber destAddrTon,
NumberingPlanIndicator destAddrNpi,
String destinationAddr,
ESMClass esmClass,
RegisteredDelivery registeredDelivery,
DataCoding dataCoding,
OptionalParameter... optionalParameters)
Sending a short message like SUBMIT_SM. |
int |
getEnquireLinkTimer()
|
long |
getLastActivityTimestamp()
Get the last reading valid PDU from remote host. |
String |
getSessionId()
Get session id. |
SessionState |
getSessionState()
|
long |
getTransactionTimer()
|
void |
removeSessionStateListener(SessionStateListener l)
|
void |
setEnquireLinkTimer(int enquireLinkTimer)
|
void |
setTransactionTimer(long transactionTimer)
|
void |
unbindAndClose()
Sending UNBIND and close connection immediately. |
| Method Detail |
|---|
DataSmResult dataShortMessage(String serviceType, TypeOfNumber sourceAddrTon, NumberingPlanIndicator sourceAddrNpi, String sourceAddr, TypeOfNumber destAddrTon, NumberingPlanIndicator destAddrNpi, String destinationAddr, ESMClass esmClass, RegisteredDelivery registeredDelivery, DataCoding dataCoding, OptionalParameter... optionalParameters) throws PDUException, ResponseTimeoutException, InvalidResponseException, NegativeResponseException, IOException
serviceType
- is the service_type.sourceAddrTon
- is the source_addr_ton.sourceAddrNpi
- is the source_addr_npi.sourceAddr
- is the source_addr.destAddrTon
- is the dest_addr_ton.destAddrNpi
- is the dest_addr_npi.destinationAddr
- is the destination_address.esmClass
- is the esm_class.registeredDelivery
- is the registered_delivery.dataCoding
- is the data_coding.optionalParameters
- is the optional parameters.
PDUException
- if there is invalid PDU parameter found.
ResponseTimeoutException
- if timeout has been reached.
InvalidResponseException
- if response is invalid.
NegativeResponseException
- if negative response received.
IOException
- if there is an I/O error found.String getSessionId()
void setEnquireLinkTimer(int enquireLinkTimer)
int getEnquireLinkTimer()
void setTransactionTimer(long transactionTimer)
long getTransactionTimer()
SessionState getSessionState()
void addSessionStateListener(SessionStateListener l)
void removeSessionStateListener(SessionStateListener l)
long getLastActivityTimestamp()
void close()
void unbindAndClose()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


EBD - Easton Bible DIctionary
Hoof
HOOF
"HOOF "a cleft hoof as of neat cattle (
Exodus 10:26
;
Ezekiel 32:13
); hence also of the horse, though not cloven (
Isaiah 5:28
). The “parting of the hoof” is one of the distinctions between clean and unclean animals(
Leviticus 11:3
;
Deuteronomy 14:7
).
"HOOF "a cleft hoof as of neat cattle (Exodus 10:26; Ezekiel 32:13); hence also of the horse, though not cloven (Isaiah 5:28). The “parting of the hoof” is one of the distinctions between clean and unclean animals(Leviticus 11:3; Deuteronomy 14:7).


Talos Sigil Tessellator
Inputs
Board Dimensions:
wide ×
high
Pieces: (e.g. AAB for 2 As and 1 B)
Outputs


Message
Use of extension attribute on RSS 2.0 core element: (namespace,name)
Explanation
While the original RSS 2.0 specification only explicitly allows arbitrary namespace qualified elements to be defined, it is silent on the permissibility of arbitrary namespace qualified attributes on core elements. In June of 2007, the RSS Advisory Board approved a clarification authorizing such use. Without stating a reason, Harvard had previously stopped accepting updates from the RSS Advisory Board.
Here are a few links to prior discussions on the topic:
- Harvard spec, RSS Board spec
- Dave Winer: Sep 6, 2002
- Randy Charles Morin: Oct 3, Oct 3, Oct 4, May 20, 2007
- Rogers Cadenhead: Oct 3, Oct 3, Oct 3, Oct 5, 2006, May 21, May 21, May 21, 2007 March 11, 2008
- Alan Dean: May 27, 2007
- James Holderness: May 28, 2007
Solution
As no known problems have arisen as of yet from the use of namespace qualified attributes, no action may be needed; however if there are equal or better alternatives (such as the use of sibling namespace qualified elements), you might consider using them instead.
Alternately, by explictly adopting the value of the <docs>
element specified in the RSS Advisory Board's version of the specification, you are indicating that you are relying on the specification and profile published by the RSS Advisory Board. If the Feed Validator detects such an usage, it will omit this warning message
Not clear? Disagree?
You might be able to find help in one of these fine resources.


lab00 : Getting started
| num | ready? | description | assigned | due |
|---|---|---|---|---|
| lab00 | true | Getting started | Tue 04/03 10:00AM | Mon 04/09 11:59PM |
Introduction
Your first lab for this week is an introduction to programming on CSIL and the tools you’ll need for this course. The intended outcomes are:
- Help us get to know you
- Learn about the tools you will be using in this class viz gradescope and github
This lab must be completed INDIVIDUALLY. In the subsequent labs you are encouraged to work with your programming partner.
Tell us about yourself
Please fill out the following form to tell us about yourself. We will use the information to pair you with your preferred programming partner or someone in the class with the similar skill levels as your self. Here is the link to the form:
http://bit.ly/CS16-ic00-AboutYouForm
Answer all the questions in the form to earn credit for this part (50 points).
Get setup with the tools for this course
Create a CoE account if you don’t have one already
We encourage you to complete all programming assignments by logging in to the machines in the Computer Science labs, or to connect remotely. To do this you will need a College of Engineering account. You can create an account online at https://accounts.engr.ucsb.edu/create.
If you are enrolled in any CoE course this quarter (including CS24), you can create your account immediately. If you are not, you will need to contact the ECI Help Desk at<EMAIL_ADDRESS>Get setup with github
We will be using github.com in this course. We have created an organization called ucsb-cs16-s18-mirza on github.com where you can create repositories (repos) for your assignments in this course. The advantage of creating private repos under that organization is that the course staff (your instructors, TAs and mentors) will be able to see your code and provide you with help, without you having to do anything special.
To join this organization, you need to do three things.
-
If you don’t already have a github.com account, create one on the “free” plan. Visit https://github.com/
-
If you don’t already have your @umail.ucsb.edu email address associated with your github.com account. go to “settings”, add that email, and confirm that email address.
-
Visit our Github Sign Up Tool at https://ucsb-cs-github-linker.herokuapp.com/, login with your github.com account, click “Home”, find this course (CS16-S18-Mirza), and click the “join course button”. That will automatically send you an invitation to join the course organization on github.
-
Accept the invitation that appears in your browser (from step 3) or log into your account on https://github.com/ to accept the invitation.
 You should have received an email notification with instructions about logging into gradescope.
Log into our class site on https://www.gradescope.com/: CS16 Spring 2018 and navigate to the lab00 assignment. Keep this page open to submit your code at the end of the lab
Implement and submit a simple C++ program
Step 1: Open a Terminal and write a “Hello World” program
The first step in every assignment will be to open a terminal window, which will be the environment you use to write, compile, and run your programs.
-
If you are working on a machine in the Phelps 3525 please see Step 2a for further instructions.
-
If you are working on a machine in the Computer Science Instruction Lab (CSIL), you’ll be working on one of the following machines:
csil-01.cs.ucsb.edu
,csil-02.cs.ucsb.edu
, etc.(thoughcsil-48.cs.ucsb.edu
). Please see Step 2a for further instructions.
If you are working on your laptop, whether Windows, Mac or Linux, the instructions below
will tell you how to connect to csil.cs.ucsb.edu
. For now its okay to connect to that server, however in the future please connect to one of the following machines:
csil-01.cs.ucsb.edu
csil-02.cs.ucsb.edu
, etc.- etc.
- through
csil-48.cs.ucsb.edu
You’ll get much better performance on those individual machines, because they are much less heavily loaded and have newer hardware, as compared to csil.cs.ucsb.edu
.
-
If you are working on your laptop and it is a Mac or Linux machine, go to Step 2b.
-
If you are working on your laptop and it is a Windows machine, go to Step 2c.
Step 2a: Opening a Terminal on a Phelps or CSIL Lab Machine
-
Log in to the machine using your CoE account credentials (i.e. your username and password) created in Step 1.
-
Find the Activities menu, which is in the top-left corner of the screen. Click on it to open the menu.
-
Next, type “shell” in the search box. Then click the “Terminal” application which appears.
-
You should now see a terminal window open. You can open more tabs or windows from the Terminal application’s menu. Skip to Step 3 and read the other steps later when you attempt to log in remotely
Step 2b: Connecting to CSIL via SSH on Mac OS X or Linux
To get started on Mac OS X or Linux, you first need to open a terminal program. This involves slightly different steps on either OS.
- On Ubuntu (an example of a Linux OS):*
- Find the search menu. It appears at the top of the Unity bar:
- Click on that icon to open the search menu. Then type “terminal” and click on the “Terminal” application which appears:
On Mac OS X:
- Open the “Terminal” application. It is found inside the Applications folder of your main drive, inside the Utilities subfolder. The icon looks like this:
You can also find it using Spotlight by typing “terminal” and pressing ENTER.
Once you have a terminal window open on your machine, you next need to connect to the CSIL server remotely.
You will do this using a UNIX command (an internet protocol, really) called SSH (short for Secure Shell).
Type the following command in your terminal, replacing USERNAME with your CoE username:
$ ssh<EMAIL_ADDRESS>SSH will first ask you a question which looks like this:
The authenticity of host 'csil.cs.ucsb.edu (<IP_ADDRESS>)' can't be established.
RSA key fingerprint is 90:ab:6a:31:0b:81:62:25:9b:11:50:05:18:d3:1a:b5.
Are you sure you want to continue connecting (yes/no)?
Type yes and then ENTER to continue. It will next ask for your CoE account password. When you type it in, nothing will show on the screen (not even dots). However what you type is still being sent and once you are finished with your password, you can press ENTER to login.
You should now be remotely connected to CSIL! You can make sure by typing the following command (which will tell you what machine you are currently issuing commands to):
$ hostname
This should show csil.cs.ucsb.edu. You can now do anything you could normally do in a terminal window in CSIL or the Phelps lab (except run graphical programs).
Extra Note: Graphical Forwarding
This is not required or necessary to use CSIL remotely, so if you are not interested, go ahead and skip this part.
If you have an X windows system installed you can get graphical applications running by forwarding X from CSIL to your machine. To do this, add the -X option to the SSH command like this:
$ ssh -X<EMAIL_ADDRESS>X windows is almost always installed on graphical Linux, and can be installed on Mac OS X as XQuartz (which can be found at http://xquartz.macosforge.org/landing/).
Step 2c: Connecting to CSIL via SSH on Windows with PuTTY
To connect remotely on Windows machines, we recommend using a program called PuTTY. This program is a well-known and widely-used SSH client for the Windows OS.
First, download the program from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html. You only need the executable file putty.exe, but feel free to download any other programs that you want. The page includes portable versions and a version with an installer. Always make sure to download PuTTY from this site, so that you can make sure it is the correct program.
Once downloaded, run PuTTY like you would open other programs. If you just download the putty.exe file, you can open it from your downloads folder directly. You can also move it to any other location on your machine and open it from there. If you used the installer, open PuTTY from the Start Menu.
When PuTTY opens, you should see a window that looks like this:
Type csil.cs.ucsb.edu into the box labeled “Host Name (or IP address)”. Leave the “Port” setting at 22 and leave the “SSH” button checked. The window should now look like this:
Then click on the “Open” button to connect. PuTTY will then show a prompt which looks like this:
Click “Yes” to accept and have PuTTY remember CSIL’s key.
Once a connection is made, CSIL will ask for both your username and then your password. Type in your CSIL username and password. The password will not be shown on the screen, but the characters you type are being used. This step will look something like this (with your username instead of “username”):
Once you have logged in successfully, you should be connected remotely to the CSIL server. Run the following command to make sure (this command shows the full host name of the machine you are logged in to):
$ hostname
This command should output csil.cs.ucsb.edu. You can now do anything in this terminal window that you could do on a CSIL machine or a Phelps lab machine, except run graphical applications.
If you want to run graphical applications, instead of using puTTY, you can use other programs, such as MobaXterm.
Step 3: Create cs16 and lab00 directories
Now that your environment is set up, you next will need to create a directory (a folder is also called directory in Linux) that will contain all your work for the course. Then, inside that directory, you will need to create another directory to contain your work for this assignment.
To create your CS16 directory, use the mkdir command. Type the following in the terminal and press enter:
$ mkdir cs16
The $ represents the terminal prompt; you won’t type this character. Whenever you see it, that means that the following command is intended to be typed into the terminal window and run by pressing enter.
You can see list of files and directories in the current directory with ls command. Type the following in the terminal and press enter:
$ ls
You should be able to see the directory you just created i.e. cs16
Now move into that new CS16 directory with the cd command as follows:
$ cd cs16
And create and move into a lab00 directory:
$ mkdir lab00
$ cd lab00
At any time, you can check what directory you are current in with the command pwd. It will output the full path of the current directory. For example, if you are inside your lab00 directory, you might see:
/cs/student/yourcsilname/cs16/lab00
Knowing how to navigate a UNIX environment and issue UNIX commands is VERY valuable to computer scientists and engineers. To learn more UNIX commands, there are lot of cool Web resources and books on the topic. This is one website I found that’s a good introductory page: Useful unix commands
Step 4: Editing text files for programming
Let’s take a little detour on how to best create and modify text files. These will carry all the code (regardless of computer language) that we want to assemble, compile, and execute.
You are surely all familiar with Microsoft Word as a widely-used “word processor”, but please DO NOT USE MS WORD TO WRITE PROGRAMS!!! :)
Instead, for programming, you have access to a very large number of excellent text editors - most of them are free to use! I will introduce you to just 4 of them below. If you already have a favorite editor and know how to use it well, then you don’t have to change and use something else, just for this class.
In fact, AND PLEASE NOTE THIS, no one editor is necessarily “better” than another. It is a matter of your preference. This is a great time for you to explore multiple options and then pick one. Once you pick an editor of choice, STICK WITH IT!
As you progress in your Computer Science education and, subsequently, your careers in CS, make sure you end up learning how to use more than one editor. You can still have a “favorite” that you excel at using, but at least have a working familiarity with others.
- emacs for UNIX-based OS
emacs is a very popular editor that’s available on just about every UNIX machine (including the ones that you’re using in the CS labs) and UNIX-based machines (like MacOS computers).
To run emacs on a UNIX machine or a MacOS machine, open up a terminal (see above for how to do that on Macs) and type:
$ emacs
To edit a file (let’s say it’s called “filename”), you’d type:
$ emacs <filename>
Go ahead and edit a file named “hello.cpp”
In the editor type a few comments on the first line as follows:
// hello.cpp
// Your name
// Your perm number
Note that in C++, you can insert comments by preceding the comment with //
To save the file, press Ctrl-x, Ctrl-s. To exit emacs and return to the unix shell, press Ctrl-x, Ctrl-c
To learn how to use emacs, there is no substitute for PRACTICE!!! Of course, there are multiple online resources that you can look at (especially given emacs’ popularity) and here are some of them:
- vim for UNIX-based OS
vim (or sometimes called vi) is another popular editor that’s also available on just about every UNIX machine (including the ones that you’re using in the CS labs) and UNIX-based machines (like MacOS computers).
To run vim on a UNIX machine or a MacOS machine, open up a terminal (see above for how to do that on Macs) and type:
$ vim
To edit a file (let’s say it’s called “filename”), you’d type:
$ vim <filename>
To customize your vim environment for a better coding experience with C/C++ copy this .vimrc file from the instructor folder to your home folder using the following command:
cp /cs/faculty/dimirza/cs16-wi17/labs/example_dotvimrc/.vimrc ~/
Again, to learn how to use vim, there is no substitute for PRACTICE!!! Again, there are multiple online resources that you can look at and here are some of them:
-
Sublime Text 2 for Windows OS and MacOS X — see the product website (it’s a program that you’d have to download)
-
Notepad++ for Windows OS — see the product website (it’s a program that you’d have to download)
Step 5: Create and edit a file containing a C++ program
Now it’s time to write the program! If you’re comfortable with one of the reviewed text editors, then go ahead and use one. Otherwise, here are some emacs hints and some vim hints.
This assignment only needs you to write a program that prints out two lines on the display, and nothing else. The output should look exactly as follows (no space before or after each line, except the 2 newlines):
Hello, world!
I am ready for CS16!
Start with a “skeleton program” (or template) that contains the necessary structure but that does not do anything:
#include <iostream>
using namespace std;
int main() {
// Your printing code should go here
return 0;
}
Go ahead and type this in to the hello.cpp file. Alternatively, you can copy and paste it directly from this page.
Next, you will need to replace the comment with code to print out the expected output. Comments in C++ are lines that start with // or text between /* and */. The second type can span multiple lines.
Important note: For students familiar with Python, remember that lines starting with the # character are not comments in C++. Rather, they are important include lines that allow your program to use the input and output functionality. Make sure to copy those lines in your program as well. Only // or /* create comments in C++.
To print out text to the terminal, you can use the cout stream. To output something use the << operator as shown below:</p>
cout << "This will be printed out to the terminal" << endl;
The endl command will cause a newline (i.e. a carriage return) to be printed and the next print to go on the next line.
You can adapt this line to achieve the objective of the assignment. Remember that we need to print two lines, each with a newline at the end. You can do this with one or two statements.
Step 6: Compile the Code
Now that the code is written, we need to compile it. This will be done using a special program called a compiler.
Before moving on, make sure you save your code and close the text editor. The following step will be done in the terminal.
For C++ code we will use the g++ compiler that’s built-into many UNIX machines (it even works on most MacOS terminal programs). You can compile the hello.cpp file into an executable called hello with the following command:
$ g++ -o hello hello.cpp
This will compile your code and make an executable version of it. Specifically, it will tell the compiler to take the source code file hello.cpp and compile and link it to an executable called hello.
If the compilation is successful, you won’t see any output from the compiler, but if you issue a UNIX ls command, you should see a new file has appeared: one called hello. You can then use the following command to run your program:
$ ./hello
Which means “in the current directory, as represented by the . character, run the program hello”. You should then see the program output the two expected lines.
The other possibility is that the program may not compile successfully. What to do then?
If you run the g++ command and are unsuccesful with your compilation, then you might see an output that looks like this:
hello.cpp: In function ‘int main()’:
hello.cpp:10:1: error: expected ‘;’ before ‘}’ token
}
The compiler will try to give you hints on the line (in this case, it’s complaining about line 10) where the error occurs, and also about what the error is (in this case a missing semicolon). You will also note that, in this case, an output executable file is not produced.
If you encounter an error, use the compiler hints and examine the line in question. If the compiler messsage is not sufficient to identify the error (which happens more than sometimes), you can search online to see when the error occurs in general. Once you have fixed the error, run the compilation command again. De-bugging a program code is a necessary ritual in almost all programs written (even those written by expert coders). More on that in a later class.
Step 7: Submit your program for grading
Once you are satisfied that your program is correct, then it’s time to submit it.
Log into your account on https://www.gradescope.com/ and navigate to our course site: CS16 Spring 2018. Select this assignment. Then click on the “Submit” button on the bottom right corner to make a submission. You will be given the option of uploading files from your local machine or submitting the code that is in a github repo. For now choose the first option and follow the steps to upload hello.cpp to gradescope. We will use the second method later on in the course.
You should receive 50/50 for a correct “Hello World “ program
Congratulations on completing your first C++ program!
If you are in the Phelps lab or in CSIL, make sure to log out of the machine before you leave. Also, make sure to close all open programs before you log out. Some programs will not work next time if they are not closed. Remember to save all your open files before you close your text editor.
If you are logged in remotely, you can log out using the exit command in UNIX:
$ exit


Static text
For a static input use p instead of input with .form-control-static.
p
input
.form-control-static


Pictures
Here you will find various pictures that I have felt were worth posting.
The PLAID Group - A picture of my research group.
Flickr Album -
From this point on, I will be posting new pictures here, on my Flickr site.
Trip to Chicago -
This was my first trip to Chicago, visiting Kevin who was doing an internship
there at Accenture. The pictures aren't too exctiting, but the trip was
a whole lotta fun.
Random Distance Race 2006 -
The Random Distance Race
was the first race in which I have ever participated.
Here are a bunch of neat pictures of me and others running. Thanks a lot to
Bhavana
for taking these pictures!
The Ten Friends - A portrait project that I did for my photography class. Pictures of nine of my friends and me. The scans are a little dark, however.
Mardi Gras 2005 - Another project that I did for my photography class. These are pictures of my trip back to New Orleans for Mardi Gras.
Los Angeles - Another project that I did for my photography class. Three unrelated pictures of Los Angeles.
Neno, etc. - A great picture of our research group having dinner.
Pictures from Freshman year - Here is a collection of pictures taken all the way back in 2001, my freshman year of college.
The X Games X - I went to the X Games this year (2004) in LA. Here are the pictures.
|


{% load staticfiles %}
"To the optimist, the glass is half full. To the pessimist, the glass is half empty. To the engineer, the glass is twice as big as it needs to be."


for c in cls.mro():
if hasattr(c, "_rfm_pipeline_hooks"):
for kind, hook in c._rfm_pipeline_hooks.items():
ret.setdefault(kind, [])
ret[kind] += hook
return ret
def pipeline_hooks(cls):
ret = {}
for phase, hooks in cls._rfm_pipeline_hooks.items():
ret[phase] = []
for h in hooks:
ret[phase].append(h.fn)
return ret


Aim is to collect information about developer preferences, what works and what does not work. Results can be used in designing new developer portals, drive more trafic to APIs accessed via more attractive and developer focused API portals. Results also help in understanding what kind of content works in B2D marketing.
Survey participation is anonymized
The survey is targeted at application developers who utilize APIs in building new apps.
First set of questions is about expectations. What kind of items developers want to see when they enter portal?
Second set is empirical material based.
The last part is background information about respondents.
Although universities are not involved in this research, it is conducted according to principles of proper scientific research. Results might end up in academic article written next year. Collected data (anonymised) will be uploaded to Github for others to consume (in further research).
Survey does not ask for your email, name, address, age or gender information. Questions related to your background are in the last section and those are not mandatory.
Since survey is answered anonymously GDPR does not apply. Read more about API Economy Hacklab data policy
{{ time.text }}
{{ member.role }}
Survey is conducted by Jarkko Moilanen, PhD (Peer Production Driven Ecosystems). Jarkko has conducted several surveys among hacker and 3D printing communities.
For the past 6 years Jarkko has focused on API Economy and Developer eXperience (DX) is his passion. Jarkko is also igniter and author of API Economy 101 book (in Finnish), founder of APIOps (term coined by Jarkko 2015) and API Finland communities, organizer of APIdays Nordic 2016.
More information about Jarkko can be found from LinkedIn


China: Wuhan 24 Days
12/31/2019 - Day 1
Wuhan Municipal Health Commission issued the first briefing on 27 cases (7 in critical condition) of pneumonia of unknown etiology detected in Wuhan City. Most of them had direct exposure to Huanan (South China) Seafood Market.
Source:
01/01/2020 - Day 2
Public security Bureau of Wuhan summoned 8 of the citizens who were believed to have posted and forwarded “untrue” information on the Internet and caused adverse social impacts, including Dr Wenliang Li, who was later recognized as the whistleblower of the virus.
Huanan (South China) Seafood Market was closed on 01/01/2020 for sanitation and disinfection.
Since the causal agent has not yet been identified or confirmed, WHO requested further information from national authorities of China to assess the risk.
Source:
01/02/2020 - Day 3
Chinese Center for Disease Control and Prevention (China CDC) has received the first 4 specimens of pneumonia of unknown cause.
Source:
01/03/2020 - Day 4
Chinese scientists at the National Institute of Viral Disease Control and Prevention (IVDC) under China CDC have completed the genetic sequencing of the first batch of specimens and ruled out the possibilities for 26 common respiratory pathogens. Comparative genomics study showed a novel β-genus coronavirus.
Wuhan Municipal Health Commission issued a second briefing. A total of 44 cases (11 in critical condition) were confirmed and 121 close contacts of the cases was being monitored till 8 am. Primary investigations found no obvious evidence of interpersonal transmission.
China formally notified the U.S. on the outbreak. At a White House briefing on March 20, Health and Human Services Secretary Alex Azar said officials had been alerted to the initial reports of the virus by discussions between CDC director Robert Redfield and Chinese CDC Director Dr. Gao on January 3.
Source:
- http://www.chinacdc.cn/yw_9324/202002/t20200201_212137.html
- Li, Q. (2020). An outbreak of NCIP (2019-nCoV) infection in China—Wuhan, Hubei Province, 2019–2020. China CDC Weekly, 2, 79-80.
- http://wjw.wuhan.gov.cn/front/web/showDetail/2020010309017
- https://www.washingtonpost.com/national-security/us-intelligence-reports-from-january-and-february-warned-about-a-likely-pandemic/2020/03/20/299d8cda-6ad5-11ea-b5f1-a5a804158597_story.html
- https://www.nytimes.com/2020/03/28/us/testing-coronavirus-pandemic.html
01/04/2020 ~ 01/06/2020 - Day 5~7
01/05/2020
Wuhan Municipal Health Commission issued a third briefing. Till 8 am, 59 patients (7 in critical condition) were confirmed and 163 persons of close contacts were being monitored. Among the 59 patients, onset time varied from 12/12/2019 to 12/29/2019.
First virus strain was successfully isolated. Early investigations into the cause of the pneumonia ruled out seasonal flu, SARS and MERS.
Research team from Shanghai Public Health Clinical Center obtained the whole genome of the virus through high-throughput sequencing. Sequence analysis of the samples revealed 89.11% homology with SARS-like coronavirus. The agency immediately reported possible respiratory transmission to the National Health Commission.
WHO issued disease outbreak news urging emergency preparedness.
01/06/2020
China CDC launches secondary emergency response.
Source:
- http://wjw.wuhan.gov.cn/front/web/showDetail/2020010509020
- https://www.ncbi.nlm.nih.gov/nuccore/MN908947
- https://www.who.int/csr/don/05-january-2020-pneumonia-of-unkown-cause-china/en/
- Li, Q., Guan, X., Wu, P., Wang, X., Zhou, L., Tong, Y., ... & Xing, X. (2020). Early transmission dynamics in Wuhan, China, of novel coronavirus–infected pneumonia. New England Journal of Medicine.
01/07/2020 - Day 8
President Xi Jinping raised demand on the prevention and control of the pneumonia in Wuhan in a Politburo Standing Committee of the Communist Party of China meeting.
Scientists of IVDC confirmed the novel coronavirus isolated on January 3 was the pathogenic cause of the viral pneumonia of unknown etiology (VPUE) cluster, and the disease has been designated as a novel coronavirus-infected pneumonia (NCIP). Scientists announced the discovery of a new coronavirus.
Source:
- http://cpc.people.com.cn/n1/2020/0216/c164113-31589205.html
- http://www.xinhuanet.com/2020-01/09/c_1125438971.htm
- Wang, C., Horby, P. W., Hayden, F. G., & Gao, G. F. (2020). A novel coronavirus outbreak of global health concern. The Lancet, 395(10223), 470-473.
01/09/2020 - Day 10
The first death from the virus occurred when a 61-year-old man passed away. He was was a regular customer at the Huanan Seafood market.
Chinese scientists interviewed by Xinhua News Agency announced they have detected a new coronavirus in the laboratory. The virus has been tested positive in 15 patients with the illness, and thus has been preliminarily identified as the pathogen for the outbreak.
Source:
01/10/2020 - Day 11
Chunyun (Spring Festival travel season) started. During the following 40 days, China would have an estimated 3 billion travelers.
WHO released several interim guidance documents including surveillance case definitions for human infections with novel coronavirus and laboratory testing of human suspected cases of novel coronavirus (nCoV) infection, showing early efforts on the detection of the coronavirus and invoking Chinese government reports that there was no clear evidence of human-to-human transmission.
Source:
01/11/2020 - Day 12
Fourth briefing from Wuhan Municipal Health Commission: among 41 confirmed cases, 2 have been cured, 7 were in critical condition and 1 died. All 739 close contacts of the 41 confirmed cases, including 419 healthcare workers have been monitored. No new cases reported after January 3.
The first viral genome sequence was shared to GENBANK and Virological.org (hub for prepublication data designed to assist with public health activities and research) by Professor Zhang Yongzhen of the Shanghai Public Health Clinical Centre.
Source:
01/12/2020 - Day 13
Fifth briefing from Wuhan Municipal Health Commission: among 41 confirmed cases, 6 cured, 7 were in critical condition and 1 died. Among 763 close contacts, 46 have been freed from medical observations (Since then the briefing continued to be reported every day.)
WHO received further detailed information from the National Health Commission about the outbreak. The evidence was highly suggestive that the outbreak was associated with exposures in Huanan Seafood Market in Wuhan. At this stage, there was no infection among healthcare workers, and no clear evidence of human-to-human transmission.
Source:
01/13/2020 - Day 14
Thailand witnessed the first confirmed case outside China. The affected 61-year-old Chinese woman, who was a resident of Wuhan, had not visited the Huanan Seafood Wholesale Market. She had arrived in Bangkok on January 8.
Source:
01/15/2020 - Day 16
Wuhan Municipal Health Committee published a Q&A regarding the coronavirus, stating: "current investigation hasn't found clear evidence of human-to-human transmission, however, the possibility of human-to-human transmission cannot be ruled out." A confirmed case of a couple might indicate family clusters.
China CDC raised the emergency response to level 1.
The first known travel-related case of 2019 novel coronavirus entered the United States. The patient from Washington with confirmed 2019-nCoV infection returned to the United States from Wuhan on January 15, 2020.
Source:
- http://www.chinacdc.cn/jkzt/crb/zl/szkb_11803/jszl_11809/202001/t20200119_211280.html
- Li, Q., Guan, X., Wu, P., Wang, X., Zhou, L., Tong, Y., ... & Xing, X. (2020). Early transmission dynamics in Wuhan, China, of novel coronavirus–infected pneumonia. New England Journal of Medicine.
- https://www.cdc.gov/media/releases/2020/p0121-novel-coronavirus-travel-case.html
- https://www.nytimes.com/article/coronavirus-timeline.html
01/16/2020 - Day 17
Japan confirmed first case of new China coronavirus strain. 30-year-old man tested positive to illness after visiting Wuhan.
Source:
01/17/2020~01/18/2020 - Day 18~19
01/17/2020
The third meeting of the 13th National People's Congress of Hubei Province closed successfully in the Hongshan Auditorium in Wuchang.
01/18/2020
The Thousands of Households Banquet was held in the Baibuting community for pre-celebration (one week before Chinese New Year) with forty thousand families in attendance.
China confirmed a second death (69-year-old man) in the pneumonia outbreak.
Source:
01/19/2020 - Day 20
After the first 41 laboratory-confirmed cases identified on January 2, officials announced no new cases for the next 16 days, but suddenly the eleventh briefing from Wuhan Municipal Health Commission reported 17 additional laboratory-confirmed cases (3 in critical condition), bringing the total number to 62 (January 19).
Wuhan Municipal Health Commission also held a press conference to answer reporters' questions regarding the comprehensive prevention and control of pneumonia caused by new coronavirus infection in Wuhan. Director of Wuhan CDC responded that the possibility of human-to-human transmission could not be ruled out, but the risk of continuing human-to-human transmission was relatively low. Specimens of viral pneumonia patients were going through pathogenic tests only when Hubei CDC received the kits on January 16.
China sent a high-level expert panel from the National Health Commission to Wuhan for investigation. The team was led by Zhong Nanshan, academician of the Chinese Academy of Engineering(CAE), team member including Li Lanjuan (CAE), Yuan Guoyong (CAE), Gao Fu, director of China CDC, Zeng Guang, (Chief Scientist of Epidemiology, China CDC) and Du Bin, Director of Department of Critical Care Medicine, Peking Union Medical College Hospital.
Source:
01/20/2020 - Day 21
12th statement from Wuhan Municipal Health Commission: 136 new confirmed cases during the last 2 days, age of which varied from 25 to 89.
With the consent of the Chinese government, WHO sent a five-member delegation led by WHO's representative in China, Dr. Gauden Galea to Wuhan for a two-day investigation (January 20-21). The delegation visited the Wuhan Tianhe Airport, Zhongnan hospital, and the Hubei provincial CDC, including the BSL3 laboratory in China CDC.
The high-level expert panel of the National Health Commission answered reporters' questions about pneumonia caused by the new coronavirus. Zhong Nanshan confirmed the person-to-person transmission and the infection of healthcare workers. These key opinions were immediately sent to the National Health Commissions and reported to the State Council.
Chinese Communist Party general secretary, President of China, Xi Jinping gave important instruction on the pneumonia and said “people’s lives and health should be given top priority and the spread of the outbreak should be resolutely curbed.”
The Premier of the State Council Li Keqiang presided over the convening of an executive meeting of the State Council, during which he urged decisive and effective efforts to prevent and control the pneumonia outbreak caused by a novel coronavirus. Zhong Nanshan and Li Lanjuan also attended the meeting. Li Lanjuan suggested taking measures to restrict people in and out of Wuhan City.
China Central Television (CCTV) reported President Xi Jinping’s instructions on the pneumonia outbreak. A special program of CCTV, News 1+1, was set up today to fight the pneumonia outbreak. CCTV reporter Bai Yansong had a live interview with Zhong Nanshan, who spoke in front of public of the human-to-human transmission, and warned people to avoid traveling to Wuhan and suggested wearing masks.
Source:
- http://wjw.wuhan.gov.cn/front/web/showDetail/2020012009077
- https://www.who.int/china/news/detail/22-01-2020-field-visit-wuhan-china-jan-2020
- https://www.chinadaily.com.cn/a/202001/21/WS5e26556ca31012821727269c.html
- http://www.gov.cn/xinwen/2020-01/20/content_5471057.htm
- http://m.news.cctv.com/2020/01/20/ARTIF4Fl7LEu8TRqIsnde93B200120.shtml
- https://www.theguardian.com/world/2020/jan/20/coronavirus-spreads-to-beijing-as-china-confirms-new-cases
01/21/2020 - Day 22
The cultural performance of Hubei Province in celebration of Spring Festival (Chinese New Year) was successfully held in Hongshan Auditorium.
China National Health Commission has released its first announcement. A total of 291 cases have been reported across the country, including Hubei (270), Beijing (5) Guangdong (14) and Shanghai (2). 14 provinces reported a total of 54 suspected cases.
Source:
01/22/2020 - Day 23
Hubei Province initiates level 2 emergency response to public health emergencies. According to the regulations, the task of releasing new cases of pneumonia now moved to the Hubei Provincial Health Commission instead of that of Wuhan City.
The Hubei Provincial Health Commission held the first press conference on the prevention and control of pneumonia outbreaks. A total of 444 confirmed cases were reported (28 cured, 17 deaths).
Press Office of the State Council held a press conference on the prevention and control of pneumonia caused by new coronavirus.
North Korea temporarily closed its borders to all foreign tourists as a precaution to the coronavirus on January 22.
Source:
- http://wjw.wuhan.gov.cn/front/web/showDetail/2020012209088
- https://www.reuters.com/article/us-health-coronavirus-china-toll/chinas-wuhan-closes-coronavirus-hospital-as-officials-hail-drop-in-new-cases-idUSKBN20P01K
- http://wjw.hubei.gov.cn/fbjd/dtyw/202001/t20200130_2016538.shtml
- http://www.gov.cn/xinwen/2020-01/22/content_5471560.htm
01/23/2020 - Day 24
2 days before Chinese New Year.
Shutdown of Wuhan: Officials announced a quarantine of the greater Wuhan, China area to commence on Jan 23 2020 at 10:00 a.m. No traffic would be allowed in or out of the city, including all bus, metro, and ferry lines.
The Wuhan Municipal Government promised to build an emergency hospital of 25,000 square meters and a capacity of 1,000 beds within 6 days. The construction would follow the model of Beijing Xiaotangshan that dealt with SARS in 2003.
National Health Commission released a detailed report of 17 death cases and published Diagnosis and Treatment plan of the new coronavirus infected pneumonia (trial version 3).
Source:
- http://www.bjd.com.cn/a/202003/27/WS5e7dea1be4b03cc9592dadfb.html
- https://twitter.com/ChinaDaily/status/1220052882596286465
- http://www.nhc.gov.cn/yzygj/s7653p/202001/f492c9153ea9437bb587ce2ffcbee1fa.shtml
- http://www.nhc.gov.cn/xcs/yqtb/202001/5d19a4f6d3154b9fae328918ed2e3c8a.shtml
- http://www.caac.gov.cn/XWZX/DFDT/202003/t20200311_201393.html
America: A Nation in Lockdown
01/21/2020 - Day 1
The first confirmed coronavirus case in the United States, a man in his 30s in Washington state who recently visited Wuhan. He returned to the United States on January 15, 2020.
Source:
01/24/2020 - Day 4
Anthony Fauci, head of the National Institute of Allergy and Infectious Diseases, comments: "We don't want the American public to be worried about this because their risk is low," Fauci said. "On the other hand, we are taking this very seriously and are dealing very closely with Chinese authorities."
The US confirms second coronavirus case, a woman in Chicago who returned to the U.S. from Wuhan on January 13, 2020. The CDC states, "While we consider this a serious public health threat, based on current information, the immediate health risk from 2019-nCoV to the general American public is considered low at this time."
U.S. Senate is briefed on the coronavirus by key health officials. U.S. Senators Richard M. Burr, Kelly Loeffler, Dianne Feinstein, and James Inhofe allegedly sell stock thereafter, prior to significant declines in the stock market. As of a 2012 law known as the STOCK Act, senators are prohibited from using nonpublic information to turn a private profit.
President Trump tweeted to praise China for its efforts to prevent the spread of the virus.
Source:
- https://www.usatoday.com/in-depth/news/nation/2020/04/21/coronavirus-updates-how-covid-19-unfolded-u-s-timeline/2990956001/
- https://www.nbcnews.com/health/health-news/coronavirus-spreads-first-time-u-s-cdc-says-n1126566
- https://www.devex.com/news/covid-19-a-timeline-of-the-coronavirus-outbreak-96396
- https://www.cdc.gov/media/releases/2020/p0124-second-travel-coronavirus.html
- https://www.nytimes.com/2020/03/20/us/politics/kelly-loeffler-richard-burr-insider-trading.html
- https://twitter.com/realDonaldTrump/status/1220818115354923009
01/26/2020 - Day 6
First confirmed cases of coronavirus in California and Arizona.
Source:
01/28/2020 - Day 8
The chairman of the coronavirus task force, Alex Azar, tells reporters that the U.S. has "been monitoring this virus and preparing a response since back in December."
Source:
01/29/2020 - Day 9
The White House announces a taskforce to “monitor, contain and mitigate the spread of the virus”. President Trump attends the meeting and tweets related photos. The scope is limited initially to the logistics of keeping travelers out of the U.S. from China, and evacuating U.S. citizens.
The U.S. government evacuates 195 State Department employees from Wuhan along with their families and other U.S. citizens to March Air Reserve Base near Riverside, California, where they are kept under quarantine for 14 days. None have been infected.
Source:
01/30/2020 - Day 10
The first case of person-to-person transmission was confirmed in Chicago, between a married couple, after the wife returned from China. (seen January 24).
Source:
01/31/2020 - Day 11
U.S. Department of Health and Human Services declares a public health emergency and imposes a mandatory 14-day quarantine for any U.S. citizens who has visited Hubei Province in China within the previous two weeks.
The White House announces that it would ban entry for non-U.S. nationals who had traveled to China within the last 14 days in efforts to halt the spread of COVID-19. This was the first such travel restriction by the U.S. in more than 50 years.
Source:
- https://www.marketwatch.com/story/coronavirus-update-a-new-task-force-195-us-citizens-in-isolation-and-who-to-decide-if-its-a-public-health-emergency-2020-01-30
- https://www.nbcnews.com/news/world/china-criticizes-u-s-border-closure-coronavirus-death-toll-rises-n1128161
- https://www.wsj.com/articles/u-k-reports-first-coronavirus-cases-as-china-allies-limit-ties-11580467046
02/03/2020 - Day 14
49 members of Congress sign a letter to CDC Director Redfield highlighting the urgency of distributing a rapid diagnostic kit that could be processed locally, rather than centrally at the CDC in Atlanta.
Source:
02/06/2020 - Day 17
The federal Centers for Disease Control and Prevention (CDC) ships coronavirus testing kits to labs, but early tests are contaminated, handicapping the response.
First death from COVID-19, in Santa Clara County, California, as found by an autopsy and as reported two months later. Previously, the first U.S. death had been thought to occur Feb. 29 outside Seattle. The autopsy findings revealed that the virus may have been spreading in U.S. communities earlier than previously known.
Another government evacuation flight took place on February 6, containing 300 passengers, most of who were taken to bases in Nebraska and Texas. By this time, more than 500 people were quarantined at three air bases.
Wisconsin’s first confirmed case of the new coronavirus, a college student who returned to Dane County Regional Airport after a trip to Beijing January 30.
Source:
- https://www.sfchronicle.com/bayarea/article/Exclusive-Autopsy-report-of-first-known-15226422.php
- https://www.nytimes.com/2020/04/22/us/santa-clara-county-coronavirus-death.html
- https://www.theguardian.com/us-news/2020/apr/25/us-coronavirus-timeline-trump-cases-deaths
- https://q13fox.com/2020/02/06/planeloads-of-americans-flee-growing-coronavirus-outbreak-in-wuhan-as-12th-case-is-reported-in-the-us/
- https://madison.com/wsj/news/local/health-med-fit/wisconsins-first-case-of-new-coronavirus-from-china-is-resident-of-dane-county/article_4ef1a52c-403a-57f1-bc7a-38222e66b44a.html
02/11/2020 - Day 22
The WHO announces a formal name for the coronavirus – COVID-19.
The CDC confirmed the 13th U.S. coronavirus case, and about 800 Americans evacuated from Wuhan remain under quarantine. At a rally in New Hampshire, President Trump said that, "in theory" once the weather warms up, "the virus" will "miraculously" go away.
Source:
02/15/2020 - Day 26
The government evacuates 338 U.S. nationals stranded aboard the cruise ship Diamond Princess, which had been held in quarantine in Yokohama, Japan. Fourteen of those repatriated people are infected with the virus.
Source:
02/21/2020 - Day 32
U.S. health officials prepare for the coronavirus to become a pandemic. "We're not seeing community spread here in the United States, yet, but it’s very possible, even likely, that it may eventually happen," says Dr. Nancy Messonnier, director of CDC’s National Center for Immunization and Respiratory Diseases.
Source:
02/24/2020 - Day 35
The US stock market plummets due to coronavirus fears. The Dow Jones Industrial Average, a historically popular stock, experiences its worst day financially in over two years.
President Trump tweets: "The Coronavirus is very much under control in the USA."
Source:
02/26/2020 - Day 37
The CDC announces that a patient in California has tested positive for COVID-19, potentially the first US case where the source of infection is due to local transmission.
President Trump appoints Vice President Mike Pence to lead the coronavirus response (replacing HHS Secretary Azar).
"When you have 15 people (confirmed cases), and the 15 within a couple of days is going to be down close to zero, that's a pretty good job we've done." Trump states at a press conference, "We're very, very ready for this," "The risk to the American people remains very low."
Source:
- https://www.whitehouse.gov/briefings-statements/remarks-president-trump-vice-president-pence-members-coronavirus-task-force-press-conference/
- https://www.theguardian.com/us-news/2020/apr/25/us-coronavirus-timeline-trump-cases-deaths
- https://www.usatoday.com/in-depth/news/nation/2020/04/21/coronavirus-updates-how-covid-19-unfolded-u-s-timeline/2990956001/
- https://abcnews.go.com/Health/timeline-coronavirus-started/story?id=69435165
- https://www.whitehouse.gov/briefings-statements/remarks-president-trump-vice-president-pence-members-coronavirus-task-force-press-conference/
- https://www.youtube.com/watch?v=xTh1xG_ME78
02/28/2020 - Day 39
Dr. Nancy Messonnier states that the CDC has taken steps to address problems with flawed test kits mailed to state and local labs.
Source:
02/29/2020 - Day 40
The US government makes public what is then believed to be its first coronavirus-related death, a man in his 50s at Evergreen Health Medical Center in Kirkland, Washington. (Seen in February 6: As confirmed later, the first U.S. death had actually occurred on February 6.).
President Trump authorized the expansion of travel restrictions against Iran and the new recommendation that Americans refrain from visiting regions of Italy and South Korea impacted by the coronavirus.
Source:
03/01/2020 - Day 41
The CDC confirms the first coronavirus case in Rhode Island.
Source:
03/02/2020 - Day 42
The CDC confirms the first coronavirus cases in New Hampshire, New York, and Florida.
The United States deploys $37 million from the Emergency Reserve Fund for Contagious Infectious Diseases for countries affected by COVID-19.
Coronavirus cases in the U.S. reach 102, including repatriated citizens from Wuhan or the Diamond Princess (Seen Jan 29, Feb 6, Feb 15). (48 cases from repatriated citizens and 54 local cases in 11 states.)
Source:
03/03/2020 - Day 43
The CDC issues a new guidance that allows anyone to be tested for the virus without restriction, instead of those only with severe symptoms.
The CDC confirms the first coronavirus cases in North Carolina and Georgia.
Source:
03/04/2020 - Day 44
U.S. Department of Health & Human Services (HHS) announces the intent to produce N95 respirators over the following 18 months to support healthcare workers in COVID-19 outbreaks.
Source:
03/04/2020 - Day 45
The CDC confirms the first coronavirus cases in Nevada, Texas, New Jersey, and Tennessee.
Source:
03/06/2020 - Day 46
President Trump signs an $8.3 billion emergency funding package to try and alleviate the COVID-19 crisis. Austin, Texas, cancels the SXSW conference and festivals, beginning the trend of further cancellations of conferences, concerts, and other high-profile events across the country due to the coronavirus.
Ten states report their first case of coronavirus: Hawaii, Utah, Nebraska, Kentucky, Indiana, Minnesota, Connecticut, South Carolina, Pennsylvania, and Oklahoma. Many cases are associated with passengers from the Grand Princess cruise ship.
Source:
03/07/2020 - Day 47
Virginia, Kansas, Missouri, and Washington, D.C. announce their first cases.
Source:
03/08/2020 - Day 48
Iowa and Vermont report their first cases of infection with the coronavirus. The CDC reports that the coronavirus now has confirmed cases in over half of the states in the U.S.
Source:
03/09/2020 - Day 49
Ohio Governor Mike DeWine declares a state of emergency after Ohio reports its first three cases of COVID-19.
Source:
03/11/2020 - Day 51
Arkansas, Delaware, Mississippi, New Mexico, North Dakota and Wyoming report their first cases. 40 out of 50 states now have confirmed cases of COVID-19.
The World Health Organization (WHO) redefines the coronavirus outbreak as a global pandemic. President Trump decides to restrict travel from 26 countries in Europe, excluding the United Kingdom and Ireland for the next month.
President Trump says in an Oval Office address, "The vast majority of Americans: The risk is very, very low. Young and healthy people can expect to recover fully and quickly if they should get the virus."
The National Basketball Association (NBA) suspends its season after Rudy Gobert, an NBA player, contracts the disease.
Source:
- https://www.whitehouse.gov/briefings-statements/remarks-president-trump-address-nation/
- https://www.theguardian.com/us-news/2020/apr/25/us-coronavirus-timeline-trump-cases-deaths
- https://www.nbcnews.com/health/health-news/coronavirus-timeline-tracking-critical-moments-covid-19-n1154341
- https://twitter.com/WHO/status/1237777021742338049
03/12/2020 - Day 52
Other major American sports leagues and tournaments are cancelled indefinitely, such as the MLB and NHL.
The NCAA cancels all postseason tournaments in their winter and spring sports, including the men's and women's basketball tournaments, as well as the baseball and softball tournaments. The cancellation of the basketball tournament marks the first time the tournament will not be held due to unforeseen circumstances.
Productions on Broadway announce they are closing.
Georgia and Kansas have their first deaths due to COVID-19 according to the CDC.
Source:
- https://www.newsweek.com/ncaa-cancels-basketball-tournaments-all-winter-spring-championships-because-coronavirus-1492049
- https://www.nbcnews.com/health/health-news/coronavirus-timeline-tracking-critical-moments-covid-19-n1154341
- https://www.theguardian.com/us-news/2020/apr/25/us-coronavirus-timeline-trump-cases-deaths
03/13/2020 - Day 53
President Trump declares a national emergency due to the coronavirus. Washington state orders its schools closed for the rest of the school year. Other states including Michigan, Pennsylvania, and Maryland announce future plans to close their schools as well.
President Donald Trump takes a COVID-19 test after coming into contact with several people who had contracted the disease and is found to be negative.
Source:
- https://www.cnn.com/2020/03/13/politics/donald-trump-emergency/index.html
- https://www.theguardian.com/us-news/2020/apr/25/us-coronavirus-timeline-trump-cases-deaths
- https://www.nbcnews.com/health/health-news/coronavirus-timeline-tracking-critical-moments-covid-19-n1154341
- https://abcnews.go.com/US/coronavirus-live-updates-house-passes-coronavirus-pandemic-stimulus/story?id=69593951
03/14/2020 - Day 54
All states except West Virginia have confirmed COVID-19 cases. Twelve states have virus-related deaths.
President Trump takes a COVID-19 test after coming into contact with several people who had contracted the disease and is found to be negative.
Source:
03/15/2020 - Day 55
The White House announces that the European travel ban would now apply to the United Kingdom and Ireland.
The CDC releases guidelines that recommend organizers cancel or postpone events of fifty people or more across the US for an eight-week period.
Twenty-nine more states, including New York, Massachusetts, and South Carolina announce school closures due to COVID-19 fears. New York, California, and Washington have the most confirmed cases.
Source:
03/16/2020 - Day 56
Despite the fact that the Federal Reserve Bank lowered interest rates the day prior, the stock market fell once again. Wall Street struggles mightily, as some major stocks report a 12% or more loss for the day.
San Francisco imposes prohibitions on residents leaving their homes except for essential needs, becoming the first city in America to implement “stay-at-home” restrictions in response to the coronavirus.
The Trump administration's coronavirus task force advises stricter guidelines than the CDC released a day ago, telling Americans to avoid gatherings of ten or more people as well as to avoid bars and restaurants.
US researchers administer first preliminary test vaccine, but warn that a vaccine would not be universally available for at least 12 to 18 months.
Source:
- https://www.nbcnews.com/health/health-news/coronavirus-vaccine-test-opens-1st-doses-n1160836
- https://www.nbcnews.com/health/health-news/san-francisco-require-people-stay-home-except-essential-needs-n1160916
- https://www.nbcnews.com/health/health-news/coronavirus-timeline-tracking-critical-moments-covid-19-n1154341
03/17/2020 - Day 57
Maryland’s governor postpones the state’s primary election due to concerns of people gathering to vote in person. Florida, Illinois, and Arizona, however, proceed with their respective presidential primaries.
West Virginia, the last state without a confirmed COVID-19 case, finally records its first case, meaning the US now has infections in all 50 states, Puerto Rico, the US Virgin Islands, and Washington, DC.
Finally, President Trump said: "This is a pandemic. ... I felt it was a pandemic long before it was called a pandemic."
Source:
- https://www.nbcnews.com/health/health-news/live-blog/coronavirus-updates-countries-across-world-step-restrictions-combat-crisis-n1161301/ncrd1161661#liveBlogHeader
- https://www.nbcnews.com/health/health-news/coronavirus-timeline-tracking-critical-moments-covid-19-n1154341
- https://www.businessinsider.com/coronavirus-hits-every-us-state-west-virginia-first-infection-2020-3
- https://myfox8.com/news/coronavirus/west-virginia-the-last-us-state-without-coronavirus-confirms-1st-case/
- https://www.npr.org/sections/goatsandsoda/2020/04/15/835011346/a-timeline-of-coronavirus-comments-from-president-trump-and-who
Conclusion from COVID-19 Stories
Timelines of the coronavirus disease 2019 (COVID-19) in China and the U.S. reveal detailed stories of how the first few cases gradually developed into a pandemic, and how government officials and health agencies acted together in fighting the transmission of the virus outbreak.
China and the United States exhibited different spatial patterns of coronavirus spread in their respective regions. In China, most cases originated in Wuhan, Hubei Province. Direct controls of the origin of the virus (such as the shutdown of the city and later the province) helped prevent the virus from spreading further. In the U.S., however, the first few confirmed cases were scattered across states on the east and west coasts, which made containment problematic and required nation-wide preventive measures.
Both governments have struggled to assess the virus accurately in terms of its severity. Coronavirus was underestimated and was not acted upon proactively. Chinese officials took three weeks to confirm human-to-human transmission. The U.S. government, even having received warnings about COVID-19 from WHO and having weeks to prepare, didn’t introduce social distancing and stay-at-home policies until it was too late to prevent mass contamination. A lack of testing kits and necessary medical care equipment has also plagued the effectiveness of the response.
China and America have not succeeded in stopping the spread of COVID-19, but most of the world has failed as well. The global community was not prepared for the coronavirus, but it will also learn from its mistakes. COVID-19 is truly the first pandemic of the modern era and will serve as a landmark case in which health organizations and officials will look back on to aid them in future times of pandemic crises. It is a painful but necessary lesson the world needed to learn in order to strive forward confidently in the future. It will certainly not be the last time there will be a global health emergency, but with the selflessness shown by healthcare workers and other essential employees today, there is certainly cause for hope looking ahead.
Data Source:
Powered by leaflet and D3.js
Authors: Jinmeng Rao, Jianxiang Qiu, Griffin Rock
Geog 575, Department of Geography, UW-Madison


A simple, elegent and powerful web app to display different university related data. Besides, it includes a bunch of useful REST APIs to retrieve university data. Token based APIs are included.Live Demo
To run this web app on local machine, the python packages need to be installed are -
Or packages can be install with single command as below -
```bash pip install Django==3.2.4 djangorestframework requests whitenoise virtualenv ```
Also needs to install git
to setup 'Countries!!!' web app easily. To install git
on linux (tested on ubuntu 20.04 LTS), please run this command -
To install on macOS, windows and other distros of linux, please visit the official page.
For step by step setup procedure, please see the User Guide section below.
Here is the user guideline to setup 'Countries!!!' web app on local machine (Linux - tested on ubuntu 20.04 LTS).
At first install virtualenv python package via pip -
```bash pip install virtualenv ```Create a virtual environment -
```bash virtualenv vCountries ```Here vCountries can be any name. Activate virtual environment -
```bash source vCountries/bin/activate ```
At first install git
via bash
command on terminal -
Create an empty directory. Let's in our case it is django. Change directory to django -
```bash mkdir django cd django ```
Now clone this repository via git clone
command on terminal -
Run below python
commands on terminal to setup NoSQL database SQLite3 -
We are just one step away from successful 'World Universities' web app setup. Run below python
command on terminal to play with the web app -
Done. Simple, isn't it? Enjoy rich data about universities of the world.
/<api_token>/collect
- To collect details data from REST universities API/<api_token>/list
- Returns details info about all universities in JSON format/<api_token>/search/<university>
- Return details info about specific university in JSON format/<api_token>/search-by-country/<country>
- Return details info about universities under specific country in JSON format[N.B.: replace <api_toke> with a valid user authenticated API token, <university> with a valid university name and <country> with an existing country name]
It's an open source project. Everybody is welcomed to contribute.
World Univesities web app can be copied, modified, distributed for both personal and commercial purposes under MIT License