Promocity Web Server
Web Server Promocity. Source: https://github.com/armandossrecife/promocity
Version: 1.0.0
BasePath:/promocity
Apache 2.0
http://www.apache.org/licenses/LICENSE-2.0.html
Access
- APIKey KeyParamName:api_key KeyInQuery:false KeyInHeader:true
- OAuth AuthorizationUrl:http://store.swagger.io/oauth/dialogTokenUrl:
[ Jump to Models ]
Table of Contents
Up
delete /coupon/{couponId}/users
Delete coupon by ID (deletecoupon)
For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
Path parameters
couponId (required)
Path Parameter — ID of coupon that needs to be deleted format: int64
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
400
Invalid ID supplied
404
coupon not found
Up
get /coupon/{couponId}
Find coupon by ID (getCouponById)
For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions
Path parameters
couponId (required)
Path Parameter — ID of coupon needs to be fetched format: int64
Return type
Example data
Content-Type: application/xml
123456789
aeiou
3.149
aeiou
true
true
true
Example data
Content-Type: application/json
{
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
Coupon
400
Invalid ID supplied
404
coupon not found
Returns all coupons (getListOfCoupons)
Returns all coupons in promocity
Return type
map[String, Integer]
Example data
Content-Type: application/json
{
"key" : 0
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
successful operation
Up
get /coupon/{couponId}/users
Find all users from a coupon by ID (getUsersFromCouponById)
For valid response try integer. Other values will generated exceptions
Path parameters
couponId (required)
Path Parameter — ID of coupon needs to be fetched format: int64
Return type
Example data
Content-Type: application/xml
123456789
aeiou
aeiou
aeiou
aeiou
123
3.149
3.149
Example data
Content-Type: application/json
{
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
User
400
Invalid ID supplied
404
coupon not found
Place a new coupon (placeNewCoupon)
Request body
Body Parameter — New coupon
Return type
Example data
Content-Type: application/xml
123456789
aeiou
3.149
aeiou
true
true
true
Example data
Content-Type: application/json
{
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
Coupon
400
Invalid coupon
Up
delete /promotion/{promotionId}
Delete promotion by ID (deletePromotion)
For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
Path parameters
promotionId (required)
Path Parameter — ID of promotion that needs to be deleted format: int64
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
400
Invalid ID supplied
404
promotion not found
Up
get /promotion/{promotionId}/coupons/{couponId}
Find a spefic coupon from promotion by ID (getCouponFromPromotionById)
For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions
Path parameters
promotionId (required)
Path Parameter — ID of promotion needs to be fetched format: int64
couponId (required)
Path Parameter — ID of coupon needs to be fetched format: int64
Return type
Example data
Content-Type: application/xml
123456789
aeiou
3.149
aeiou
true
true
true
Example data
Content-Type: application/json
{
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
Coupon
400
Invalid ID supplied
404
promotion not found
Up
get /promotion/{promotionId}/coupons
Find all coupons from promotion by ID (getCouponsFromPromotionById)
For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions
Path parameters
promotionId (required)
Path Parameter — ID of promotion needs to be fetched format: int64
Return type
Example data
Content-Type: application/xml
123456789
aeiou
3.149
aeiou
true
true
true
Example data
Content-Type: application/json
{
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
Coupon
400
Invalid ID supplied
404
promotion not found
Returns all promotions (getListOfPromotion)
Returns all promotions in promocity
Return type
map[String, Integer]
Example data
Content-Type: application/json
{
"key" : 0
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
successful operation
Up
get /promotion/{promotionId}
Find promotion by ID (getPromotionById)
For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions
Path parameters
promotionId (required)
Path Parameter — ID of promotion needs to be fetched format: int64
Return type
Example data
Content-Type: application/xml
123456789
aeiou
2000-01-23T04:56:07.000Z
2000-01-23T04:56:07.000Z
Example data
Content-Type: application/json
{
"fromDate" : "2000-01-23T04:56:07.000+00:00",
"couponList" : [ {
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
}, {
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
} ],
"toDate" : "2000-01-23T04:56:07.000+00:00",
"name" : "name",
"id" : 5
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
Promotion
400
Invalid ID supplied
404
promotion not found
Place a new promotion (placeNewPromotion)
Request body
Body Parameter — New promotion
Return type
Example data
Content-Type: application/xml
123456789
aeiou
2000-01-23T04:56:07.000Z
2000-01-23T04:56:07.000Z
Example data
Content-Type: application/json
{
"fromDate" : "2000-01-23T04:56:07.000+00:00",
"couponList" : [ {
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
}, {
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
} ],
"toDate" : "2000-01-23T04:56:07.000+00:00",
"name" : "name",
"id" : 5
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
Promotion
400
Invalid promotion
Up
delete /store/{storeId}
Delete store by ID (deleteOrder)
For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
Path parameters
storeId (required)
Path Parameter — ID of store that needs to be deleted format: int64
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
400
Invalid ID supplied
404
Store not found
Returns all stores (getAllStores)
Returns all stores in promocity
Return type
map[String, Integer]
Example data
Content-Type: application/json
{
"key" : 0
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
successful operation
Up
get /store/{storeId}/promotions/{idPromotion}/coupons/{idCoupon}
Find promotions from store by ID (getCouponFromPromotionByStoreId)
For valid response try integer IDs. Other values will generated exceptions
Path parameters
storeId (required)
Path Parameter — ID of store needs to be fetched format: int64
idPromotion (required)
Path Parameter — ID of Promotion needs to be fetched format: int64
idCoupon (required)
Path Parameter — ID of Coupon needs to be fetched format: int64
Return type
Example data
Content-Type: application/xml
123456789
aeiou
3.149
aeiou
true
true
true
Example data
Content-Type: application/json
{
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
Coupon
400
Invalid ID supplied
404
Store not found
Up
get /store/{storeId}/promotions/{idPromotion}/coupons
Find coupons from store by ID (getCouponsFromPromotionByStoreId)
For valid response try integer IDs. Other values will generated exceptions
Path parameters
storeId (required)
Path Parameter — ID of store needs to be fetched format: int64
idPromotion (required)
Path Parameter — ID of store needs to be fetched format: int64
Return type
Example data
Content-Type: application/xml
123456789
aeiou
3.149
aeiou
true
true
true
Example data
Content-Type: application/json
{
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
Coupon
400
Invalid ID supplied
404
Order not found
Find store by ID (getOrderById)
For valid response try integer IDs. Other values will generated exceptions
Path parameters
storeId (required)
Path Parameter — ID of store needs to be fetched format: int64
Return type
Example data
Content-Type: application/xml
123456789
aeiou
aeiou
aeiou
aeiou
3.149
3.149
Example data
Content-Type: application/json
{
"addrees" : "addrees",
"city" : "city",
"latitude" : 6.027456183070403,
"description" : "description",
"id" : 0,
"state" : "state",
"promotionList" : [ {
"fromDate" : "2000-01-23T04:56:07.000+00:00",
"couponList" : [ {
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
}, {
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
} ],
"toDate" : "2000-01-23T04:56:07.000+00:00",
"name" : "name",
"id" : 5
}, {
"fromDate" : "2000-01-23T04:56:07.000+00:00",
"couponList" : [ {
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
}, {
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
} ],
"toDate" : "2000-01-23T04:56:07.000+00:00",
"name" : "name",
"id" : 5
} ],
"longitude" : 1.4658129805029452
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
Store
400
Invalid ID supplied
404
Store not found
Up
get /store/{storeId}/promotions/{idPromotion}
Find promotions from store by ID (getPromotionByStoreId)
For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions
Path parameters
storeId (required)
Path Parameter — ID of store needs to be fetched format: int64
idPromotion (required)
Path Parameter — ID of store needs to be fetched format: int64
Return type
Example data
Content-Type: application/xml
123456789
aeiou
2000-01-23T04:56:07.000Z
2000-01-23T04:56:07.000Z
Example data
Content-Type: application/json
{
"fromDate" : "2000-01-23T04:56:07.000+00:00",
"couponList" : [ {
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
}, {
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
} ],
"toDate" : "2000-01-23T04:56:07.000+00:00",
"name" : "name",
"id" : 5
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
Promotion
400
Invalid ID supplied
404
Store not found
Up
get /store/{storeId}/promotions
Find all promotions from store by ID (getPromotionsByStoreId)
For valid response try integer IDs. Other values will generated exceptions
Path parameters
storeId (required)
Path Parameter — ID of store needs to be fetched format: int64
Return type
Example data
Content-Type: application/xml
123456789
aeiou
aeiou
aeiou
aeiou
3.149
3.149
Example data
Content-Type: application/json
{
"addrees" : "addrees",
"city" : "city",
"latitude" : 6.027456183070403,
"description" : "description",
"id" : 0,
"state" : "state",
"promotionList" : [ {
"fromDate" : "2000-01-23T04:56:07.000+00:00",
"couponList" : [ {
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
}, {
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
} ],
"toDate" : "2000-01-23T04:56:07.000+00:00",
"name" : "name",
"id" : 5
}, {
"fromDate" : "2000-01-23T04:56:07.000+00:00",
"couponList" : [ {
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
}, {
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
} ],
"toDate" : "2000-01-23T04:56:07.000+00:00",
"name" : "name",
"id" : 5
} ],
"longitude" : 1.4658129805029452
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
Store
400
Invalid ID supplied
404
Order not found
Up
get /store/{storeId}/promotions/{idPromotion}/coupon/{idCoupon}/users/{idUser}
Find user from store by ID (getUserCouponsFromPromotionByStoreId)
For valid response try integer IDs. Other values will generated exceptions
Path parameters
storeId (required)
Path Parameter — ID of store needs to be fetched format: int64
idPromotion (required)
Path Parameter — ID of promotion needs to be fetched format: int64
idCoupon (required)
Path Parameter — ID of coupon needs to be fetched
idUser (required)
Path Parameter — ID of store needs to be fetched
Return type
Example data
Content-Type: application/xml
123456789
aeiou
aeiou
aeiou
aeiou
123
3.149
3.149
Example data
Content-Type: application/json
{
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
User
400
Invalid ID supplied
404
Store not found
Place a new store (placeNewStore)
Request body
Body Parameter — New Store
Return type
Example data
Content-Type: application/xml
123456789
aeiou
aeiou
aeiou
aeiou
3.149
3.149
Example data
Content-Type: application/json
{
"addrees" : "addrees",
"city" : "city",
"latitude" : 6.027456183070403,
"description" : "description",
"id" : 0,
"state" : "state",
"promotionList" : [ {
"fromDate" : "2000-01-23T04:56:07.000+00:00",
"couponList" : [ {
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
}, {
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
} ],
"toDate" : "2000-01-23T04:56:07.000+00:00",
"name" : "name",
"id" : 5
}, {
"fromDate" : "2000-01-23T04:56:07.000+00:00",
"couponList" : [ {
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
}, {
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
} ],
"toDate" : "2000-01-23T04:56:07.000+00:00",
"name" : "name",
"id" : 5
} ],
"longitude" : 1.4658129805029452
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
Store
400
Invalid Store
Create user (createUser)
This can only be done by the logged in user.
Request body
Body Parameter — Created user object
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
default
successful operation
Up
post /user/createWithArray
Creates list of users with given input array (createUsersWithArrayInput)
Request body
Body Parameter — List of user object
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
default
successful operation
Up
post /user/createWithList
Creates list of users with given input array (createUsersWithListInput)
Request body
Body Parameter — List of user object
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
default
successful operation
Up
delete /user/{username}
Delete user (deleteUser)
This can only be done by the logged in user.
Path parameters
username (required)
Path Parameter — The name that needs to be deleted
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
400
Invalid username supplied
404
User not found
Up
get /user/{username}/activate/coupon/{idCoupon}/store/{idStore}/friends/{idFriend1}/{idFriend2}
Get friends by user name (getActiveteCuponByUser)
Path parameters
username (required)
Path Parameter — The name that needs to be fetched. Use user1 for testing.
idCoupon (required)
Path Parameter —
idStore (required)
Path Parameter —
idFriend1 (required)
Path Parameter —
idFriend2 (required)
Path Parameter —
Return type
Example data
Content-Type: application/xml
123456789
aeiou
aeiou
aeiou
aeiou
123
3.149
3.149
Example data
Content-Type: application/json
{
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
User
400
Invalid username supplied
404
User not found
Up
get /user/{username}/add/friend/{idFriend}
Get friends by user name (getAddFriendByUser)
Path parameters
username (required)
Path Parameter — The name that needs to be fetched. Use user1 for testing.
idFriend (required)
Path Parameter —
Return type
Example data
Content-Type: application/xml
123456789
aeiou
aeiou
aeiou
aeiou
123
3.149
3.149
Example data
Content-Type: application/json
{
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
User
400
Invalid username supplied
404
User not found
Up
get /user/{username}/coupons
Get coupons by user name (getCouponsByuserName)
Path parameters
username (required)
Path Parameter — The name that needs to be fetched. Use user1 for testing.
Return type
Example data
Content-Type: application/xml
123456789
aeiou
3.149
aeiou
true
true
true
Example data
Content-Type: application/json
{
"consumed" : false,
"qrCode" : "qrCode",
"awarded" : false,
"name" : "name",
"discount" : 2.3021358869347655,
"id" : 5,
"listOfUsers" : [ {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}, {
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
} ],
"activated" : false
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
Coupon
400
Invalid username supplied
404
User not found
Up
get /user/{username}/delete/friend/{idFriend}
Delete friend by user name and idFriend (getDeleteFriendByUser)
Path parameters
username (required)
Path Parameter — The name that needs to be fetched. Use user1 for testing.
idFriend (required)
Path Parameter —
Return type
Example data
Content-Type: application/xml
123456789
aeiou
aeiou
aeiou
aeiou
123
3.149
3.149
Example data
Content-Type: application/json
{
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
User
400
Invalid username supplied
404
User not found
Up
get /user/{username}/friends
Get friends by user name (getFriendsByUser)
Path parameters
username (required)
Path Parameter — The name that needs to be fetched. Use user1 for testing.
Return type
Example data
Content-Type: application/xml
123456789
aeiou
aeiou
aeiou
aeiou
123
3.149
3.149
Example data
Content-Type: application/json
{
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
User
400
Invalid username supplied
404
User not found
Up
get /user/{username}/tracks
Get tracks by user name (getTracksByUser)
Path parameters
username (required)
Path Parameter — The name that needs to be fetched. Use user1 for testing.
Return type
Example data
Content-Type: application/xml
123456789
aeiou
aeiou
aeiou
aeiou
123
3.149
3.149
Example data
Content-Type: application/json
{
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
User
400
Invalid username supplied
404
User not found
Up
get /user/{username}/monitoring/location/{latitude}/{longitude}
Get monitoring location by user name (getUserByLocation)
Path parameters
username (required)
Path Parameter — The name that needs to be fetched. Use user1 for testing.
latitude (required)
Path Parameter —
longitude (required)
Path Parameter —
Return type
Example data
Content-Type: application/xml
123456789
aeiou
aeiou
aeiou
aeiou
123
3.149
3.149
Example data
Content-Type: application/json
{
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
User
400
Invalid username supplied
404
User not found
Get user by user name (getUserByName1)
Path parameters
username (required)
Path Parameter — The name that needs to be fetched. Use user1 for testing.
Return type
Example data
Content-Type: application/xml
123456789
aeiou
aeiou
aeiou
aeiou
123
3.149
3.149
Example data
Content-Type: application/json
{
"password" : "password",
"couponList" : [ null, null ],
"latitude" : 3.616076749251911,
"idFriendsList" : [ null, null ],
"id" : 7,
"email" : "email",
"enabled" : 9,
"username" : "username",
"completename" : "completename",
"longitude" : 2.027123023002322
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
User
400
Invalid username supplied
404
User not found
Up
get /user/login/{email}/{password}
Logs user into the system (loginUser)
Path parameters
email (required)
Path Parameter — The user name for login
password (required)
Path Parameter — The password for login in clear text
Return type
String
Example data
Content-Type: application/xml
aeiou
Example data
Content-Type: application/json
""
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
200
successful operation
String
400
Invalid username/password supplied
Logs out current logged in user session (logoutUser)
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
default
successful operation
Updated user (updateUser)
This can only be done by the logged in user.
Path parameters
username (required)
Path Parameter — name that need to be updated
Request body
Body Parameter — Updated user object
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
application/xml
application/json
Responses
400
Invalid user supplied
404
User not found
[ Jump to Methods ]
Table of Contents
Coupon
-
Promotion
-
Store
-
User
-
id (optional)
name (optional)
discount (optional)
qrCode (optional)
activated (optional)
consumed (optional)
awarded (optional)
listOfUsers (optional)
id (optional)
name (optional)
fromDate (optional)
toDate (optional)
couponList (optional)
id (optional)
description (optional)
addrees (optional)
city (optional)
state (optional)
latitude (optional)
longitude (optional)
promotionList (optional)
id (optional)
username (optional)
completename (optional)
email (optional)
password (optional)
enabled (optional)
latitude (optional)
longitude (optional)
couponList (optional)
idFriendsList (optional)


Step Scaling
Whenever
{{ $ctrl.policy.metricAlarm.statistic }} of {{ $ctrl.policy.metricAlarm.metricName }} is
{{ $ctrl.policy.metricAlarm.threshold }}
for at least
{{ $ctrl.policy.metricAlarm.continuousTime }} consecutive periods of {{ $ctrl.policy.metricAlarm.period }} seconds
No alarms configured for this policy.


MentDB SERVER
MySQL DB
Service Oriented Architecture
Extract and Load
Enterprise Service Bus
Application Manager
Data transformation
Artificial Intelligence
Analytics
Storage structure
Experience Database (NoSQL)
CLIENTS
Portal
MentDB Project
REST API
MQL Documentation
Trigger
Java Editor
Liza (chatbot)
Application Manager
app1
app2
...
Java API
Web Socket API
Business layer
Mentalese layer
Mental process
Emotional cooperation


Evacuation Recommendations
Escape Point
In case you want to use the road from the escape point you have {{ duration }} min
Remember your escape point is allocated in "Carrer Margarit, 3, Sant Cugat del Vallès, Barcelona"
Your meeting point in Barcelona is allocated in "Via Augusta, 251, Barcelona"
Social networks language analisis
This part is a simulation, takes different texts (it could be for example twitter texts)
in order to analyse if the escape road is secure
Text analysed and score:
{% for i in range(0, (text_people_road|length)) %}
*** {{ text_people_road[i] }} - {{ text_people_road_sentiment[i] }}
{% endfor %}
Resume: {{ positive}} positive, {{ negative }} negative, {{ neutral }} neutral
Reccommendation
{% if (duration > 20 or negative > positive) %}The reccomendation is to go to a more secure house
The selected house address is: {{ house_secure[1] }}
The reccomendation is to take the evacuation road


--- title: "Web Scraping with rvest" author: "Daniel Boadzie" date: '2021-06-29' output: pdf_document categories: Web Scraping tags: - Data Cleaning - Data Extraction - Web Harvesting description: null image: https://cdn.pixabay.com/photo/2017/08/16/11/45/pickup-truck-2647492_1280.png math: null license: null hidden: no comments: yes slug: web-scraping-with-rvest ---
Web scraping is the act of extracting data from web pages. It is one of the best ways of getting data from from a website. You can get data from web elements like tables, divs, a tags, etc. with web scraping.
Note, that you may need to get permission or find out if a website allows scraping before doing so from a robots.txt
file on a website. Fortunately, the R robotstxt
package can help us find out this important information.
To scrape data from a website you need a working knowledge of HTML
and CSS
. These together with JavaScript
are the lingua franca of the web. A good understanding of HMTL
tags CSS
selectors like class, ids, etc will help you when scrapping a website.
In this article, we will scrap IMDB’s top rated movies. We will focus on the movie’s title, year, rank and rating. Let’s get started.
# load the libraries
# pacman enable to easily load multiple packages at a time
library(pacman)
p_load(rvest, dplyr, ggplot2, robotstxt, stringr, ggthemes)
Check if the website can be scrapped.
paths_allowed("https://www.imdb.com/chart/top") # yes we can
##
www.imdb.com
## [1] TRUE
We will scrap top movies title, year, rating and then analyze it.
url = "https://www.imdb.com/chart/top"
top_movies <- read_html(url)
# get all the titles
movie_title <- top_movies %>%
html_nodes(".titleColumn a") %>%
html_text2() %>%
as.vector()
# get all the year
year <- top_movies %>%
html_nodes("span.secondaryInfo") %>%
html_text2() %>%
str_replace_all("\\(|\\)", "") %>%
as.integer()
head(year)
## [1] 1994 1972 1974 2008 1957 1993
typeof(year)
## [1] "integer"
# get all rating
rating <- top_movies %>%
html_nodes(".ratingColumn strong") %>%
html_text2() %>%
as.numeric()
Lets get the ranks as well
rank <- top_movies %>%
html_nodes("td.titleColumn") %>%
html_text2() %>%
str_split(" ") %>%
lapply(., function(movie){
movie[1]
}) %>%
str_replace_all("\\.", "") %>%
as.integer()
tibble
Now lets combine all to create a tibble.
movie_tibble <- tibble(
title = movie_title,
year = year,
rating = rating,
rank = rank
)
head(movie_tibble)
## # A tibble: 6 x 4
## title year rating rank
## <chr> <int> <dbl> <int>
## 1 The Shawshank Redemption 1994 9.2 1
## 2 The Godfather 1972 9.1 2
## 3 The Godfather: Part II 1974 9 3
## 4 The Dark Knight 2008 9 4
## 5 12 Angry Men 1957 8.9 5
## 6 Schindler's List 1993 8.9 6
#View(movie_tibble)
And just like that, we have successfully scrapped top movie title, year, rating and rank. Let’s write our new data to a csv
file for further analysis.
write.csv(movie_tibble, "imdb_top_movies.csv")
Now that we have a clean dataset, we can start with our analysis. To do that we need to following the data analysis process.
The following questions will guide our analysis;
Our dataset is IMDB’s top rated movies.
The data has the following structure;
glimpse(movie_tibble)
## Rows: 250
## Columns: 4
## $ title <chr> "The Shawshank Redemption", "The Godfather", "The Godfather: Pa…
## $ year <int> 1994, 1972, 1974, 2008, 1957, 1993, 2003, 1994, 1966, 2001, 199…
## $ rating <dbl> 9.2, 9.1, 9.0, 9.0, 8.9, 8.9, 8.9, 8.8, 8.8, 8.8, 8.8, 8.7, 8.7…
## $ rank <int> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, …
# year <- as.Date(as.character(data_file$evtYear), format = "%Y")
g <- movie_tibble %>%
select(title, rating) %>%
top_n(10, rating) %>%
ggplot(aes(x=reorder(title, rating), y=rating)) +
geom_col(aes(fill=title, )) +
coord_flip() +
geom_text(aes(label = factor(rating)), vjust = 1.5, hjust=1.4, colour = "white") +
theme(
legend.position = "none") +
labs(title="Top 10 Rated movies",
x="Movie Title",
y="Movie Rank")
g + scale_fill_viridis_d() +
theme_fivethirtyeight()
# year <- as.Date(as.character(data_file$evtYear), format = "%Y")
g <- movie_tibble %>%
select(title, rating, year) %>%
top_n(10, rating) %>%
ggplot(aes(x=reorder(title, rating), y=rating)) +
geom_col(aes(fill=title)) +
coord_flip() +
geom_text(aes(label = factor(year)), vjust = 1.5, hjust=1.4, colour = "white") +
theme(
legend.position = "none") +
labs(title="Top 10 rated movies and the year of production",
x="Movie Title",
y="Movie Rank")
g + scale_fill_calc() +
theme_fivethirtyeight()
In this article, we scraped data from IMDB website, clean it and visualized it to answer some questions. These are some of the things Data Professional do in real world. I hope this will be a guide for you in your data journey. In subsequent articles I will build a dashboard from the data we scraped here.
:) Happy Analyzing!


The TMClose API call closes access to a particular 1-Wire network. After this function is called on a 1-Wire network, the only way to use it again is to call TMSetup. A common use of this API call is in hardware situations where a port needs to be powered down when not in use. Note that in the Windows situation where multiple programs may be using a 1-Wire network, closing a port may be disastrous so this function is callable but it does not have an effect in Windows.
For a description of the above types, see the TMEX Type Descriptions.
Parameters
session_handle
Specifies the session handle returned from the API function TMExtendedStartSession that specifies the desired 1-Wire network port. This parameter is required by most TMEX API functions.
Return Value
1 => 1-Wire network is closed.
<0 => TMEX Hardware Specific Error Return Code
See Also


Workflow Explorer
About
Home
Workflow
Execution
See RDF
Download Template
See RDF
Selected execution trace below:
Toggle Legend
See RDF
Download
Collapsible Group Item #2 (template panel)
Input Variables
Output Variables
See RDF
Download
Variable: (template panel)
Type:
Generated By:
Used By:
Value:


Unreleased
- Fixes stringify to only take ancestors into account when checking
circularity.
It previously assumed every visited object was circular which led to false
positives.
Uses the tiny serializer I wrote for Must.js a year and a half ago.
- Fixes calling the
replacer
function in the proper context (thisArg
).
- Fixes calling the
cycleReplacer
function in the proper context (thisArg
).
- Speeds serializing by a factor of
Big-O(h-my-god-it-linearly-searched-every-object) it had ever seen. Searching
only the ancestors for a circular references speeds up things considerably.


This is a feature index for the Inform 7 (build 6L02) source text of Sparkle release 3.
The language features are arranged roughly under the same headlines the Writing with Inform manual uses.
The index doesn't try to document every instance of every feature. When a feature is used in multiple places, the index points to a couple of the first or more interesting cases.
As with all programming, there are many possibilities for doing any given task. The solutions used in this source shouldn't be taken as the absolute correct method, nor should they be used as an argument for not doing things some other way.
{{INDEX}}


Demand for more and more apps
Plentiful
Relevant
Robust
MWF and other frameworks make it easy to get going
but how do we enable an ecosystem of apps?
The Word Wide Web is vast and uncurated
Limited ability to identify capabilities and relevancy
Device support
Interoperability
World view
A model that already does this well...
Native App Stores
Mobile Web Framework
Each organization contacts peers for apps
1/2*N*(N-1)
connections for complete
Edu-Apps.org
Aggregator as central repository for apps
Homogeneous world view and trust
Peer with others
Discover apps
Share apps
Propagate apps
Routing protocols
Each peer is an autonomous system
Just a different layer
Small world networks
Distributed topology
Tightly coupled subgraphs
Engine
Discover from and share with peers
Translate, filter and transform
Provide to local outlets
Outlet
Calls the engine via web services defined by the protocol
Built with integration in mind
Modeling our decision-making process
Filtering apps for relevance
Transforming attributes for our world view
Journaling any changes made
Modeling the real world
Local decisions to curate our ecosystem
while being part of a larger community
This pattern fits other use cases...
like learning tools
Imagine a store of tools that could be added to a class
Protocol modules
from static JSON to full peer
Attribute specifications
how to define attributes rather than defining them
Implementations
modular and configurable
Identity
URI
Timestamp
Share & Propagate Flags
Required & Optional Attributes
UUID-based
Extensible
Journalled
World view
Implement the protocol in part or full
Use libraries to build your own engine
Use the engine and hook up your own outlets
Use the outlet with its integration points
Candidate Draft
Comments and feedback encouraged
Additional documentation is coming soon
Aligned with candidate draft
Design matches protocol
Not exactly easy to set up
Under development
Focus on ease of installation and use
Reducted feature set from the entire protocol
github.com/ebollens/casa-on-rails
(temporarily)
UCLA
IMS Global Learning Consortium
University of California System
Higher Ed & EdTech Partners


Trees shine for festival
by Miriam HalpennyThe Festival of Trees returns to West Kelowna's Mission Hill Family Estate Winery on Friday for a third year of holiday celebrations and fundraising.
The celebration occurs in communities around B.C., and all proceeds from the event at Mission Hill will benefit the BC Children's Hospital Foundation.
Attendees can expect a decorated forest of trees, and visitors will also have the ability to vote on their favourite, through donations to the hospital.
The event begins with an open house from 5 to 9 p.m., with a minimum donation of $2, and will run until Jan. 4.
Attendees can enjoy mulled wine, hot chocolate, food stations, entertainment, Santa photos and more.
“Mission Hill Family Estate is thrilled and honoured to once again host Kelowna’s Festival of Trees,” said spokesman Darryl Brooker.
“The life-saving work performed every day at BC Children’s Hospital is an evergreen cause that has benefitted countless families across the province. Everyone at Mission Hill looks forward to celebrating the season with our guests, and once again bringing attention and much-needed funds to the festival’s incredible beneficiary.”


O. Henry wrote a lot of interesting short stories, and "The Gift of the Magi" arguably is the most famous . Your task is to print the first paragraph of the story that contains a certain word. The word you are to use is in the first line of the input, and the link to the story is in the second line.


GIX IoT Hub
Name: Super Porg
Owner: Yun
Type: Porg
Activate
Name: Power Porg
Owner: Cody
Type: Porg
Activate
Name: YouTube Porg
Owner: Joey
Type: Porg
Activate
Name: Happy Porg
Owner: Chuck
Type: Porg
Activate
Name: Gaming Porg
Owner: CJ
Type: Porg
Activate
Name: xx Porg
Owner: TBD
Type: Porg
Activate


VANA VANI VIDYALAYA MATRICULATION SCHOOL
NEIKKARAPATTI, SALEM, TAMILNADU, INDIA
Our Mission
To provide urban facilities to rural chidren


Get an alternate travel plan.
http://dev5:8888/alternateCommuteRoute?start=37.379339,-121.961446&end=37.373596,-122.020500
The request method is GET so there is no body that needs to be described.
Only the basic headers are sent.
For example:
GET /alternateCommuteRoute?start=37.379339,-121.961446&end=37.373596,-122.020500 HTTP/1.1 Host: dev5:8888
| start (required) |
latitude & longitude of the starting point of the route |
| end (required) |
latitude & longitude of the end point of the route |
The request method is GET.
So the body does not exist.
http://dev5:8888/alternateCommuteRoute?start=37.379339,-121.961446&end=37.373596,-122.020500
{ "status": "ok", "index": 2, "params": { "start": "37.379339,-121.961446", "end": "37.373596,-122.020500" }, "route": [ "14 mins Central Expy ", "15 mins Kifer Rd ", "13 mins Walsh Ave and Kifer Rd " ] }
http://dev5:8888/alternateCommuteRoute?start=37.373596,-122.020500&end=37.616404,-122.386212
{ "status": "ok", "index": -1, "params": { "start": "37.373596,-122.020500", "end": "37.616404,-122.386212" }, "route": [ "34 mins US-101 N" ] }
http://dev5:8888/alternateCommuteRoute?start=37.379339,-121.961446&end=37.373596,-122.020500
{ "status": "ok", "index": 1, "params": { "start": "37.379339,-121.961446", "end": "37.373596,-122.020500" }, "route": [ "13 mins Central Expy ", "12 mins Kifer Rd ", "13 mins Walsh Ave and Kifer Rd " ] }
http://dev5:8888/alternateCommuteRoute?start=37.373596,-122.020500&end=37.616404,-122.386212
{ "status": "ok", "index": -1, "params": { "start": "37.373596,-122.020500", "end": "37.616404,-122.386212" }, "route": [ "34 mins US-101 N" ] }


keras_model_to_pmml module¶
Classes used in keras_model_to_pmml.py
-
class
keras_model_to_pmml.
KerasDataDictionary
(dataSet, predictedClasses)[source]¶ Bases:
PMML43Ext.DataDictionary
KerasDataDictionary stores the class information to be predicted in the PMML model. The current implementation takes care of the Imagenet class label by giving dataset name as dataSet parameter.
Parameters: - dataSet (String) – Name of the dataset
- predictedClasses (List) – List of class names or values to be predicted.
Returns: Return type: Nyoka’s Dictionary Object
-
class
keras_model_to_pmml.
KerasHeader
(description, copyright)[source]¶ Bases:
PMML43Ext.Header
Creates header for Keras PMML model file using Nyoka
Parameters: - copyright (String) – Adds the information about the copyright.
- description (String) – Description of the PMML file provided as a default
- Timestamp (Datetime) – Timestamp of the time when the file is created
Returns: Return type: Nyoka header object
-
class
keras_model_to_pmml.
KerasLocalTransformations
(model_name)[source]¶ Bases:
PMML43Ext.LocalTransformations
KerasLocalTransformations provides the information about the list of transformations applied to the data.
Parameters: model_name (String) – Name of the model (internally used to be specific for Keras) Returns: Return type: Nyoka’s Transformations Object
-
class
keras_model_to_pmml.
KerasMiningSchema
(dataSet=None)[source]¶ Bases:
PMML43Ext.MiningSchema
KerasMiningSchema stores the attributes which are used to build the model.
Parameters: dataSet (String) – Name of the dataset Returns: Return type: Nyoka’s Mining Schema Object
-
class
keras_model_to_pmml.
KerasNetwork
(keras_model, model_name, dataSet=None, predictedClasses=None)[source]¶ Bases:
PMML43Ext.DeepNetwork
KerasNetwork creates the DeepNetwork object which stores the NetworkLayer in sequence to define the architecture.
Parameters: - model_name (String) – Name of the model
- functionName (String) – Regression or Classification, currently supports classification functionName
- numberOfLayers (Int) – Number of layers in the architecture
- isScorable (Boolean) – True or False
- Extension (Nyoka's extention tag) – Allows to pass extra information in Nyoka objects
- MiningSchema (Nyoka's Mining schema object) – Nyoka’s miningschema object to be passed
- Output (Nyoka's Output object) – Nyoka’s Output object to be passed
- LocalTransformations (Nyoka's LocalTransformations object) – Nyoka’s LocalTransformations object to be passed
- NetworkLayer (Nyoka's LocalTransformations object) – Nyoka’s NetworkLayer object to be passed
Returns: Return type: Nyoka’s DeepNetwork Object
-
class
keras_model_to_pmml.
KerasNetworkLayer
(layer, layer_type)[source]¶ Bases:
PMML43Ext.NetworkLayer
Creates Networklayer of PMML which has information about the layer type, weight matrix and bias matrix and their properties.
Parameters: - inputFieldName (String) – This parameter is required only for Input layer in keras
- layerType (String) – Any Keras layer (e.g. Input, Dense, Conv2D)
- connectionLayerId (String) – Name of the previous layer ID
- layerId (String) – Layer ID for defined layer
- normalizationMethod (String) – Name of normalization method here
- LayerParameters (Nyoka LayerParamter Object) – Nyoka’s LayerParameter object which has information of Layerparamters (eg, input dimension and output dimension).
- LayerWeights (Nyoka's LayerWeights object) – LayerWeights goes inside the LayerParameters object and provide information about the weigth matrix of the layer.
- LayerBias (Nyoka's LayerBias object) – LayerBias goes inside the LayerParameters object and provide value of the bias matrix.
Returns: Return type: Nyoka NetworkLayer object
-
class
keras_model_to_pmml.
KerasOutput
(predictedClasses=None)[source]¶ Bases:
PMML43Ext.Output
KerasOutput provides the information about the output representation of the PMML. (e.g. Predicted classes, probabilities)
Parameters: predictedClasses (List) – List of Classes for which model has been trained Returns: Return type: Nyoka’s Output Object
-
class
keras_model_to_pmml.
KerasToPmml
(keras_model, model_name='KerasNet', description='Keras Models in PMML', copyright='Internal User', dataSet=None, predictedClasses=None)[source]¶ Bases:
PMML43Ext.PMML
KerasToPmml exports the Keras model object into PMML file using nyoka.
Parameters: - keras_model (keras model object) – Keras model object
- model_name (String) – Name to be given to the model in PMML.
- dataSet (String (Optional)) – Name of the dataset
- predictedClasses (List) – List of the class names for which model has been trained
Returns: Return type: Creates PMML object, this can be saved in file using export function


Here are your options when growing your codebase or scaling your application.
Flask started in part to demonstrate how to build your own framework on top of existing well-used tools Werkzeug (WSGI) and Jinja (templating), and as it developed, it became useful to a wide audience. As you grow your codebase, don’t just use Flask – understand it. Read the source. Flask’s code is written to be read; it’s documentation published so you can use its internal APIs. Flask sticks to documented APIs in upstream libraries, and documents its internal utilities so that you can find the hook points needed for your project.
The API docs are full of available overrides, hook points, and Signals. You can provide custom classes for things like the request and response objects. Dig deeper on the APIs you use, and look for the customizations which are available out of the box in a Flask release. Look for ways in which your project can be refactored into a collection of utilities and Flask extensions. Explore the many extensions in the community, and look for patterns to build your own extensions if you do not find the tools you need.
The Flask class has many methods designed for subclassing. You can quickly add or customize behavior by subclassing Flask (see the linked method docs) and using that subclass wherever you instantiate an application class. This works well with Application Factories.
The Application Dispatching chapter shows in detail how to apply middleware. You can introduce WSGI middleware to wrap your Flask instances and introduce fixes and changes at the layer between your Flask application and your HTTP server. Werkzeug includes several middlewares.
If none of the above options work, fork Flask. The majority of code of Flask is within Werkzeug and Jinja2. These libraries do the majority of the work. Flask is just the paste that glues those together. For every project there is the point where the underlying framework gets in the way (due to assumptions the original developers had). This is natural because if this would not be the case, the framework would be a very complex system to begin with which causes a steep learning curve and a lot of user frustration.
This is not unique to Flask. Many people use patched and modified versions of their framework to counter shortcomings. This idea is also reflected in the license of Flask. You don’t have to contribute any changes back if you decide to modify the framework.
The downside of forking is of course that Flask extensions will most likely break because the new framework has a different import name. Furthermore integrating upstream changes can be a complex process, depending on the number of changes. Because of that, forking should be the very last resort.
For many web applications the complexity of the code is less an issue than the scaling for the number of users or data entries expected. Flask by itself is only limited in terms of scaling by your application code, the data store you want to use and the Python implementation and webserver you are running on.
Scaling well means for example that if you double the amount of servers you get about twice the performance. Scaling bad means that if you add a new server the application won’t perform any better or would not even support a second server.
There is only one limiting factor regarding scaling in Flask which are the context local proxies. They depend on context which in Flask is defined as being either a thread, process or greenlet. If your server uses some kind of concurrency that is not based on threads or greenlets, Flask will no longer be able to support these global proxies. However the majority of servers are using either threads, greenlets or separate processes to achieve concurrency which are all methods well supported by the underlying Werkzeug library.
The Flask developers keep the framework accessible to users with codebases big and small. If you find an obstacle in your way, caused by Flask, don’t hesitate to contact the developers on the mailinglist or IRC channel. The best way for the Flask and Flask extension developers to improve the tools for larger applications is getting feedback from users.


|
Drake
|
Interface used by implementations of individual solvers.
#include <drake/solvers/solver_interface.h>
Public Member Functions | |
| virtual | ~SolverInterface () |
| virtual bool | available () const =0 |
| Returns true iff this solver was enabled at compile-time. More... | |
| virtual bool | enabled () const =0 |
| Returns true iff this solver is enabled at runtime. More... | |
| virtual void | Solve (const MathematicalProgram &prog, const std::optional< Eigen::VectorXd > &initial_guess, const std::optional< SolverOptions > &solver_options, MathematicalProgramResult *result) const =0 |
| Solves an optimization program with optional initial guess and solver options. More... | |
| virtual SolverId | solver_id () const =0 |
| Returns the identifier of this solver. More... | |
| virtual bool | AreProgramAttributesSatisfied (const MathematicalProgram &prog) const =0 |
| Returns true if the program attributes are satisfied by the solver's capability. More... | |
Does not allow copy, move, or assignment | |
| SolverInterface (const SolverInterface &)=delete | |
| SolverInterface & | operator= (const SolverInterface &)=delete |
| SolverInterface (SolverInterface &&)=delete | |
| SolverInterface & | operator= (SolverInterface &&)=delete |
Protected Member Functions | |
| SolverInterface () | |
|
delete |
|
delete |
|
virtual |
|
protected |
|
pure virtual |
Returns true if the program attributes are satisfied by the solver's capability.
Implemented in SolverBase.
|
pure virtual |
Returns true iff this solver was enabled at compile-time.
Certain solvers may be excluded at compile-time due to licensing or linking restrictions. When this method returns false, the Solve method will throw.
Implemented in SolverBase.
|
pure virtual |
Returns true iff this solver is enabled at runtime.
The toggle mechanism is specific to the solver in question, but typically uses an environment variable. When this method returns false, the Solve method will throw.
Implemented in SolverBase.
|
delete |
|
delete |
|
pure virtual |
Solves an optimization program with optional initial guess and solver options.
Note that these initial guess and solver options are not written to prog
. If the prog
has set an option for a solver, and solver_options
contains a different value for the same option on the same solver, then solver_options
takes priority.
Implemented in SolverBase.
|
pure virtual |
Returns the identifier of this solver.
Implemented in SolverBase.


Device ID: {{deviceId}}
Devices Detected
Number of detected devices (Last 24h): {{nWFdevices}}
Detection Details
100 meters: 18 Devices
300 meters: 9 Devices
500 meters: 7 Devices
Edit
A nebula is an interstellar cloud of dust, hydrogen, helium and other ionized gases.
Originally, nebula was a name for any diffuse astronomical object,
including galaxies beyond the Milky Way.


Constructors
| New ( capacity:int, dynamic:bool ) |
Methods
| CanGet : Int () |
| CanPut : Int () |
| Capacity : Int () |
| Clear : Void () |
| Get : Int ( data:DataBuffer, offset:Int, count:Int ) |
| IsEmpty : Bool () |
| IsFull : Bool () |
| Put : Int ( data:DataBuffer, offset:Int, count:Int ) |
Detailed Discussion
A ringbuffer is a circular FIFO buffer that wraps a DataBuffer.Data can be added to the end of the buffer using Put, and removed from the start of the buffer using Get.
A ringbuffer can also dynamically resize itself as necessary so that Put always succeeds.
Constructor Documentation
Method New ( capacity:int, dynamic:bool )
Creates a new ringbuffer with the given capacity. This is the number of bytes the buffer can store.If dynamic is true, the ringbuffer will grow as necessary so that Put always succeeds.
Method Documentation
Method CanGet : Int ()
Returns the number of bytes that can be read from the buffer using Get.Method CanPut : Int ()
Returns the number of bytes that can be written to the buffer using Put.Method Clear : Void ()
Empties the buffer.Method Get : Int ( data:DataBuffer, offset:Int, count:Int )
Removes count bytes from the start of the ringbuffer and copies them to data/offset.Returns the number of bytes actually transferred.
Method IsEmpty : Bool ()
Returns true if the buffer is empty, ie: CanGet=0.Method IsFull : Bool ()
Return true if the buffer is full, ie: CanPut=0.Method Put : Int ( data:DataBuffer, offset:Int, count:Int )
Copies count bytes from data/offset and adds them to the end of the ringbuffer.Returns the number of bytes actually transferred.
If the buffer is dynamic, this method will reallocate the internal databuffer as necessary so that all count bytes are always added.


Unusually Pink Updates: Dropbox, Password Managers, and Ad Blocking
This will be one of those weird amalgam posts featuring multiple only mildly-related topics but which are too short to be a post in their own right. I though it would be helpful to provide some updates on a few things that Brandi and I have talked about in some of our past episodes. They’re all tech-related… but you already know that from reading the title.
Dropbox Upgrades and Price Increases⌗
On June 1st, Dropbox added more features to their Plus plan. I’ve been a Plus customer for a couple of years now. It’s less of a “I need to pay for the extra space” situation and more of a “I store some important shit in here and this gives me more peace of mind” situation. The main features from the upgrade, according to the email they sent me, are:
“Double your storage—save everything with 2 TB (2,000 GB).
World-class sync technology—move out-of-date files off your computer’s hard drive and to the cloud with Dropbox Smart Sync.
Dropbox Rewind—roll back accidental changes to any folder, or your entire account, up to 30 days.”
The extra storage is nice, though suffice to say it’s not exactly something I need.
Rewind seems really nice, though. I store a lot of PowerShell scripts in Dropbox, so I could see rewind being useful if I accidentally break one or need to snag an older version for some reason. While I’ve recently been making an effort to check in my bigger, more important scripts with Azure DevOps for version control, smaller ones that I’m the only person likely to use still just go into Dropbox.
Things aren’t all roses and unicorns, though, as the added storage and features come at a cost: $2 USD more per month. This bumps the monthly price up to $12 USD. The good part is that if you go with yearly pricing, you save that $2 a month and pay $120 for the year. I’m actually still on monthly pricing despite having used the Plus service for a few years so I’ll need to move over for sure. While the bonus storage is available now the new pricing isn’t happening for me until July. So before early July I need to swap to yearly billing to avoid paying the extra couple of bucks.
Wired Password Manager Recommendations⌗
In our last episode, Brandi and I spoke a bit about password managers. Right after we recorded that episode Wired published an article all about password managers. The timing seemed perfect to share it. Of the ones Wired recommends Dashlane is the only that I haven’t used. It also makes me feel good that my preferred password manager, 1Password, was Wired’s #1 recommendation.
Speaking of Wired, I love their content but always run into my 5 free articles per month limit. I just happened to see earlier today that they’re doing a deal where you can snag a year’s subscription for just $10. This includes the print editions plus digital content (normally $50 a year) or just digital if you don’t care about print (normally $30 a year.) I was fortunate enough to see it right when they posted to Twitter. I have no clue how long this is running for, but it seems pretty worthwhile if you’re a geek and like tech news. And no… we don’t get anything for promoting this. I just like Wired.
Browser Ad Blocking⌗
Also from our last episode, we discussed how Google was initially thinking about making changes to the webRequest API that would essentially cripple ad blockers. Like we discussed in the episode, after those initial reports and backlash in January Google had backed off a little and said they would think through how this API update should work. At the end of May, though, it came to light that Google still plans to nuke the webRequest API pieces that allow current ad blockers to work… that is unless you’re a G Suite customer.
What’s worse is that these proposed changes seem to be in the open-source Chromium project. So unless Microsoft does some work on their fork, the Chromium-based version of Edge could also be impacted. Suffice to say this gives me some significant pause on my previously mentioned plans to buy a new Chromebook. I’m now re-evaluating what I should do for my laptop situation. And if you haven’t used Firefox Quantum recently, now might be a great time to check it out.


101_serdes.py
class Solution:
def getCollisionTimes(self, a: List[List[int]]) -> List[float]:
n = len(a)
# -- monotonically decreasing
# [steepness, pos]
stk = []
# [lo, hi]
# bias low
# hug low
# kill low
# so you never need to check hi
# no steepness is infinite so that is good
# y = mx + b
# b == starting position
# m == speed (steepness)
# mx + b == Mx + B
# (M-m)x = b-B
# x = (b-B)/(M-m)
# ok cool
# monotonically decreasing stack... by speed?
# monotonically increasing by position start
# but you need to pop and access efficiently
# do I think you need it the other way around?
def line_intersection(m, b, M, B):
return (b-B)/(M-m)
# my logic probably isn't correct
# i probably need to continue to pop off the convex hull
# while... while what condition?
# i think while it completely subsumes the previous two
# something like this
# its totally possible to have it be completely consumed
# do I need the last to compare against the last TWO?
# yes...
# monotonically increasing stack, by speed
# monotonically decreasing stack, by position start
ret = [-1] * n
for i,(pos,steepness) in reversed(list(enumerate(a))):
#print("current i", i)
# check intersection points
# convex hull maintenance
# you WILL pop off anything that is FASTER
while stk and stk[-1][0] >= steepness:
stk.pop()
#print("stk to work with", stk)
# cars are more forward
# you need the SLOWER ONES
#
# will never intersect with anything
if not stk:
ret[i] = -1.0
# will intersect
else:
# binary search for the optimal
# intersect(stk[i]) <= intersect(stk[i+1])
# essentially look for this
# looking for a minima on a parabola
# hug lo
lo = 0
hi = len(stk) - 1
# a[i] = [pos, steepness]
# stk has [steepness, pos]
while lo != hi:
mid = (lo+hi)//2
if (
line_intersection(a[i][1],a[i][0],stk[mid][0],stk[mid][1]) <= line_intersection(a[i][1],a[i][0],stk[mid+1][0],stk[mid+1][1])):
hi = mid
else:
lo = mid+1
ret[i] = line_intersection(a[i][1],a[i][0], stk[lo][0],stk[lo][1])
# update with convex hull maintenance
# stk[-1] will
# if intersection point of stk[-2] comes earlier than stk[-2], then you must pop it off
while len(stk) >= 2 and line_intersection(steepness,pos,stk[-1][0],stk[-1][1]) >= line_intersection(steepness,pos,stk[-2][0],stk[-2][1]):
stk.pop()
stk.append([steepness, pos])
return ret
# update == pop off as many as which tie or lower than your steepness
# TODO: how to tell if x will never hit any parent?
# need to solve the equation in order to determine the intersection point...
# OH
# there is a quick way to check this
# you need to check only the range which has > steepness
# because you'll only ever possibly intersect with these
# so lets just pop these off in advance
# if there is nothing left in the stack
# you know you'll never intersect with anything
# STACK
# race car
# this is a repeat question
# cars are all moving forward
# start with the leading car (most rightward)
# consider collision time of kth and k+1th car
# oh, slowest car in the fleet, hmm
# O(nlogn)?
# its already ordered...
# stack... bisect based on collision time, I think?
# do you need to binary search to see
# the pack you see in front of you will just get slower and slower
# lets say you already have a monotonic stack of the cars in front of you (and their collision times?)
# now what?
# strictly decreasing speed
# is there an inflection point somewhere?
# polygon lines
# the slower one is below the others until it gets above
# and then it will always be above the faster ones
# I think its binary search yes
# find the one where the next one, you'll intersect at a LATER time
# ^ you can consider tie as OK (satisfactory)
# where do you insert your own value?
# I think you just pop off of the stack
# you might need to do monotonically decreasing...
# now the bisect will be kind of wierd...
#


Dogs can do so many thing. Espesially for man kind. Like guard dogs. Hunting dogs. Guide dogs for the blind. And dogs that can find bombs. Dogs that can find guns. Dogs can find drugs. And they can also find elegal drugs. Herd dogs scare the sheep in to staying together. They are domestic. They are not wild. They are use full pets. They are loyal. Dogs eat meat. Dogs Have four legs. Different breeds have Diferent life spans. German sherperds are the police dogs of german. All dogs Have evolved from wolves. Dogs have lived with people for at least 30,000 years.
They are also police dogs. That help protect your country. They are dogs that can smell diseases. Dogs smell diseases in the human body. Dogs Originated from wolves. In latin dog is called canis. A baby dog is called a pup.  A dog is called a puppy until it is one year old. Dogs are called "Mans Best Friend". March 26 is National Puppy day. August 26 is National Dog Day. Their very play full. Dogs like to be petted. Never pet a dog from the behind. Breeds such as the Dachshund usually live for fifteen years. Chihuahuas can reach age twenty. The Great Dane, on the other hand has an average lifespan of six to eight years. some Great Danes have lived for ten years. dogs sometimes help police.


Our REST web service - beta preview available at http://beta.rest.ensemblgenomes.org - provides language-independent programmatic access to data including sequences, genes and gene trees, and tools including assembly conversion and variant effect predictors. Follow the links below for more details on each resource request type.
Comparative Genomics | |
| Resource | Description |
|---|---|
| GET genetree/id/:id | Retrieves Gene Tree dumps for a given Gene Tree stable identifier |
| GET homology/id/:id | Retrieves homology information by ensembl gene id |
| GET homology/symbol/:species/:symbol | Retrieves homology information by symbol |
Cross References | |
| Resource | Description |
| GET xrefs/id/:id | Perform lookups of Ensembl Identifiers and retrieve their external cross references in other databases |
| GET xrefs/name/:species/:name | Performs a lookup based upon the primary accession or display label of an external reference and returning the information we hold about the entry |
| GET xrefs/symbol/:species/:symbol | Looks up an external symbol and returns all Ensembl objects linked to it. This can be a display name for a gene/transcript/translation, a synonym or an externally linked reference. If a Gene's transcript is linked to the supplied symbol the service will return both Gene and Transcript (it supports transient links). |
Features | |
| Resource | Description |
| GET feature/region/:species/:region | Retrieves multiple types of features for a given region |
Information | |
| Resource | Description |
| GET assembly/info/:species | Returns information about the current available assemblies in this given species |
| GET assembly/info/:species/:region_name | Returns information about the given toplevel sequence region given to this endpoint |
| GET info/comparas | Lists all available comparative genomics databases and their data release |
| GET info/data | Shows the data releases available on this REST server. Can return more than one release but this is rare (and non-standard Ensembl configuration) |
| GET info/ping | Pings the first available DBAdaptor to see if the service is still active |
| GET info/rest | Shows the current version of the REST API |
| GET info/software | Shows the current version of the Ensembl API |
| GET info/species | Lists all available species, their aliases, available adaptor groups and data release |
Lookup | |
| Resource | Description |
| GET lookup/id/:id | Query for an identifier's location in the available Ensembl databases |
Mapping | |
| Resource | Description |
| GET map/:species/:asm_one/:region/:asm_two | Convert the co-ordinates of one assembly to another |
| GET map/cdna/:id/:region | Convert from CDNA coordinates to genomic coordinates. Output reflects forward orientiation coordinates as returned from the Ensembl API. |
| GET map/cds/:id/:region | Convert from CDS coordinates to genomic coordinates. Output reflects forward orientiation coordinates as returned from the Ensembl API. |
| GET map/translation/:id/:region | Convert from protein (translation) coordinates to genomic coordinates. Output reflects forward orientiation coordinates as returned from the Ensembl API. |
Ontologies and Taxonomy | |
| Resource | Description |
| GET ontology/ancestors/:id | Find all ancestors, all terms above, belonging to a given term. It is possible to restrict the search to a single ontology so as to help when terms are shared between ontologies e.g. EFO. By default searches are conducted within the namespace of the given identifier |
| GET ontology/ancestors/chart/:id | Reconstruct the entire ancestory of a term from is_a and part_of relationships. |
| GET ontology/descendents/:id | Find all descendents, all terms below, belonging to a given term. It is possible to restrict the search to a single ontology so as to help when terms are shared between ontologies e.g. EFO. By default searches are conducted within the namespace of the given identifier |
| GET ontology/id/:id | Search for an ontological term by its namespaced identifier |
| GET ontology/name/:name | Search for a list of ontological terms by their name and an optional ontology |
| GET taxonomy/classification/:id | Return the taxonomic classification of a taxon node |
| GET taxonomy/id/:id | Search for a taxonomic term by its identifier or name |
Sequences | |
| Resource | Description |
| GET sequence/id/:id | Query for multiple types of Sequence by its stable identifier |
| GET sequence/region/:species/:region | Query for a region of genomic sequence based on its location |
Variation | |
| Resource | Description |
| GET vep/:species/:region/:allele/consequences | Fetch variant consequences |
| GET vep/:species/id/:id/consequences | Fetch variant consequences based on a variation identifier |


 "How bad could it be?" I asked myself.  A movie whose cruelty knows no bounds, it makes the mistake of confusing shock with humor. When you break a guy's leg so horrendously that the bone sticks out, it isn't funny.
I'm one of the few critics who thinks that Tom Green's last major outing, ROAD TRIP, was one of last year's best and most underappreciated comedies. Perhaps Green has suffered some kind of blow to the head since then that has changed his ability to ascertain what is humorous and what isn't.  Stopping his car when he sees a horny horse, he runs over to masturbate it.
 Well, he does get a job at the Hollywood Cheese Sandwich Factory, but it doesn't last. Rip Torn and Julie Hagerty, drawing their agents' short straws, are stuck playing Gord's parents. Torn copes by overacting while Hagerty tries her best to blend into the woodwork, hoping that no one will notice her presence.
With the manic behavior of someone about to overdose on cocaine, Gord seems about to explode in every scene. While at a hospital, Gord delivers a baby from a woman whom he has irritated into an early labor. After yanking her baby out, he swings the baby rapidly around his head by holding on to the umbilical cord. He then proceeds to bite through the cord, spewing blood everywhere. The scene manages to be even more disgusting that this description.
There are a few briefly bearable -- bearable, not funny -- moments in the film, but it is impossible to catch your breath them since you are perpetually on your guard for the story's next atrocity. As bad as the trailers are, they are masterpieces of comedy next to the abomination of the movie itself. Whatever you do, don't flirt with the idea that any movie this bad might be fun to see. This is a film that you don't want to inflict on yourself, no matter how adventuresome a moviegoer you think you are. Trust me. A root canal without anesthetics would be less painful that FREDDIE GOT FINGERED.
FREDDY GOT FINGERED runs 1:33 but feels like three eternities. It is rated R for crude sexual and bizarre humor, and for strong language. Consider it as NC-17. This is not a movie for adults and certainly not for kids.
Web: <http://www.InternetReviews.com>
Email<EMAIL_ADDRESS>Want free reviews and weekly movie and video recommendations via Email? Just send me a letter with the word "subscribe" in the subject line.
========== X-RAMR-ID: 28767 X-RT-AuthorID: 1271 X-RT-TitleID: 1107183 X-RT-RatingText: 0/4
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


Before Change
if org_tensorflow_path.endswith("/org_tensorflow"):
binary = os.environ["TEST_TARGET"][2:].replace(":", "/", 1)
possible_path = os.path.join(org_tensorflow_path, binary)
logging.info("Guessed test binary path: %s", possible_path)
if os.access(possible_path, os.X_OK):
path = possible_path
if path is None:
logging.error(
After Change
break
// The binary can possibly have _gpu suffix.
possible_path += "_gpu"
if os.access(possible_path, os.X_OK):
path_to_use = possible_path
break
if path_to_use is None:
raise RuntimeError("Cannot determine binary path")
sys.argv[0] = path_to_use
// Note that this sets the executable for *all* contexts.


Many times its important to determine how many times a particular element is traversed over. That is, determine the flow through an element. Particular examples include:
gremlin> software = []
gremlin> g.V('lang','java').fill(software)
==>v[3]
==>v[5]
gremlin> software
==>v[3]
==>v[5]
Vertices v[3]
and v[5]
are software projects. Lets determine who is on the most software projects. In other words, lets traverse out of these vertices and see which developer vertices get the most flow.
gremlin> software._().in('created').name.groupCount.cap
==>{marko=1, peter=1, josh=2}
Josh received the most traversals through him. The groupCount
step maintains an internal Map<Object,Number>
. The cap
step is used to “cap” groupCount
and have it emit its internal map, not the elements that flow through it. The following example better explains “capping” by demonstrating what happens when its not used.
gremlin> m = [:]
gremlin> software._().in('created').name.groupCount(m)
==>marko
==>josh
==>peter
==>josh
gremlin> m
==>marko=1
==>josh=2
==>peter=1
Here is a more complicated example using the loop
step and the Grateful Dead graph diagrammed in Defining a More Complex Property Graph.
g = new TinkerGraph()
g.loadGraphML('data/graph-example-2.xml')
The example below will continue to loop until a counter reaches 1000 (so the loop doesn’t continue indefinitely). The loop will walk the outgoing edges of a vertex and update the flow map m
. What is returned is how many times each song is traversed when starting from vertex 12
(Me and My Uncle). Note that g.v(12)
is not a pipe, so the looping only happens over outE.inV.name.groupCount(m).back(2)
. Finally iterate()
is appended so no results are outputted to the terminal.
gremlin> c = 0
==>0
gremlin> m = [:]
gremlin> g.v(12).out.groupCount(m){it.name}.loop(2){c++ < 1000}.iterate()
gremlin> m
==>CHINA CAT SUNFLOWER=518
==>RAMBLE ON ROSE=527
==>WHARF RAT=213
==>HES GONE=439
==>HURTS ME TOO=112
==>SHIP OF FOOLS=345
==>FRIEND OF THE DEVIL=378
==>IT MUST HAVE BEEN THE ROSES=371
==>JACK STRAW=540
==>MEXICALI BLUES=369
==>CANDYMAN=345
==>LOOKS LIKE RAIN=471
==>DIRE WOLF=341
==>HELP ON THE WAY=245
...
gremlin> println g.v(12).out.groupCount(m){it.name}.loop(2){c++ < 1000}
[StartPipe, LoopPipe([OutPipe, GroupCountFunctionPipe])]
==>null
Finally, you can sort your rankings and, for example, get the top 5 results.
gremlin> m.sort{a,b -> b.value <=> a.value}[0..4]
==>PLAYING IN THE BAND=587
==>ME AND MY UNCLE=570
==>JACK STRAW=540
==>EL PASO=532
==>RAMBLE ON ROSE=527


INFERTILITY
Our ancient Acharyas had a vision of having a better society and nation, for which they developed a separate branch in the field of Ayurveda .
PANCHAKARMA
Panchakarma (Sanskrit; ‘pancha’ means five; and ‘karma’ means procedures) is a set of five therapeutic procedures
TRADITIONAL TREATMENTS
The tratment programmes will be decided by the panel of doctors as per the condition of the patient
TREATMENT PACKAGES
The treatment programmes will be decided by the panel of doctors as per the condition of the patient.
Services
Sprouted in the pristine land of India some 5000 years ago, Ayurveda, the science of life and longevity, is the oldest healthcare system in the world and it combines the profound thoughts of medicine and philosophy. Since then Ayurveda has stood for the wholesome physical, mental and spiritual growth of humanity around the world
KERALA TRADITIONAL TREATMENTS
Kerala treatments like Uzhichil, Pizhichil, Njavarakizhi, Elakizhi, Podikizhi etc and all type of panchakarma treatments done by experienced and trained therapists under the direct supervision of Specialist doctors.
NEUROLOGY
●Treatment for Chronic Neck pain, Back pain (IVDP, SPONDYLITIS, SPONDYLYSTHESIS) Knee pain(Osteo-Arthritis) etc.
COSMETOLOGY
●Special Ayurvedic treatments for skin related disorders, Face packs, Hair fall and dandruff treatments (COSMETOLOGY CLINIC)
LIFE STYLE DISEASES
Treatments for the life style diseases like Diabetes Mellitus,Infertility, Mental-strain, Depression, cholesterol, Obesity etc.
POST DELIVERY CARE AND TREATMENTt
Post delivery care and treatment available for both mothers and baby under the direct supervision of doctors and experienced therapists.


hh.....You Requested the page that is no longer There.
Back To Home© 2016 Si Chen. All Rights Reserved | Design by W3Layouts
hh.....You Requested the page that is no longer There.
Back To Home© 2016 Si Chen. All Rights Reserved | Design by W3Layouts


Code Coverage |
|||||||||
Lines |
Functions and Methods |
Classes and Traits |
|||||||
| Total | |
51.82% |
213 / 411 |
|
62.20% |
130 / 209 |
|
0.00% |
0 / 8 |
| Action.php | |
88.24% |
60 / 68 |
|
90.48% |
38 / 42 |
|
0.00% |
0 / 1 |
| Activity.php | |
69.81% |
37 / 53 |
|
74.19% |
23 / 31 |
|
0.00% |
0 / 1 |
| Constraint.php | |
85.45% |
47 / 55 |
|
88.24% |
30 / 34 |
|
0.00% |
0 / 1 |
| Equipment.php | |
75.00% |
12 / 16 |
|
77.78% |
7 / 9 |
|
0.00% |
0 / 1 |
| Image.php | |
66.67% |
16 / 24 |
|
54.55% |
6 / 11 |
|
0.00% |
0 / 1 |
| Mobility.php | |
75.00% |
12 / 16 |
|
77.78% |
7 / 9 |
|
0.00% |
0 / 1 |
| Scenario.php | |
85.29% |
29 / 34 |
|
86.36% |
19 / 22 |
|
0.00% |
0 / 1 |
| User.php | |
0.00% |
0 / 145 |
|
0.00% |
0 / 51 |
|
0.00% |
0 / 1 |


Jet Fuel!!
Stop wasting time! Add Jet Fuel to your web searches!
Select a folder
Add a new Folder
Folders


Peer Performance for VP prototype
Select VP
Prototype
also possible: overall engagement, calculated difficulty of VP (based on data), summary statement scores (icnluding subscores),


% include header.html %>
Welcome to the news section
The game ZigZag is apparently the brand new inclusion in the hurdle passing section of game. ZigZag is now one of the best game in this particular criteria. This game pays attention to the user or player satisfaction with having a very easy user control of the game. There are also some other games which are popular from the different criteria like Clash of clans, League of legends and so on.
<% include footer.html %>


22 January 1996
Disease Outbreak Reported
A suspected case of Ebola virus was reported to WHO on 6 December. The patient was a 25-year-old male from a village in neighbouring Liberia who was admitted to hospital in the Tabou Prefecture (south of Tai National Park). The man appears to be recovering from the illness. The diagnosis of Ebola virus infection was confirmed by serological tests carried out at the Institute Pasteur in Paris. A WHO team including an expert from the Institut Pasteur has investigated the case in close cooperation with the Ministry of Health, Médecins sans Frontièrs, Epicentre (Paris) and UNHCR. The team has ensured the patient is properly isolated in the hospital and that all precautions have been taken to prevent spread of the infection. The team has also investigated hospital and village contacts of the confirmed case and visited the household of the case which is located in Plibo Village Maryland County, Liberia. The man lived there with three other men and two women. The team found two of the three men were sick with fever and extreme fatigue which could be signs of Ebola virus infection. Both have been isolated in their home. The third man is well. Of the two women one has been hospitalized in Côte d'Ivoire with symptoms which could be Ebola fever. The other one is well. Samples of blood from the three suspect cases are under investigation. WHO is presently organizing an international study of the epidemiology and ecology of the virus in the Tai Forest Region of Côte d'Ivoire. The reservoir and vector of Ebola virus in nature remains unknown. WHO does not recommend that any special measures be instituted for international travel (in relation to the Ebola incident) to and from Côte d'Ivoire and Liberia (See also Press Releases of 15 & 11 December) (15.12.95)


class: center, middle, title-slide # A primer on mixing
React
and
Vega
--- # Framing - There are *endless* possibilities. - So, this presentation is: - *just a proposal* to organize future projects/prototypes; - a *condensed introduction* of technologies that do not usually appear together. --- # Agenda 1. Toolbox 2. A project folder 3. A simple Renderer (function) component 4. A simple hierarchy of components 5. An example of Visual Regression Testing --- # Toolbox - [[Create React App](https://create-react-app.dev/), [Vega/Vega-Lite](https://vega.github.io/)] - [VS Code ES7 React/Redux/React-Native/JS snippets](https://marketplace.visualstudio.com/items?itemName=dsznajder.es7-react-js-snippets) - [[Vega-Embed](https://github.com/vega/vega-embed), [Vega Tooltip](https://github.com/vega/vega-tooltip)] - [[jest-image-snapshot](https://github.com/americanexpress/jest-image-snapshot), [jsdom-screenshot](https://github.com/dferber90/jsdom-screenshot), [jest-transform-css](https://github.com/dferber90/jest-transform-css)] --- class: center, middle # To the app! 🦇


| Edit | {{ end }}Name | Org Name | Team Leads |
|---|---|---|---|
| {{ end }} | {{ $team.name }} | {{ $team.schoolOrg.name }} | {{ join (sort (pluck $team.teamLeads "displayName")) ", " }} |
| Edit | {{ end }}Name | Org Name | Team Leads |
|---|---|---|---|
| {{ end }} | {{ $team.name }} | {{ $team.schoolOrg.name }} | {{ join (sort (pluck $team.teamLeads "displayName")) ", " }} |


These can range from the common cold to more serious diseases.
COVID-19 is the disease caused by a new coronavirus. It was first reported in
December 2019 in Wuhan City in China.
Other coronaviruses include Middle East Respiratory Syndrome (MERS)
and Severe Acute Respiratory Syndrome (SARS).


---
layout: post
title: 好香 taken with instagram at htc research center
date: '2011-06-03T17:07:26+08:00'
tags: []
tumblr_url: http://blog.jln.co/post/6137368086/好香-taken-with-instagram-at-htc-research-center
---
好香 (Taken with Instagram at HTC Research Center (Sindian Branch))


Hand-crafted robots
Modular robots
organs
Metamorphic robots
cells
Smart matter
atoms
...basically replicators from Star Gate: SG-1
Hardware challenges
Challenges of the distributed nature
Algorithmic challenges
"Be ready when the hardware guys finish their job."
Several approaches:
Relation to verification: inspiration by model-checking techniques
Several topics:
Relation to verification: need to validate protocol properties