Position 14°01.9'N, 83°23.3'W.
This is a Port of Entry.
The Immigration officials here are strict about the maximum of 90 days being spent in the CA4 countries (Guatemala, Honduras, Nicaragua and El Salvador) without leaving to visit a non-CA4 country. You will be fined if you have exceeded your stay.
If all paperwork in in order, then clearance is no problem.
Last updated March 2011.


{% extends 'BasePage.html' %} {% block body %}
Reference ID IdP Adapter Request
POST {{dropoffEndpoint}}
Show raw
{{rawRequest}}
User-Session Attributes
{{userAttributes}}
Reference ID IdP Adapter Response
{{httpStatus}}
{{rawResponse}}
Reference ID
{{REF}}
State from the previous request has been invalidated. Please restart the flow.


Mai Shiranui is too booby for the ‘good boys and girls’ of Smash Ultimate
Follow Polygon online:
by Julia LeeSuper Smash Bros. Ultimate director Masahiro Sakurai did a 48-minute deep dive on the game’s new character, SNK’s Terry Bogard, and his new stage on Wednesday. The stage, King of Fighters stadium, has many of the franchise favorite characters like Geese Howard, King, Blue Mary, Athena, and Iori bouncing around in the background. However, there is one SNK character that isn’t in there and will never be added.
Sakurai put his hands together during the video, faced the camera, and noted that Mai Shiranui will not have a cameo in Super Smash Bros. Ultimate, because the game is for “good boys and girls of many different ages.”
One look at Mai and everyone will immediately realize why she’s not included in this family-friendly game. She’s a massively popular character, one of the main female mascots for the SNK franchise, but her outfit is just too skimpy! While Sakurai didn’t explicitly explain why Mai wasn’t included, we can probably guess that it has something to do with her lack of clothing.
Naturally, Twitter went to work in making memes about how Mai’s bodacious bod is what’s preventing her from getting a sweet Smash cameo.
Related
[Warning: The images below teeter on the line of being not safe for work, but you saw the headline and you probably know what you’re getting into already, honestly.]
Dead or Alive developer Team Ninja joined the fun on Twitter by noting that you can play as Mai in Dead or Alive 6, though. The company welcomed players to “the world of adults” while dropping a link to buy Mai’s DLC.


az version
Shows the current version of Azure CLI modules and extensions.
Part of `az`, the command-line client for Microsoft Azure.
More information: home page
- Show the current version of Azure CLI modules and extensions in JSON format:
az version
- Show the current version of Azure CLI modules and extensions in a given format:
az version --output json|table|tsv


ITSPEED
Repository
*
Select desired repository
Directory
*
Select desired directory
Add to favourites
Go back


Carol
Carol is a driven professional who has spent most of her career in the non-profit world. She has a demonstrated
history of building strong relationships with staff, clients and donors, managing projects and developing social
media and marketing strategies. When not working she can be found enjoying the outdoors, coding, and wine (of course).
David
David is an experienced Technical Account Manager and Technical Support Engineer in the television broadcast industry.
Currently studying HTML5, Javascript, JQuery, and Node, at the University of Denver, David is gaining knowledge of
fullstack web development, including interacting with APIs, JSON messaging and backend database querying. "What?
It's only been two months?"
Pritha
Pritha is an experienced Software Test Engineer with a demonstrated history of working in the finance and health
wellness and fitness industry. She is a quality assurance professional and a graduate from Columbia College. Besides
work, she is learning how to ski and love to travel to new places to explore different culture and try new food.
Nathaniel
Nathaniel has a strong background in process management and development. His past knowledge in technology and business managment has driven him to excel in his field. Nathaniel loves writing code and is motivated to develop web applications that are bug free and sophisticated. Besides his passion about writing code Nate enjoys the occasional drink. So, Sip This to support him and the rest of the team- Cheers!


The paper studies transfer learning in RL, focusing on simultaneous transfer across both tasks and environments.
The key idea is to learn task and environment embeddings and compose them using a meta-rule, and the proposed approach is called SYNPO (Synthesized Policies).
Three settings considered:
S1: Transfer to a new (environment, task) pair when the agent has been trained on the environment and the task before (but not simultaneously).
S2: Transfer to a new (environment, task) pair where either the environment or the task is not seen previously.
S3: Transfer to a new (environment, task) pair where neither the environment nor the task is seen previously.
In the second and third settings, the agent is allowed to collect some data in the new environment or task.
The (environment, task) combinations that the agent has seen during training are referred to as seen combinations, while the remaining combinations are referred to as the unseen combinations.
The key idea is to:
learn embeddings of environments and tasks
use these embeddings to compose a policy (parameterized as the linear combination of the policy basis).
A disentanglement objective is used to decouple the task and environment embedding.
Given an (environment, task) pair $z = (\epsilon, \tau)$, the policy is given as $\pi_z(a|s) \propto exp(\psi_s^TU(e_{\epsilon}, e_{\tau})\phi_{a} + b_{\pi} )) $.
Here $b_{\pi}$ is a scalar bias, $\psi_{s}$ and $\phi_{a}$ are state and action representations, $U$ is parameterized as the linear comination of $K$ basis matrices $\Theta_k$
$U(e_{\epsilon}, e_{\tau}) = \sum_{k=1}^{K}\alpha_k(e_{\epsilon}, e_{\tau})\Theta_k$.
The basis matrices (denoted by $\Theta_k$) are shared across tasks while the coefficients ($\alpha_k$) are specific to the (environment, task) pair.
During training, the agent also predicts rewards using the same set of basis but different coefficients.
Given an (environment, task) pair, the agent is trained to decode the environment (and task) given the agent’s trajectory.
The sequence of state-action pairs (in the trajectory) is mapped to a sequence of state-action representations, given by $\psi_s^T\Theta_k\phi_{a}$
GRIDWORLD
Twenty $16 \times 16$ gird-aligned mazes that are similar in appearance but differ in topology.
The task is to collect colored blocks in a given order. In each task, the starting position of the agent and the position of the blocks is randomized.
Each environment has 20 tasks, leading to a total of 400 (environment, task) combinations.
This is a 3D simulator where the agent is placed in indoor photo-realistic scenes.
The task is the search for objects and perform actions like “put cabbage on the fridge.”
The setup uses 19 scenes (environments), with each environment comprising of 21 tasks.
MLPs that concatenate state, environment embeddings, and task embedding.
Multi-task Learning where the distinction between the environments is ignored.
GRIDWORLD
In the first setting (S1)
SYNPO outperforms all the baselines.
As the agent is trained on more (environment, task) combinations, its performance on the unseen combinations improves. This trend saturates when the seem/total ratio reaches about 0.4 (i.e., training on 40% of all the combinations).
Task disentanglement is more important than environment disentanglement.
In the second and third setting (S2 and S3)
The agent uses one demonstration from each test pair to finetune the embeddings.
S2 is an easier setting than S3.
Transfer learning across tasks is easier than transfer learning across environments.
THOR


| constants (version 0.1) | index |
Description:
This program implements a simple Twitter bot that tweets information about bills in Congress
that are (in)directly related to cyber issues. This bot uses a MySQL database backend to
keep track of bills, both posted and unposted (i.e., tweeted and yet to be tweeted, respectively).
For this initial proof of concept, bill data are scraped from the official US Government
Publishing Office website. For future versions, it would probably be better to connect to a
less cumbersome endpoint like ProPublica.
Module:
This module containts all program constants.
Libraries:
This program makes use of the following libraries:
lxml
Stephan Richter / Infrae
BSD License
http://lxml.de/
xmltodict
Martin Blech & contribs.
MIT License
https://github.com/martinblech/xmltodict
python-twitter
Mike Taylor ('bear') & contribs.
Apache License 2.0
https://github.com/bear/python-twitter
requests
Kenneth Reitz
Apache License 2.0
http://docs.python-requests.org/en/master
MySQL Connector
Oracle & affiliates
Misc. License
https://dev.mysql.com/doc/connector-python/en/
License:
Copyright 2017 J. Michael Beaver
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
References:
https://www.gpo.gov/fdsys/bulkdata/BILLSTATUS/resources/BILLSTATUS-XML_User-Guide-v1.pdf
https://github.com/usgpo/bill-status/blob/master/BILLSTATUS-XML_User_User-Guide.md
https://projects.propublica.org/api-docs/congress-api/endpoints/
https://github.com/bear/python-twitter
https://github.com/martinblech/xmltodict
http://docs.python-requests.org/en/master
https://dev.mysql.com/doc/connector-python/en/
http://lxml.de/
https://www.python.org/dev/peps/pep-0249
https://is.gd/apishorteningreference.php
https://www.pantz.org/software/mysql/mysqlcommands.html
https://bitbucket.org/ned/coveragepy/commits/f8e9d62f1412
https://www.govtrack.us/api/v2/role
https://choosealicense.com/licenses/apache-2.0/
http://www.mysqltutorial.org/getting-started-mysql-python-connector/
| Data | ||
| BASE_URL = 'https://www.gpo.gov/fdsys/bulkdata/BILLSTATUS/115' BILL_TYPES_PATH = {'HCONRES': 'house-concurrent-resolution', 'HJRES': 'house-joint-resolution', 'HR': 'house-bill', 'HRES': 'house-resolution', 'S': 'senate-bill', 'SCONRES': 'senate-concurrent-resolution', 'SJRES': 'senate-joint-resolution', 'SRES': 'senate-resolution'} BULK_PATH = 'bulkdata/BILLSTATUS/' CONGRESS = '115' CONGRESS_TWITTER = {'Abraham, Ralph': '@RepAbraham', 'Adams, Alma': '@RepAdams', 'Aderholt, Robert': '@Robert_Aderholt', 'Aguilar, Pete': '@reppeteaguilar', 'Alexander, Lamar': '@SenAlexander', 'Allen, Rick': '@reprickallen', 'Amash, Justin': '@justinamash', 'Amata, Aumua': '@RepAmata', 'Amodei, Mark': '@MarkAmodeiNV2', 'Arrington, Jodey': '@RepArrington', ...} CONGRESS_URL = 'https://www.congress.gov/bill/' HCONRES_URL = 'https://www.gpo.gov/fdsys/bulkdata/BILLSTATUS/115/hconres/' HJRES_URL = 'https://www.gpo.gov/fdsys/bulkdata/BILLSTATUS/115/hjres/' HOUSE_URL = 'https://www.gpo.gov/fdsys/bulkdata/BILLSTATUS/115/hr/' HRES_URL = 'https://www.gpo.gov/fdsys/bulkdata/BILLSTATUS/115/hres/' KEYWORDS = ['cyber', 'hacking', 'hacker', 'hacked', 'breach', 'privacy', 'Internet', 'broadband', 'crypto', 'net neutrality', 'communications', 'fcc'] ROOT_URL = 'https://www.gpo.gov/fdsys/' SCONRES_URL = 'https://www.gpo.gov/fdsys/bulkdata/BILLSTATUS/115/sconres/' SENATE_URL = 'https://www.gpo.gov/fdsys/bulkdata/BILLSTATUS/115/s/' SJRES_URL = 'https://www.gpo.gov/fdsys/bulkdata/BILLSTATUS/115/sjres/' SLEEP_LIMIT = 8 SRES_URL = 'https://www.gpo.gov/fdsys/bulkdata/BILLSTATUS/115/sres/' TWEET_MAX_LENGTH = 116 URL_LIST = ['https://www.gpo.gov/fdsys/bulkdata/BILLSTATUS/115/s/', 'https://www.gpo.gov/fdsys/bulkdata/BILLSTATUS/115/sres/', 'https://www.gpo.gov/fdsys/bulkdata/BILLSTATUS/115/sjres/', 'https://www.gpo.gov/fdsys/bulkdata/BILLSTATUS/115/sconres/', 'https://www.gpo.gov/fdsys/bulkdata/BILLSTATUS/115/hr/', 'https://www.gpo.gov/fdsys/bulkdata/BILLSTATUS/115/hres/', 'https://www.gpo.gov/fdsys/bulkdata/BILLSTATUS/115/hjres/', 'https://www.gpo.gov/fdsys/bulkdata/BILLSTATUS/115/hconres/'] __version__ = '0.1' |


the dream inspired:
October 30, 2010
didn't it sound great- all that new star?
you might as well abate those dreams are wrong
might as well have not sung that song at all
it's not always the case of the bad start
a second chance will not always make it any better
I hold your hand as we move all but I never get you back
like a time machine
and it doesn't seem to me like a tragedy
but I thought I lost it all
I will think of you for a while my friend
I would have let you go back a hero
I never thought about why I had broken over
never wrong never think about it’s a step you're on too hard
it seems like all you want is a love song
yet you don't hear what you need
you're never gonna be there as the band starts
you are never gonna let the fights stop
it's a dream when you and I say the same words oh it's a frenzy I say
can't you can't help yourself my sweet friends you need this
where you even now you seemingly escaping
twitter twitch I don't care
what do you think I am made of my friend
I'd love to hear you sing a fool's song
I would love to hear your -why it's wrong


Back Step 3 of 16
Approve a representative (optional)Provide approval from the taxpayer (optional)
You will need approval from the taxpayer if you want to receive correspondence or represent the taxpayer at a hearing. to provide approval for your representative before they can receive correspondence or represent you at a hearing.
How to get approval from the taxpayerHow to approve a representative
- copy and paste the text below into an email, document or download as a PDF
- send to the taxpayer to complete
- if you are acting on behalf of a company you will need approval from a company director
- ask the taxpayer to email back the information from their email account or return a signed form
- upload a copy of the email or signed form in digital format below
- copy and paste the text below into a document or download as a PDF
- complete and sign the form
- if your appealapplication is for a company you will need the signature of a company director
- upload the form in digital format below
Example text
Taxpayer's name:
I authorise my representative to act on my behalf in this appeal application.
Name of representative:
Address of representative:
Signed by taxpayer:
Name of signatory (printed):
Position held:
Date:


ROFR Thread January to March 2018 *PLEASE SEE FIRST POST FOR INSTRUCTIONS & FORMATTING TOOL*
Discussion in 'Purchasing DVC' started by pangyal, Jan 2, 2018.
- Thread Status:
- Not open for further replies.
Page 1 of 55
Page 1 of 55
- Thread Status:
- Not open for further replies.


grain size conductivity high detonation max zone reaction duration density data explosives influence maximum {border-style value px;} work #ffffff;} results critical HEs chemical density. different electrical powder smaller Satonkina Shock condensed dependence Waves \documentclass[pt]{minimal} \setlength{\oddsidemargin}{-pt} \usepackage{amsbsy} \usepackage{amsfonts} \usepackage{amsmath} \usepackage{amssymb} \usepackage{mathrsfs} \usepackage{upgreek} \usepackage{wasysym} decrease experimental small using grains obtained point shows size. Combustion, Ershov Fig. Physics RDX g/cm product vs. Detonation Explosives, Figure charge close diameter d〉 = effect increase px; shown {font-family HMX Table Thus, degree densities font-size given graph number points probability profile range single size, values ./. = . ./S Electrical PETN Supplementary approximation density, double; explosion function information initial observed pressing related shift statistical zone. μm, (the ./s--- Experimental RDX, \begin{document}$$\langle according average border-color border-width change common coordinates corresponding corresponds detonating experiments explosive interpretation leads material minimum order paper scatter sensitivity solid; structure vzryvchatykh works {font-style {font-weight ./. Combustion Commons Creative Data Influence Scientific TNT analysis belong bold carbon courier; diameters distribution em; hypothesis larger lower method methods presented pressed properties proposed pt;} region research significantly theory used wave zone,


A tribal region somewhere in Asia
BUILD NATIVE HUTS - No more homeless tribals 2030
Nobody likes to be homeless even in the jungle. (pun intended)
Besides building huts and toilets we are interested in many Cardano projects listed below. Got ideas? Join our community let’s do it together. As they say…
GAME NFT - Launch Cardano NFT Games 2022
Launch Cardano NFT games or sponsor existing project. There are many indie game developers for Unity and Unreal engines
It does not cost millions anymore to produce playable blockchain games.
NATIVE TOKENS - Token Projects 2023
Our community shares about the idea to start club pool funds like the functions of VC funds in a token system.
Babel fees is another thing we are looking forward to implement self sustaining token ecosystem for new users without the complexity of tx fees as ada.
ECOSYSTEM - Support New Projects 2022
Let’s light up Asia with Cardano Nodes. Help expand small independent pools across Asia. .
Support new or existing projects to achieve its goals and roadmaps.


My "To Do" Application
“He who is best prepared can best serve his moment of inspiration.”
Samuel Taylor Coleridge
Tasks left: 6
Add a task
Remaining Tasks
Do the
Christmas
shopping
✓
Set reminder
Delete
Attend medical appointment
✓
Set reminder
Delete
Apply for travelling Visa
✓
Set reminder
Delete
Attend the
opera
performance on Thursday
✓
Set reminder
Delete
Choose activities for each honeymoon
destination
✓
Set reminder
Delete
Submit honeymoon requests to travel concierge
✓
Set reminder
Delete
Already Completed
Study
✓
Set reminder
Delete
Complete homework
✓
Set reminder
Delete
Submit homework
✓
Set reminder
Delete
Have you made any changes?
Update List


backend package¶
Submodules¶
backend.app module¶
backend.auth module¶
auth.py¶
Authentication API endpoints. All routes start with /api/auth All incoming request parameters are wrapped in a JSON body. All outgoing response returns are wrapped in a JSON entry with key ‘payload’, like this:
{
"error": "false",
"error-msg": None,
"payload": {
"return-1": "true"
}
}
Note that method documentation assumes you are using jsonResponse/errorResponse to generate the response, and only shows the actual returns within payload. Ditto for request parameters.
-
backend.auth.
getuid
()[source]¶ GET get currently logged in user from session cookie
Notes
Implicitly sends session cookie with request
- Returns
uid – Unique identification for user.
- Return type
int
-
backend.auth.
login
()[source]¶ POST login as a user.
- Parameters
email (str) –
password (str) –
- Returns
uid – unique ID that idenfies this user.
- Return type
int
- Raises
InvalidEmail – Email does not exist in system.
InvalidPassword – Password does not exist in system.
Notes
This function also sets a encrypted session cookie which can only be decrypted server-side.
See also
backend.auth.getuid
getuid from session cookie.
-
backend.auth.
logout
()[source]¶ POST clear the current session cookie for a logged in user
Notes
Returns an empty session cookie, in addition to an empty payload.
-
backend.auth.
register
()[source]¶ POST Register a new user.
- Parameters
firstName (str) –
lastName (str) –
email (str) –
password (str) –
isTutor (bool) –
- Returns
uid – unique ID that idenfies this user.
- Return type
int
- Raises
BadRequest – Some part of the required parameters is missing.
UsersExists – User with the same email has already registered.
backend.class_list module¶
class_list.py¶
Endpoints for retrieving a list of all classes. All routes start with /api/classList All incoming request parameters are wrapped in a JSON body. All outgoing response returns are wrapped in a JSON entry with key ‘payload’, like this:
{
"error": "false",
"error-msg": None,
"payload": {
"return-1": "true"
}
}
Note that method documentation assumes you are using jsonResponse/errorResponse to generate the response, and only shows the actual returns within payload. Ditto for request parameters.
backend.form_response module¶
form_response.py¶
Helper methods for generating response objects. All response objects are generated like this:
{
"error": "false",
"error-msg": None,
"payload": {
"return-1": "true"
}
}
-
backend.form_response.
errorResponse
(msg='')[source]¶ Formulate a response return that is an error. :param msg: error message to return to frontend. :type msg: str
- Returns
_ – object suitable for reply over HTTP with a correctly formulated JSON body.
- Return type
Response object
-
backend.form_response.
jsonResponse
(body={})[source]¶ Formulate a response return that is successful. :param body: dictionary of keys and their values to send with as the response :type body: dict
- Returns
_ – object suitable for reply over HTTP with a correctly formulated JSON body.
- Return type
Response object
backend.match module¶
match.py¶
Endpoints for operations related to matching users. All routes start with /api/match All incoming request parameters are wrapped in a JSON body. All outgoing response returns are wrapped in a JSON entry with key ‘payload’, like this:
{
"error": "false",
"error-msg": None,
"payload": {
"return-1": "true"
}
}
Note that method documentation assumes you are using jsonResponse/errorResponse to generate the response, and only shows the actual returns within payload. Ditto for request parameters.
-
backend.match.
get_user_list
()[source]¶ POST get associated users of a given user.
- Parameters
uid (int) – UID for the interested user
- Returns
userList – string list of uids associated with the requested user
- Return type
list[int]
- Raises
BadRequest – Some part of the required parameters is missing.
-
backend.match.
tutor_respond
()[source]¶ POST [for tutors] respond to an incoming connection request. Backend adds both members to each other’s list.
- Parameters
studentID (int) – UID for the student
tutorID (int) – UID of the tutor
Notes
returns an empty response body on success.
- Raises
BadRequest – Some part of the required parameters is missing.
backend.message module¶
message.py¶
Endpoints for operations related to matching users. All routes start with /api/message All incoming request parameters are wrapped in a JSON body. All outgoing response returns are wrapped in a JSON entry with key ‘payload’, like this:
{
"error": "false",
"error-msg": None,
"payload": {
"return-1": "true"
}
}
Note that method documentation assumes you are using jsonResponse/errorResponse to generate the response, and only shows the actual returns within payload. Ditto for request parameters.
-
backend.message.
add
()[source]¶ POST submit a message. :param from: UID for the originator, as string :type from: str :param to: UID of the recipient, as string :type to: str :param msg: message content :type msg: str :param createdDate: :type createdDate: timestamp
Notes
returns an empty response body on success.
- Raises
BadRequest – Some part of the required parameters is missing.
-
backend.message.
get
()[source]¶ POST submit a message. :param uid1: UID for the originator, as string :type uid1: str :param uid2: UID of the recipient, as string :type uid2: str
- Returns
messages – list of messages from uid1 to uid2
- Return type
list(Message)
Notes
the Message object is exactly the request parameters of add/
- Raises
BadRequest – Some part of the required parameters is missing.
See also
backend.message.add
contents of the Message object
backend.notification module¶
notification.py¶
Endpoints for operations related to matching users. All routes start with /api/notification All incoming request parameters are wrapped in a JSON body. All outgoing response returns are wrapped in a JSON entry with key ‘payload’, like this:
{
"error": "false",
"error-msg": None,
"payload": {
"return-1": "true"
}
}
Note that method documentation assumes you are using jsonResponse/errorResponse to generate the response, and only shows the actual returns within payload. Ditto for request parameters.
-
backend.notification.
add
()[source]¶ POST get currently pending notifications
- Parameters
uid (str) – UID to set the notification for
notification (Notification) – Notification object (see notes)
- Returns
notifications
- Return type
list(Notification)
Notes
the Notification object is structure as the following:
{ msg: str notificationId: str createDate: timestamp read: bool type: "INITIATE" or "MESSAGE" from: str to: uid }
- Raises
BadRequest – Some part of the required parameters is missing.
-
backend.notification.
delete
()[source]¶ POST delete a given notification
- Parameters
uid (str) –
notificationId (str) –
Notes
Method returns an empty object on success.
See also
backend.notification.get
notificationId
-
backend.notification.
get
()[source]¶ POST get currently pending notifications
- Parameters
uid (str) – UID for the user requesting notifications
- Returns
notifications
- Return type
list(Notification)
Notes
the Notification objects returned by this endpoint each additionally contain a notificationId, which uniquely identifies them.
See also
backend.notification.add
implementation of Notification
backend.profile module¶
profile.py¶
Endpoints for operations related to matching users. All routes start with /api/profile All incoming request parameters are wrapped in a JSON body. All outgoing response returns are wrapped in a JSON entry with key ‘payload’, like this:
{
"error": "false",
"error-msg": None,
"payload": {
"return-1": "true"
}
}
Note that method documentation assumes you are using jsonResponse/errorResponse to generate the response, and only shows the actual returns within payload. Ditto for request parameters.
-
backend.profile.
edit
()[source]¶ POST change attributes of a user profile.
- Parameters
firstName (str) –
lastName (str) –
major (str) –
year (int) –
classes (list(str)) –
uid (str) –
Notes
returns empty json object on success.
- Raises
BadRequest – Some part of the required parameters is missing.
UidNotFound – Could not find the user in the database.
-
backend.profile.
get
()[source]¶ POST get attributes of a user profile.
- Parameters
uid (str) – uid of requested profile
- Returns
firstName (str)
lastName (str)
major (str)
year (int)
classes (list(str))
uid (str)
notifications (list(Notifications))
Messages (list(Messages))
isTutor (bool)
- Raises
BadRequest – Some part of the required parameters is missing.
UidNotFound – Could not find the user in the database.
See also
backend.message
messages module
backend.notification
notifications modle
-
backend.profile.
pictureDownload
()[source]¶ POST download the profile picture for the given user.
- Parameters
uid (str) – uid of requested profile
- Returns
profilePicUrl – base64 encoded data string or None
- Return type
str
- Raises
BadRequest – Some part of the required parameters is missing.
UidNotFound – Could not find the user in the database.
-
backend.profile.
pictureUpload
()[source]¶ POST upload a picture for the given user.
- Parameters
uid (str) – uid of requested profile
profilePicUrl (str) – base64 encoded data string
Notes
method returns empty json object on success.
- Raises
BadRequest – Some part of the required parameters is missing.
UidNotFound – Could not find the user in the database.
backend.rdscli module¶
rdscli.py helper module to connect to redis database.
backend.recovery module¶
recovery.py¶
Endpoints for operations related to matching users. All routes start with /api/recovery All incoming request parameters are wrapped in a JSON body. All outgoing response returns are wrapped in a JSON entry with key ‘payload’, like this:
{
"error": "false",
"error-msg": None,
"payload": {
"return-1": "true"
}
}
Note that method documentation assumes you are using jsonResponse/errorResponse to generate the response, and only shows the actual returns within payload. Ditto for request parameters.
-
backend.recovery.
forgot
()[source]¶ POST submit a password reset request. Emails the user a recovery link.
- Parameters
email (str) – email to reset to
Notes
returns an empty response body on success.
- Raises
BadRequest – Some part of the required parameters is missing.
EmailNotFound – no user associated with email.
ServerBad – Mailserver is not functioning.
-
backend.recovery.
reset
()[source]¶ POST complete a password reset request.
- Parameters
secret (str) – secret sent in email
password (str) – new password
Notes
returns an empty response body on success.
- Raises
BadRequest – Some part of the required parameters is missing.
NoRecovery – No recovery has been requested.
backend.schedule module¶
schedule.py¶
Endpoints for operations related to matching users. All routes start with /api/schedule All incoming request parameters are wrapped in a JSON body. All outgoing response returns are wrapped in a JSON entry with key ‘payload’, like this:
{
"error": "false",
"error-msg": None,
"payload": {
"return-1": "true"
}
}
Note that method documentation assumes you are using jsonResponse/errorResponse to generate the response, and only shows the actual returns within payload. Ditto for request parameters.
Scheduling blocks are from 9am - 9pm in two hour incrememts for 6 blocks a day, 7 days a week. We index into a scheduling array by 6*day + block.
backend.search module¶
search.py¶
Endpoints for operations related to matching users. All routes start with /api/search All incoming request parameters are wrapped in a JSON body. All outgoing response returns are wrapped in a JSON entry with key ‘payload’, like this:
{
"error": "false",
"error-msg": None,
"payload": {
"return-1": "true"
}
}
Note that method documentation assumes you are using jsonResponse/errorResponse to generate the response, and only shows the actual returns within payload. Ditto for request parameters.
-
backend.search.
schedule_overlaps
(schedule, user_sched)[source]¶ Helper function for search. Not used in requests.
-
backend.search.
search_results
()[source]¶ POST /get get search results
- Parameters
name (str) – case-insensitive name search
classes (list(str)) – name of classes to search for
major (str) – major to search for
bytes (int[42]) – availibility to search for
- Returns
tutors – list of UIDs of tutors which match search criteria
- Return type
list(str)
- Raises
BadRequest – Some part of the required parameters is missing.
See also
backend.schedule
magic 42


Container Details
Information
This view provides basic details about a container. This information includes:
- the container's profiles
- the container's runtime environment
- PID
- JVM Version
- Up time
- System Architecture
- System OS
- Number of available CPU cores
- the container's name and status
- the container's system resources
- physical memory
- swap space
- heap memory
- file descriptors
- threads
Controls
This page offers the following controls:
- Add Profiles - Add profiles to the container.
- OSGi Details - Opens a new page that lists the OSGi bundles and OSGi services deployed into the container
- Fuse MQ Details - Available if the container has a Fuse MQ Enterprise broker. Opens a new page listing details about the Fuse MQ broker instance.


Adding the third dimension, the image backgrounds are now split into separate layers and positioned in 3D space. next >


ScratchCardView
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Installation
ScratchCardView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "ScratchCardView"
Usage
See the example project for usage.
You can setup custom views for both the scratch card cover and the cratch card content. The setup is done through a delegate.
class YourViewController: UIViewController {
...
override func viewDidLoad() {
super.viewDidLoad()
configureScratchCardView()
}
private func configureScratchCardView() {
scratchCardView.delegate = self
scratchCardView.scratchWidth = 150
}
}
extension YourViewController: ScratchCardViewDelegate {
func coverView(for scratchCardView: ScratchCardView) -> UIView {
let coverView = UIView()
coverView.backgroundColor = UIColor.gray
return coverView
}
func contentView(for scratchCardView: ScratchCardView) -> UIView {
let imageView = UIImageView(image: yourCustomImage)
imageView.contentMode = .scaleAspectFill
return imageView
}
}
That is all you need to know, its that simple :)
If you want to reload the ScratchCardView call:
scratchCardView.reloadView()
This will trigger a call to your delegate for a new cover and content view.
Author
pgorzelany<EMAIL_ADDRESS>License
ScratchCardView is available under the MIT license. See the LICENSE file for more info.


class TargetLocator
Methods
| String |
locate(String $context, String|resource $resource)
Locates the target for a resource in a context |
Details
at line 31
public String
locate(String $context, String|resource $resource)
Locates the target for a resource in a context
For example, adding /path/to/file where the context (current working
directory) is /path/to will return `file` as target


Class: Food
- Inherits:
-
FoodAbstract
- Object
- FoodAbstract
- Food
- Includes:
- Comparable
- Defined in:
- lib/food/food_class.rb
Overview
Class for Food that inherit FoodAbstract
Instance Attribute Summary collapse
- #group_name ⇒ Object readonly
Attributes inherited from FoodAbstract
#energetic_content, #glucid_quantity, #lipid_quantity, #name, #protein_quantity
Instance Method Summary collapse
-
#<=>(food) ⇒ String
Essential comparating for using Comparable Module.
-
#initialize(name, protein_energy_pair, glucid_energy_pair, lipid_energy_pair, group_name) ⇒ Food
constructor
Constructor of Food with the group name.
-
#to_s ⇒ String
Return string with the output for the food calling the father.
Methods inherited from FoodAbstract
Constructor Details
#initialize(name, protein_energy_pair, glucid_energy_pair, lipid_energy_pair, group_name) ⇒ Food
Constructor of Food with the group name
77 78 79 80 |
# File 'lib/food/food_class.rb', line 77 def initialize(name, protein_energy_pair, glucid_energy_pair, lipid_energy_pair, group_name) @group_name = group_name super(name, protein_energy_pair, glucid_energy_pair, lipid_energy_pair) end |
Instance Attribute Details
#group_name ⇒ Object (readonly)
69 70 71 |
# File 'lib/food/food_class.rb', line 69 def group_name @group_name end |
Instance Method Details
#<=>(food) ⇒ String
Essential comparating for using Comparable Module
90 91 92 93 |
# File 'lib/food/food_class.rb', line 90 def <=> (food) raise unless food.is_a?Food return self.energetic_content <=> food.energetic_content end |
#to_s ⇒ String
Return string with the output for the food calling the father
84 85 86 |
# File 'lib/food/food_class.rb', line 84 def to_s "Grupo: #{@group_name} | " + super end |


QANet-Combining Local Convolution with Global Self-Attention for Reading Comprehension
Related Resources:
- Origional Paper
- Thang Luong’s Slides
- Kim’s Blog (Following example code is taken from Kim’s Blog)
- TensorFlow Implementation of QANet (By Kim)
- PyTorch Implementation of QANet
1 Abstract
Ideas
- Idea #1: Mainstream MC models with RNN and attention are slow for both training and inference.
- Idea #2: In QANet, encoder only consists of convolution and self-attention.
- Convolution models local interactions and self-attention models global interactions.
1.1 LSTM is slow
Previous models like BiDAF uses a lot LSTM and is slow.
1.2 Convolution & Self-Attention
Using convolution to capture local features.
Using self-attention to capture global interactions.
2 Introduction
Some background information about Machine Reading Comprehension can be found in the R-Net Blog.
Previous successful models generally employ two key ingredients:
- RNN for sequential inputs.
- Attention Mechanism for long term interactions.
However, these model are struggling for long time to train.In this paper:
1. Query and Context Encoder: exclusivly use convolutions and self-attentions for query and context encoder.
2. Context-Query Attention: a standard attention is used to learn the interactions between context and questions.
3. Model Encoder Layer: resulting representation is encoded again with the recurrence-free encoder.
4. Output Layer: a task-specific layer, same stratege as in Seo et al., (2016).
3 Model
3.1 Problem Formulation
Context paragraph with words:
Query sentence with words:
Output span :
In the following, we’ll use to denote both the original word and its embedded vector.
3.2 Model Overview
3.2.1 Input Embedding Layer
Embedding of each word is obtained by concatenating its word embedding and character embedding.
where word embedding and character embedding .
The output of a given word is the concatenation:
Kim implements the embedding layer with a similar approach as (Kim et al., 2016).
import tensorflow as tf
import numpy as np
N = 32 # num_batch
PL = 400 # passage_length
QL = 30 # question_length
nh = 8 # number of heads in multi-head self attention.
char_lim = 16 # character_limit
dim = 128 # dimension
dim_char = 32 # character_dimension
test_para_limit = 1000
test_ques_limit = 100
word_mat = np.load("glove.840B.300d.txt")
context = tf.placeholder(tf.int32, [None, PL], "context")
quesion = tf.placeholder(tf.int32, [None, QL], "question")
context_char = tf.placeholder(tf.int32, [None, PL, char_lim], "context_char")
question_char = tf.placeholder(tf.int32, [None, QL, char_lim], "question_char")
y1 = tf.placeholder(tf.int32, [None, PL], "answer_index1")
y2 = tf.placeholder(tf.int32, [None, PL], "answer_index2")
# Pretrained Word Vectors -- fixed during traing
word_mat = tf.get_variable("word_mat", initializer=tf.constant(
word_mat, dtype=tf.float32), trainable=False)
# Character Vectors -- trainable
char_mat = tf.get_variable(
"char_mat", initializer=tf.constant(char_mat, dtype=tf.float32))
# Context and Question Word's character embedding
context_char_emb = tf.reshape(tf.nn.embedding_lookup(
char_mat, context_char), [N * PL, char_lim, dim_char])
quesion_char_emb = tf.reshape(tf.nn.embedding_lookup(
char_mat, question_char), [N * QL, char_lim, dim_char])
context_char_emb
and question_char_emb
are put through a single layer of convolution and max-pooling.
The concatenated context_emb = tf.concat([context_emb, context_char_emb])
word embedding is then input to a highway network.
# convolution
context_char_emb = conv(context_char_emb, dim,
bias=True, activation=tf.nn.relu, kernel_size=5, name="char_conv", reuse=None)
quesion_char_emb = conv(quesion_char_emb, dim,
bias=True, activation=tf.nn.relu, kernel_size=5, name="char_conv", reuse=True)
# max-pooling
context_char_emb = tf.reduce_max(context_char_emb, axis=1)
quesion_char_emb = tf.reduce_max(quesion_char_emb, axis=1)
context_char_emb = tf.reshape(context_char_emb, [N, PL, dim])
quesion_char_emb = tf.reshape(quesion_char_emb, [N, QL, dim])
# word embedding
context_emb = tf.nn.embedding_lookup(word_mat, context)
question_emb = tf.nn.embedding_lookup(word_mat, quesion)
# concatenation of word embedding and character embedding
context_emb = tf.concat([context_emb, context_char_emb], axis=2)
question_emb = tf.concat([question_emb, quesion_char_emb], axis=2)
# 2-layer highway network
context_emb = highway(context_emb, size=dim, layers=2, scope="highway", reuse=None)
question_emb = highway(question_emb, size=dim, layers=2, scope="highway", reuse=True)
3.2.2 Embedding Encoder Layer
Outputs of the embedding layer is input into the encoder layer to generate corresponding context and question representation.
The encoder layer is a stack of basic building block:
and it uses depthwise separable convolutions (Chollet., 2016) (Kaiser et al., 2017) rather than traditional ones.
The kernel size is , the number of filters is and the number of convert layers within a block is .
For the self-attention-layer, we adopt the multi-head attention mechanism defined in (Vaswani et al., 2017).
For an input and a given operation , the output is :
Note that the input of this layer is a vector of dimension for each individual word, which is immediately mapped to by a one-dimensional convolution.
3.2.3 Context-Query Attention Layer
This module is almost the same as every previous reading comprehension models, such as BiDAF (Seo et al., 2016) and DCN (Xiong et al., 2016) .
We use and to denote the encoded context and query.
Step 1. Calculate Similarity Matrix:
Firstly, compute the similarites between each pair of context and query words, rendering a similarity matrix .
Similarity function used here is the trilinear function:
where is the element-wise multiplication and is a trainable variable.
Step 2. Calculate Context2Query Attention:
Then, normalize each row of by applying the softmax function, getting a matrix .
The Context-to-Query attention is computed as .
Step 3. Calculate Query2Context Attention:
For the Query-to-Context attention, QANet follows DCN attention (Xiong et al., 2016).
It computes the column normalized matrix by softmax function, and the query-to-context attention is :
3.2.4 Model Encoder Layer
Similar to (Seo et al., 2016) the input of this layer at each position is , where and are respectively a row of attention matrix and .
context = residual_block(context_emb, num_blocks=1, num_conv_layers=4, kernel_size=7,
num_filters=dim, num_heads=nh, scope="Encoder_Residual_Block", bias=False)
question = residual_block(question_emb, num_blocks=1, num_conv_layers=4, kernel_size=7,
num_filters=dim, num_heads=nh, scope="Encoder_Residual_Block",
reuse=True, # Share the weights between passage and question
bias=False)
tiled_context = tf.tile(tf.expand_dims(context, 2), [1, 1, QL, 1])
tiled_question = tf.tile(tf.expand_dims(question, 1), [1, PL, 1, 1])
S = trilinear([tiled_context, tiled_question, tiled_context * tiled_question])
S_ = tf.nn.softmax(S)
S_T = tf.transpose(tf.nn.softmax(S, dim=1), (0, 2, 1))
context2question = tf.matmul(S_, question)
question2context = tf.matmul(tf.matmul(S_, S_T), context)
attention_outputs = [context, context2question, context * context2question, context * question2context]
3.2.5 Output Layer
Output layer is task-specific.
For span selection, this paper follows the strategy of (Seo et al., 2016) to predict the probability of each position in the context being the start or the end of an answer span.
where and are two trainable variables and are respectively the outputs of the three model encoders, from bottom to top.
The objective function is defined as the negative sum of the log probabilities of the predictied distributions indexed by true start and end indices, averaged over all the training examples:
inputs = tf.concat(attention_outputs, axis=-1)
encoder_inputs = [conv(inputs, dim, name="input_projection")]
for i in range(3):
encoder_inputs.append(
residual_block(encoder_inputs[i],
num_blocks=7,
num_conv_layers=2,
kernel_size=5,
num_filters=dim,
num_heads=nh,
scope="Model_Encoder",
bias=False,
reuse=True if i > 0 else None)
)
# only use the first and second output of stacked encoder for the first answer probability calculation
start_prob = tf.squeeze(conv(tf.concat([encoder_inputs[1], encoder_inputs[2]], axis=-1), 1, bias=False, name="start_pointer"), -1)
# use the first and THIRD output of stacked encoder for the last answer probability calculation
end_prob = tf.squeeze(conv(tf.concat([encoder_inputs[1], encoder_inputs[3]], axis=-1), 1, bias=False, name="end_pointer"), -1)
# We calculate the loss
losses = tf.nn.softmax_cross_entropy_with_logits(logits=start_prob, labels=y1)
losses2 = tf.nn.softmax_cross_entropy_with_logits(logits=end_prob, labels=y2)
loss = tf.reduce_mean(losses + losses2)


Trump says will issue final decision on vaping product next week
The Trump administration will issue its final decision on vaping products next week, U.S. President Donald Trump told reporters at the White House on Friday.
WASHINGTON: The Trump administration will issue its final decision on vaping products next week, U.S. President Donald Trump told reporters at the White House on Friday.
Trump did not give further details about the ruling, but said that vaping had become an important industry and that the administration was weighing flavors, age of use and industry jobs.
(Reporting by Alexandra Alper; Writing by Susan Heavey; Editing by Alison Williams)


DROP DEAD GORGEOUS (New Line) Starring: Kirsten Dunst, Denise Richards, Kirstie Alley, Ellen Barkin, Allison Janney, Sam McMurray. Screenplay: Lona Williams. Producers: Gavin Polone and Judy Hofflund. Director: Michael Patrick Jann. MPAA Rating: PG-13 (profanity, adult themes) Running Time: 96 minutes. Reviewed by Scott Renshaw.
It's tough to knock a funny film for being not nearly as funny as it could have been -- or thinks it is -- but that's ultimately the problem with DROP DEAD GORGEOUS. Using that increasingly-popular device of the faux documentary, it tells the behind-the-scenes story of a regional beauty pageant in the small town of Mount Rose, Minnesota. Town grand dame Gladys Leeman (Kirstie Alley) is one of the organizers of the local Miss Teen Princess America competition, but she also happens to be the mother of contestant Becky Leeman (Denise Richards). That gives Becky a distinct edge, though she faces her toughest challenge from tap-dancing trailer park ingenue Amber Atkins (Kirsten Dunst). Unless, that is, Amber meets the same sort of untimely end as others who cross the Leemans.
It would be easy enough to call DROP DEAD GORGEOUS a second-rate gloss on Michael Ritchie's SMILE, or a wannabe WAITING FOR GUFFMAN, or a half-hearted THE POSITIVELY TRUE ADVENTURES OF THE ALLEGED TEXAS CHEERLEADER-MURDERING MOM (also, not coincidentally, directed by Michael Ritchie). Such criticisms don't do justice to the number of belly laughs this film provides. Some are exaggerated, like the behavior of one judge's mentally handicapped brother (Will Sasso). Some are subtle, like the production number that finds pageant contestants smearing themselves on freshly-painted stepladders. And some are sharp, like the smoking, drinking, pregnant teen who says she can't make an event because she's "like, due, or something." By the time the talent portion of the competition rolls around -- complete with dog impressions and monologues from SOYLENT GREEN -- DROP DEAD GORGEOUS has provided enough humor to avoid being buried by comparative criticism.
The thing about those comparitive criticisms is that you'd also be right. As scripted by Lona Williams -- herself a former Minnesota beauty contest participant -- the film takes on too many targets to skewer any of them with maximum effectiveness. The peek at pageant contestants finds only the occasional insight, opting instead for broad caricatures and even broader gags. The film's small-town setting is given a similar treatment, with freakishly outrageous characters (including chief overacting offenders Alley and Ellen Barkin) undercutting the more spot-on observations of provincial foibles. In fact, director Michael Patrick Jann almost always opts for over-the-top, making the documentary set-up seem completely inappropriate. It's impossible to get caught up in DROP DEAD GORGEOUS's verisimilitude when the action arbitrarily switches to rapid-fire, multiple-angle edits the likes of which I've never seen in any documentary.
It's that aggravating refusal to look for genuine humor that makes DROP DEAD GORGEOUS so frustrating. When it's funny, it's quite entertaining, but there's always the suspicion that it could have been hilarious with a bit of care. Why make the teen-obsessed judge (Matt Malloy) a nervous, chain-smoking cartoon character patterned after Martin Short's shyster Nathan Thurm? Why continue the story for fifteen minutes after the film's natural climax, including a vomit-spewing journey to the state finals? Why give the one recognizably human character (the wonderful Allison Janney as Amber's surrogate mother) so little to do? Every joke made in DROP DEAD GORGEOUS made me think of a joke missed; every raucous chuckle called to mind an even better sly snicker. It's like a vaudeville act that will do anything to please the crowd, only it's a vaudeville act that thinks it's a wicked satire. You'll laugh, you'll sigh, you'll think about the better films covering similar subject matter. This may be one of the least satisfying entertaining films of recent years.
On the Renshaw scale of 0 to 10 pageants pending: 6.
Visit Scott Renshaw's Screening Room http://www.inconnect.com/~renshaw/ *** Subscribe to receive new reviews directly by email! See the Screening Room for details, or reply to this message with subject "Subscribe".
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Search for a hymn tune by scale degrees.
Examples: For the tune of "Ode to Joy",
type in "3 3 4 5 5 4 3 2", or for the
tune of "Joy to the World", type in
"1 7 6 5 4 3 2 1".
| Book | Num | Tune |
|---|


Yunyi Liu
Home
Projects
About Me
Contact
resume
PROJECTS
LinkedIn Redesign
HTML5 iwatch
WordPress Blog
jQuery mobile
Reaction Test
Code Player


| 020:126 Khan | : |
(Allah) will say: "Like this, Our Ayat (proofs, evidences, verses, lessons, signs, revelations, etc.) came unto you, but you disregarded them (i.e. you left them, did not think deeply in them, and you turned away from them), and so this Day, you will be neglected (in the Hell-fire, away from Allah's Mercy)." |
| 020:126 Maulana | : |
He will say: Thus did Our messages come to thee, but thou didst neglect them. And thus art thou forsaken this day. |
| 020:126 Pickthal | : |
He will say: So (it must be). Our revelations came unto thee but thou didst forget them. In like manner thou art forgotten this Day. |
| 020:126 Rashad | : |
He will say, "Because you forgot our revelations when they came to you, you are now forgotten." |
| 020:126 Sarwar | : |
The Lord will say, "This is true.  |
| 020:126 Shakir | : |
He will say: Even so, Our communications came to you but you neglected them; even thus shall you be forsaken this day. |
| 020:126 Sherali | : |
God will say, 'Thus did OUR Signs come to thee and thou didst ignore them and in like manner wilt thou be ignored this day.' |
| 020:126 Yusufali | : |
(Allah) will say: "Thus didst Thou, when Our Signs came unto thee, disregard them: so wilt thou, this day, be disregarded." |
Concepts/Themes Covered: أركان الإسلام > التوحيد > الكافرون > صفات الكفار Pillars of Islam> Islamic> The Disbelievers> The Characteristics of the Disbelievers
This tool uses eight English parallel translations for the Holy Quran imported from Mr. Clay Smith. You can also visit Qurany Concepts for browsing the Quran themes or topics. If you want to search the Holy Quran for keywords, please visit Qurany Keywords.


E-Exam Portal
Home
About Us
Contact Us
Home
About Us
Contact Us
menu
Feedback
Name
Student or Faculty
University Name
E-mail id
Mobile Number
Click on me and type feedback
Submit


{% set title="Events - Eventplanner" %} {% extends "base.html" %} {% block content %} {% if currentUser() and not rooms %}
No events here, start by Adding an Event
Current Event: {{ currentRoom().name }}


Bilinear Matrix Inequality (BMI) is the following constraint on $x\in\mathbb{R}^n$ \begin{align} F_0+\sum_{i=1}^{n}x_iF_i+\sum_{i,j=1}^nx_ix_jF_{ij}\succeq 0\label{eq:bmi} \end{align} where $F_0,F_i,F_{ij}\in\mathbb{R}^{m\times m}$ are given matrices. $\succeq 0$ means the matrix on the left hand-side is a positive semidefinite matrix (psd), i.e., all the eigen values of such matrix is non-negative. This problem is non-convex, due to the bilinear product $x_ix_j$. But we will try to solve this non-convex problem using a sequence of convex optimization.
There are many methods to solve such BMI. We implement the method described in
The non-convex rank constraint \eqref{eq:rank1} can be reformulated as the following constraint \begin{align} \text{trace}(X)-x^Tx = 0\label{eq:residue} \end{align} To enforce constraint \eqref{eq:residue}, we can linearize this constraint and solve it iteratively. As a result, we end up with the following algorithm
We implement BMIspotless.m using Spotless
BMIspotless.addBilinearVariable(x,X);
checkDependency('spotless'); % Make sure spotless is in the search path
p = BMIspotless(); % Construct the program
[p,x] = p.newFree(2,1); % Declare the variables x1,x2
[p,X] = p.newSym(2); % Declare a symmetric matrix X
p = p.addBilinearVariable(x,X); % Now the program knows X = x*x^T
p = p.withEqs(X(1,1)+X(2,2)-1); % Enforces x_1^2+x_2^2=1 as a convex constraint
p = p.withPos(1-X(1,2)); % Enforces x_1*x_2<=1 as a convex constraint;
solver_sol = p.optimize(); % Solve the problem;
[sol,sol_bilinear] = p.retrieveSolution(solver_sol);
x_sol = sol.w; % Retrieve the solution
expression_bilinear = replaceBilinearProduct(expression,x,X);
The returned argument is the expression in which the bilinear product of $x$ is replaced by proper entries of $X$.
replaceBilinearProduct(x(1)^2+x(2)^2,x,X);
it will return $X(1,1)+X(2,2)$.


This star is the base class for a group of stars which implement a dynamic fork function.
Derived from: DEStar
Location: $PTOLEMY/src/domains/de/contrib/stars
Version: 1.4 "04/29/98"
Author: J. Voigt
This star and its childs work (only) in connection with DEDynMap and/or DEDynMapGr. The createPortHole and removePortHole methods are called from there, whenever a block is dynamically instantiated or deleted. The first porthole of the output-multiporthole, the childs of that star must have, has to be connected to a DEDynMap or DEDynMapGr-star. The next portholes in the output-multiporthole will be created dynamically, whenever a new block is put into the system configuration. They are deleted dynamically, whenever a block is taken from the system configuration.
This class is an abstract class, so it can't be instantiated and can not be used on its own. We here just declare methods, which are defined in its childs, in order to have access to them from DEDynMapBase and derived types. The childs of that star must have an input-porthole and a multiporthole as output-porthole. These portholes can be of different datatypes, so we provide this base class.
See: source code,
DynForkBase users
copyright (c) 1997-1998 Dresden University of Technology, WiNeS-Project. All rights reserved. See the file $PTOLEMY/copyright for copyright notice, limitation of liability, and disclaimer of warranty provisions.


Arun Rathi
🌈 Hi there!! 👋 Glad to see you here.
💬 Ask me about Data Science, Machine Learning and Math.
⚡ Fun fact: Data is never clean
🌈 Hi there!! 👋 Glad to see you here.
Main role is built a machine learning model
- Worked on a Deep Learning model to detect the anomalies in a multivariate time series
data.
- Univariate time series data analysis using Prophet (Facebook's open source library),
StumPy.
- Worked on multiple research papers to built a deep learning model for anomaly
detection.
- Built a dashboard for time series dataset to display the trends and seasonality.
- Worked on a Java project using OOPs
Start my kaggle journey to learn from data science community(Kaggler's) and looking forward to participate in the Kaggle competition
Built a machine learning model to diagnose the cancer patient.
- Train multiple machine learning model i.e Naive Bayes, K-nearest Neighbors, Random Forest
and XGBoost algorithms.
- Found XGBoost - best performer model, used logloss, Precision and Recall as evaluation
metrics.
Used publicly available dataset from [NYC Yellow
Taxi](https://www1.nyc.gov/site/tlc/index.page)
- First Model used is the Moving Averages Model which uses the previous n values in order to
predict the next value
- Other models - Weighted Moving Averages, Exponential Weighted Moving Averages, EWMA -
perform well compared to others.
- Regression models - Linear Regression, Random Forest Regressor, XgBoost Regressor.
- XgBoost Regressor performs well in Regression models but there is slightly difference in
the MAPE value between EWMA and XgBoost.
- Learning - Simple model can perform well.
Built multiple machine learning model to find best performer model.
- Used Feature Embedding methods - Bag of Words (BoW), TF-IDF vectorizer
- Found XGBoost - best performer model
- Evaluation Metrics - AUC and F1-score
GPA: 7.98
GPA: 8.01


Module to control timer T3 of the PIC32MX.
More...
#include <stdint.h>
Go to the source code of this file.
|
|
#define | SYSCLK 80000000 |
| |
|
#define | PBCLK SYSCLK/2 |
| |
|
#define | PWM_STEPS 256 |
| |
|
| int8_t | choose_prescaler (uint32_t fout) |
| | A function to calculate the prescaler value corresponding to a given frequency. More...
|
| |
| int8_t | timer3_config (uint32_t freq) |
| | A function to configure timer T3 to count at a given frequency. More...
|
| |
| int8_t | timer3_config_int (uint32_t freq) |
| | A function to configure timer T3 to count at a given frequency with interrupts. More...
|
| |
| int8_t | timer3_config_pwm (uint32_t freq, uint8_t dutyCycle, uint8_t pin) |
| | A function to configure timer T3 to generate a PWM signal. More...
|
| |
| int8_t | timer3_set_pwm (uint8_t dutyCycle, uint8_t pin) |
| | A function to set the duty cycle of the PWM signal generated by timer T3. More...
|
| |
|
void | timer3_start (void) |
| | A function to start timer T3.
|
| |
|
void | timer3_stop (void) |
| | A function to stop timer T3.
|
| |
◆ choose_prescaler()
| int8_t choose_prescaler |
( |
uint32_t |
fout | ) |
|
A function to calculate the prescaler value corresponding to a given frequency.
- Parameters
-
- Returns
- A result code
- Return values
-
| -1 | Impossible frequency value |
| others | Calculated prescaler value |
◆ timer3_config()
| int8_t timer3_config |
( |
uint32_t |
freq | ) |
|
A function to configure timer T3 to count at a given frequency.
- Parameters
-
- Returns
- A result code
- Return values
-
| 0 | Configuration was successfull |
| -1 | Impossible frequency value |
◆ timer3_config_int()
| int8_t timer3_config_int |
( |
uint32_t |
freq | ) |
|
A function to configure timer T3 to count at a given frequency with interrupts.
- Parameters
-
- Returns
- A result code
- Return values
-
| 0 | Configuration was successfull |
| -1 | Impossible frequency value |
◆ timer3_config_pwm()
| int8_t timer3_config_pwm |
( |
uint32_t |
freq, |
|
|
uint8_t |
dutyCycle, |
|
|
uint8_t |
pin |
|
) |
| |
A function to configure timer T3 to generate a PWM signal.
- Parameters
-
| freq | Frequency |
| dutyCycle | Duty cycle in range [0 - (PWM_STEPS-1)] |
| pin | Output compare pin from OC1 to OC5 |
- Returns
- A result code
- Return values
-
| 0 | Configuration was successfull |
| -1 | Impossible frequency value |
| -2 | Invalid duty cycle value |
| -3 | Invalid output compare pin |
◆ timer3_set_pwm()
| int8_t timer3_set_pwm |
( |
uint8_t |
dutyCycle, |
|
|
uint8_t |
pin |
|
) |
| |
A function to set the duty cycle of the PWM signal generated by timer T3.
- Parameters
-
| dutyCycle | Duty cycle in range [0 - (PWM_STEPS-1)] |
| pin | Output compare pin from OC1 to OC5 |
- Returns
- A result code
- Return values
-
| 0 | Configuration was successfull |
| -1 | Invalid duty cycle value |
| -2 | Invalid output compare pin |


CouchAttachment Class Reference
| Inherits from | CouchResource : RESTResource : NSObject |
| Declared in | CouchAttachment.h |
Overview
A binary attachment to a document.
Actually a CouchAttachment may be a child of either a CouchDocument or a CouchRevision. The latter represents an attachment immutably as it appeared in one revision of its document. So if you PUT a change to an attachment, the updated attachment will have a new CouchAttachment object.
Type of block that’s called when the database changes.
Tasks
Other Methods
-
revision
The owning document revision.
property -
document
The owning document.
property -
name
The filename (last URL path component).
property -
contentType
The MIME type of the contents.
property -
length
The length in bytes of the contents.
property -
metadata
The CouchDB metadata about the attachment, that lives in the document.
property -
body
Synchronous accessors for the body data.
propertyThese are convenient, but have no means of error handling.
-
unversionedURL
The attachment’s URL without the revision ID.
propertyThis URL will always resolve to the current revision of the attachment.
-
– PUT:contentType:
Asynchronous setter for the body. (Use inherited -GET to get it.)
-
– PUT:
Asynchronous setter for the body. (Use inherited -GET to get it.)
Extension Methods
Properties
body
Synchronous accessors for the body data.
These are convenient, but have no means of error handling.
@property (copy) NSData *body
Discussion
Synchronous accessors for the body data.
These are convenient, but have no means of error handling.
Declared In
CouchAttachment.h
contentType
The MIME type of the contents.
@property (readonly) NSString *contentType
Discussion
The MIME type of the contents.
Declared In
CouchAttachment.h
document
The owning document.
@property (readonly) CouchDocument *document
Discussion
The owning document.
Declared In
CouchAttachment.h
length
The length in bytes of the contents.
@property (readonly) UInt64 length
Discussion
The length in bytes of the contents.
Declared In
CouchAttachment.h
metadata
The CouchDB metadata about the attachment, that lives in the document.
@property (readonly) NSDictionary *metadata
Discussion
The CouchDB metadata about the attachment, that lives in the document.
Declared In
CouchAttachment.h
name
The filename (last URL path component).
@property (readonly) NSString *name
Discussion
The filename (last URL path component).
Declared In
CouchAttachment.h
revision
The owning document revision.
@property (readonly) CouchRevision *revision
Discussion
The owning document revision.
Declared In
CouchAttachment.h
unversionedURL
The attachment’s URL without the revision ID.
This URL will always resolve to the current revision of the attachment.
@property (readonly) NSURL *unversionedURL
Discussion
The attachment’s URL without the revision ID.
This URL will always resolve to the current revision of the attachment.
Declared In
CouchAttachment.h
Instance Methods
PUT:
Asynchronous setter for the body. (Use inherited -GET to get it.)
- (RESTOperation *)PUT:(NSData *)body
Discussion
Asynchronous setter for the body. (Use inherited -GET to get it.)
Declared In
CouchAttachment.h


--- title: Cosmos Liquid Staking Working Group subtitle: Welcome to Liquid Staking lead: The purposed of the Liquid Staking Working Group is a to design and implement the addition of a Liquid Staking system to the Cosmos SDK system for deployment on the Cosmos Hub in 2021. layout: page --- {% capture include_top %} {% include_relative home/top.md %} {% endcapture %} {% capture include_bottom_left %} {% include_relative home/bottom-left.md %} {% endcapture %} {% capture include_bottom_right %} {% include_relative home/bottom-right.md %} {% endcapture %} {% capture include_bottom_agenda %} {% include_relative home/bottom-agenda.md %} {% endcapture %}


{% extends "splunkdj:base_with_app_bar.html" %} {% load splunkmvc %} {% block title %}How to use the Splunk Dev CLI - Web Framework Toolkit{% endblock title %} {% block css %} {% endblock css %} {% block content %}
When developing Splunk apps, you can use the Splunk Dev command-line interface (CLI) to make it easier to create and manage apps. The Splunk Dev CLI uses Yeoman for templates and Grunt for watch tasks.
The Node Package Manager (NPM) is used to configure and set up the Splunk Dev CLI, so Node.js must be installed first. To download the latest version of Node.js (we recommend version 0.10.x or later), go to the Node.js website.
To install the Splunk Dev CLI (along with dependencies such as Yeoman), open a command prompt and enter the following command:
npm install -g splunkdev-cli
Now you'll have access to the Splunk Dev CLI globally, from anywhere on your system.
Use the splunkdev
command to access the Splunk Dev CLI.
To use the Splunk Dev CLI, open a command prompt and use the splunkdev
command as follows, where optional items are in square brackets:
splunkdev options
splunkdev command [command options] [options]
The following table lists the possible command-line options.
| Option | Descripton |
-h | Displays help. |
-V | Displays the version number. |
-H path | Specifies a $SPLUNK_HOME directory to use with a CLI command. |
-v | Specifies verbose output for a CLI command. |
The following table lists the splunkdev
commands.
| Command | Description |
apps | List and manage Splunk apps. |
config | Configure the CLI login credentials for the current Splunk instance. |
create | Create a Splunk app. |
reload | Reload resources and configurations for all apps, without restarting Splunk. |
settings | Specify whether to use minified files in Splunk. |
service | Start, stop, and restart Splunk services. |
watch | Watch for configuration changes to a specific app or to Splunk. |
To get help for the splunkdev
command:
splunkdev –h
splunkdev –-help
To get help for the splunkdev
commands apps
and watch
:
splunkdev apps –h
splunkdev watch –-help
Use the splunkdev apps
command to list and manage your Splunk apps. If you don't specify any options, all non-system, enabled apps are listed.
splunkdev apps [appname] [options]
The following table lists the possible command-line options.
| Option | Descripton |
-h | Displays help. |
-s | Lists Splunk apps, including system apps. |
-d | Lists Splunk apps, including disabled apps. |
-s {enabled | disabled} | Changes the app state. |
-R | Removes the specified app from Splunk. |
List installed apps:
splunkdev apps
List all apps, including disabled and system apps:
splunkdev apps --disabled –-system
List all the apps that start with "test":
splunkdev apps test*
Remove the app called "my_app":
splunkdev apps my_app –-remove
Remove all apps with names that start with "test":
splunkdev apps "test*" –-remove
Change the state of the "my_app" app to disabled:
splunkdev apps my_app --state disabled
Change the state of the "my_app" app to enabled:
splunkdev apps my_app --state enabled
Use the splunkdev config
command to configure the CLI login credentials for the current Splunk instance. These credentials are used by splunkdev
commands that communicate with splunkd, such as watch
, reload
, and settings
.
splunkdev config [options]
The following table lists the possible command-line options.
| Option | Descripton |
-h | Displays help. |
-R | Removes the CLI login credentials configuration for the current Splunk instance. |
Set the CLI login credentials:
splunkdev config
Use the splunkdev create
command to create a Splunk app. You'll be asked whether to restart Splunk afterwards.
splunkdev create appname
splunkdev create [options]
The following table lists the possible command-line options.
| Option | Descripton |
-h | Displays help. |
Create an app called "my_app":
splunkdev create my_app
Use the splunkdev reload
command to reload resources and configurations for all apps, without restarting Splunk.
splunkdev reload [options]
The following table lists the possible command-line options.
| Option | Descripton |
-h | Displays help. |
Use the splunkdev settings
command to specify whether to use minified files in Splunk.
splunkdev settings [options]
The following table lists the possible command-line options.
| Option | Descripton |
-h | Displays help. |
-m {true | false} | Indicates whether to use minified CSS and JS files. |
Use unminified CSS and JS files in the web environment:
splunkdev settings -m false
Use the splunkdev service
command to start, stop, and restart Splunk services. If a particular service is not specified, the action is performed on all services.
splunkdev service {start | stop | restart} [options]
The following table lists the possible command-line options.
| Option | Descripton |
-h | Displays help. |
-s {splunkd | splunkweb | * } | Indicates the Splunk service to start, stop, or restart: splunkd: Splunk server daemon splunkweb: Splunk Web interface *: both services |
Start all Splunk services:
splunkdev service start
Restart all Splunk services:
splunkdev service restart
Stop all Splunk services:
splunkdev service stop
Start the splunkd service:
splunkdev service stop -s splunkd
Restart the splunkweb service:
splunkdev service restart --service splunkweb
Use the splunkdev watch
command to watch for changes to a specific app or to Splunk. When a change occurs that requires restarting a Splunk service or reloading a configuration file, that action is performed automatically. For example, changes to app configuration or Python files require the app resources to be reloaded, and changes to the app's navigation file require splunkweb to be restarted.
To stop the current watch task, press Ctrl+C.
splunkdev watch [options]
The following table lists the possible command-line options.
| Option | Descripton |
-h | Displays help. |
-a appname | Watches for changes to the specified app. |
-s | Watches for changes to all apps and Splunk global files. |
Watch for changes to the "my_app" app:
splunkdev watch --app my_app


Tree
Inspector
Treemap
Node search
name
type
Search results
Value inspector
Settings
Treemap scale
bytes
log_1024(bytes)
equal
Node sorting
offset
alphabetical
size
Good bye!


Mix wet ingredients and yeast and set aside. Mix dry ingredients. Add wet to dry one third at a time.  Set it on parchment paper. Use wet hands to smooth it out. Cover with saran wrap and let rest 90 minutes. 30 minutes before baking time, heat oven to 500 degrees with a dutch oven. When ready, place dough in dutch oven. Cook for 20 minutes with lid on, then remove lid, turn down to 450, and cook for 15 more minutes. Allow bread to cool completely or it will be gummy.
Melt chocolate and butter together. Mix eggs and flour and sugar, and then add the butter and chocolate. Add vanilla extract if you desire.
Boil water with spices, then let rest for 1 hour. Bring back to a boil and add 12 tea bags. Let steep 2 minutes, then remove and refrigerate. Serve with sugar and milk.
Fry the ginger, leeks, and scallions in vegetable oil over medium heat until dark brown (about 30 minutes). Drain.
Boil chicken and kombu together with the ginger, leeks, and scallions for several hours. Let cool to work with. Discard the kombu. Remove the chicken and separate the meat for use in Chicken Chasu. in a strainer, press the bones into the stock, until you've removed as much liquid as possible. You might even blend the bones and press them. (And save for dog food!)
Remove the excess fat from the stock (easy if you refridgerate it). Add water or boil down further to get to 6 cups of stock. Add soy sauce, soy milk, and salt.
Blanch the tomatoes and remove their skins. Cut into chunks and cook with 2-3 cups of water, boullion, and garlic for 30 minutes. Blend and return to the stove. Fry the onion in oil until slightly brown. Add the basil, onion, and bay leaves.
In a small dish, mix the flour with warm water to form a runny paste. Add this to the soup, along with the milk. Add salt and pepper to taste. Boil until it has a good consistency. Enjoy with cheddar on top, and fresh bread and butter!
Rinse the rice thoroughly first, then cook at a low temperature for several hours.
Cook the beans and rice separately. Add them to a saucepan with oil and fry on medium heat until the rice turns a slight brown (just 5 minutes). Add spices and 6+ cups of water. Boil until it has the consistency you like (porride or oatmeal).
 Boil the water with kombu and boullion or stock. Remove from heat and remove the kombu. In a separate cup of cool water, mix in miso paste. Add to the stock. When ready to eat, add diced tofu,
After cooking rice, form into 1/4 c. triangles. Spread a small amount of miso on one side. Cover with another 1/4 c. of rice. Form into one shape and wrap with 1/2 a sheet of nori. Can also add umeboshi plum slivers.
To make the tofu, cut into thin slices and fry them in oil, soy sauce, and sesame oil until it is crispy. Then boil the noodles according to the instructions. Set out a bowl of cool water. To make the rolls, dip the paper just briefly in the water, and then set the noodles and other ingredients that you want to include, then fold up the top and sides, and then roll over toward you. Make with peanut sauce.
Mix and enjoy. Add parmesean for additional deliciousness.
To cook chickpeas, either soak overnight or boil for 5 minutes and let soak 1 hour, then rinse and boil till soft. Then use blender or food processor to mix the ingredients, saving the olive oil for last, adding until the hummus has the consistency you want. You can spice it up by adding roasted red bell pepper, garlic, or other interesting flavors.
Mix and enjoy!
Mix thoroughly and refridgerate and enjoy!
Mix flours and dry ingredients, then add the milk and liquids.


When any identifier sent to Smarkets is invalid this payload will be sent back to the originating session.
The seq here refers to the seq of the eto/payload your application sent to Smarkets with the original order-create so your application can detect which request included an invalid identifier.


- api
- management
- on top of a
- reverse
- proxy
Otoroshi is a layer of lightweight api management on top of a modern http reverse proxy written in Scala and developped by the MAIF OSS team. Otoroshi is designed to handle all the calls to and between your microservices without service locator and let you change configuration dynamicaly at runtime.
Features
- Gorgeous React admin UI
- Rest admin API
- Event-Driven
- Live reconfiguration at runtime
- Circuit breakers, retry, canary mode
- Round Robin loadbalancing, healthcheck
- Throttling and quotas per ApiKey
- Metrics (Rest, Datadog, Statd)
- Advanced Clever-Cloud integration
- Multi-datastores support
- Official docker image
- Available as single jar file
easy to configure
No config files, gorgeous admin UI, slick admin API. Live reconfiguration at runtime
high productivity
Freedom to chose your own stack, no library needed. Route and secure microservices in matter of seconds and accelerate your time to market


|
Racist PropagandaDuring World War II, the U.S. government printed a massive run of propaganda posters that occupy a unique place in American history.The War Production Board was established in 1942 with a mandate to take over the U.S. economy and convert it into a production machine for war materiel. As part of its mission, the WPD encouraged American workers to spend every waking moment on war-related efforts. Some of the posters were commissioned and produced in-house, while others were submitted by Americans who wanted to help the war effort. Although many of the posters are relatively simple messages about workplace safety and the importance of the home front, the series features some of the most racist imagery ever produced by the American government. After Pearl Harbor, the U.S. arrested thousands of ethnic Japanese, seized their property and placed them in internment camps. Although U.S. history was rife with racism of every stripe, the outpouring of hate toward the Japanese after the Pearl Harbor was unique for its sudden onset and its official sanction. While the federal government endorsed slavery through the 19th century, there was no need to persuade the public of its merits - the challenge had been to do the opposite - and the vagaries of commercial printing processes at the time would have made such efforts expensive. By the 1940s, America was in the midst of a communications revolution, thanks to movies, radio and perhaps most importantly, the invention of offset printing, which exponentially boosted capacity in the U.S. to produce newspapers, pamphlets and color posters. The WPD exploited the latter capability to its fullest. It produced thousands of posters within just two years time, littering American factories with endless exhortations to home front workers to remember the soldiers, avoid absenteeism and recycle scrap for the war effort - all for the purpose of defeating America's unspeakably evil enemies. A significant number of these posters aimed to demonize America's enemies - the Axis nations of Germany, Italy and Japan. Anti-German sentiment was predictably embodied by Hitler, but Mussolini spoke for the guinea. The Japanese were treated differently. Although many posters caricatured Tojo, the supreme commander of Japan's army, many more simply caricatured a demonized racial stereotype of the Japanese - to such extremes that the racial identity of the characters are frankly unrecognizable to someone familiar with Japanese people but not with the stereotype itself. There is a certain, difficult to define quality to racial caricature that causes them to drip with hate. American's WWII anti-Japanese propaganda posters are obscenely successful as a government-endorsed vehicle for that quality. Japanese are presented as yellow drooling, well-fanged, blackfaced, blood-sucking, chong-fonging, rong-donging demons who menace everything America holds dear, often with a spooky dagger in hand. Many of the pictures feature evil "Jap" soldiers threatening the women of America's homeland, a pastoral theme which was also transposed for the Nazis. Many WPD posters parodied Tojo, at least in principle. In practice, however, the generic racial caricatures often overwhelmed anything specific to Tojo, with the exception of his glasses, uniform and mustache. The extremely broad range of depictions runs from simply recreating Tojo with an air of menace to gross exaggerations of his (largely nonexistent) racial characteristics (the teeth, the eyes, etc.). As a rule, racism doesn't need to be terribly imaginative, which may explain why Tojo's caricature occasionally takes on the characteristics of black racial caricature instead of looking even remotely Japanese.
A particularly attractive series of posters is distinguished by the above-average artistic skill with which they were executed and an excruciating parody of the broken English which Americans imagined the Japanese spoke. The "Tokio Kid" series represents a vicious nadir of racial stereotyping in the WPD posters, which probably explains their success. The Tokio Kid depicts the Japanese (embodied by another character presumably inspired by Tojo) as mythic monsters, resembling vampires more than humans. The Tokio Kid mocked American workers for their sloth and careless waste, their failure to save scrap and their frequent absenteeism from factories which supported the war effort. The Tokio Kid was so successful that he inspired a cheap knockoff, Tokio Joe. Although Joe was equally hateful, the artwork was uninspired and his impact was far smaller. Many of the WPD posters doubled-up on the hate content by mimicking other images associated with racial hatred and other forms of bigotry. (Ironically, a handful of posters warned about the enemies' prejudices, telling Americans to report anyone overheard casting aspersions on Catholics, Protestants and Jews.)
|


Serge Nevsky: A list of every film I've seen and rated since 2009. Films are rated 1 (lowest) to 5 (highest).


How can the land of K-pop fail to innovate?
Johnson & Johnson partners Lazada to support emerging South-east Asia brands
Vivienne Tay<EMAIL_ADDRESS>@VivienneTayBT
NOVEMBER 07, 2019 - 11:00 AM
CONSUMER group Johnson & Johnson Consumer Health (J&J) and Lazada Group have partnered to incubate emerging brands in South-east Asia and China.
Both companies will help these brands reach and engage more Chinese consumers by leveraging J&J’s market insights and offline distribution channels, and e-commerce player Lazada’s regional ecosystem.
Tim Deng, Johnson & Johnson Consumer Health China managing director, said the partnership will serve as a gateway to "bring out" local China brands to reach South-east Asian consumers. At the same time, it would "bring in" South-east Asian products to "inspire Chinese consumers".
"In addition, we will support a vibrant ecosystem of startups and entrepreneurs in the Belt and Road Initiative region with access to the world-class open innovation expertise within the Johnson & Johnson global network," Mr Deng added.
Qian Yi, general manager of Lazada Cross-Border business, said that through the partnership, the connectivity between the South-east Asia market and Chinese consumers can be further strengthened, while also bringing more quality products and services to China from South-east Asia.
Stay updated with
BT newsletters
Terms & conditions Sign up
This will be done by utilising consumer insights, digital marketing expertise and channel expansion model.
Lazada is the South-east Asia flagship platform of Alibaba Group.
Written by: Vivienne Tayvtay@sph.com.sg@VivienneTayBT
- WEnergy Global, partners pump US$20m into four Philippines energy projects
- E-commerce may boost Thailand SMEs' income and reach
- Malaysian consumers set to fuel furniture boom
- Johnson & Johnson partners Lazada to support emerging South-east Asia brands
- Slow growth the main risk to Indonesian property market: Report


Seek With Cocos2D
This is an implementation of Craig Reynold's flocking behavior based on the book Python Game Programming By Example. Reynolds mentions many variations for flocking. This will implement a basic boid that flocks to the mouse pointer.
Imports
# third party
from cocos.cocosnode import CocosNode
from cocos.euclid import Vector2
import cocos
import cocos.particle_systems as particle_system
Constants
CHASE = 1
RUN_AWAY = -1
CHANGE_BEHAVIOR = -1
The Boid
Boid Settings
class BoidSettings(object):
"""a settings object"""
def __init__(self):
self.position = None
self.velocity = None
self.speed = None
self.max_force = None
self.slowing_radius = None
self._attributes = None
return
@property
def attributes(self):
"""list of required attributes"""
if self._attributes is None:
self._attributes = ("position",
"velocity",
"speed",
"slowing_radius",
"max_force")
return self._attributes
def x_y(self, position):
"""sets the initial x, y coordinates
Parameters
----------
position: tuple
(x, y) coordinates
"""
self.position = position
self.check_types(position, "position", (list, tuple))
for item in position:
self.check_numeric(item, "position")
return self
def velocity_vector(self, velocity):
"""initial velocity
Parameters
----------
velocity: Vector2
2-d vector representing boid's velocity
"""
self.velocity = velocity
self.check_type(velocity, "velocity", Vector2)
return self
def speed_scalar(self, speed):
"""scalar for the velocity vector
Parameters
----------
speed: number
pixels per frame to scale velocity
"""
self.speed = speed
self.check_numeric(speed, "speed")
return self
def slow_down_distance(self, slowing_radius):
"""denominator to create ratio to slow down
Used to reduce steering-force (distance/radius)
Parameters
----------
slowing_radius: numeric
steering-force reduction factor
"""
self.slowing_radius = slowing_radius
self.check_numeric(slowing_radius, "slowing radius")
return self
def maximum_force(self, max_force):
"""sets the max force magnitude
Parameters
----------
max_force: numeric
upper-bound for the steering force
"""
self.max_force = max_force
self.check_numeric(max_force, "max force")
return self
def maximum_velocity(self, max_velocity):
"""sets the max-velocity
Parameters
----------
max_velocity: numeric
upper-bound for magnitude of velocity
"""
self.max_velocity = max_velocity
self.check_numeric(max_velocity, "max velocity")
return self
def check_numeric(self, value, identifier):
"""checks value is numeric
Parameters
----------
value: object
item to check
identifier: string
name for error message
Raises
------
TypeError if value is not int or float
"""
self.check_types(value, identifier, (int, float))
return
def check_types(self, value, identifier, expected):
"""checks type of value
Parameters
----------
value: object
the thing to check
identifier: string
id for error message
expected: collection
types to check if value is one of them
Raises
------
TypeError if type of value not in expected
"""
if type(value) not in expected:
raise TypeError("{0} must be one of {1}, not {2}".format(
identifier,
expected,
value))
return
def check_type(self, value, identifier, expected):
"""checks type of the value
Parameters
----------
value: object
thing to check
identifier: string
id for error messages
expected: type
what the value should be
Raises
------
TypeError if type of value is not expected
"""
if not isinstance(value, expected):
raise TypeError("{0} must be {1} not {2}".format(identifier,
expected,
value))
return
def __call__(self):
"""checks all the attributes are set
Raises
------
TypeError if an attribute is None
"""
for attribute in self.attributes:
if getattr(self, attribute) is None:
raise TypeError("{0} must be set, not None".format(attribute))
return self
Boid Node
the Constructor
class Boid(CocosNode):
"""represents a boid
Parameters
----------
settings: BoidSettings
settings for this node
"""
def __init__(self, settings):
super(Boid, self).__init__()
self.settings = settings
self.position = settings.position
self.velocity = Vector2(0, 0)
self.speed = settings.speed
self.slowing_radius = settings.slowing_radius
self.max_force = settings.max_force
self.max_velocity = settings.max_velocity
self.target = None
I'm not a fan of method calls in the constructor, but these next two lines help set up the node.
self.add(particle_system.Sun())
self.schedule(self.update)
return
The add
method sets the Sun
instance as a child of the Boid
node and the schedule
method sets the Boid's
update
method to be called once per frame.
The Current Position
This is just a convenience attribute. It probably takes a performance hit, but the original code was a little obscure so I thought I'd pull it out to document it.
@property
def current_position(self):
"""this node's position
Returns
-------
Vector2: the current of this node
"""
return Vector2(self.x, self.y)
I had to look it up, since there's no setting of self.x
or self.y
here - these two attributes are built into the CocosNode object and are always the current values.
The Update Method
def update(self, delta):
"""updates the current position
Parameters
----------
delta: float
seconds since the last clock tick
"""
if self.target is None:
return
The target is going to be set when the mouse is move. Because of this it's initially not set, so we need to short circuit if that's the case.
distance = self.target - self.current_position
ramp_down = min(distance.magnitude()/self.slowing_radius, 1)
steering_force = distance * self.speed * ramp_down - self.velocity
steering_force = self.limit(steering_force, self.max_force)
self.velocity = self.limit(self.velocity + steering_force,
self.max_velocity)
self.position += self.velocity * delta
return
In the snippet above, distance
is a vector with the tail on our current position and the head on the target. The steering-force is created by scaling the distance by our speed
and then subtracting our current velocity, creating a vector that over-compensates to turn us toward the target. The new velocity is our old velocity plus the steering-force and our position is updated to be our new velocity times the elapsed time. That doesn't look like it's doing anything, but position
is another special attribute on the CocosNode
.
This next method reduces a vector if its magnitude is above a given threshold.
def limit(self, vector, upper_bound):
"""limits magnitude of vector
Re-scales all values in the vector if the magnitude exceeds limit
Parameters
----------
vector:
vector to check
upper_bound: number
upper limit for magnitude of vector
Returns
-------
vector whose magnitude is no greater than upper_bound
"""
try:
magnitude = vector.magnitude()
except OverflowError:
print(vector)
raise
return (vector if magnitude <= upper_bound
else vector*(upper_bound/magnitude))
Main Layer
This is the class to act as the event handler.
class MainLayer(cocos.layer.Layer):
"""sets up the interaction
Parameters
----------
boids: collection
boids to maintain
"""
is_event_handler = True
That value (is_event_handler
) has to be true or the Layer
class doesn't handle events.
def __init__(self, boids):
super(MainLayer, self).__init__()
self.boids = boids
for boid in boids:
self.add(boid)
return
def on_mouse_motion(self, x, y, dx, dy):
"""sets the boids' targets
Parameters
----------
x, y:
current mouse cursor position
dx, dy:
change in position since the last report
"""
for boid in self.boids:
boid.target = Vector2(x, y)
return
def on_mouse_press(self, x, y, button, modifiers):
"""handles mouse-clicks"""
for boid in self.boids:
boid.speed *= CHANGE_BEHAVIOR
return
The on_mouse_motion
method is a pass through to pyglet
so the method is documented there more than on the cocos2d site.
if __name__ == "__main__":
boid_settings = (BoidSettings()
.x_y((300, 200))
.velocity_vector(Vector2())
.speed_scalar(10)
.slow_down_distance(200)
.maximum_force(5)
.maximum_velocity(2000)())
cocos.director.director.init(caption="Seeker")
boid = Boid(boid_settings)
scene = cocos.scene.Scene(MainLayer([boid]))
cocos.director.director.run(scene)
The first thing to note is that the cocos.director.init
function has to be called before any of the other cocos2D objects are created. If you move the instantiation of the Boid above that line, for instance, it will crash with a AttributeError: 'Director' object has no attribute '_window_virtual_width'
error.