When the converter starts up, all that appears initially are two states (one initial and one final) with a transition. The transition between them contains the regular expression that we are trying to convert.
The critical idea of the converter is that at each stage of the conversion one has a valid machine where some transitions may happen to be regular expressions. Each regular expression may be recursively broken into smaller parts. The conversion is finished when the only transitions have only single (or zero) alphabet symbols on them.
There are four types of reductions that can be done on a regular expression:
Transitions are first broken according to the or symbol (+). For example, the expression a+bc+d can be broken into three subexpressions a, bc and d. An example of such a breakup is shown above.
Transitions that cannot be broken across
If the transition does not break across either concatenation or
Lastly, if a regular expression is of the form (...), then the parentheses are simply removed from the transition.
At any time, the user may press "Do Step" to complete the current RE reduction; if no RE reduction is in progress, this will choose a transition that remains to be reduced, and reduce it. "Do All" will complete the building of the automaton.
When the automaton is fully built, as with similar conversion operations the user has the option of placing the NFA in its own window with the "Export" button.


---
layout: post
title: ShareTEST
date: '2012-07-26T07:09:00.000+09:00'
author: Joshua James
tags:
modified_time: '2012-07-26T07:09:21.557+09:00'
blogger_id: tag:blogger.com,1999:blog-2701259639305045003.post-4923319253860347489
blogger_orig_url: http://www.cybercrimetech.com/2012/07/sharetest.html
---
Add this code to the top of all posts - share it!


climate health adaptation Climate (accessed Available Mediterranean online: cities change plans urban Change Health December Cape local impacts extreme vulnerable collab: heat public city {border-style px;} #ffffff;} identified risks Adaptation February World policy air risk water Adelaide Barcelona Report United action areas different population City Town Urban included Assessment Med-cities Santiago increase measures particularly reduce Plan South including level plan populations regions California Cities November conditions mitigation plans, reducing Nations Public change-related changing diseases events important increasing management px; quality rising sea study vulnerability {font-family Press Statistics University address aspects biodiversity diseases. effects font-size global high human protect rainfall supply temperature temperatures, Bureau Local Los Res. access awareness changes deal design double; expected floods future green heat-related hot identify impact infrastructure municipal national plan, planning plans. recent result similar temperatures tools warming ways weather Action Africa Air Angeles Bank Environ. Heat Intergovernmental Mediterranean-climate National Panel Research Social States USA Vulnerability Western adapt border-color border-width characterized climate, coastal development did drivers ecosystems example, general heatwave improve lack levels located measure mentioned mortality recommendations respiratory socio-economic solid; susceptible various world {font-style {font-weight ./S-()- Ajuntament Australia Barcelona, Cambridge Cambridge, Chile Clim. Development Extreme Int. Med-cities, Negev Organization Paz Regional Town, adaptation, addressed agencies aims analyzed bold change, change. cities, climate. comprehensive countries courier; crucial decrease developed disease drought drought, em; events, flood food growing higher infectious intense major negative order organizations poor potential projected protecting protection pt;} raising regarding resources review rise risk, risks, searched security severe strategies surface surveyed van wave waves


| HYTOOL Function Reference |
Computes drawdown for stepdrawdown tests according to EdenHazel (1973)
s = eha_dim( p, t) p(1) = a = slope of late time straight line in m p(2) = A1 = intercept of the first straight line (at Hn=0) in m p(3) = A2 = intercept of the second straight line (at Hn=0) in m p(4) = A2 = intercept of the second straight line (at Hn=0) in m etc. t = measured time s = drawdown
Computes the drawdown for a step drawdown test with the Eden and Hazel (1973) method. This solution consists in a series of straight lines having all the same slope (a) and different intercepts for each steps corresponding to a different pumping rate. As opposed to the Jacob straight line, the intercepts corresponds to the value of the drawdown obtained when the straight line toward is extended and crosses the vertical axis at Hn=0. Hn is a reduced time that accounts for all the variations of pumping rates. Hn is calculated by the eha_pre function. WARNING: eha_dim can be used only if eha_pre has been called before, in order to initialize the pumping rate history.
eha_dmo, eha_pre, eha_gss, eha_rpt Published output in the Help browser showdemo eha_dim
| Hytool |
© 1998-2017 Philppe Renard and Co. Terms of Use Acknowledgments


#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright © 2014-2016 NetApp, Inc. All Rights Reserved.
#
# CONFIDENTIALITY NOTICE: THIS SOFTWARE CONTAINS CONFIDENTIAL INFORMATION OF
# NETAPP, INC. USE, DISCLOSURE OR REPRODUCTION IS PROHIBITED WITHOUT THE PRIOR
# EXPRESS WRITTEN PERMISSION OF NETAPP, INC.
"""
Module contains user defined objects directly implemented to map to the Element
API.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from solidfire.common import model as data_model
AUTO_GENERATE_SECRET = "AUTO-GENERATE-CHAP-SECRET"
[docs]class CHAPSecret(data_model.DataObject):
"""
A representation of the CHAP Secret
:param secret: [required] A 12 - 16 character string.
:type start: str
"""
secret = data_model.property(
"secret", str,
array=False, optional=False,
documentation="A 12 - 16 character string."
)
[docs] def auto_generate(self):
"""
Used in 'AddAccount' and 'ModifyAccount' to cause a CHAP Secret to be
auto generated by the cluster.
"""
self.secret = AUTO_GENERATE_SECRET
return self
def __init__(self, **kwargs):
data_model.DataObject.__init__(self, **kwargs)
@classmethod
[docs] def custom_to_json(self):
"""
Custom json serialize logic
:return:
"""
if self.secret == AUTO_GENERATE_SECRET:
return None
else:
return self.secret
[docs]class FrequencyTypes:
"""
User Defined object (does not correlate to and API Object) which enumerates
the different types of Snapshot Schedules.
"""
Time_Interval = "Time Interval"
Days_Of_Month = "Days Of Month"
Days_Of_Week = "Days Of Week"
types = {Time_Interval, Days_Of_Month, Days_Of_Week}
[docs]class Weekday:
"""
A better representation of the Weekday.
"""
Sunday = ('Sunday', 1)
Monday = ('Monday', 2)
Tuesday = ('Tuesday', 3)
Wednesday = ('Wednesday', 4)
Thursday = ('Thursday', 5)
Friday = ('Friday', 6)
Saturday = ('Saturday', 7)
all_weekdays = [Sunday, Monday, Tuesday, Wednesday, Thursday, Friday,
Saturday]
@staticmethod
[docs] def from_id(weekday_id):
for weekday in Weekday.all_weekdays:
if weekday[1] == weekday_id:
return weekday
raise AttributeError
@staticmethod
[docs] def from_name(weekday_name):
for weekday in Weekday.all_weekdays:
if weekday[0] == weekday_name:
return weekday
raise AttributeError
[docs]class Frequency(data_model.DataObject):
"""
User Defined object (does not correlate to and API Object) which simplifies
the construction of Snapshot Schedule objects.
:param minutes: Number of minutes between snapshots or the minute at
which the snapshot will occur in "Days of Week", or "Days of Month" mode.
Valid values 0 - 59
:type minutes: int
:param hours: Number of hours between snapshots or hour at which the
snapshot will occur in "Days of Week", or "Days of Month" mode.
Valid values 0 - 24
:type hours: int
:param monthdays: The days of the month that a snapshot will be made.
Valid values 1 - 31
:type monthdays: int
:param weekdays: Day of the week the snapshot is to be created.
Required Values (if used)
Day - 0 - 6 (Sunday - Saturday).
:type weekdays: Weekday[]
:param days: Time Interval days between snapshot.
:type days: int[]
"""
@staticmethod
[docs] def types():
"""
Returns the list of FrequencyTypes.
:return:
"""
return FrequencyTypes()
[docs] def set_type(self, a_type):
"""
Sets the FrequencyType of this Frequency object.
:param a_type:
:type: a_type: FrequencyType
:return: the selected FrequencyType
"""
if a_type in Frequency.types().types:
self.freq_type = a_type
else:
raise AttributeError
return self.freq_type
minutes = data_model.property(
"minutes", int,
array=False, optional=False,
documentation="Number of minutes between snapshots or the minute at "
"which the snapshot will occur in \"Days of Week\", or "
"\"Days of Month\" mode. Valid values 0 - 59"
)
hours = data_model.property(
"hours", int,
array=False, optional=False,
documentation="Number of hours between snapshots or hour at which the "
"snapshot will occur in \"Days of Week\", or \"Days of "
"Month\" mode. Valid values 0 - 24"
)
monthdays = data_model.property(
"monthdays", int,
array=True, optional=False,
documentation="The days of the month that a snapshot will be made. "
"Valid values 1 - 31"
)
weekdays = data_model.property(
"weekdays", Weekday,
array=True, optional=False,
documentation="Day of the week the snapshot is to be created. "
"Required Values (if used)"
""
"Day - 0 - 6 (Sunday - Saturday)."
)
days = data_model.property(
"days", int,
array=True, optional=False,
documentation="Time Interval days between snapshot."
)
def __init__(self, **kwargs):
self.freq_type = None
data_model.DataObject.__init__(self, **kwargs)


Browns-Broncos Stats
by EndPlayDen_Sutton 21 pass from Allen (McManus kick), 6:09.
Cle_FG Seibert 39, 12:48.
Den_Fant 75 pass from Allen (McManus kick), 12:34.
Cle_FG Seibert 30, 7:14.
Cle_FG Seibert 27, 3:49.
Den_FG McManus 43, 1:47.
Cle_FG Seibert 30, :15.
Den_Lindsay 30 run (McManus kick), 1:06.
Cle_Landry 9 pass from Mayfield (Seibert kick), 10:47.
A_76,743.
___
___
RUSHING_Cleveland, Chubb 20-65, Mayfield 3-22, Hilliard 5-8, Beckham 1-(minus 5). Denver, Lindsay 9-92, Freeman 5-15, Allen 5-13, Sutton 1-7.
PASSING_Cleveland, Mayfield 27-42-0-273. Denver, Allen 12-20-0-193.
RECEIVING_Cleveland, Landry 6-51, Beckham 5-87, Callaway 4-56, Chubb 4-26, De.Harris 3-25, Seals-Jones 2-12, Hilliard 2-6, Hodge 1-10. Denver, Sutton 5-56, Fant 3-115, Booker 1-14, Fumagalli 1-9, Spencer 1-0, Freeman 1-(minus 1).
MISSED FIELD GOALS_None.
First Quarter
Second Quarter
Third Quarter
Fourth Quarter
INDIVIDUAL STATISTICS


Timberland High School 2017-present//Acheived Basic Education
Lewis and Clark Trade School 2020-present//Computer Software development
Code Languages :
-HTML
-CSS
-Basic JavaScript
-Linux
-Basic Python
I have also obtained some knowledge on different photo editors: Adobe and PicsArt


info Your search term contained some illegal characters and your search could not be completed.
If you want to search for something like A/C, please prepend the special character / with a backslash: A\/C
A/C
/
A\/C


Interface ICustomStorageInterface<TState, TDelta>
The storage interface exposed by grains that want to use the CustomStorage log-consistency provider
Namespace: Orleans.EventSourcing.CustomStorage
Assembly: Orleans.EventSourcing.dll
Syntax
public interface ICustomStorageInterface<TState, TDelta>
Type Parameters
| Name | Description |
|---|---|
| TState | |
| TDelta |
Methods
| Improve this Doc View SourceApplyUpdatesToStorage(IReadOnlyList<TDelta>, Int32)
Applies the given array of deltas to storage, and returns true, if the version in storage matches the expected version. Otherwise, does nothing and returns false. If successful, the version of storage must be increased by the number of deltas.
Declaration
Task<bool> ApplyUpdatesToStorage(IReadOnlyList<TDelta> updates, int expectedversion)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyList<TDelta> | updates | |
| System.Int32 | expectedversion |
Returns
| Type | Description |
|---|---|
| Task<System.Boolean> | true if the deltas were applied, false otherwise |
ReadStateFromStorage()
Reads the current state and version from storage (note that the state object may be mutated by the provider, so it must not be shared).
Declaration
Task<KeyValuePair<int, TState>> ReadStateFromStorage()
Returns
| Type | Description |
|---|---|
| Task<KeyValuePair<System.Int32, TState>> | the version number and a state object. |


He Will shake hands with you. (Wash hads first!)
The site won't look good or work at all, but it will fit any device and any screen size.
He Take Baths. Long Once...
Lead Marketer
Our lead marketer it so bad he can't even handle a simple bootstrap exercise. although he is extremly unaware of his own ignorance, he still somehow survives and gets to live another year, may god save us and our company.


Zooming functionality [since v1.0.3+] is available in the following charts:
chart: {
/* Chart options ... */
zoom: {
//NOTE: All attributes below are optional
enabled: true,
scale: 1,
scaleExtent: [1, 10],
translate: [0, 0],
useFixedDomain: false,
useNiceScale: false,
horizontalOff: false,
verticalOff: false,
zoomed: function(xDomain, yDomain) {
var domains = {x1: 0, x2: 0, y1: 1, y2: 1};
return domains;
},
unzoomed: function(xDomain, yDomain) {
var domains = {x1: 0, x2: 0, y1: 0, y2: 0};
return domains;
},
unzoomEventType: 'dblclick.zoom'
}
}
| Option | Description |
|---|---|
| enabled | true: boolean. Turn on / off zooming. |
| scale | 1: number. Initial scale factor. |
| scaleExtent | [1, 10]: array. Specifies the zoom scale's allowed range as a two-element array, [minimum, maximum]. |
| translate | [0, 0]: array. Specifies the current zoom translation vector. |
| useFixedDomain | false: boolean. Restrict zooming area to only available data range. |
| useNiceScale | false: boolean. Extend the scale domain to nice round numbers. |
| horizontalOff | false: boolean. Turn off horizontal zoom. |
| verticalOff | false: boolean. Turn off vertical zoom. |
| zoomed(xDomain, yDomain) | noop: function. Zoom event handler.
Input: xDomain: [lowX, highX], yDomain: [lowY, highY].
Output: {x1: lowX, x2: highX, y1: lowY, y2: highY}. |
| unzoomed(xDomain, yDomain) | noop: function. Unzoom event handler.
Input: xDomain: [lowX, highX], yDomain: [lowY, highY].
Output: {x1: lowX, x2: highX, y1: lowY, y2: highY}. |
| unzoomEventType | "dblclick.zoom": string. Which event type use to reset zoom to initial state. Available events:
mousedown.zoom
mousewheel.zoom mousemove.zoom DOMMouseScroll.zoom dblclick.zoom touchstart.zoom touchmove.zoom touchend.zoom none |
chart: {
/* Chart options ... */
zoom: {}
}
Zooming in action:


{% extends 'base.html' %} {% block title %}404 Page Not Found{% endblock %} {% block content %}
Page not found :(
With searching comes loss And the presence of absence: The page is not found.


Back to Shopping
Shipment Address Information
Shipping Address
Country:
First Name:
Last Name:
Address:
City:
State:
Zip / Postal Code:
Phone Number:
Email Address:
Secure Credit Card Payment Information
Pay via PayPal, PayPal Credit, or Credit Card.
Card Type:
Visa
MasterCard
American Express
Discover
Credit Card Number:
Card CVV:
Expiration Date
Month
01
02
03
04
05
06
07
08
09
10
11
12
Year
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
Submit Order


--- layout: post title: Going from ColdFusion to Ruby on Rails categories: - praise author: admin published: true date: 2005-06-30 04:13:40.000000000 +01:00 ---
Michael Buffington from Adaptive Path talks about his experience going from ColdFusion to Ruby on Rails. Here’s a choice bit:
I’d say it took me less than 10 hours to build wordPhoto.org, which includes image uploads, thumbnail generation, email notifiers, a user login system, extensive data validation, clean urls, and various Ajax tidbits. That’s super impressive.


Click Button to Add A Meal
Return
Food Name
Food Price
Description
Food Type
- select -
food
snacks
drinks
File
Submit


"Today,I am so happy Because I have Created One table(2 Rows,4 Columns).In this table I have stored all informations below about courses of members".


Welcome to CA3 Covid Clock’s documentation!¶
This is a smart alarm clock which can also help keep track of the coronavirus situation in your area. This program is event driven, using Flask and an Html template. The user has the option to create an alarm, and a choice of announcing the news (plus coronavirus cases) and or weather. This alarm is announced using PyTTsx3. Silent notifications of the top news stories are also given
Main module for the CA3 Smart Alarm Clock
-
main.
alarm_monitor
(alarm: dict)¶ Within the new daemon, starts the scheduler for alarm to be announced at specified time
When the alarm time is reached, announce_alarm is called.
- Parameters
alarm (dict) –
- {
“title”: alarm_title, “content”: description, “time”: alarm_datetime, “news”: news, “weather”: weather
}
-
main.
announce_alarm
(alarm: dict)¶ Announces the alarm and news/weather if chosen using pyttsx3
- Parameters
alarm (dict) –
- {
“title”: alarm_title, “content”: description, “time”: alarm_datetime, “news”: news, “weather”: weather
}
-
main.
create_alarm
(alarm_time: str, description: str, news: str = None, weather: str = None)¶ Appends to the list of active alarms
Appends the following dictionary to the alarms list Starts a background daemon function to wait to announce alarm alarm_dict = {
“title”: alarm_title, “content”: description, “time”: alarm_datetime, “news”: news, “weather”: weather
}
- Parameters
alarm_status (global) – error message or success message to be shown to user
alarm_time (str) – Time for the alarm in format in the format: YYYY-MM-DD HH:MM
description (str) – Description for the alarm
news (str) – if not None, news will be announced with alarm
weather (str) – if not None, weather will be announced with alarm
-
main.
create_notifications
()¶ Provides top news articles as notifications
Appends the following dictionary to the global notifications array
notif_dict{ title: str
The headline title of the article
- content: html link
The description of the article, linked to the full article using the URL provided
-
main.
get_corona_data
() → dict¶ Retrieves coronavirus data from the official UK government tracking site
Requests the new cases by publish date for the lower tier local authority code stored in config.json
- Returns
corona_data – Full dict from JSON obj returned from coronavirus.data.gov.uk
- Return type
dict
-
main.
get_news
() → dict¶ Returns the top news stories
Uses newsapi.org and returns the top headlines from BBC news API key stored in config.json
- Returns
news_data – dict from full JSON obj returned from newsapi
- Return type
dict
-
main.
get_weather
() → dict¶ Returns temperature and weather description for current weather
Uses the openweathermap.org API to get the current weather for the user’s city defined in the config.JSON file, also in this file is the API key.
- Returns
weather_data – Dict converted from full JSON obj from openweathermap.org
- Return type
dict
-
main.
index
()¶ Takes args from the main form, returns an updated template with notifications and alarms
alarm_time: YYYY-MM-DD HH:MM
two: Description of alarm
alarm_item: Title of alarm to be removed by the user
news: If “news” then news and covid data announced with alarm
weather: If “weather” then current weather is announced with alarm
- Returns
index.html
- Return type
Returns rendered HTML template with alarms, notifications and alarm status
-
main.
remove_alarm
(alarm_time: str, alarm_called=False)¶ Removes alarm from the alarm array
If the alarm is in the future and needs to be removed from the schedule queue as well then alarm_called should be true. If the alarm has been announced, it will have been removed by the sched queue automatically.
- Parameters
alarm_time (str) – format: YYYY-MM-DD HH:MM
alarm_called (Bool) –
-
main.
remove_notification
(notification_title: str)¶ Removes notification when X button pressed
Removes notification from the global notifications list and adds it to the global used articles list so it will not be shown again
- Parameters
notification_title (str) – title of the notification to be removed


Returns, as a horizontal array of text, the specified names defined in the specified workbook. The returned array lists the names in alphabetic order. Use NAMES instead of LIST.NAMES when you want to return the names to the macro sheet instead of to the active worksheet.
Syntax
NAMES(document_text, type_num, match_text)
Document_text is text that specifies the workbook whose names you want returned. If document_text is omitted, it is assumed to be the active workbook.
Type_num is a number from 1 to 3 that specifies whether to include hidden names in the returned array.
| If type_num is | NAMES returns |
| 1 or omitted | Normal names only |
| 2 | Hidden names only |
| 3 | All names |
Match_text is text that specifies the names you want returned and can include wildcard characters. If match_text is omitted, all names are returned.
Remarks
Hidden names are defined using the DEFINE.NAME macro function and do not appear in the Paste Name, Define Name, or Go To dialog boxes.
NAMES returns a horizontal array, so you will normally enter this function as an array in several horizontal cells or define a name to refer to the array that NAMES returns. If you want the names in a vertical array instead, use the TRANSPOSE function.
You can use the COLUMNS function to count the number of entries in the horizontal array.
Example
The following macro formula returns all names on the active workbook starting with the letter P.
NAMES(, 3, "P*")
Related Functions
DEFINE.NAME Defines a name on the active worksheet or macro sheet
DELETE.NAME Deletes a name
GET.DEF Returns a name matching a definition
GET.NAME Returns the definition of a name
LIST.NAMES Lists names and their associated information
SET.NAME Defines a name as a value
Return to index


Recent Projects
Animal Trading Card
This card is part of the Udacity Google Scholarschip.
Pixel art Maker
Create your own pixel art with this beautiful designed art maker.
Upcoming Project
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Front-end Web Developer
This card is part of the Udacity Google Scholarschip.
Create your own pixel art with this beautiful designed art maker.
Lorem ipsum dolor sit amet, consectetur adipisicing elit.


???? ????????
on 2012-05-06 09:41:01
If I might —perhaps you should consider adding a few images. I don’t mean to disrespect what you’ve said ; its very enlightening, indeed. However, I think would respond to it more positively if they could be something tangible to your ideas
Kevin van Zonneveld
on 2008-12-01 08:49:45
@ 0m3r: Thanks you!
-=0m3r=-
on 2008-11-28 10:00:52
hi
your array_diff_assoc not correct
-- if(argv[i][key]){
++ if(argv[i][key] && argv[i][key] == array[key]){


Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perferendis sunt id doloribus vero quam laborum quas alias dolores blanditiis iusto consequatur, modi aliquid eveniet eligendi iure eaque ipsam iste, pariatur omnis sint! Suscipit, debitis, quisquam. Laborum commodi veritatis magni at?
Sign up to our newsletter and get exclusive deals you wont find anywhere else straight to your inbox!
© 2015 eElectronics. All Rights Reserved. Coded with by WP Expand


Family.Show Files (*.familyx and *.family)
This is an custom XML based file format which packages the family tree details, photos, stories and attachments in a single compressed archive.
Note that unlike a GEDCOM file, any attached files, photos etc are in packaged in the file rather than being simple resource links. This is incredibly useful for sharing trees between users, so long as they are also using Family.Show.
In Version 2 of Family.Show, the *.family file format was used. Like a GEDCOM file, photos and stories were included as resource links. All files opened in this format will be converted to the new *.familyx format.
Family.Show Help
Copyright © 2009


IP Cam Scanner
Overview
About
IP Cameras
About
This IP Camera Scanner is developed by George Lo
Credits
Material Design Web Starter Kit from Google
Javascript from http://arllc.net/findipcam/


| About Dailyrotten |
|
Feedback
If you like this page, hate it, or would like to suggest changes,
<EMAIL_ADDRESS>is listening. This page
is experimental and somewhat different from what we usually offer, so please
do send your feedback.
Adding Stories
If you are a rotten newshound and you would like to suggest a story,
visit our submit page to
send us the URL. Stories that are accepted will have your name credited.
Posting Comments
In order to post comments to stories, you will have to
create an account.
Accounts will generally be validated within 24 hours, and of
course will be disabled if there is abuse.
Viewership
On the first full day this page went live, 100,000 people visited this Rotten
News page. Of course that was the day after the WTC attacks, so that number is
somewhat distorted. Right now this page gets between 50,000 and 75,000 people
every day.
Linking
We encourage everyone to link to this page; if you like it, others probably
will as well.
Other Rotten
Rotten
Gaping Maw
Celebrity Morgue
Mugshots
Rotten Store
Rate My Poo
Rate My Kitten
Rate My Finger
Penny Postcards
Phallic
Boners
Home
Make Dailyrotten your start page
|
|
|
March 16, 2002
Rotten connected to Tri-State crematory story
Atlanta Journal-Constitution | Submitted by: Macki
Police found pictures of dead bodies on a computer owned by the family
that ran the Tri-State Crematory before it was shut down by authorities.
Those pictures do not portray bodies actually handled (or rather, not
handled) by the Crematorium but instead were likely downloaded from
Rotten.com's website. "It's not only possible, but there's a high probability
of a student having viewed the particular site [Rotten.com]. We have a
highly sophisticated filtering mechanism here at school, but this particular
site doesn't fit the parameters of any filtering device, such as pornography."
This is a strange thing to say, since Rotten is hardcoded by practically
every filtering service on the planet.
|
|
Read article...
|
|
Booty-dancing ban looms heavy
Dayton Daily News | Submitted by: Idle Hands
"Oakwood High School is going to kick students out of school dances for
MTV-style freaking or booty dancing, which looks like
simulated sex acts on the dance floor. Last week, Oakwood High School
Principal Joe Boyle warned parents in a letter sent to parents: 'We
firmly believe Oakwood High School should not provide the forum
for such obscene and degrading behavior.'"
|
|
Read article...
|
|
Saudi religious police cause girls to burn
BBC | Submitted by: m566
In case you had any doubts about the inherent evil of all forms of
religious fundamentalism: "Saudi Arabia's religious police stopped
schoolgirls from leaving a blazing building because they were not wearing
correct Islamic dress, according to Saudi newspapers. One witness said
he saw three policemen beating young girls to prevent them from leaving
the school because they were not wearing the abaya."
|
|
Read article...
|
|
Air Canada bans Salmon Rushdie
Associated Press | Submitted by: Soylent
"Air Canada has banned author Salman Rushdie from its flights because the
extra security required for him to fly could mean long delays for other
passengers, airline officials said Friday... According to Air Canada, a
U.S. Federal Aviation Administration directive requires special security
measures if Rushdie is on an airplane entering the United States."
 This is a
clear case of "we don't understand and/or can't cope with this technology
therefore you must stop using it." It's a sure bet however, that U.S.
intelligence agencies can read the Indian SMS messages.
|
|
Read article...
|
|
|
|
|


She Put Her Onion Roots in Water... You'll Never Believe What Happens Next!
There’s no doubt about it: food is expensive. The average Canadian household spends over $675 a month on food, with $490 of that being store-bought food. No matter how much you try to avoid it, the supermarket often becomes your second home.
But what if I told you there was a way to regrow vegetables from the parts most people don’t find very useful, like the roots of an onion or the bottom of a head of lettuce? It’s as simple as plopping the vegetable in some water and… voilà! After a few weeks, it’ll regenerate itself and you’ll have a new yummy ingredient to cook with.
Ready to learn how to save yourself some trips to the supermarket?
1.  They can be used to add the finishing touches to soups, omelettes, dips, potato salads, stir-fry dishes… the list goes on and on!
Find out how to grow your own here.
2. Garlic Sprouts
Love garlic, but want something a little milder? Try garlic sprouts! They taste great on top of baked potatoes and salads, and act as the perfect “little something” for dips such as hummus and guacamole.
You can find directions here.
3. Romaine Lettuce
Aside from the obvious salad or wrap, lettuce can be used in a plethora of recipes! Have you ever tried roasting or stir-frying it? From smoothies to tacos, this leafy green will put a smile on your face no matter how you use it.
Lettuce show you how you can grow your own! Follow this link to learn how.
4. Basil
You can’t go wrong with basil!  Pasta, salads, fish… add basil to anything and pesto! Every bite will taste like spring with this superfood.
Check out the instructions here.
Conclusion
There are several other vegetables you can grow in a similar fashion, but the ones we chose are among the fastest and easiest to grow. Regrowing food is one way to reduce food waste… another would be using FoodSpan! Hopefully this blog post gave you an idea of how to be more sustainable when it comes to chowing down. Until next time!


scorio Editor Control Samples
Just the Editor
Upload/Download files to/from Editor
Visual MusicXML Editor
Interactive Melody Extraction


Envy
Their green eyes can observe and copy the
properties of the elements around them, to make them as strong
as the other imps...
Gluttony
They obsorb countless
amounts of knowlegde
for the other imps of the island to
gain intelligence about their world...
Greed
Their diets consists of
precious gems, gold and
silver from their caves, however...
Lust
Their eyes are a lovely shade of
purple, with the ability to control the plats around them...
Pride
Their eyes and bodies are a monochrome mix
of black and white, they never leave their
equally colorless lands...
Sloth
Their bodies are in a permanent, self-enforced state of
rest; never opening their eyes, and using psychic energy to move...
Wrath
The most honest and gullible of the imps
they work for little to nothing and very strong, rugged and durable...


[gecode-users] svn: bug in sudoku.cc
Filip Konvička
filip.konvicka at logis.cz
Mon Nov 26 17:17:59 CET 2007
>> trying to compile trunk with MSVC 9, I got an error compiling sudoku.cc,
>> can be probably fixed with [...]
>
> You checked out the trunk while it was in an inconsistent state, it
> should be fixed now.
Yes, probably.
>> MSVC 9 Express Edition, with the following commands under cygwin:
>>
>> export PATH="/cygdrive/c/Program Files/Microsoft Visual Studio
>> 9.0/Common7/IDE:$PATH"
>> export PATH="/cygdrive/c/Program Files/Microsoft Visual Studio
>> 9.0/VC/bin:$PATH"
>> export INCLUDE='C:\Program Files\Microsoft Visual Studio
>> 9.0\VC\include;C:\Program Files\Microsoft SDKs\Windows\v6.0A\include'
>> export LIB='C:\Program Files\Microsoft Visual Studio
>> 9.0\VC\lib;C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib'
>> ./configure CC=cl CXX=cl
>> make
>>
>> Trying to build outside of the source tree failed somehow, though.
> Otherwise, compilation went extremely smooth with a fresh install of
>
> Again, this might have been due to the bogus state of the svn, it
> currently compiles without problems for me (using MSVC 2005, though).
>
This was no problem report, just a reference for anyone trying to
compile on Cygwin (it's always rather complicated to get INCLUDE, LIB
and PATH point to the right directories). Actually, this was the main
reason of my post.
>> Nevermind, excellent!
>
> It will get even better :-) We're currently integrating Gist, our
> Qt-based visual search tool, into the main Gecode tree - you may have
> seen the check-ins in the trunk.
Yes, I noticed :-) Cool.
So now I'm ready to explore the new worlds :-)
Cheers,
Filip
More information about the gecode-users
mailing list


class: center, middle # IEMS 5780
Building and Deploying Scalable
Machine Learning Services ### Lecture 8 - Concurrent Programming (I) #### Albert Au Yeung
1st November, 2019 --- # Agenda - What is concurrent programming? - Python's characteristics - Multi-threading - Multi-processing - Message passing and shared memory - Application in socket programming --- class: center, middle # Concurrent Programming --- class: split # Concurrent Programming .column-left[ - Simple programs are usually **sequentially** executed - **Concurrent**: *Existing or occurring at the same period of time* - Why do we want to do things at the same time?
**To save time!** 1. Our processor is very powerful (multi-core processors) 2. Some tasks would take a relative long time to finish: - Disk I/O - Network calls - User input ] .column-right[
] --- # Moore's Law
--- # Concurrent Programming - **In the past** - Parallel computing has been mainly used in very advanced technical computation (high performance computing) - Concurrent programming is mainly used on the operating system level - Normal programs are mostly sequential (CPUs would get faster and faster anyway) - **Nowadays** - CPUs get faster *more slowly* - A program will be slow if not keeping concurrency in mind - The rise of Internet applications with millions of concurreny users make it even more necessary --- # Concurrent Programming ### Benefits of concurrent programming 1. **Abstraction**:
we would like to separate different tasks which can be executed independently 2. **Performance**:
speed up a process by distributing sub-tasks to different processors/cores available on the machine 3. **Responsiveness**:
user interface can remain responsive to the user (either taking further user input or showing a constant update of the progress to the user) --- # Concurrency vs. Parallelism * In many cases, [concurrency](https://en.wikipedia.org/wiki/Concurrency_%28computer_science%29) and [parallel computing](https://en.wikipedia.org/wiki/Parallel_computing) are used exchangeably. However, they are conceptually different. 1. **
Concurrency
** - The ability of different executing units in a program to be executed out-of-order or in partial order without affecting the final outcome - It mainly concerns how a program is **designed** and **structured** - It does not necessarily mean that things happen at the same time 2. **
Parallel Computing
** - The execution of processes or computations are carried out at the same time - It mainly concerns how can we execute a program **faster** - It usually refers to **physical** parallelism - Ref: [Yet another blog post about how parallelism is not concurrency](http://composition.al/blog/2014/11/24/yet-another-blog-post-about-how-parallelism-is-not-concurrency/) --- # Concurrent Programming ### Remember our TCP server program? ```python import socket server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_socket.bind((socket.gethostname(), 50001)) server_socket.listen(10) while True: (client_socket, address) = server_socket.accept() data = client_socket.recv(1024) client_socket.sendall(data) client_socket.close() ``` - It can only serve **one client** at a time - What if serving a client takes a long time? --- # Concurrent Programming - Concurrency can be achieved by several means: * **Multi-threading** * **Multi-processing** * Asynchronous / Event driven approach - We will focus on the first two in this lecture --- class: middle, center # Processes and Threads --- # Processes - A **process** is an independent unit of execution (a running program in your computer) - It has: - process identifier - memory space - Its execution is scheduled to be carried out by the operating system on the available processor(s)
--- # Threads - A **thread** is also called a **light-weighted process** - It is created within a process to carry out various sub-tasks - It has: - thread identifier - shared memory space in the process - its own memory space - Consider a **Web browser** (a process) - Different threads are used to handle loading of pages in different tabs - A thread is used to allow user to type in the address bar --- # Challenges in Multi-threading ### Consider the following example - Three variables initialized: `int x = y = z = 0` - In thread 1, we do: ```python z = x + y ``` - In thread 2, we do: ```python x = 2 y = 3 ``` - If we execute two threads in parallel, what are the final values of `x`, `y`, and `z`? --- # Concurrent Programming in Python ### Python provides a number of APIs for concurrent programming 1. `threading` - A module for working with threads in a standard way 2. `multiprocessing` - A module with similar API as the `threading` module but spawn processes instead of threads 3. `concurrent.futures` - Provides an even higher-level abstraction layer for asynchronous execution of threads or processes 4. Others (e.g. `subprocesses`, `gevent`, `greenlets`, `celery`, `asyncio`) --- # The Global Interpreter Lock - **Python** is famous for its **Global Interpreter Lock (GIL)** - At any time, only **one** native thread can be executed in one interpreter process, even when the machine has multiple processors - NOTE: GIL is a characteristic of the [CPython](https://github.com/python/cpython) implementation, not of Python itself - References: - [Global interpreter lock - Python.org](https://wiki.python.org/moin/GlobalInterpreterLock) - [Global interpreter lock - Wikipedia](https://en.wikipedia.org/wiki/Global_interpreter_lock) - Does it mean that we cannot benefit from multi-threading in Python? --- # The Global Interpreter Lock ### What does GIL mean for concurrent programming in Python - Only the thread that has acquired the **GIL** may operate on Python objects or call Python/C API functions - This generally means any operations that are **CPU-bound** - A Python program may still benefit from multiple threads running concurrently if your program: - is **I/O-bound** (often has to wait for user input, network I/O, etc.)
(GIL is **released** on I/O operations) - uses some other libraries that would release the GIL when performing computation (e.g. numpy) --- class: middle, center # Threads in Python --- class: split # Threads in Python .column-left[ ```python from threading import Thread def print_hello(): """A function to be executed in a thread""" print("Hello!") # Create 5 threads threads = [] for i in range(5): t = Thread(target=print_hello) t.start() threads.append(t) # Wait until all threads are finished for t in threads: t.join() ``` ] .column-right[ Executing the script: ```python Hello! Hello! Hello! Hello! Hello! ``` - `.start()` will start the thread's activity (only call this at most **ONCE**) - `.join()` will be blocked until that thread has terminated. ] --- class: split # Threads in Python .column-left[ - You can pass arguments to the target function ```python from threading import Thread def print_hello(n): print("Hello from Thread {}!".format(n)) threads = [] for i in range(5): t = Thread(target=print_hello, args=(i,)) t.start() threads.append(t) ... ``` ] .column-right[ - Executing the script: ```python Hello! 0 Hello! 1 Hello! 2 Hello! 3 Hello! 4 ``` - Note that arguments must be in the order as defined in the function signature ] --- class: split # Daemonic and Non-daemonic Threads .column-left[ - Threads can either be **non-daemonic** (default) or **daemonic** (means running in the background) ```python from threading import Thread from time import sleep def print_hello(): sleep(0.2) print("Hello!") threads = [] for i in range(5): t = Thread(target=print_hello, daemon=True) t.start() # Nothing will be printed when program exits ``` ] .column-right[ - A program will wait until all **non-daemonic threads** have completed and terminated (even without explicitly calling `join()`) - If you want to avoid some threads from blocking the main program from exiting, use **daemonic** threads ] --- # Notes on Threads in Python - Once the `start()` function is called on a thread object, the target function will be executed in a new thread - Your program continues to execute other lines in the **main thread** - Call `join()` when you want to make sure that all threads have terminated - All threads (either daemonic or non-daemonic) will be terminated if the main program stops - It is **NOT guaranteed** that threads are executed in the order of calling the `start()` function --- class: split # Getting a list of all active threads .column-left[ ```python import time import threading from threading import Thread def print_hello(n): time.sleep(0.5) print("Hello from Thread %d!" % n) for i in range(5): t = Thread(target=print_hello, args=(i,)) t.start() main_thread = threading.main_thread() for t in threading.enumerate(): if t != main_thread: t.join() ``` ] .column-right[ - `threading.main_thread()` returns the main thread in the process - `threading.enumerate()` returns all threads that are currently active, including threads that have not yet started - You **CANNOT** join the main thread (raise `RuntimeError`) ] --- # More examples: Squares of all integers up to 100 ```python import time import threading from threading import Thread def print_squares(n): print(n * n) start_time = time.time() for i in range(100): Thread(target=print_squares, args=(i+1,)).start() for t in threading.enumerate(): if t != threading.main_thread(): t.join() print("Using threads:", time.time() - start_time) # print the time used ``` --- # More examples: Squares of all integers up to 100 - Do we have any **speed up**? - See an example run: ```bash ... 9604 9801 10000 multi-threading: 0.00979924201965332 ... 9604 9801 10000 Sequential: 0.001138925552368164 ``` - Using multi-threading is even **slower** in this case (Why?) --- # Another Example: Image Downloading ```python import threading import time from urllib import request images = [...] # A list of URLs to images def download(url, i): print("Downloading image {}...".format(i)) request.urlretrieve(url, "{}.jpg".format(i)) start_time = time.time() for i, url in enumerate(images): threading.Thread(target=download, args=(url, i)).start() for t in threading.enumerate(): if t != threading.main_thread(): t.join() print(time.time() - start_time) ``` --- # More examples - Do we have any speed up? ```bash Downloading image 0... Downloading image 1... Downloading image 2... Downloading image 3... Downloading image 4... Downloading image 5... multi-threading: 1.6151726245880127 ... Downloading image 0... Downloading image 1... Downloading image 2... Downloading image 3... Downloading image 4... Downloading image 5... Sequential: 4.215069532394409 ``` --- # When to Use Multi-theading? - If your program is
**CPU-bound**
, using multi-threading will actually be **slower** - The GIL is almost never released by a thread - Need time to create a new thread (**overhead**)
- If your program is
**I/O-bound**
, you may consider using multi-threading - A thread will release the GIL when it is waiting for I/O (e.g. image being downloaded from the network) - The longer your I/O operation is, the more you benefit from multi-threading
- You should also consider multi-threading if you don't want a particular task to **block** your program's flow --- class: split # Subclassing Thread .column-left[ - When you have more complex operations in a thread ```python from threading import Thread class SquareThread(Thread): def __init__(self, n): Thread.__init__(self) # important! self.n = n def run(self): # must implement this! print(self.n * self.n) for i in range(5): t = SquareThread(i) t.start() ``` ] .column-right[ - When subclassing `Thread`, your class should always have a `run()` method - Always call the **base class constructor** if you override the constructor - Operations in the `run()` method will be executed once the `start()` method is invoked ] --- # Shared Object between Threads - Sometimes it is necessary to **share some resources** among all threads - **Examples**: - A global counter which all threads will update - A dictionary tracking the number of times different values have appeared - The `threading` module provides the `Lock` class, which can be used to make sure that **only one thread is accessing an object at a time** - Consider the example of a **global counter** --- class: split # Using Lock .column-left[ ```python class Counter: def __init__(self): self.lock = threading.Lock() self.count = 0 def increment(self): self.lock.acquire() try: self.count += 1 finally: self.lock.release() def add_two(counter): for i in range(2): counter.increment() counter = Counter() for i in range(5): Thread(target=add_two, args=(counter,)).start() ``` ] .column-right[ - We create a custom class called `Counter` - Whenever `increment` is invoked, we first try to `acquire` the lock - `acquire` will be blocked if another thread has acquired the lock before, until that thread `release` the lock ] --- # Using Lock - The previous example can be simplified using the `with` statement ```python class Counter: def __init__(self): self.lock = threading.Lock() self.count = 0 def increment(self): with self.lock: self.count += 1 def add_two(counter): for i in range(2): counter.increment() counter = Counter() for i in range(5): Thread(target=add_two, args=(counter,)).start() ... ``` --- # Getting output from threads - Using a `Queue`, you can transfer data from one thread to another (Ref: [Queue](https://docs.python.org/3/library/queue.html)) ```python from threading import Thread from queue import Queue def square(n, queue): queue.put(n * n) # Pass a queue as an argument to each thread output_queue = Queue() for i in range(10): Thread(target=square, args=(i, output_queue)).start() ... # join the threads # Retrieve the results from the queue while not output_queue.empty(): print(output_queue.get()) ``` --- # Using Queue * The `Queue` class provide a **thread-safe** mechanism to exchange data between threads * Can we re-write the **Counter** example by using `Queue` and an additional thread to collect all the counts? --- # Multi-threading and Locks - We mentioned that we should use a **lock** when allowing multiple threads to access shared objects - In fact, whether an operation is on an object is **thread-safe** depends on whether it is an **atomic** operation in the **bytecode** level - Even though there is the GIL in Python, it does NOT mean that a function or a single line of Python code will be executed altogether before the OS **switches** from one thread to another thread - The GIL simply makes sure that codes from only one thread is being executed at the same time - Ref: http://effbot.org/pyfaq/what-kinds-of-global-value-mutation-are-thread-safe.htm --- # Multi-threading and Locks - You can inspect the bytecodes of your Python program using the `dis` module ```python >>> import dis >>> dis.dis("a += 1") 1 0 LOAD_NAME 0 (a) 3 LOAD_CONST 0 (1) 6 INPLACE_ADD 7 STORE_NAME 0 (a) 10 LOAD_CONST 1 (None) ``` - When there is a [context switch](https://en.wikipedia.org/wiki/Context_switch) between loading the value of `a` and storing the new value of `a`, there is a synchronization problem - **Conclusion**: always use a lock on shared objects --- class: middle, center # Multiprocessing in Python --- # Multiprocessing in Python - `multiprocessing` is a module in Python that provides APIs similar to that of `threading` for spawning processes - Each process would be executed in a **separate** Python interpreter, thus will **NOT** be restricted by the global interpreter lock (GIL) - This allows you to **fully leverage** multiple processors on a machine - For parallel execution of functions, `multiprocessing` is preferred --- # Multiprocessing ```python # Import the Process class from multiprocessing import Process # A function to print Hello World def f(i): print("Hello World %d!" % i) if __name__ == '__main__': processes = [] for i in range(10): p = Process(target=f, args=(i, )) p.start() processes.append(p) for p in processes: p.join() ``` --- class: split # Multiprocessing .column-left[ ```python # Import the Process class from multiprocessing import Process # A function to print Hello World def f(i): print("Hello World %d!" % i) if __name__ == '__main__': # important! processes = [] for i in range(10): p = Process(target=f, args=(i, )) p.start() processes.append(p) for p in processes: p.join() ``` ] .column-right[ - As you can see, the API is the same as using `Thread` - Each spawned process have its **own Python interpreter** - Spawned processes will continue to live even if your main program has exited ] --- # Multiprocessing ### Why is the line `if __name__ == '__main__':` necessary? - When spawning new processes, the module will be **imported** by these processes, such that they can access the **target function** - This is similar to the case when you use want to use a function defined in another Python file - When importing a module, the codes inside the module will be executed, UNLESS it is protected by the name checking line - When a module is imported, its `__name__` will NOT be `__main__` --- # Multiprocessing - Using `Pool` in multiprocessing to process lines of text ```python from multiprocessing import Pool def count_words(line): counts = {} for w in line.lower().split(" "): counts[w] = counts.get(w, 0) + 1 return counts with Pool(4) as pool: # Use with will make sure that all processes are closed and joined all_counts = pool.map(count_words, lines) word2count = {} # collect the counts from each output for c in all_counts: for w, n in c.items(): word2count[w] = word2count.get(w, 0) + n ``` --- # Using Pool ```python ... with Pool(4) as pool: all_counts = pool.map(count_words, lines) ... ``` - `Pool(4)` creates a pool of 4 processes - If you don't specify the number, it will be equal to the number of CPUs on your machine (which can also be obtained using ` os.cpu_count()`) - `lines` is a list (an iterable), `map` will split it into chunks and pass them to each processes --- # Multiprocessing Pool ### What if your target function receives more than one argument? - use `starmap()` of the pool object ```python from multiprocessing import Pool def multiply(x, y): return x * y args = [(1, 2), (3, 4), (5, 6)] with Pool() as pool: results = pool.starmap(multiply, args) print(results) # prints [2, 12, 30] ``` --- # Summary - For CPU-bound tasks, use `multiprocessing` instead of `threading`, so that you can get around the **GIL** - `threading` is more for *concurrent programming*, while `multiprocessing` is more for *parallel computing* - You should always test whether you can achieve any speed gain, especially for `multiprocessing` because it introduces more overhead - Be careful when sharing objects among threads and processes, use thread-safe objects such as `Queue` if possible --- class: middle, center # Multi-threading in Network Programming --- # The C10K Problem - The problem of optimising network sockets to handle **a large number of clients** at the same time. - **C10k** = concurrently handling 10,000 connections - This is NOT about how FAST your server can operate (requests handled per second) - The requirement is on the server to **return response to each client within an acceptable period of time** - Ref1: [http://www.kegel.com/c10k.html](http://www.kegel.com/c10k.html) - Ref2: [WhatsApp handles 2M TCP Connections](https://blog.whatsapp.com/196/1-million-is-so-2011) --- # Revisiting Our TCP Server ```python import socket server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_socket.bind((socket.gethostname(), 50001)) server_socket.listen(10) while True: (client_socket, address) = server_socket.accept() data = client_socket.recv(1024) client_socket.sendall(data) client_socket.close() ``` - Everything in this program runs on the **main thread** - `accept()`, `recv()` and `sendall()` are all **blocking** - Can it handle **many connections** at a time? --- # Revisiting Our TCP Server ### Problem of using *
a single thread
* and *
blocking I/O
* - Server CANNOT accept connections while serving a client - Backlog keeps increasing, some clients eventually will be **refused** - Even if a client is in the backlog, it might take a long time before it is served - Clients with **timeouts** implemented will report failure to the users - Very low throughput --- class: split # Use Multi-threading .column-left[ ```python def serve_client(client_socket, address): print("Serving client on {}".format(address)) data = client_socket.recv(1024) client_socket.sendall(data) client_socket.close() ``` ] .column-right[ - Let's remove the first limitation by using multiple threads - Create a function to serve a client (to be executed in a thread) - Each thread will handle one client and then terminate ] --- # Use Multi-threading - We create a **new thread** whenever we have **accepted** one connection - The server will return to accept another connection once a new thread has created ```python import socket from threading import Thread server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_socket.bind((socket.gethostname(), 50001)) server_socket.listen(10) while True: (client_socket, address) = server_socket.accept() client_thread = Thread(target=serve_client, args=(client_socket, address) client_thread.daemon = True client_thread.start() ``` --- # Use Multi-threading ### What if 1,000 clients connect at about the same time? - 1,000 threads will be created and started at the same time - Is 1,000 **too many**? Depends! - **Consider**: - Each client may retrieve data from or update data in a database - Each client may require the server to perform a lot of computation - The server may connect to other services in order to serve a client - You need to understand your system and design accordingly - Let's see what we can do if we want to **limit** the number of threads started --- # Using a Thread Pool - In the `concurrent.futures` module, there is a `ThreadPoolExecutor` class - We can use it to create a thread pool with a **maximum number** of active threads ```python from concurrent.futures import ThreadPoolExecutor import socket ... # create and bind socket executor = ThreadPoolExecutor(max_workers=5) while True: (client_socket, address) = server_socket.accept() # Submit the target function 'serve_client' with arguments to the executor # Submitting does NOT mean that the thread will run immediately executor.submit(serve_client, client_socket, adddress) ``` --- # Multi-processing in Socket Programming ```python from concurrent.futures import ProcessPoolExecutor import socket import sys def serve_client(client_socket, address): data = client_socket.recv(1024) client_socket.sendall(data) client_socket.close() if __name__ == "__main__": soc = socket.socket(socket.AF_INET, socket.SOCK_STREAM) soc.bind(("localhost", 50000))) soc.listen(10) with ProcessPoolExecutor(max_workers=5) as executor: while True: (client_socket, address) = soc.accept() executor.submit(serve_client, client_socket, address) ``` --- class: center, middle # Logging in Python --- # Logging ### When writing your programs, it is important that you display some messages (logs) for various purposes - Check for runtime exceptions (when you have `try...except` blocks) - Understand how the application is performing (how much time is taken to run certain lines) - Facilitate debugging and future development (e.g. what is the value of `x` at some point?) --- class: split # Logging .column-left[ ### Why not use `print`? ```python try: infile = open(“data.txt”, “r”) lines = infile.readlines() infile.close() print("Read file successfully") except Exception as ex: print(ex) print("Error in reading file") ``` ] .column-right[ - Cannot control when to or when not to print - Cannot easily control where to print - Cannot change the message format easily - Cannot print to multiple destinations (e.g. both the standard output and a log file) ] --- # The `logging` Module - Python provides a powerful `logging` module in its standard library - Provides a flexible event logging system - Can choose to send log to standard output or files - Allows customisation of the log format - Features different log levels --- # The `logging` Module - An example ```python import logging logging.basicConfig(level=logging.DEBUG) logging.debug("This is a debug message") logging.info("This is an information message") logging.error("An error has occurred!"") # The above will output the following on the screen # DEBUG:root:This is a debug message # INFO:root:This is an informational message # ERROR: An error has occurred! ``` --- # Log Levels ### The following levels are defined in Python - **Debug** - For debugging purpose, should not be shown in a production system - **Information** - For informational messages - **Warning** - For giving warnings when something unexpected happens - **Error** - For error messages - **Critical** - Something that needs to be attended immediately --- # Concepts in `logging` ### Logger - An object that can be used to create log messages - Each logger is identified by a unique name ### Handler - Defines what to do when a log message is created in the logger - Each handler can have its own log format - Common handlers: file, standard error, standard output --- # Examples ```python import logging # Create a logger with the program name and level=DEBUG logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) # Create a file handler that will write to a file fh = logging.FileHandler("log.txt") # Create a handler that will write log to stderr ch = logging.StreamHandler() # Add the handlers to the logger logger.addHandler(ch) logger.addHandler(fh) logger.info("Hello!") ``` --- # Formatting - You can create a `formatter` for each handler to format their log messages ```python # Create a formatter and add it to the handlers formatter = logging.Formatter("TIME=%(asctime)s, %(name)s, [%(levelname)s] : %(message)s") ch.setFormatter(formatter) fh.setFormatter(formatter) ``` - The above will print:
`TIME=2018-01-24 07:42:54,232, __main__, [INFO] : Hello!` - References: [https://docs.python.org/3/library/logging.html#logrecord-attributes](https://docs.python.org/3/library/logging.html#logrecord-attributes) --- # Print the Current Thread * Logging is particularly useful when using threads and processes * You can configure the **thread/process name** to be included in each log message ```python logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) formatter = logging.Formatter("TIME=%(asctime)s,%(threadName)s,[%(levelname)s]:%(message)s") ch = logging.StreamHandler() ch.setFormatter(formatter) logger.addHandler(ch) def print_log(): logger.info("Hello!") for i in range(5): threading.Thread(target=print_log, args=()).start() ... ``` --- # References ### For more examples and tutorials, check the official documents at: - The logging module (https://docs.python.org/3/library/logging.html) - Logging HOWTO (https://docs.python.org/3/howto/logging.html) - Logging Cookbook (https://docs.python.org/3/howto/logging-cookbook.html) --- class: center, middle # Assignment 2 --- # Assignment 2 * In Assignment 2, you will create a Telegram bot that offers an **object recognition** service * Functions: - A user can send to the bot either a **URL of an image** or a **photo** - Your `bot.py` program will receive the message, download the image (from the URL or from Telegram) - Submit the image via a TCP connection to another program (`server.py`) - In `server.py`, the image will be fed into a Keras pre-trained neural network to recognize the object in the image - The result is sent back to `bot.py`, which will send the result to the user --- # Assignment 2
--- # Assignment 2
--- class: center, middle # End of Lecture 8


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/Software.20Foundations.html ---
@Kevin Buzzard I think a while back you were looking at Software Foundations using Lean. Did you write anything up?
I have got a work experience kid doing it for a week in July!
Goodness knows how far they'll get
Interesting! What is the scope of the project? Only writing up solutions in Lean or reformulating the parts of the book that are specifically about Lean?
It's one of my kids
so they'll just do what they want really
I'm just hoping to get them engaged with the material
because I know they'll like it
He's good at python
and I showed him that python had lambdas
and he got quite interested in them
Amazing :D How old is he?
16
wants to do computer science
How disappointed is the dad? :laughing:
One of my former undergraduate student is thinking of going through SF with Lean. Do you think that might help your son to have a studying buddy?
who is SF?
Software Foundations
aha
i think in general it might not be a bad idea to have a lean translation of SF
I'd volunteer to do 4-5 chapters if people were interested
That'd be great, that's true. I should probably pitch in too :D
great, you can take all the chapters that deal with tactics
haha
I would but then there would be nothing left for you to do!
don't forget SF is 3 books now... it's a big project
I'm wondering how different the result would be from SF
I would hope that change capitals for lower cases with an underscore in front be enough but we might have rewrite some sections significantly
^
yes, because i taught myself lean by doing sf in lean
and there are differences
unfortunately i didn't keep my solutions around...
I have solutions for some stuff, which I was going to let my son see if he was completely lost
cool. i'll take a look at setting up a github repo . SF is GPL licensed so I don't think there's any issue forking it and putting it online
I'm wondering if we could team up with the SF team. I don't know if they will keep updating SF but if they do, it would be great to be notified (automatically?) so that we can adjust the Lean version too
why does that need teaming up? you could just watch their github repo
is there actually a notification system for that?
Oh, yeah, ok I see. I guess we can register to get emails on commits to their repos
yeah, you can choose to receive notification emails
I would hope that change capitals for lower cases with an underscore in front be enough
Don't forget to find-and-replace A to α as well
One of my former undergraduate student is thinking of going through SF with Lean. Do you think that might help your son to have a studying buddy?
Hi all, I'm the said former undergrad (now masters) student :simple_smile: I'm a Haske-holic coming to Lean and hope to do neat things with programming language semantics, and with system specs and models as well
nice. I got started on translating the first chapter of sf, basics. Everything up to chapter 11 seems pretty straightforward
that said, even though it's straightforward, it's still work. actually, I've been spending most of my time figuring out how the sphinx documentation workflow works
i'll have more time to devote to this after thursday
Let me know when you decide to show it
So my son will start from book 1 p1 because he's learning the entire theory from nothing but a background of python.
But I'm independently interested in any sphinx tips because I want to write something about Lean for mathematicians at some point and I am still not 100% clear on the format this should take -- at the minute I am tempted to just copy TPIL but my concern is that I don't know how to display LaTeX within that set-up. Is this possible?
What kind of LaTeX do you want to use? Merely "equations"? Or also other fancy typesetting, like diagrams?
Hey guys, I'm working through software foundations lists chapter:
https://softwarefoundations.cis.upenn.edu/current/lf-current/Lists.html#lab60
After some fairly mindless pattern-matching I was able to implement a function, which can compute a sum of a list of natural numbers, and I think it basically works, but a few things seem strange:
1.  I suspect this is something to do with recursion not necessarily being well-defined, but my PL knowledge + understanding of lean are a bit lacking, so not _really_ sure why. Any idea how to do it without meta
?
2. There's a weird thing inside the recursor inside list_sum
, I've called it "what_is_this_for". I thought I was producing a term of type nat
, not of type nat → nat
, but lean disagrees. Any idea why?
inductive natlist : Type | nil : natlist | cons : nat → natlist → natlist meta definition list_sum : natlist → nat := λ list : natlist, natlist.rec_on list 0 (λ list_element : nat, λ previous_list : natlist, λ what_is_this_for: nat, list_element + (list_sum previous_list)) open natlist #reduce list_sum $ cons 2 $ cons 2 nil #eval list_sum $ cons 4 $ cons 3 $ cons 2 nil
What you called what_is_this_for
is the inductive hypothesis
you should use it in place of list_sum previous_list
and then it won't need to be meta
Or you can just use the equation compiler instead of the recursor, and then you can make reference to the function you are defining and lean automatically compiles it to recursors
Of course! Thank you Mario, in hindsight this is super-obvious (I think you've actually explained this to me last year in Cambridge).
Here's an alternative definition:
def natlist.sum : natlist → ℕ := natlist.rec 0 (λ (n : ℕ) (nl : natlist) (ih : ℕ), n + ih)
It's definitely easier to use the equation compiler, though. :simple_smile:
I should definitely learn to use the equation compiler, thanks guys!
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


Centers Offering Online Psychological Services During the COVID-19 Pandemic
The data reflected here are from the Psychological Association of the Philippines (PAP), updated as of May 14, 2020. We have then researched for other information (address, contact numbers, etc.) from available online resources and from the MHAPh Directory. Click pins for information on these centers that offer free psychological services during the COVID-19 Pandemic, or contribute data by adding points for the services that you know. For centers with no physical reception/location, pin the location on the city where most of the members of the center are located (if known). Visit the Mental Health aWHEREness website for more information on how to contribute.
NOTE: The locations reflected here may or may not be accurate as some services may not have physical reception/location. Since these are online, anyone from anywhere in the country may contact these services for help for their mental health.


| Methods |
public
|
startCollection(string $collection): void
Start the collection rendering.
Start the collection rendering.
|
#
|
public
|
endCollection(): void
End the collection rendering.
End the collection rendering.
|
#
|
public
|
appendCollection(string $collection, string $content): void
Store or extend data to a collection.
Store or extend data to a collection.
|
#
|
public
|
prependCollection(string $collection, string $content): void
Store data infront of the collection.
Store data infront of the collection.
|
#
|
public
|
startPrependToCollection(string $collection): void
Start prepending to the collection.
Start prepending to the collection.
|
#
|
public
|
endPrependToCollection(): void
End prepending to the collection.
End prepending to the collection.
|
#
|
public
|
yieldCollection(string $collection, string $default = ""): string
Yield the collection contents stored with a default fallback.
Yield the collection contents stored with a default fallback.
|
#
|


Welcome !
I am Sasini Madhumali.
I am the Document Manager in Vuro(Pvt) Ltd.
I contribute to the software development team and I plan and execute documentation projects in close cooperation with product management, program management and
development.
Responsibilities of a Document Manager
Prepares the project proposal.
Reviews and updates existing documents.
Retrieves and edit information.
Works with program management to produce on-time deliverables.
Prepares the Final Document of the Project.


Ecology tax
问题描述 :
In a big and rich on natural resources country, the government started a campaign to control deforestation. In fact the government is not too interested in how many trees get fallen, but rather how effectively the wood is utilized. So a law was passed which requires every logging company to pay amount of money in proportion to amount of wood that it wastes during operation.
A felling quota on some territory was allotted to a company in this country. Company lorries may only transport logs of exactly L meters long. So when a tree gets sawed into logs, the remainder is wasted.
Trees in this country grow exactly 1 meter per year, so the company may decrease the amount of tax to be paid by simply waiting for some years. Your task is to determine the number of years needed to achieve smallest possible tax. If there is more than one answer, find minimal (earliest) one.
输入:
Input file contains number of trees N, length of log L, followed by integers i1 i2 … iN — heights of each tree.
Constraints
1 ≤ N ≤ 30000, 1 ≤ L, ik ≤ 30000
输出:
Output file must contain single integer — number of years to wait.
样例输入:
Sample Input 1 3 1 10 15 11 Sample Input 2 3 2 5 3 6
样例输出:
Sample Output 1 0 Sample Output 2 1
温馨提示:
Bold texts appearing in the sample sections are informative and do not form part of the actual data.
解题代码:
/* @author: */ import java.util.Scanner; import java.util.Arrays; public class Main{ public static void main(String args[]) { Scanner sc=new Scanner(System.in); int n,L,v; n=sc.nextInt(); L=sc.nextInt(); int m=0; while((n--)!=0) { v=sc.nextInt(); if(v%L==0)continue; int u=L-v%L; if(u>m)m=u; } System.out.printf("%d",m); } }
very good solutions.
代码不对，仔细对比一下输入输出， 怎么会有‘‘printf("The winning moves are:");’’这种输出呢？
通不过。
这道题目虽然简单，但是小编做的很到位，应该会给很多人启发吧！对于面试当中不给开辟额外空间的问题不是绝对的，实际上至少是允许少数变量存在的。之前遇到相似的问题也是恍然大悟，今天看到小编这篇文章相见恨晚。
无需用转移方程也可以解决，哈哈
这道题目重复了，删掉一个吧
多谢支持！
真心不错，力顶作者
输出规范写错了哦~
第一题还有个解释：没说桌子有多大，可以假设桌子和硬币一样大，肯定是先手胜
不太懂呀，乡亲们。原理知道代码不会
这个是代码高亮功能，那就再换一个颜色


This site helps me to show to myself and others the path I've taken since my first online learning experience, dating back 2012 when Coursera was released.
Having to summarize after finishing each course helps to take a step back to sctually realise what I've receive for my time invested.
Taking a step back allows me to better aim the future of my learning journey..
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt ut voluptatum eius sapiente, totam reiciendis temporibus qui quibusdam, recusandae sit vero unde, sed, incidunt et ea quo dolore laudantium consectetur!
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt ut voluptatum eius sapiente, totam reiciendis temporibus qui quibusdam, recusandae sit vero unde, sed, incidunt et ea quo dolore laudantium consectetur!
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt ut voluptatum eius sapiente, totam reiciendis temporibus qui quibusdam, recusandae sit vero unde, sed, incidunt et ea quo dolore laudantium consectetur!
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt ut voluptatum eius sapiente, totam reiciendis temporibus qui quibusdam, recusandae sit vero unde, sed, incidunt et ea quo dolore laudantium consectetur!
Created by: University of Michigan
| When | Late 2012 |
| Total TimeSpent | 30 hrs in 2.5 months |
| Completed | |
| Platform | Coursera |
| Institution | Un of Michigan |
| Homepage | Go ! |
The impact of technology and networks on our lives, culture, and society continues to increase. The very fact that you can take this course from anywhere in the world requires a technological infrastructure that was designed, engineered, and built over the past sixty years. To function in an information-centric world, we need to understand the workings of network technology. This course will open up the Internet and show you how it was created, who created it and how it works. Along the way we will meet many of the innovators who developed the Internet and Web technologies that we use today.
1) After playing with different online learning platforms (Apple university, Stanford online) without never really engaging with the material, I discoreved Coursera. I wanted to try this new (back in 2012) learning format that looked very engaging. This was my first MOOC enrolement and the first MOOC I've finished.
2) The second reason is because I love the Internet, and I always wanted to know how it came to be.
With this course, I understood the underlaying history and structures that made/make internet possible. Turing's enigma machines @ Bletchley Park to be the grand parent of computers. Then a network of academics that becomes ARPANET leading Sir Tim Berners-Lee to create the world wide web in CERN. On the "technology" part of the course, four-layer model, HTTP as an application layer, TCP/IP, all those concepts were aligned in order to undertand the foundations of the internet. Lastly, in the "security" I've learned that ...
As my first experience with MOOCs, I was fascinated. Finally a real way to learn online !
| Before | After | |
|---|---|---|
| Internet History | Novice: history from highschool lecture. Arpanet becomes the Internet and that is that. | Advance beginnner: Can explain how WWII led networked computers to the WWW to the modern internet of applications. |
| Internet technology | Ignorant: TCP/IP is something related to internet. | Novice: Overall understanding of internet's 4 layers model (the link, IP, TCP and application layers) for internet data exchange. |
| Internet security | Ignorant: Secure > Unsecure | Novice: First approach to digital signatures, SSL, encoding and encryptation. |
Highlight project link
Discover insights from data
| When | Q4 2016 - Q2 2017 |
| Total TimeSpent | ~ 500 hrs in 6 months |
| Completed | |
| Platform | Udacity |
| Institution | Facebook + Tableau |
| Homepage | Go ! |
The Data Analyst Nanodegree program is specifically designed to prepare you for a career in Data Science. As a Data Analyst, you are responsible for obtaining, analyzing, and effectively reporting on data insights ranging from business metrics to user behavior and product performance. This program’s curriculum was developed with leading industry partners to ensure students master the most cutting-edge curriculum. Graduates will emerge fully prepared for this amazing career.
I always was intrigued by information transactions. Since I discovered the internet in 1995, I was hooked by its potential as the information broadcasting network that it is. In the early 2000's, data minning was the edge skill to have, but I lacked the programming skills to enter the environment. Fast forward 10 years, with idustrial engineering studies, 5 years of digital marketing experience and a couple of MOOCs later (ex: PY4E), I wanted to 'enter' the data science ecosytem. During 2016, top influencers [1] [2] started debating about our IA future.
Take aways from this ~ 500 hrs degree are plenty, but there will be divided in 2 sections, a) Data Sciences b) Project based long commitment MOOC's .
| Before | After | |
|---|---|---|
| Jupyter Notebooks | Ignorant : No clue of it's existance | Advance beginner : Confortable with it's use as for most data analysis work. Became my Python IDE. |
| Pandas | Ignorant : No clue of it's existance | Advance beginner : Confortable with it's use as for most data analysis work. |
| Numpy | Ignorant : No clue of it's existance | Advance beginner : Confortable with it's use as for most data analysis work. |
| Scikit Learn | Ignorant : No clue of it's existance | Novice + : Explored the majors ML algoritms in order to understand how a "vanilla" ML project works from questions to execution |
| R | Ignorant : It's a programming lenguage | Novice + : Concluded a lesson of exploratory data analysis with R and R-Studio. Up to this day I don't know any key feature for using R before Python. |
| Ggplot 2 | Ignorant : No clue of it's existance | Novice + : Made some decent visualitions guided by course tutors [1] . |
| Matplotlib | Ignorant : No clue of it's existance | Novice + : Confortable with it's use as for most data analysis work. Became my Python IDE. |
| The grammar of graphics | Ignorant : No clue of it's existance | Novice + : Confortable enough to understand it's value |
Highlight project link
Lorem ipsum dolor sit amet consectetur.
Treehouse is a free PSD web template built by Mathavan Jaya. This is bright and spacious design perfect for people or startup companies looking to showcase their apps or other projects.
You can download the PSD template in this portfolio sample item at FreebiesXpress.com.
Created by: University of Michigan
| When | Late 2013 |
| Total TimeSpent | 45 hrs in 8 weeks |
| Completed | |
| Platform | Coursera |
| Institution | University of Michigan |
| Homepage | Go ! (N/A) |
Everything is connected: people, information, events and places, all the more so with the advent of online social media. A practical way of making sense of the tangle of connections is to analyze them as networks. In this course you will learn about the structure and evolution of networks, drawing on knowledge from disciplines as diverse as sociology, mathematics, computer science, economics, and physics. Online interactive demonstrations and hands-on analysis of real-world data sets will focus on a range of tasks: from identifying important nodes in the network, to detecting communities, to tracing information diffusion and opinion formation.
Mid 2014 and 2 years in my position of CRM manager at Renault Marketing, I was fasinated by digital marketing. I had some heated exchanges with digital/media agency planners (Havas media) on how performance marketing could be improved.
Google and Facebook were raising as the only two options for a "let's not throw money" campaign (as is the case today in mid 2017 [1]). So I took this course to have a broader undertanding of what was "media" and how digital companies are disrupting it.
Main takeaways of this reading oriented course is the opinion that we are entering the attention economy. Our attention is being commoditised by disruptive tech/media companies (ex: freemium ad based digital services).
This shift as an impact on our society as information looses value compared to attention demanding data [1]. It is our responsibility to take actions about this.
I believe advertising has become a tax that the poor and the technologically illiterate pay
Highlight readings
Created by: CentraleSupélec
| When | Early 2015 |
| Total TimeSpent | 30 hrs in 7 weeks |
| Completed | |
| Platform | Coursera |
| Institution | CentraleSupélec |
| Homepage | Go ! |
Transform or disappear, the Darwinism of IT: In order to adapt to a digital world, a two-speed IT is needed. Despite the importance of IT in today’s digital world, Chief Information Officers (CIOs) often struggle to get their voices heard by executive committees. Faced with this challenge, IT departments are being forced to reinvent themselves to adapt their companies to the fast paced evolution of technology. The Boston Consulting Group has developed a business approach that allows IT to shed off its appearance of a heavy cost center and to adopt a new, more realistic persona as a quality service provider, partnering with users and the management. Would you be a professional, a student in engineering, a student in a business schools or would you just be interested in digital transformation and its implications on IT, Learn with three BCG experts why and how to manage an IT department as a business in order to transform a company and adapt it to a digital world. Join the conversation: #2SpeedIT
2015 and 3 years in my position of CRM manager at Renault Marketing, I was surprised by many difficulties undertaken in order to suceed in IT project management. Projects took way too much time in my (young proffesional) opinion and were "obsolete" even at planning stage.
Furthermore, I was experiencing frustration regarding the lack of interest that my superiors were showing to my innovation projects.
So I took this course to have a better understanding on corporate management IT, in order to improve my project management skills.
Main takeaways of this video oriented course is the observation that IT management is much more than equipping white collars employees with a laptop.
Legacy custom software, digital disruption and ever demanding clients (employees) is not as simple as I thought before taking this course.
I've gained perspective to understand also that corporate leaders may not have the experience to understand how quick and disruptive digital wave is, as young professionals might not have the experience of being in charge of an "it's already working" machine.
| Before | After | |
|---|---|---|
| Corporate IT architechture | Novice: As a digital nerd inside a big corporate, I had a pessimistic opinion on overall IT services provided in order to work | Advance beginnner: I understand how IT management is much more than buying laptops and dealing with Microsoft to get overcharged services. |
Highlight readings
Created by: Northwestern University
| When | Late 2014 |
| Total TimeSpent | 30 hrs in 6 weeks |
| Completed | |
| Platform | Coursera |
| Institution | Northwestern University |
| Homepage | Go ! |
Google Inc. is one of the key success stories of the Internet era. The company has expanded beyond its original search business through innovation and acquisition to touch the lives of nearly every person who lives life online. For example, Americans spend more than 3,400 hours per year using consumer media, the field where Google’s impact is most profound, and citizens around the world must understand what the company has wrought not only to control their offline and online environments, but also to interact and engage successfully with anyone in our professional and personal lives.
Enrollees in this course learn how to understand the tactics that modern media companies, journalists, marketers, politicians, technologists, and social networks are using to reach them and affect their behavior. They learn how to adopt strategies that put them on an even footing with these entities in achieving their own communications goals. They
Mid 2014 and 2 years in my position of CRM manager at Renault Marketing, I was fasinated by digital marketing. I had some heated exchanges with digital/media agency planners (Havas media) on how performance marketing could be improved.
Google and Facebook were raising as the only two options for a "let's not throw money" campaign (as is the case today in mid 2017 [1]). So I took this course to have a broader undertanding of what was "media" and how digital companies are disrupting it.
Main takeaways of this reading oriented course is the opinion that we are entering the attention economy. Our attention is being commoditised by disruptive tech/media companies (ex: freemium ad based digital services).
This shift as an impact on our society as information looses value compared to attention demanding data [1]. It is our responsibility to take actions about this.
I believe advertising has become a tax that the poor and the technologically illiterate pay
| Before | After | |
|---|---|---|
| Media landscape | Novice: As a consumer. | Advance beginnner: I undertand how Google first, Facebook and now Amazon are disruptiing what is now called the "attention economy". |
| Attention economy | Novice: As a consumer I understand my time is a ressource | Competent: I'm enforcing personal choices in order to keep my attention for me : Powerfull adblocker, strict no notifications settings on smarthphone, proactively reduce social media exposure. |
Highlight readings


Models the gearbox used in the first three joints with all its effects, like elasticity and friction. Coulomb friction is approximated by a friction element acting at the "motor"-side. In reality, bearing friction should be also incorporated at the driven side of the gearbox. However, this would require considerable more effort for the measurement of the friction parameters. Default values for all parameters are given for joint 1. Model relativeStates is used to define the relative angle and relative angular velocity across the spring (=gear elasticity) as state variables. The reason is, that a default initial value of zero of these states makes always sense. If the absolute angle and the absolute angular velocity of model Jmotor would be used as states, and the load angle (= joint angle of robot) is NOT zero, one has always to ensure that the initial values of the motor angle and of the joint angle are modified correspondingly. Otherwise, the spring has an unrealistic deflection at initial time. Since relative quantities are used as state variables, this simplifies the definition of initial values considerably.


National Crafts Museum: Away from Delhi’s chaos, history in all its glory
New Delhi | Updated: December 9, 2019 4:54:41 pm
Mirror work Gujrat Hut made from sun-dried bricks at the Crafts Museum. (Photos: Aashi Sadana)
Written by Aashi Sadana
A treasure trove of over 33,000 objects, including handicrafts, textiles, figurines, paintings and more, collected from the farthest corners of the country. That is the National Crafts Museums at Pragati Maidan, in the heart of New Delhi, set up way back in 1956 by the All India Handicrafts Board.
Earlier this year, Union Textile Minister Smriti Irani inaugurated a new textile gallery at the museum. A new mini collection from Sri Lanka will soon be a part of the museum, which serves as a platform for the development and revival of Indian crafts, informs a museum official. In their book, Museums of India: National Handicrafts and Handlooms Museum, New Delhi, Jyotindra Jain and Aarti Aggarwala write, “It has defined criteria of excellence by determining what should be preserved and encouraged.”
Entering the gravel path, intricate regional murals can be seen on the colourful walls, which are embellished with rich motifs including mud mirror work from Gujarat and Warli and Mithila paintings from Maharashtra and Bihar respectively. If you fancy getting similar artwork for your home, the contact details of each artist are helpfully mentioned alongside their work.
Wall murals at the Crafts museum
The museum has three parts — the village-disguised outdoor area, indoor galleries exhibiting a huge array of handicrafts and live crafts demonstrations of pan-Indian artisans.
The village complex
The Rajasthan Courtyard in the village complex
Spread over five acres and with 15 life-sized structures of village abodes, courtyards and shrines, the village complex represents one of the most diverse sightseeing experiences. Interestingly, the complex is an extension of a temporary exhibition on the same theme that took place in 1972, a museum official told indianexpress.com.
The architect of this complex, Charles Correa, believed in designs that uplift local and historic cultures. Taking you back in time, the mammoth houses, the verandahs and fascinating array of daily objects blur out the city chaos. The rural scenes radiate with painted walls, mini niches, bright engravings and balconies.
Museum galleries
The museum has a total of five galleries out of which four are operational, while the fifth is currently under maintenance. These are set in traditional Indian houses with a verandah at the core.
Folk and tribal gallery
Kathputlis at the tribal gallery
If tribal and eco-friendly ways of living appeal to you, this gallery is a must-visit. The beautiful tribal art and daily objects, such as the one depicting Nagaland, opens a window to simpler times. Objects and paintings from Rajasthan and South India light up the gallery.
Don’t miss the festooned puppets (kathputlis), masks used in Durga Puja and Ramleela and cloth paintings or Pattachitra.
Bhuta gallery
Large wooden statues at the Bhuta Gallery
You could be thrilled or spooked by this gallery. It houses large wooden statues called Bhutas that are believed to be spirits of one’s ancestors. India, among many other societies in the world, believes in worshipping the dead and Bhutas are a manifestation of this age-old belief. As you exit the gallery, you’re greeted by a miniature model of an old Bengal village and a tiny separate enclosure dedicated to beautiful Madhubani paintings.
Textile gallery
Phulkari display at the textile gallery
This one is for a history geek or fashion lover. A rich corpus of textiles has prevailed in the subcontinent since the Harappan civilisation. Specimens of khadi, brocade, phulkari, Banjara embroidery and much more are discovered here.
Cult craft gallery
An eighteenth-century chariot in the verandah dwarfs the black rustic gates of this gallery. The immersive aura comes from the objects used in various religious rituals of the country. An extensive collection of masks, vehicles, symbols and votive objects associated with Shiva and his forms are displayed here. This gallery allows us to trace the evolution of accessories used in temples and other places of worship.
Keep a lookout for incense burners and their evolution, Jaina domestic temple and over 50 little Lord Ganeshas.
Live craft demonstrations
An artisan from Bihar selling his crafts at the museum
The Crafts Museum is doing its part in providing a livelihood to artisans of India. “Every month we host 25 artisans from across the country and provide them space to sell their products,” states a museum official.
A Madhubani painter from Bihar remarked, “I have travelled across the country, thanks to my art. We come here whenever the government invites us.” Like many others, he is a registered artisan under the Ministry of Textiles.
Other facilities
Theatre of the Audio-Visual room
The museum houses a small indoor theatre with a unique collection of documentaries and short films on Indian textiles and handicrafts.”We have more than 70 well- researched documentaries that you won’t find on YouTube or any other platform. We host lectures and discussions after the screening, which is conducted every 30 minutes, irrespective of the number of spectators from 10 am to 5.30 pm,” the theatre management informed.
The popular Cafe Lota, located right at the entrance of the museum, was “originally supposed to provide meals to our artisans before it transformed into a contemporary cafe,” according to an official. Today, it is a hub for food enthusiasts and critics alike.
Significantly, the museum enjoys popularity among the foreign audience as well, including prominent personalities such as former US First Lady Michelle Obama. “Regular visitors include students from design colleges like Pearl Academy, NIFT and Delhi School of Art along with year-round visits from schools across the country,” commented a museum official.
The average daily footfall, according to the caretaker, could vary between 1,000 to 2500 on weekends and during school visits. The museum official remarked: “People are not aware of how their ancestors lived; they must learn from simpler times, which is what makes the Crafts Museum important today.”
(The writer is an intern at indianexpress.com)
For all the latest Lifestyle News, download Indian Express App
© IE Online Media Services Pvt Ltd


Online Practise Exam Bulk Upload
Online Practise Question
Home
Online Practise Question List
Online Practise Question
Online Practise Question Answer
Exam Name
--Exam Type--
fetchDetailById(1,$table,"exam_type"); if($rs) { $i=0; while($row=mysqli_fetch_assoc($rs)) { $i++; ?>
Subject
Subject
Upload (CSV)
Download Simple File (CSV)
Submit


IN THE HIGH COURT OF KERALA AT ERNAKULAM PRESENT: THE HONOURABLE MR. JUSTICE RAJA VIJAYARAGHAVAN V WEDNESDAY, THE 13TH DAY OF DECEMBER 2017/22ND AGRAHAYANA, 1939 Bail Appl..No. 8528 of 2017 () ------------------------------- CRIME NO. 458/2017 OF NILAMBUR POLICE STATION, MALAPPURAM DISTRICT --------------- PETITIONERS/ACCUSED : ----------------------------------- 1. MUHAMMED SHAFI,S/O. KOYALI, AGED 30 YEARS, NILAMBALANGATTU HOUSE, POOCHAL, AIKKARAPADY, MALAPPURAM DISTRICT. 2. MUJEEB RAHMAN,S/O. MOIDEEN, AGED 31 YEARS, POOCHALIL MOOLAYIL, POOCHAL, AIKKARAPADY, MALAPPURAM DISTRICT. 3. ABDUL MAJEED M., S/O. ALAVI, AGED 49 YEARS, MAMPADAN HOUSE, VETTIKKATIRI, VALLUVANGAD, MALAPPURAM DISTRICT. BY ADV. SRI.BABU S. NAIR RESPONDENTS/STATE & COMPLAINANT : --------------------------------------------------------- 1. THE STATE OF KERALA, REPRESENTED BY THE PUBLIC PROSECUTOR, HIGH COURT OF KERALA, ERNAKULAM, KOCHI-682031. 2. THE SUB INSPECTOR OF POLICE, NILAMBUR POLICE STATION, MALAPPURAM DISTRICT, PIN-679329. R1 & R2 BY PUBLIC PROSECUTOR SRI.  No.8528 of 2017 ----------------------------------- Dated this the 13th day of December, 2017 ORDER
1.This application is filed under Section 439 of the Code of Criminal Procedure.
2.The petitioners herein are the accused Nos. 1 to 3 in Crime No.458 of 2017 of the Nilambur Police Station, registered alleging offences punishable under Sections 270 of the IPC, section 120(e) of the Kerala Police Act, Sections 24 and 43 of the Water (Prevention and Control of Pollution) Act, 1974 and under Section 3(2)(a) of the Prevention of Damages to Public Property Act, 1984.
3.According to the prosecution, sometime between 22 hours on 13.10.2017 and 6 hours on 14.10.2017, the petitioners herein, who are the owner and employees of two lorries, collected waste materials and other human excreta from various places and dumped it in the river near Vadappuram bridge and thus contaminated the water body. The petitioners were arrested BA 8528/2017 2 on 7.11.2017 and has been in custody since then.
4.Heard the learned counsel for the petitioners, who asserts that the petitioners are innocent.
5.This submission is countered by the learned Public Prosecutor who submits that the acts committed by the petitioners herein were recorded in the Close Circuit TV and the materials sourced out during investigation clearly shows the complicity of the petitioners.
6.I have considered the submissions advanced and have gone through the materials on record. Though the allegations against the petitioners are extremely grave, having regard to the fact that they have been undergoing detention since 7.11.2017, I am of the view that they can now be enlarged on bail.
7.In the result this application will stand allowed. However, it shall be subjected to the following conditions.
1). The petitioners shall be released on bail on their executing a bond for Rs.50,000/-(Rupees Fifty thousand only) each with two solvent sureties each for the like sum to the satisfaction of the court having jurisdiction.
BA 8528/2017 3
2). The petitioners shall appear before the Investigating Officer on all Saturdays between 9 a.m. and 1 p.m., for 2 months or till final report is filed, whichever is earlier.
3). The petitioners shall not intimidate or attempt to influence the witnesses; nor shall they tamper with the evidence.
4). The petitioners shall not commit any offence while they are on bail.
In case of violation of any of the above conditions, the jurisdictional Court shall be empowered to consider the application for cancellation, if any, and pass appropriate orders in accordance with the law.
Sd/-
RAJA VIJAYARAGHAVAN V., JUDGE vps 13/12 /True Copy/ PS to Judge


Russia accuses NATO of stirring up tensions over Ukraine: TASS
MOSCOW (Reuters) - Russia’s foreign ministry accused NATO on Friday of fuelling tensions over Ukraine and said the alliance’s military support for the country was creating divisions inside it, the TASS news agency reported.
On Thursday, NATO Secretary General Jens Stoltenberg traveled to Ukraine and its President Volodymr Zelensky said it was ready to speed up preparations to become a member of NATO.


|
IdTool
0.4.2
A tool for inspecting and manipulating SQRL identities.
|
A class for enabling copy-pasting of identity blocks. More...
Public Member Functions | |
| void | setBlock (IdentityBlock block) |
| IdentityBlock | getBlock () |
| bool | hasBlock () |
Static Public Member Functions | |
| static IdentityClipboard * | getInstance () |
A class for enabling copy-pasting of identity blocks.
IdentityClipboard
holds a single IdentityBlock
which can be used for copy-paste operations.
The class adheres to the "singleton" pattern and can therefore not be instantiated directly using the constructor. Instead, call IdentityClipboard::getInstance()
to get a pointer to the singleton instance.
| IdentityBlock IdentityClipboard::getBlock | ( | ) |
Retrieves an IdentityBlock
from the clipboard. If no block was previously stored within the clipboard using setBlock()
, a std::runtime_error
is thrown.
|
static |
Returns an IdentityClipboard
instance while ensuring that only one instance of the class exists at any given time.
| bool IdentityClipboard::hasBlock | ( | ) |
Returns true
if an IdentityBlock
is present within the clipboard (was previously stored using setBlock()
), and false
otherwise.
| void IdentityClipboard::setBlock | ( | IdentityBlock | block | ) |
Stores block in the clipboard so that it can be retrieved later using getBlock()
.


- F12
- Ctrl + Shift + I
- Menu > More tools > Developer Tools
- Left click + Inspect
View and change the DOM and CSS
View messages and run JavaScript from the Console.
Debug JavaScript, persist changes made in DevTools across page reloads, save and run snippets of JS, and save changes that you make in DevTools to disk.
View and debug network activity.
Find ways to improve load and runtime performance.
Profile memory usage and track down leaks.
Inspect all resources that are loaded, including databases, local and session storage, cookies, Application Cache, images, fonts, and stylesheets.
Debug mixed content issues, certificate problems, and more.
Simulate mobile devices.
The Command Menu provides a fast way to navigate the Chrome DevTools UI and accomplish common tasks.
Press Control+Shift+P
or Command+Shift+P
(Mac).
Or, click Customize And Control DevTools and then select Run Command.
The first character in the line defines the type of action you want to perform:
| Character | Action |
|---|---|
| > | Run command |
| ... | Open file |
| : | Go to line |
| @ | Go to symbol |
| ! | Run snippet |
Ctrl+F
document.designMode = 'on'
H
console.clear()
$_
$0 - $4
$(selector)
$$(selector)
$x(path)
copy()
dir()
monitor(fn)
/ unmonitor
monitorEvents(obj, [, events])
/ unmonitor
debugger
debug(fn)
A snippet is a custom piece of code that can be reused anywhere.
Make changes in DevTools, and keep those changes across page loads.
Save changes that you make within DevTools to source code that's stored on your computer.


About.
Cypress is an automated web app designed to help the people of Toronto track and report problems
they notice on the street, allowing the city to keep track of issues affecting everyday citizens. Cypress will allow citizens to pinpoint problems on a map
and accurately describe the problem. Citizens can also login to view problems in a specfic area.
Contact Information
Phone number: 1-800-TORONTO (867 6686)
Email: cypress@toronto.ca