Buttons
The four directional buttons (up, down, left and right) are used as inputs and can be read by your program to determine if the button is being pressed or not. They can be checked in two different ways. One way is to just check once to see if the button is being pressed. This works well, but it is possible to miss a button press if your program doesn't check often enough. Sometimes this is not a problem, but for some programs it may be an issue. The other way of checking buttons is to use an event handler.
An event handler will continuously check to see if a button has been pressed or released. A button is released when the person pushing the button stops pushing (or releases) the button. Once an event handler is set up, the BrainPad will start an event listener that will check the button for you. This allows your program to do other tasks without you worrying about missing a button event. Once the button is pushed (or released) the event listener will call your event handler. The event handler is code you write to tell the BrainPad how to react when a button is pushed (or released).
While an event handler is a little harder to set up, it allows the program to take care of other tasks while never missing a button event.
Button Methods
BrainPad.Buttons.IsUpPressed()
- returns a boolean true if the up button is pressed and a boolean false otherwise.BrainPad.Buttons.IsLeftPressed()
- returns a boolean true if the left button is pressed and a boolean false otherwise.BrainPad.Buttons.IsRightPressed()
- returns a boolean true if the right button is pressed and a boolean false otherwise.BrainPad.Buttons.IsDownPressed()
- returns a boolean true if the down button is pressed and a boolean false otherwise.ButtonEventHandler
WhenUpButtonPressed
ButtonEventHandler
WhenUpButtonReleased
ButtonEventHandler
WhenLeftButtonPressed
ButtonEventHandler
WhenLeftButtonReleased
ButtonEventHandler
WhenRightButtonPressed
ButtonEventHandler
WhenRightButtonReleased
ButtonEventHandler
WhenDownButtonPressed
ButtonEventHandler
WhenDownButtonReleased
Tip
When entering event listener code, hitting the Tab
key after the +=
(see sample below) will automatically complete the line of code and generate a basic event handler routine.
Button Sample Code
The following program uses both polling and an event handler to check the up and down buttons. When the up button is pressed the light bulb will turn blue, and when the down button is pressed the light bulb will turn off.
To try it, start a new C# project, manage the NuGet packages, and add the BrainPad helper code. Then copy this code and paste it into the Program.cs
window replacing just the main
method in the original program.
static void Main()
{
BrainPad.Buttons.WhenDownButtonPressed += Buttons_WhenDownButtonPressed;
while (true)
{
if (BrainPad.Buttons.IsUpPressed()) BrainPad.LightBulb.TurnBlue();
BrainPad.Wait.Minimum();
}
}
private static void Buttons_WhenDownButtonPressed()
{
BrainPad.LightBulb.TurnOff();
}


This example demonstrates the basics of an implementation of the
SecurityManager.authenticate
method.
The remainder of the example may be found in the Apache Geode
source code in the
geode-core/src/main/java/org/apache/geode/examples/security
directory.
Of course, the security implementation of every installation is unique, so this example cannot be used in a production environment. Its use of the user name as a returned principal upon successful authentication is a particularly poor design choice, as any attacker that discovers the implementation can potentially spoof the system.
This example assumes that a set of user name and password pairs
representing users that may be successfully authenticated
has been read into a data structure upon intialization.
Any component that presents the correct password for a user name
successfully authenticates,
and its identity is verified as that user.
Therefore, the implementation of the authenticate
method
checks that the user name provided within the credentials
parameter
is in its data structure.
If the user name is present,
then the password provided within the credentials
parameter
is compared to the data structure’s known password for that user name.
Upon a match, the authentication is successful.
public Object authenticate(final Properties credentials)
throws AuthenticationFailedException {
String user = credentials.getProperty(ResourceConstants.USER_NAME);
String password = credentials.getProperty(ResourceConstants.PASSWORD);
User userObj = this.userNameToUser.get(user);
if (userObj == null) {
throw new AuthenticationFailedException(
"SampleSecurityManager: wrong username/password");
}
if (user != null
&& !userObj.password.equals(password)
&& !"".equals(user)) {
throw new AuthenticationFailedException(
"SampleSecurityManager: wrong username/password");
}
return user;
}


You can explicitly define conversion operators for classes.
class Foo
{
public:
operator double();
};
This would define an explicit conversion from Foo to double.


The Danville Register & Bee reports that the black female pig named “Hope” was born with deformed rear legs on a farm near the western Virginia town of Floyd.
The 3-week-old pig was set to be euthanized. But Ziggy’s Refuge Farm Sanctuary in nearby Providence, North Carolina, adopted her.
Volunteers flew Hope on a private plane to the New Bolton Center at the University of Pennsylvania’s School of Veterinary Medicine in Kennett Square outside of Philadelphia on Nov. 16. Its staff will determine whether her legs can be repaired.
Even if Hope’s legs can’t be fixed, she will return to the animal sanctuary in North Carolina.
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.


LogViewer is developed to be able to quickly view and analyze log files or content from online log clients.

-
One way of doing this is to provide more than one way of doing common tasks such as opening a log file, for example use short-cut, menu, toolbar, drag n' drop etc.
-
Another way is to never popup any dialogs that informs the user that a entered value is out of range or prompts for input. Also make sure to disable all buttons and menus that the end user currently can't use. For example, if the filter input edit is empty the apply filer button is disabled, if the user starts to type the button is enabled. Use placeholderText in all edit fields to inform what's supposed to be entered. Example: the filter input has the placeholderText set to "Enter text to filter".
The documentation is intended to aid developers of the application, not to provide a user guide to the end-user.
The following sections are describing the implementation in more detail:
A goal has been to follow the JSF Coding Standard (link: http://www2.research.att.com/~bs/JSF-AV-rules.pdf).
- Author
- Tommy Gustavsson
- Version
- 0.x


‘Centre cleared DDA’s plan for commercial units’
Gupta call it ‘major step’ for shopkeepers
by Special CorrespondentDirect freehold and ownership rights will be given to more than ten lakh commercial unit holders and shopkeepers in the Capital, Leader of Opposition in the Delhi Assembly and member of DDA Vijender Gupta said here on Monday.
Terming it a “major step” under Prime Minister Narendra Modi’s ease of doing business policy, Mr. Gupta said, the Centre had approved the DDA’s proposal in this regard. Commercial units, shops existing in commercial streets and mix land use would be covered under it, he said.
“The Centre has approved the proposal of DDA to allow commercial units and freehold shops in commercial establishments existing in DDA’s commercial plots wherein the builder has not been cooperating with the shopkeepers or unit holders,” Mr. Gupta told a press meet.
“The policy will cover commercial unit and shops existing in commercial streets or mix land use and they are in compliance of the provisions of MPD-2021, building bye-laws and fall within the ‘definition of apartment’ as per Delhi Apartment Act 1986,” he said.
The policy would entail shopkeepers or unit holders to get apartment deeds in their favour from the DDA by virtue of which they would now be recognised as lessees, he added.


Túpac Amaru
Túpac Amaru
Available
Account
Settings
Logout
Dashboard
Notifications
3
Jessica Caruso
accepted your invitation to join the team.
2 min ago
Joel King
is now following you
2 days ago
John Doe
is watching your main repository
2 days ago
Emily Carter
is now following you
5 days ago
GitHub
Bitbucket
Slack
Dribbble
Mail Chimp
Dropbox
Dashboard
Menu
All Pages
Pages
Featured
Categories
Category Gallery
Invoice
Developed by Designsintellect.com
All Pages
Action
Another action
Something else here
Separated link
Page Name
Page Slug
Featured Image
Slider
Active
Home Page
Initial commit
8 / 15
v1.2.0
master
May 6, 2016
Solar Panel
Main structure markup
22 / 30
v1.1.5
develop
April 22, 2016


Start Effect
I got no class :(
I got no class11111 :(
Let the user enter
INPUT above
a class (create some example classes) and attach it
Let the user enter
INPUT above
a class and enter true/ false for another class
now with values for styles with color of background:
INPUT above
Start Progress


Auto Generated Calendars
[en] English
[ar] Arabic
[be] Belarusian
[ca] Catalan
[de] German
[es] Spanish
[fr] French
[gr] Greek
[hu] Hungarian
[it] Italian
[ja] Japanese
[ko] Korean
[nl] Dutch
[no] Norwegian
[pl] Polish
[pt] Portuguese
[ru] Russian
[sk] Slovak
[sv] Swedish
[th] Thai
[tr] Turkish
[uk] Ukrainian
[zh] Chinese
Dynamical Generated Calendars


pex
pex is a smart utility to create the single file independent Python environment, with which you can run Python based programs just like it is a executable program.
pex
to create an environment with pex
:
$ pex requests -o myenv.pex
requests
packagecan add more than one dependencies like below:
# etc below is just the placeholder!
$ pex requests flask etc -o myenv.pex
to pin the package to a particular version use:
$ pex 'flask==1.1.1' -o myenv.pex
# or
$ pex 'flask<1.1.1' -o myenv.pex
can create the env with the dependencies as prescribed in requirements file as below:
$ pex -r requirements.txt -o myenv.pex
pex
to run the program with pex
:
$ ./myenv.pex hello.py
this way your program will work as if you have activated the environment, and running your program with python as below:
# after activating the env
$ python hello.py
Now this would suffice for most of scenarios, but for few, we would need to use/run with some different executable (not python as in this case).
For example, running flask applications using flask
command, or running with gunicorn, uvicorn etc.
In such cases, need to change the PEX_SCRIPT
as done in below example for running the web app with gunicorn
.
$ PEX_SCRIPT=gunicorn ./httpx.pex -w 2 fastapi_demo:app -k uvicorn.workers.UvicornWorker
Since pex
essentially makes an one file - “zipped” python environment, there are many more useful ways and scenarios in which this tool would be very helpful.
Will add more ways of using this tool as I explore it more.


--- layout: post title: Logic Pro Now $199 on the Mac App Store!! published: true ---
This is huge! So fricking cheap!


This Stat About The Redskins’ Offense Is Absolutely Embarrassing
by Tzvi MachlinWeek after week new NFL teams seem to be trying to assert themselves as the biggest dumpster fire in the NFL. If it isn’t the Dolphins, it’s the Jets. If it isn’t the Jets, it’s the Giants. If it isn’t the Giants, it’s the Browns.
But the Washington Redskins have put up an offensive “performance” this season that is putting all of those bad teams to shame.
With the end of the third quarter of their game against the New York Jets today, Washington went 16 straight quarters without a touchdown.
Per ESPN’s Rich Cimini, it’s a “feat” that hasn’t been matched since the 2000 Ravens went 21 quarters without a TD.
But while the 2000 Ravens were able to ride an elite defense through their offensive struggle that year, Washington hasn’t been. They’re 1-8 right now and will in all likelihood drop to 1-9 at the end of the game.
Fortunately, Washington was able to end that streak at 16 in the fourth quarter.
Derrius Guice took a pass in the flats from rookie quarterback Dwayne Haskins 45 yards for a Washington touchdown.
On top of breaking the streak, it also served as Haskins’ first-ever passing touchdown.
But Washington still trails, 34-11, with under 10 minutes remaining. It’s a bittersweet way to end an awful run on offense.


The Western Tech Alumni host workshops for students about how to get a job, run an interview prep program, and use the alumni network to help connect students with the opportunity to do work that they love.
Our events have been sponsored in the past by Western University's Computer Science and Electrical and Computer Engineering departments, however Western Tech Alumni is not an official Western affiliate organization.
The Western Tech Alumni host periodic workshops with resume and interview tips, as well as general information about the job application process.
Breaking into Tech Workshop Slides
Breaking into Tech for the 2nd year Intro to Software Engineering Class
We also run a 4 week interview prep program.
Interview Prep Program Gitbook
Interview Prep Program Facebook Group
Western Tech Alumni mock interview credits on Pramp
Handouts
Need to spruce up your resume? Check out our resume handout.
Our one page summary of coding interview tips.
Calla's guide to getting freshman internship.
Cassidy's guide to getting a gig in university.
Joining as a student
Opportunities abound for resume review, career tips, mock interviews, and mentorship from experienced alumni and senior students. Sign up through our Google Form.
Joining as an alumni
If you are looking for a job, sign up through the student intake form.
If you've already found work that you love, and are willing to provide encouragement, advice, mock interviews or potential referrals to your company, please sign up through our alumni form, or contact us directly.
Feel free to email us for more information<EMAIL_ADDRESS>Join the community through the Western Computer Science Facebook group.
The Western Tech Alumni initiative is organized by
Michelle Chen, 2017 student representative
Adithya Sukumar, 2017 student representative
Cullan Liang, software engineer at Amazon
Alan Michaan, software engineer at Bloomberg
Saad Ahmed, software engineer at Microsoft
Andrew Simpson, engineer resident at Google
Artur Tsurkan, product manager at Google
Duncan Cai, software engineer at Google
Ruth Grace Wong, software engineer at Pinterest
Robin Pham, software engineer at Cruise Automation


twilio.rest.sync.v1.service.sync_map package¶
Submodules¶
twilio.rest.sync.v1.service.sync_map.sync_map_item module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.sync.v1.service.sync_map.sync_map_item.
SyncMapItemContext
(version, service_sid, map_sid, key)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
delete
(if_match=<object object>)[source]¶ Deletes the SyncMapItemInstance
Parameters: if_match (unicode) – The If-Match HTTP request header Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the SyncMapItemInstance
Returns: The fetched SyncMapItemInstance Return type: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemInstance
-
update
(data=<object object>, ttl=<object object>, item_ttl=<object object>, collection_ttl=<object object>, if_match=<object object>)[source]¶ Update the SyncMapItemInstance
Parameters: - data (dict) – A JSON string that represents an arbitrary, schema-less object that the Map Item stores
- ttl (unicode) – An alias for item_ttl
- item_ttl (unicode) – How long, in seconds, before the Map Item expires
- collection_ttl (unicode) – How long, in seconds, before the Map Item’s parent Sync Map expires and is deleted
- if_match (unicode) – The If-Match HTTP request header
Returns: The updated SyncMapItemInstance
Return type: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemInstance
-
-
class
twilio.rest.sync.v1.service.sync_map.sync_map_item.
SyncMapItemInstance
(version, payload, service_sid, map_sid, key=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
created_by
¶ Returns: The identity of the Map Item’s creator Return type: unicode
-
date_created
¶ Returns: The ISO 8601 date and time in GMT when the resource was created Return type: datetime
-
date_expires
¶ Returns: The ISO 8601 date and time in GMT when the Map Item expires Return type: datetime
-
date_updated
¶ Returns: The ISO 8601 date and time in GMT when the resource was last updated Return type: datetime
-
delete
(if_match=<object object>)[source]¶ Deletes the SyncMapItemInstance
Parameters: if_match (unicode) – The If-Match HTTP request header Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the SyncMapItemInstance
Returns: The fetched SyncMapItemInstance Return type: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemInstance
-
key
¶ Returns: The unique, user-defined key for the Map Item Return type: unicode
-
map_sid
¶ Returns: The SID of the Sync Map that contains the Map Item Return type: unicode
-
revision
¶ Returns: The current revision of the Map Item, represented as a string Return type: unicode
-
service_sid
¶ Returns: The SID of the Sync Service that the resource is associated with Return type: unicode
-
update
(data=<object object>, ttl=<object object>, item_ttl=<object object>, collection_ttl=<object object>, if_match=<object object>)[source]¶ Update the SyncMapItemInstance
Parameters: - data (dict) – A JSON string that represents an arbitrary, schema-less object that the Map Item stores
- ttl (unicode) – An alias for item_ttl
- item_ttl (unicode) – How long, in seconds, before the Map Item expires
- collection_ttl (unicode) – How long, in seconds, before the Map Item’s parent Sync Map expires and is deleted
- if_match (unicode) – The If-Match HTTP request header
Returns: The updated SyncMapItemInstance
Return type: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemInstance
-
url
¶ Returns: The absolute URL of the Map Item resource Return type: unicode
-
-
class
twilio.rest.sync.v1.service.sync_map.sync_map_item.
SyncMapItemList
(version, service_sid, map_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
create
(key, data, ttl=<object object>, item_ttl=<object object>, collection_ttl=<object object>)[source]¶ Create the SyncMapItemInstance
Parameters: - key (unicode) – The unique, user-defined key for the Map Item
- data (dict) – A JSON string that represents an arbitrary, schema-less object that the Map Item stores
- ttl (unicode) – An alias for item_ttl
- item_ttl (unicode) – How long, in seconds, before the Map Item expires
- collection_ttl (unicode) – How long, in seconds, before the Map Item’s parent Sync Map expires and is deleted
Returns: The created SyncMapItemInstance
Return type: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemInstance
-
get
(key)[source]¶ Constructs a SyncMapItemContext
Parameters: key – The key value of the Sync Map Item resource to fetch Returns: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemContext Return type: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of SyncMapItemInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of SyncMapItemInstance Return type: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemPage
-
list
(order=<object object>, from_=<object object>, bounds=<object object>, limit=None, page_size=None)[source]¶ Lists SyncMapItemInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - order (SyncMapItemInstance.QueryResultOrder) – How to order the Map Items returned by their key value
- from (unicode) – The index of the first Sync Map Item resource to read
- bounds (SyncMapItemInstance.QueryFromBoundType) – Whether to include the Map Item referenced by the from parameter
- limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemInstance]
-
page
(order=<object object>, from_=<object object>, bounds=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of SyncMapItemInstance records from the API. Request is executed immediately
Parameters: - order (SyncMapItemInstance.QueryResultOrder) – How to order the Map Items returned by their key value
- from (unicode) – The index of the first Sync Map Item resource to read
- bounds (SyncMapItemInstance.QueryFromBoundType) – Whether to include the Map Item referenced by the from parameter
- page_token (str) – PageToken provided by the API
- page_number (int) – Page Number, this value is simply for client state
- page_size (int) – Number of records to return, defaults to 50
Returns: Page of SyncMapItemInstance
Return type: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemPage
-
stream
(order=<object object>, from_=<object object>, bounds=<object object>, limit=None, page_size=None)[source]¶ Streams SyncMapItemInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.
Parameters: - order (SyncMapItemInstance.QueryResultOrder) – How to order the Map Items returned by their key value
- from (unicode) – The index of the first Sync Map Item resource to read
- bounds (SyncMapItemInstance.QueryFromBoundType) – Whether to include the Map Item referenced by the from parameter
- limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemInstance]
-
-
class
twilio.rest.sync.v1.service.sync_map.sync_map_item.
SyncMapItemPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of SyncMapItemInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemInstance Return type: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemInstance
-
twilio.rest.sync.v1.service.sync_map.sync_map_permission module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.sync.v1.service.sync_map.sync_map_permission.
SyncMapPermissionContext
(version, service_sid, map_sid, identity)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
delete
()[source]¶ Deletes the SyncMapPermissionInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the SyncMapPermissionInstance
Returns: The fetched SyncMapPermissionInstance Return type: twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionInstance
-
update
(read, write, manage)[source]¶ Update the SyncMapPermissionInstance
Parameters: Returns: The updated SyncMapPermissionInstance
Return type: twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionInstance
-
-
class
twilio.rest.sync.v1.service.sync_map.sync_map_permission.
SyncMapPermissionInstance
(version, payload, service_sid, map_sid, identity=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
delete
()[source]¶ Deletes the SyncMapPermissionInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the SyncMapPermissionInstance
Returns: The fetched SyncMapPermissionInstance Return type: twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionInstance
-
identity
¶ Returns: The identity of the user to whom the Sync Document Permission applies Return type: unicode
-
map_sid
¶ Returns: Sync Map SID Return type: unicode
-
service_sid
¶ Returns: The SID of the Sync Service that the resource is associated with Return type: unicode
-
update
(read, write, manage)[source]¶ Update the SyncMapPermissionInstance
Parameters: Returns: The updated SyncMapPermissionInstance
Return type: twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionInstance
-
url
¶ Returns: The absolute URL of the Sync Map Permission resource Return type: unicode
-
-
class
twilio.rest.sync.v1.service.sync_map.sync_map_permission.
SyncMapPermissionList
(version, service_sid, map_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
get
(identity)[source]¶ Constructs a SyncMapPermissionContext
Parameters: identity – The application-defined string that uniquely identifies the User’s Sync Map Permission resource to fetch Returns: twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionContext Return type: twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of SyncMapPermissionInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of SyncMapPermissionInstance Return type: twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionPage
-
list
(limit=None, page_size=None)[source]¶ Lists SyncMapPermissionInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionInstance]
-
page
(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of SyncMapPermissionInstance records from the API. Request is executed immediately
Parameters: Returns: Page of SyncMapPermissionInstance
Return type: twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionPage
-
stream
(limit=None, page_size=None)[source]¶ Streams SyncMapPermissionInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.
Parameters: - limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionInstance]
-
-
class
twilio.rest.sync.v1.service.sync_map.sync_map_permission.
SyncMapPermissionPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of SyncMapPermissionInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionInstance Return type: twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.sync.v1.service.sync_map.
SyncMapContext
(version, service_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
delete
()[source]¶ Deletes the SyncMapInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the SyncMapInstance
Returns: The fetched SyncMapInstance Return type: twilio.rest.sync.v1.service.sync_map.SyncMapInstance
-
sync_map_items
¶ Access the sync_map_items
Returns: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemList Return type: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemList
-
sync_map_permissions
¶ Access the sync_map_permissions
Returns: twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionList Return type: twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionList
-
-
class
twilio.rest.sync.v1.service.sync_map.
SyncMapInstance
(version, payload, service_sid, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
created_by
¶ Returns: The identity of the Sync Map’s creator Return type: unicode
-
date_created
¶ Returns: The ISO 8601 date and time in GMT when the resource was created Return type: datetime
-
date_expires
¶ Returns: The ISO 8601 date and time in GMT when the Sync Map expires Return type: datetime
-
date_updated
¶ Returns: The ISO 8601 date and time in GMT when the resource was last updated Return type: datetime
-
delete
()[source]¶ Deletes the SyncMapInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the SyncMapInstance
Returns: The fetched SyncMapInstance Return type: twilio.rest.sync.v1.service.sync_map.SyncMapInstance
-
links
¶ Returns: The URLs of the Sync Map’s nested resources Return type: unicode
-
revision
¶ Returns: The current revision of the Sync Map, represented as a string Return type: unicode
-
service_sid
¶ Returns: The SID of the Sync Service that the resource is associated with Return type: unicode
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
sync_map_items
¶ Access the sync_map_items
Returns: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemList Return type: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemList
-
sync_map_permissions
¶ Access the sync_map_permissions
Returns: twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionList Return type: twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionList
-
unique_name
¶ Returns: An application-defined string that uniquely identifies the resource Return type: unicode
-
update
(ttl=<object object>, collection_ttl=<object object>)[source]¶ Update the SyncMapInstance
Parameters: - ttl (unicode) – An alias for collection_ttl
- collection_ttl (unicode) – How long, in seconds, before the Sync Map expires and is deleted
Returns: The updated SyncMapInstance
Return type:
-
url
¶ Returns: The absolute URL of the Sync Map resource Return type: unicode
-
-
class
twilio.rest.sync.v1.service.sync_map.
SyncMapList
(version, service_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
create
(unique_name=<object object>, ttl=<object object>, collection_ttl=<object object>)[source]¶ Create the SyncMapInstance
Parameters: - unique_name (unicode) – An application-defined string that uniquely identifies the resource
- ttl (unicode) – An alias for collection_ttl
- collection_ttl (unicode) – How long, in seconds, before the Sync Map expires and is deleted
Returns: The created SyncMapInstance
Return type:
-
get
(sid)[source]¶ Constructs a SyncMapContext
Parameters: sid – The SID of the Sync Map resource to fetch Returns: twilio.rest.sync.v1.service.sync_map.SyncMapContext Return type: twilio.rest.sync.v1.service.sync_map.SyncMapContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of SyncMapInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of SyncMapInstance Return type: twilio.rest.sync.v1.service.sync_map.SyncMapPage
-
list
(limit=None, page_size=None)[source]¶ Lists SyncMapInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type:
-
page
(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of SyncMapInstance records from the API. Request is executed immediately
Parameters: Returns: Page of SyncMapInstance
Return type:
-
stream
(limit=None, page_size=None)[source]¶ Streams SyncMapInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.
Parameters: - limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type:
-
-
class
twilio.rest.sync.v1.service.sync_map.
SyncMapPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of SyncMapInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.sync.v1.service.sync_map.SyncMapInstance Return type: twilio.rest.sync.v1.service.sync_map.SyncMapInstance
-


SG(1) User Commands SG(1) NAME sg - execute command as different group ID SYNOPSIS sg [-] [group [-c ] command] DESCRIPTION The sg command works similar to newgrp but accepts a command. The command will be executed with the /bin/sh shell. With most shells you may run sg from, you need to enclose multi-word commands in quotes. Another difference between newgrp and sg is that some shells treat newgrp specially, replacing themselves with a new instance of a shell that newgrp creates. This doesn't happen with sg, so upon exit from a sg command you are returned to your previous group ID. CONFIGURATION The following configuration variables in /etc/login.defs change the behavior of this tool: SYSLOG_SG_ENAB (boolean) Enable "syslog" logging of sg activity.  SEE ALSO id(1), login(1), newgrp(1), su(1), gpasswd(1), group(5), gshadow(5). shadow-utils <IP_ADDRESS> 05/25/2012 SG(1)


Views
02
Recipeint's NamehereMonday 10/30/87 8:55pm
http://www.familyguy.com
PLAYLISTS
PERSONAL VIDEOS
Admin Username
http://www.familyguy.com
http://www.familyguy.com
http://www.familyguy.com
http://www.familyguy.com
http://www.familyguy.com
http://www.familyguy.com
http://www.familyguy.com
http://www.familyguy.com


Shahzad Huq
GitHub
Demo - Template Processor
Below is the final HTML output produced by this library.


Institute of Plasma Physics, Chinese Academy of Sciences Email<EMAIL_ADDRESS>⋆Note: This document has been written using GNU TE Xmacs[14].
Abstract.A routine in operating a tokamake is to reconstruct axisymmetirc poloidalmagnetic ﬁeld under the constraints of MHD force balance and various magneticmeasurements. This kind of task can be done by various codes, e.g., EFIT. Another routinein analsing the tokamak discharge is to constructs a coordinate system, based on the 2Dequilibrium magnetic ﬁeld, with a desired form of Jacobian by using discrete numericalequilibrium data output by the equilibrium reconstructing codes. These are my notes whenlearning tokamak equilibrium theory. These notes are evolving and are written for myown record. I have been keeping revising these notes for more than 10 years. I enjoyseeing the continuous improvement of these notes and my undersanding of this simple andfundamental stuﬀ.


University Application Important Dates
As I start my first day of university tomorrow, I’d like to share with you grade 12’s the process of applying to university. This post will be a brief timeline and will only contain information about Ontario universities. I didn’t apply to Out of Province universities so I’m not knowledgable about that. By the way, I went to a semestered school in Ontario.
Timeline
September 2014
Ontario University Fair (OUF): The OUF is running from September 19th to 21st this year at the Metro Toronto Convention Centre. All universities in Ontario will be there! They typically will bring admission officers, recruitment/marketing officers, undergrad students and professors. Make sure you come prepared with questions. If not, don’t worry because they’re all really friendly people.
October 2014
Parent-Teacher night: To be honest, this night isn’t very important. However, by this date, your teachers should provide you with a mark update. If you’re doing well, keep up the good work!  If you’re doing “meh”, then this is the time you have to start working even harder. If you’re doing poorly, this is your wake up call.  So why waste this opportunity?
Halloween: HAVE FUN! Remember grade 12 is supposed to be the fun year!
University fall open house: These typically run in late October and early November. You can drive to your desired school and check out their campus. This is very useful for checking the culture, both academic and social.
Pro tip: If you’re interested in Waterloo Engineering, definitely apply for a shadow day. I participated in one last year and I really enjoyed it. It’s basically a one-on-one tour with a Waterloo Engineering student!
November 2014
Semester 1 midterm marks: You’re getting closer and closer to the end of Semester 1 (or midterms for those non-semesters kids). Basically follow the same advice I gave for Parent-Teacher night. This set of marks are NOT reported to Ontario universities.
OUAC Pins handed out: Around mid-late November (sometimes even early December), your school will hand out your Ontario University Application Centre pins. Now you can start applying to University! YAY! You can browse through your programs and then apply. Applying is very simple. All you have to do is choose your programs and then pay. You have to pay $130 for your first 3 programs, and then additional $44 for each program beyond the initial 3. Note: You must pay $130, even if you apply to one university. You will be able to see all of you grade 11 courses under academic information.
December 2014
Week before Winter break: For some reason, everyone tends to slack off this time of year. (I did too) Make sure you keep doing your homework and maintain your work ethic, otherwise it’ll cost you a couple of % on your final mark. Just hang in there for a bit!
Winter break: During the break, I would strongly recommend to work on your supplementary application. Most competitive programs require a supplementary application. Generally, you have to write a few short essay responses and list your extracurricular activities. At Waterloo, if you don’t fill out the AIF, you may not be considered for admission. Make sure when you’re done to have a peer or teacher edit it. The supplementary is important for both admission and scholarship purposes. I will cover this in another post.
January 2015
Back from break: So you’re back from the break. You have about 3-4 weeks, until semester one is done. Keep on working hard and prepare well for the exams. If it comes down to a shortage of time, focus on your program’s required courses.
Super-early admission offers: Some universities will hand out super-early admission offers to students with amazing grade 11 marks (or grade 12 if they fast tracked) in December/January. Don’t be concerned if you don’t receive an offer at this time. Some programs don’t even hand out offers during this time.
February 2015
Supplementary application deadlines: Most apps are due in February, some are due a bit later. Submit them! Don’t wait until the last minute to do them. Please, I can’t stress this enough.
Semester 1 final marks uploaded on OUAC: Your school will report your marks to OUAC and universities will be able to see them.
Early admission offers: Many programs will hand out offers during late February/early March based on your Semester 1 final marks. They typically hand out a small portion of their offers. For example, Waterloo Engineering only handed out roughly a quarter to a third of their offers during the early round.
March 2015
March open house: Same thing as above, check them out if you’re interested.
Continuous round of offers: Some programs hand out continuous offers throughout March and April. Waterloo Engineering does this for out of province students. If you’re an Ontario student, don’t expect an offer during this time span.
April 2015
Semester 2 midterm marks: In mid-late April, semester 2 midterm marks will be up on OUAC. By this point, you’ve done all you could to help your cause. Now, your fate is in the hands of the admission officers.
May 2015
Huge round of offers (“regular admission”): This is pretty much the final and largest round of offers. Universities will hand out the offers they have left. If you received an offer, CONGRATULATIONS! If not, then oh well, you tried your best right? If you still want to get in the program, I suggest you apply to be on the wait list. There’s also another type of offer- alternate offer. If your application was not strong enough for the program you applied to, universities sometimes give you an alternate offer to a less competitive program.
Prom: Have fun. You’ve waited the whole year for this.
June 2015
Deadline to accept your offer on OUAC: Last year was June 2nd, this year I think it’s June 1st. Accept your offer! It might be hard choosing between two or more programs, but follow your heart. Don’t make anyone else make that decision for you. Speak to your teachers, family, university alumni, and etc.
Apply to OSAP: If you require funding for your studies, definitely apply to OSAP. I might post a detailed guide on this some other day. Listen to me when I say this: don’t procrastinate on this. It might seem like work, but remember, this is money you’re dealing with. I recommend you guys to apply before June 15th. You’ll get funding estimates earlier and if you made a mistake, you can fix it earlier.
Maintain your conditional offer: All universities hand out conditional offers. This means that you have to keep a specific mark in your pre-req’s and top 6 average, or some variant of this. Usually the conditional averages they require are tens of % below your admission average. However, make sure you don’t cross below the threshold. Your offer may be at risk.
Wait list: Sometimes, if you’re in the right place at the right time, you can get off the wait list and receive a late offer to your desired university program! Don’t bank on this though. I’m just throwing the idea out there.
I guess I have covered the basics of the university application timeline. If you prepare well, it won’t be that stressful. Anyways, good luck on your grade 12 year!


| us_rent_income {tidyr} | R Documentation |
Captured from the 2017 American Community Survey using the tidycensus package.
us_rent_income
A dataset with variables:
FIP state identifier
Name of state
Variable name: income = median yearly income, rent = median monthly rent
Estimated value
90% margin of error


Login
Inventory
Add Device
Delete Devices
Retire Devices
Contact Us
Contact Us
If you're having problems with the site or would like to suggest a new feature, please use the form below.
Name
Email


Error 410 - Page disabled
The resources necessary to render annotate on
Misc/NEWS
forcpython
andcpython-fullhistory
lead to poor performance for all repositories hosted at hg.python.org.If you are reliant on this feature, please contact The Infrastructure Staff to help us understand and support your usecase.


Here Are the 2020 Golden Globe Nominations in Full
Awards season is finally here, and it's starting with a bang. Favorites like The Crown, Fleabag, and Big Little Lies lead the list of 2020 Golden Globe television nominees. Major motion productions like Martin Scorsese's The Irishman and Quentin Tarantino's Once Upon a Time… in Hollywood are also top contenders, with both men nominated for Best Director as well. A category some have already noted is seriously lacking in female directors, Best Director has historically followed suit. Since the Golden Globes' inception, it has nominated only seven women for the honor, according to the Los Angeles Times.
We'll all find out the winners come next year, with the ceremony set for January 5. In the meantime, place your bets on this season's biggest winners. Here are the 2020 Golden Globe nominees.
Best Motion Picture – Drama
- 1917
- The Irishman
- Joker
- Marriage Story
- The Two Popes
Best Performance by an Actress in a Motion Picture – Drama
- Cynthia Erivo, Harriet
- Scarlett Johansson, Marriage Story
- Saoirse Ronan, Little Women
- Charlize Theron, Bombshell
- Renée Zellweger, Judy
Best Performance by an Actor in a Motion Picture – Drama
- Christian Bale, Ford v Ferrari
- Antonio Banderas, Pain and Glory
- Adam Driver, Marriage Story
- Joaquin Phoenix, Joker
- Jonathan Pryce, The Two Popes
Best Motion Picture – Musical or Comedy
- Dolemite Is My Name
- Jojo Rabbit
- Knives Out
- Once Upon a Time... in Hollywood
- Rocketman
Best Performance by an Actress in a Motion Picture – Musical or Comedy
- Ana de Armas, Knives Out
- Awkwafina, The Farewell
- Cate Blanchett, Where'd You Go, Bernadette
- Beanie Feldstein, Booksmart
- Emma Thompson, Late Night
Best Performance by an Actor in a Motion Picture – Musical or Comedy
- Daniel Craig, Knives Out
- Roman Griffin Davis, Jojo Rabbit
- Leonardo DiCaprio, Once Upon a Time... in Hollywood
- Taron Egerton, Rocketman
- Eddie Murphy, Dolemite Is My Name
Best Motion Picture – Animated
- Frozen 2
- How to Train Your Dragon: The Hidden World
- The Lion King
- Missing Link
- Toy Story 4
Best Motion Picture – Foreign Language
- The Farewell
- Les Misérables
- Pain and Glory
- Parasite
- Portrait of a Lady on Fire
Best Performance by an Actress in a Supporting Role in Any Motion Picture
- Kathy Bates, Richard Jewell
- Annette Bening, The Report
- Laura Dern, Marriage Story
- Jennifer Lopez, Hustlers
- Margot Robbie, Bombshell
Best Performance by an Actor in a Supporting Role in Any Motion Picture
- Tom Hanks, A Beautiful Day in the Neighborhood
- Anthony Hopkins, The Two Popes
- Al Pacino, The Irishman
- Joe Pesci, The Irishman
- Brad Pitt, Once Upon a Time... in Hollywood
Best Director – Motion Picture
- Bong Joon Ho, Parasite
- Sam Mendes, 1917
- Todd Phillips, Joker
- Martin Scorsese, The Irishman
- Quentin Tarantino, Once Upon a Time... in Hollywood
Best Screenplay – Motion Picture
- Noah Baumbach, Marriage Story
- Bong Joon Ho, Han Jin Won, Parasite
- Anthony McCarten, The Two Popes
- Quentin Tarantino, Once Upon a Time... in Hollywood
- Steven Zaillian, The Irishman
Best Original Score – Motion Picture
- Little Women
- Joker
- Marriage Story
- 1917
- Motherless Brooklyn
Best Original Song – Motion Picture
- "Beautiful Ghosts," Cats
- "I'm Gonna Love Me Again," Rocketman
- "Into the Unknown," Frozen 2
- "Spirit," The Lion King
- "Stand Up," Harriet
Best Television Series – Drama
- Big Little Lies
- The Crown
- Killing Eve
- The Morning Show
- Succession
Best Performance by an Actress in a Television Series – Drama
- Jennifer Aniston, The Morning Show
- Olivia Colman, The Crown
- Jodie Comer, Killing Eve
- Nicole Kidman, Big Little Lies
- Reese Witherspoon, The Morning Show
Best Performance by an Actor in a Television Series – Drama
- Brian Cox, Succession
- Kit Harington, Game of Thrones
- Rami Malek, Mr. Robot
- Tobias Menzies, The Crown
- Billy Porter, POSE
Best Television Series – Musical or Comedy
- Barry
- Fleabag
- The Kominsky Method
- The Marvelous Mrs. Maisel
- The Politician
Best Performance by an Actress in a Television Series – Musical or Comedy
- Christina Applegate, Dead to Me
- Rachel Brosnahan, The Marvelous Mrs. Maisel
- Kirsten Dunst, On Becoming a God in Central Florida
- Natasha Lyonne, Russian Doll
- Phoebe Waller-Bridge, Fleabag
Best Performance by an Actor in a Television Series – Drama
- Michael Douglas, The Kominsky Method
- Bill Hader, Barry
- Ben Platt, The Politician
- Paul Rudd, Living with Yourself
- Ramy Youssef, Ramy
Best Television Limited Series or Motion Picture Made for Television
- Catch-22
- Chernobyl
- Fosse/Verdon
- The Loudest Voice
- Unbelievable
Best Performance by an Actress in a Limited Series or a Motion Picture Made for Television
- Kaitlyn Dever, Unbelievable
- Joey King, The Act
- Helen Mirren, Catherine the Great
- Merritt Wever, Unbelievable
- Michelle Williams, Fosse/Verdon
Best Performance by an Actor in a Limited Series or a Motion Picture Made for Television
- Christopher Abbott, Catch-22
- Sacha Baron Cohen, The Spy
- Russell Crowe, The Loudest Voice
- Jared Harris, Chernobyl
- Sam Rockwell, Fosse/Verdon
Best Performance by an Actress in a Supporting Role in a Series, Limited Series or Motion Picture Made for Television
- Patricia Arquette, The Act
- Helena Bonham Carter, The Crown
- Toni Collette, Unbelievable
- Meryl Streep, Big Little Lies
- Emily Watson, Chernobyl
Best Performance by an Actor in a Supporting Role in a Series, Limited Series or Motion Picture Made for Television
- Alan Arkin, The Kominsky Method
- Kieran Culkin, Succession
- Andrew Scott, Fleabag
- Stellan Skarsgård, Chernobyl
- Henry Winkler, Barry
Chelsey Sanchez Editorial Fellow Chelsey Sanchez is the Digital Fellow for HarpersBAZAAR.com.


Find Window
I rather hope that most of the controls here are self-explanatory. Some that might not be:
- Regexp: Specifies that the search will be performed using regular expression syntax. See #Regular Expressions
- In selection only: Applies to the Replace All function.
Please inform me if this section needs more explanation.


--- layout: post title: 2013 in review date: 2013-12-31 08:39:12.000000000 -06:00 type: post published: true status: publish categories: - Ruby on Rails tags: [] meta: wpcom_recap: '2013' _edit_last: '15714693' _publicize_pending: '1' author: login: broberts65 email<EMAIL_ADDRESS>display_name: Bob Roberts first_name: '' last_name: '' ---
The WordPress.com stats helper monkeys prepared a 2013 annual report for this blog.
Here's an excerpt:
The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 23,000 times in 2013. If it were a concert at Sydney Opera House, it would take about 9 sold-out performances for that many people to see it.


http...
Builders: There is now only a single http
builder, that is equivalent to the former httpLazy
builder. To achieve the behaviour of the removed builders, please use:httpLazy
-> http { ... }
http
-> http { ... } |> Request.send
httpAsync
-> http { ... } |> Request.sendAsync
httpLazyAsync
-> http { ... } |> Request.toAsync
httpMessage
-> http { ... } |> Request.toMessage
LazyHttpBuilder
-> HttpBuilder
Request.buildAsync
-> Request.toAsync
send
and sendAsync
builder methodsDsl
/ DslCE
namespaces: There is no need for distinction of both namespaces. It is now sufficient to open FsHttp
only.HttpBuilder<'context>
is replaced by IBuilder<'self>
, so that the CE methods work directly on the HeaderContext
, BodyContext
, and MultipartContext
directly. This simplifies things like mixing Dsl and DslCE, pre-configuring and chaining requests.FsHttp.GlobalConfig
module. The Config
module is only for functions on request contexts.(string * obj) list
nowSee README.md


Development - Ionosphere
What Ionosphere is for
I want to monitor metrics on small VPSs that do not do a great deal, meaning there is no high, rate constant work or 3sigma consistency in the metrics. There are 7 apache.sending a day, not 7000 a minute.
Or there are peaks of 3 on the metric stats_counts.statsd.bad_lines_seen
This is not anomalous.
Ionosphere’s goal is to allow us to train Skyline on what is not anomalous.
Almost a year in review
For a large part of 2016 a method of implementing the Ionosphere concept has been sort after.
Ramblings - the development of Ionosphere
The original idea behind Ionosphere was…
Ionosphere is a user feedback/input to Skyline that allows for the creation of timeseries specific “algorithms”.
Skyline Mirage (and Analyzer) work well on fairly constant rate, high range metrics, however on low rate, low range metrics like machine stats metrics it tends to be less effective and these types of timeseries make Mirage chatty even when set too very high resolution e.g. 730 hours.
Ionosphere enables the user to create custom algorithms for specific timeseries. While defining all the custom “rules” to match different types of timeseries and metrics, much of the recent efforts in anomaly detection have been dedicated to creation of automated, algorithmic and machine learning processes doing everything with minimal user input, other than some configurations.
However, in truth anomaly detection is not necessarily equal among everything and the pure computational anomaly detection system is not there yet. There is still an aspect of art in the concept.
Ionosphere adds a missing piece to the Skyline anomaly detection stack, in our attempts to computationally handle the anomaly detection process we have removed or neglected a very important input, allowing the human to fly the craft.
Requirements
Ionosphere is dependent on the panorama branch (Branch #870: panorama)
20160719 update
We have Panorama now.
Allow us to have an input to allow us to tell Skyline that an alert was not anomalous after it had been reviewed in context and probably many, many times. Certain timeseries patterns are normal, but they are not normal in terms of 3sigma and never will be. However, they are not anomalous in their context.
It would be great if Skyline could learn these.
The initial idea was to attempt to start introducing modern machine learning models and algorithms into the mix, to essentially learn machine learning, the models, algorithms and methods. This it appears is easier said than done, it appears that machine learning with timeseries is not simple or straight forward. In fact, it seems in terms of machine learning, well timeseries are the one of the things that machine learning is not really good at yet.
A seemingly obvious method would be to consider trying to determine similarities between 2 timeseries, once again easier said than done.
Determining timeseries similarities - 20160719
Researching computing timeseries similarities in terms of both machine learning and statistics means, it appears that there is a fair bit of stuff in R that handles timeseries quite well.
bsts: Bayesian Structural Time Series - Time series regression using dynamic linear models fit using MCMC (Google) - https://cran.r-project.org/web/packages/bsts/index.html
The R package PDC provides complexity-based dissimilarity calculation and clustering, and also provides p values for a null hypothesis of identical underlying generating permutation distributions. The R package TSclust was recently updated and provides (among PDC) a number of approaches to time series dissimilarities. (https://www.researchgate.net/post/How_can_I_perform_time_series_data_similarity_measures_and_get_a_significance_level_p-value)
And python maybe RMS - Erol Kalkan · United States Geological Survey, “Another approach to compute the differences between two time series is moving window root-mean-square. RMS can be run for both series separately. This way, you can compare the similarities in energy (gain) level of time series. You may vary the window length for best resolution.” (https://www.researchgate.net/post/How_can_I_perform_time_series_data_similarity_measures_and_get_a_significance_level_p-value) http://stackoverflow.com/questions/5613244/root-mean-square-in-numpy-and-complications-of-matrix-and-arrays-of-numpy#
However finding a good similarity measure between time series is a very non-trivial task.
http://alexminnaar.com/time-series-classification-and-clustering-with-python.html
Spent tinkered with LBKeogh and sklearn.metrics import classification_report, he is not wrong. Any which way I think bringing R into the evaluation is going to be useful long term. rpy2
Other:
Fast Time Series Evaluation (FTSE) - older algorithm from 2007 but potential - http://dbgroup.eecs.umich.edu/files/sigmod07timeseries.pdf
Aggregation. Further complicates… a lot I think.
Clustering not the way?
Clustering of Time Series Subsequences is Meaningless: Implications for Previous and Future Research - http://www.cs.ucr.edu/~eamonn/meaningless.pdf - covers K-means and STS
Time clustering algorithm. An idea. We need to give time more dimensionality. http://www.cs.unm.edu/~mueen/FastestSimilaritySearch.html
Which ends up relating to Feature #1572: htsa - Haversine Time Similarity Algorithm, an idea to perhaps pursue in the future, non-trivial, but may be able to add some additional clusterable dimensionalities to timeseries at some point in the future. Are timeseries difficult for machine learning to understand as in simple timeseries, a timestamp is a 1 dimensional things and has no relationship to anything else. Whereas time really has a number of additional aspects to it as well. In the very least, it has a spatial dimension as well. Lucky with timeseries we have metric_name, timestamp and value, we could cluster on grouping of classifiable (classable) parts of namespaces say. Which would at least add a certain layer of machine learning, but to what end currently?
It is not easy.
But maybe it can be.
Originally Ionosphere was envisioned as bringing some machine learning to Skyline and lots of paths and methods, etc have been reviewed and unfortunately no simple way can be seen of achieving this in any meaningful way in terms of Skyline and it original purpose, anomaly detecting in machine metrics timeseries. Although it would be nice to update to the current Skyline stack and pipeline to use something not from the 1920’s, it is alas a fork to far at this point.
And a bit of 1920’s with a bit of modern key value and some Python, with a dash of “lets try CONSENSUS”, does not do bad a job. Considering off the production line and into the digital pipeline, with a sprinkling of new ideas.
However, not all metrics do well with 3sigma either :) Machine learning, scikit-learn, tensorflow, NuPIC, TPOT, k-means, et al are not helping either.
Thresholding, no. Although thresholding in Boundary is useful for it purpose, direct thresholding for Ionosphere has been constantly been looked away from as it is felt that simple thresholding is not useful or helpful in terms of learning for Skyline and people. We have done thresholding and we can.
Ionosphere should be about learning and teaching, for want of better words. Machine learning has training data sets. So Ionosphere needs training data sets. So lets give it training data sets.
Updated by Gary Wilson 3 months ago
Small steps
For some reason I think this should be at least started on before feature extraction.
Add user input
via Panorama tickbox - not anomalous
via alert with link to Panorama not anomalous
Calculate things - stdDev - slope - linear regression - variability - etc - values for the timeseries
Store the triggered timeseries for X amount of time to allow the user to process the anomaly and timeseries as it was, real timeseries data that was used and review the metric, if no action is taken on the anomaly, prune older than X.
Begins to provide training data sets or at least calculated metrics as above about anomalies
Analyzer says this is anomalous, user can evaluate and say:
This is not anomalous at X time range. This is not anomalous on a Tuesday.
Updated by Gary Wilson about 1 month ago
Simple Ionosphere
Some nice simple ideas, yesterday morning and I think it might be workable.
Operator flags as not_anomalous (within a 24 hr period)
Take saved Redis timeseries and: - sum - determine mean - determine median - determine min - determine max - determine 3sigma - determine range - determine range in the 95% percentile - determine count in the 95% percentile - determine range in the 5% percentile - determine count in the 5% percentile
Save not_anomalous details to Ionosphere table
The devil may be in the details
Match entire namespace, wildcarding, may be difficult and expensive, but may not if Redis keyed
Expire training sets and trained results, how long?
Ionosphere before Mirage? May be mute point as should work in both, each with their own metrics as alerts will come from the responsible app and therefore they can be tagged independently.
Workflow
This works for Analyzer and Mirage, only Analyzer is described here as it has the additional task of checking if it is a Mirage metric.
Analyzer -> detect anomaly
Analyzer checks mirage.unique_metrics set, if mirage_metric == True send to Mirage and skip sending to Ionosphere, continue.
Analyzer sends to Ionosphere if not a Mirage metric
Analyzer then checks ionosphere.unique_metrics set, to see if it is an Ionosphere metric, if True, Analyzer skips alerting and continues. Ionosphere will analyze the metric that Analyzer just sent and score it and alert if it is anomalous.
Ionosphere -> calculate a similarity score for the anomalous timeseries based on trained values. If less than x similar, alert, else proceed as normal.
Updated by Gary Wilson 18 days ago
Maybe we took a step - FRESH
In terms of one aspect of machine learning timeseries, tsfresh
The paper is interesting - https://arxiv.org/pdf/1610.07717v1.pdf
Updated by Gary Wilson 1 day ago
Task #1718: review.tsfresh - still in progress
tsfresh possibly does have the potential to fulfill some of the functionality of Ionosphere as described above.
It is not super fast, quite processor intensive, but… lots of features!!!
THE FIRST
o/ before the end of the year!!!
This was the first production Ionosphere matched tsfresh features profile after a year in the waiting and making.
A special thanks to @MaxBenChrist, @nils-braun and @jneuff over at https://github.com/blue-yonder/tsfresh
Well it took a year :) But… it works :)
Branch #922: ionosphere - created 2015-12-26 11:21 AM
Task #1658: Patterning Skyline Ionosphere
ionosphere.log
Then along came learn
After achieving the above first milestone and then the second, etc, etc. A significant amount of time has gone into improving the data presentation to the operator in terms of providing Graphite NOW graphs at various resolutions, etc.
So that I could make better more informed decisions with a fuller picture of the metric and the point anomaly in context, to decide as to whether the alert was anomalous or not. I would open Graphite link and looks at -7h and then change to -24h, -7d and then -30d. So added to Ionosphere UI.
And in that process, one can see learn. Decisions as to whether a point anomaly is contextually anomalous are based on longer than Skyline analyses, which is fine. However if we define that a human operator should not create a features profile if they cannot say that the point anomalous is NOT anomalous at all resolutions, we give Ionosphere multiple resolutions to enable it to train itself.
Ionosphere does not attempt to achieve statistical or scientific accuracy it merely attempts to make 3sigma based anomaly detection methods better. That said there may be some within the data science arena that may wish to argue that a number of things in the Ionosphere learning method would not necessarily hold up to some UCR review or Kaggle competition. Luckily Ionosphere makes no bones in this regard as this is not Ionosphere’s domain space. Ionosphere’s domain space is machine and application metrics, with ambitions for bigger things. Skyline and Ionosphere will find a timeseries Rebra (I reckon) :)
Ionosphere is the culmination of over 24 months of deconstruction and refitting of Etsy’s now much aged Skyline simple Python anomaly detection (complicated stack) application.
Ionosphere began with a very, very small goal. To teach Skyline what things were not anomalous. The journey of trying to build something that would do that went from confused, impossible, no idea …. to a multi-generation one-step learning system, like a timeseries Rebra finder.


- Game_Profile - Class in Game_Structure
-
Game_Profile Class is implemented as a Model class (Project is trying to approach to Model-view-controller design pattern)
This class implemented as a data base for all View and Controller class.
- Game_Profile() - Constructor for class Game_Structure.Game_Profile
-
Construct a new game_Profile setup in GUI_Setup - Default value constructor
- Game_Profile(int, String, String, int, int, int) - Constructor for class Game_Structure.Game_Profile
-
Constructor of dependent variable
Construct with farmer type, farmer name, farm_name, farmer_energy, end_day after getting input from GUI_Setup
- Game_Structure - package Game_Structure
-
- getAge() - Method in class Game_Structure.Game_Profile
-
- getAnimal_chicken() - Method in class Game_Structure.Game_Profile
-
- getAnimal_cow() - Method in class Game_Structure.Game_Profile
-
- getAnimal_goat() - Method in class Game_Structure.Game_Profile
-
- getAnimal_happiness() - Method in class Game_Structure.Game_Profile
-
- getAnimal_healthiness() - Method in class Game_Structure.Game_Profile
-
- getAxe_durability() - Method in class Game_Structure.Game_Profile
-
- getCart_total() - Method in class Game_Structure.Game_Profile
-
- getChop_tree_strumps() - Method in class Game_Structure.Base_Component
-
- getController() - Method in class Game_Structure.GUI_body
-
- getCrop_Plot(int) - Method in class Game_Structure.Game_Profile
-
getCrop_Plot
- getCropURL(String) - Method in class Game_Structure.Farm
-
getCropURL determine the icon to be display on crop plot
- getDay_num() - Method in class Game_Structure.Game_Profile
-
- getEat_burger() - Method in class Game_Structure.Base_Component
-
- getEat_burger() - Method in class Game_Structure.Game_Profile
-
- getEnd_day() - Method in class Game_Structure.Base_Component
-
- getEnd_day() - Method in class Game_Structure.Game_Profile
-
- getFarm_name() - Method in class Game_Structure.Game_Profile
-
- getFarmer_axe() - Method in class Game_Structure.Game_Profile
-
- getFarmer_burger() - Method in class Game_Structure.Game_Profile
-
- getFarmer_corn() - Method in class Game_Structure.Game_Profile
-
- getFarmer_corn_feed() - Method in class Game_Structure.Game_Profile
-
- getFarmer_corn_seed() - Method in class Game_Structure.Game_Profile
-
- getFarmer_energy() - Method in class Game_Structure.Game_Profile
-
- getFarmer_fertilizer() - Method in class Game_Structure.Game_Profile
-
- getFarmer_gold() - Method in class Game_Structure.Game_Profile
-
- getFarmer_lettuce() - Method in class Game_Structure.Game_Profile
-
- getFarmer_lettuce_seed() - Method in class Game_Structure.Game_Profile
-
- getFarmer_mask() - Method in class Game_Structure.Game_Profile
-
- getFarmer_name() - Method in class Game_Structure.Game_Profile
-
- getFarmer_pea() - Method in class Game_Structure.Game_Profile
-
- getFarmer_pea_seed() - Method in class Game_Structure.Game_Profile
-
- getFarmer_pumpkin() - Method in class Game_Structure.Game_Profile
-
- getFarmer_pumpkin_seed() - Method in class Game_Structure.Game_Profile
-
- getFarmer_relic_chair() - Method in class Game_Structure.Game_Profile
-
- getFarmer_tomato() - Method in class Game_Structure.Game_Profile
-
- getFarmer_tomato_seed() - Method in class Game_Structure.Game_Profile
-
- getFarmer_turnip() - Method in class Game_Structure.Game_Profile
-
- getFarmer_turnip_seed() - Method in class Game_Structure.Game_Profile
-
- getFarmer_type() - Method in class Game_Structure.Game_Profile
-
- getFarmer_water_jar() - Method in class Game_Structure.Game_Profile
-
- getFeeding_Chicken() - Method in class Game_Structure.Barn
-
- getFertilizing() - Method in class Game_Structure.Base_Component
-
- getFrame() - Method in class Game_Structure.GUI_body
-
- getGame_Profile() - Method in class Game_Structure.GUI_setup
-
- getGo_Home() - Method in class Game_Structure.Base_Component
-
- getGo_To_Animal() - Method in class Game_Structure.Base_Component
-
- getGo_to_farm() - Method in class Game_Structure.Base_Component
-
- getGUI_setup() - Method in class Game_Structure.GUI_body
-
- getJPanel() - Method in class Game_Structure.Barn
-
- getOpen_Inventory() - Method in class Game_Structure.Base_Component
-
- getPlay_In_Barn() - Method in class Game_Structure.Barn
-
- getPlot_harvest_time() - Method in class Game_Structure.Crop_Plot
-
- getPlot_plant() - Method in class Game_Structure.Crop_Plot
-
- getPrice_axe() - Method in class Game_Structure.Game_Profile
-
- getPrice_burger() - Method in class Game_Structure.Game_Profile
-
- getPrice_corn_seed() - Method in class Game_Structure.Game_Profile
-
- getPrice_fertilizer() - Method in class Game_Structure.Game_Profile
-
- getPrice_lettuce_seed() - Method in class Game_Structure.Game_Profile
-
- getPrice_mask() - Method in class Game_Structure.Game_Profile
-
- getPrice_pea_seed() - Method in class Game_Structure.Game_Profile
-
- getPrice_pumpkin_seed() - Method in class Game_Structure.Game_Profile
-
- getPrice_relic_chair() - Method in class Game_Structure.Game_Profile
-
- getPrice_tomato_seed() - Method in class Game_Structure.Game_Profile
-
- getPrice_turnip_seed() - Method in class Game_Structure.Game_Profile
-
- getPrice_water_jar() - Method in class Game_Structure.Game_Profile
-
- getProfit() - Method in class Game_Structure.Game_Profile
-
- getRelic_aura() - Method in class Game_Structure.Game_Profile
-
- getRelic_chair() - Method in class Game_Structure.Base_Component
-
- getTemp_str() - Method in class Game_Structure.Game_Profile
-
- getTrade_Items() - Method in class Game_Structure.Base_Component
-
- getTrading_market() - Method in class Game_Structure.Base_Component
-
- GUI_body - Class in Game_Structure
-
GUI_body Class is implemented as a View class (Project is trying to approach to Model-view-controller design pattern)
This class implemented to display content to the user and relays user command/action to the Controller.
- GUI_body() - Constructor for class Game_Structure.GUI_body
-
Create the application.
- GUI_body(Game_Profile) - Constructor for class Game_Structure.GUI_body
-
- GUI_setup - Class in Game_Structure
-
This Class is implemented as a View and Controller class (Project is trying to approach to Model-view-controller design pattern)
It create the First frame for game setup with all init of GUI and the setup frame
(I learnt how to use card layout and switch between panel but I decided to keep this frame setup as it shows a progress of learning
and I belive seperating Game Setup and Game body does make the game "cleaner" in some aspect)
- GUI_setup() - Constructor for class Game_Structure.GUI_setup
-
Create the application.
- GUI_setup(Game_Profile) - Constructor for class Game_Structure.GUI_setup
-
Construct the Setup with a Player profile


For the "Description of Incident" field.
# import packages for text processing
import csv
import pandas as pd
import nltk
from nltk.corpus import stopwords
from nltk.stem.wordnet import WordNetLemmatizer
import re
import gensim
from gensim.corpora import Dictionary
from gensim.models import ldamodel
from gensim import corpora, models, similarities
from gensim.models.coherencemodel import CoherenceModel
from gensim.models.wrappers import LdaVowpalWabbit, LdaMallet
import numpy as np
%matplotlib inline
import matplotlib.pyplot as plt
import pyLDAvis.gensim
import warnings
warnings.filterwarnings(action='ignore', category=UserWarning) # To ignore all warnings that arise here to enhance clarity
# load data
Data_Breaches = []
openfile = open("Datasets/Cleaned/Privacy_Rights_Cleaned.csv", "rb")
r = csv.reader(openfile)
for i in r:
Data_Breaches.append(i)
openfile.close()
#convert to pandas
Data_Breaches_DF = pd.DataFrame(Data_Breaches)
#set column names
Data_Breaches_DF.columns = ['Company','Year','Month','Day of Month','City','State', 'Country','Data_Public', 'Breach_Type','Org_Type','Total_Records','Description']
#set total_records to float datatype
Data_Breaches_DF['Total_Records'] = Data_Breaches_DF.Total_Records.astype(float)
#check data
Data_Breaches_DF.head(5)
# put incident description into list
List_Descriptions = []
for i in Data_Breaches_DF['Description']:
List_Descriptions.append(i)
#verify data by looking at a sample
for i in List_Descriptions[0:5]:
print i
# Remove useless numbers and alphanumerical words
documents = [re.sub("[^a-zA-Z0-9]+", " ", text) for text in List_Descriptions]
# tokenize
description_data = [[word for word in text.lower().split() ] for text in documents]
# stemming words: having --> have; friends --> friend
lmtzr = WordNetLemmatizer()
description_data = [[lmtzr.lemmatize(word) for word in text ] for text in description_data]
# remove common words
more_stopwords = set(('would','said','also', 'like','many','way','say','know','may','000'))
stoplist = set(stopwords.words('english')) | more_stopwords
description_data = [[word for word in text if word not in stoplist] for text in description_data]
#remove short words
description_data = [[ word for word in tokens if len(word) >= 3 ] for tokens in description_data]
#make it into a flat list of data
description_data = [item for sublist in description_data for item in sublist]
#word freqeuncy distrobution
fdist_DD = nltk.FreqDist(description_data)
fdist_DD.most_common(50)
#graph of 50 most common words
plt.figure(figsize=(12,6))
fdist_DD.plot(50)
#bigrams
description_bgs = nltk.bigrams(description_data)
fdist_DD_bgs = nltk.FreqDist(description_bgs)
fdist_DD_bgs.most_common(50)
#graph of 50 most common bigrams
plt.figure(figsize=(12,6))
fdist_DD_bgs.plot(50)
#convert to pandas
description_data_DF = pd.DataFrame(description_data)
#Dictionary Creation
# this is text processing required for topic modeling with Gensim
dictionary = Dictionary(description_data)
len(dictionary)
#Corpus Creation
# this is text processing required for topic modeling with Gensim
corpus = [dictionary.doc2bow(text) for text in description_data]
#save the dictionary & corpus
#dictionary.save('Topic_Modeling/Data_Breaches.dict') # store the dictionary, for future reference
#corpora.MmCorpus.serialize('Topic_Modeling/Data_Breaches.mm', corpus) # store to disk, for later use # store to disk, for later use
#find optimal k value
from gensim.models.coherencemodel import CoherenceModel
from gensim.models.wrappers import LdaVowpalWabbit, LdaMallet
#use a range of 2-10 topics
for k in range(2,10):
goodLdaModel = ldamodel.LdaModel(corpus=corpus, id2word=dictionary, num_topics=k, passes=50)
goodcm = CoherenceModel(model=goodLdaModel, corpus=corpus, dictionary=dictionary, coherence='u_mass')
print goodcm.get_coherence()
#Create LDA Topic Model for 2 topics
ldamodel = ldamodel.LdaModel(corpus, id2word=dictionary, num_topics=2, passes=20)
#list model topics
ldamodel.show_topics()
#LSI Model
from gensim.models import CoherenceModel, LdaModel, LsiModel, HdpModel
lsimodel = LsiModel(corpus=corpus, num_topics=2, id2word=dictionary)
# Show topics
lsimodel.show_topics()
The LDA model is much slower to train than the LSI model but appears to have a higher accuracy. The LDA models terms were more organized that the LSI ones which were much more disconnected.
For the classifer modeling, I decided to try a new approach. I'm going to use Azure Machine Learning studio (AZML). https://studio.azureml.net/ . AZML is a different technique that doesn't require any advanced coding but instead uses individual function nodes and wiring to show data flows. It contains multiple classification algorithms as well as data cleaning nodes and model evaluation. Using this system, I found it much easier to run multiple algorithms against each other and compare the outputs. It also has the ability to easily convert a trained model into a web service for easy production use.
The basic steps are the same to using a programming languaged based system
1. Create/Upload datasets
2. Clean/process the datasets
3. Split the data into training/testing sets
4. Train models
5. Evaluate the models.
This is an example of the AZML page which is browser based. You have the functions node selection on the left side, the workspace/data flow in the middle and node properties on the right hand side
from IPython.display import Image
Image("img/AZML/Overall.png")
This shows the steps I took to train a multi classifier model.
1. Import the dataset, which was already uploaded. This is the same dataset from the cleaning steps prior to this.
2. Select columns, remove columns were not going to use for the model.
3. Edit Metadata, this node changes the datatype from a string to a categorical for "Type of Breach" and "Type of Organization".
4a. This is an import of a second dataset, the Stop Words list from NLTK.
4b. Text Processing, this is a data cleaning step. It does cleaning and pre-processing like i did in topic modeling. The steps are 1. remove stop words (from the attached NLTK dataset) 2. Lemmatization, 3. normalizes words to lowercase 4. removes numbers 5. removes special characters 6. Remove duplicated characters 7. Remove URLS 8. Expand verb contraction.
5. Select columns, remove non-cleaned text column
6. Split Data, this is the split to training & testing datasets. I used 70% training and 30% testing.
7a. Model selection, this is which model will be trained
7b. Train Model, the actual model training.
8. Score Model, this is where the model gets scored when compared with the testing dataset
9. Evaluated Model, this is where it shows the metric of the score.
Because all of the steps except for selecting the model were the same to test a new model, it was easy to test multiple models by just replacing the one node a 7a. You can also duplicate the 7b and 8. nodes and run another model in a parallel.
Image("img/AZML/model_training.png")
This is a closeup of the settings for the text processing step 4b.
Image("img/AZML/text_processing.png")
This is the comparison of the models in parallel.
Image("img/AZML/multiple_models.png")
For predicting Breach Type, I trained basic models with default settings using the following algorithms and comparied the accuracy results.
"Type of Breach"
| Algorithm | Overall Accuracy |
|---|---|
| Multiclass Decision Forrest | 0.362 |
| Multiclass Decision Jungle | 0.355 |
| Multiclass Logistic Regression | 0.339 |
| Multiclass Neural Network | 0.346 |
These were all incredibly close to each other but Decision Forrest had the best overall accuracy of 0.362, but that is still very low.
This is the evauation results from the Decision Forrest algorithm.
Image("img/AZML/type_of_breach_eval.png")
The same models are easily re-run for prediction the type of organization by changing the column selection in step 5. to Type of Organization instead of Type of Breach and then changing the train model node in step 7b. to predict Type of Organization".
Algorithm results for predicting "Type of Organization".
| Algorithm | Overall Accuracy |
|---|---|
| Multiclass Decision Forrest | 0.487 |
| Multiclass Decision Jungle | 0.487 |
| Multiclass Logistic Regression | 0.486 |
| Multiclass Neural Network | 0.487 |
The orgininal dataset contains 49% "medical provider" so the algorithms predict that result almost 99% of the time leading to that accuracy. So the models are overfitting. Additonal work will be required to try to correct that.
This is the evauation results from the Decision Forrest algorithm.
Image("img/AZML/type_of_org_eval.png")


Class: Dir
- Inherits:
-
Object
- Object
- Dir
- Defined in:
- lib/sprout/dir.rb
Class Method Summary (collapse)
-
+ (Boolean) empty?(path)
Return true if the provided path has no children.
Instance Method Summary (collapse)
-
- (Boolean) empty?
Return true if the directory has no children.
Class Method Details
+ (Boolean) empty?(path)
Return true if the provided path has no children.
Code found here: www.ruby-forum.com/topic/84762
19 20 21 |
# File 'lib/sprout/dir.rb', line 19 def self.empty? path new(path).empty? end |
Instance Method Details
- (Boolean) empty?
Return true if the directory has no children.
Code found here: www.ruby-forum.com/topic/84762
8 9 10 11 12 13 |
# File 'lib/sprout/dir.rb', line 8 def empty? Dir.glob("#{ path }/*", File::FNM_DOTMATCH) do |e| return false unless %w( . .. ).include?(File::basename(e)) end return true end |


{% include 'base-header.html' %}
"Runbook makes reacting to system issues fast and predictable. Without requiring manual intervention."
"Runbook helped us get to 100% availability for our API, and 0% headaches with their simple integrations to existing services. Their team is absolutely awesome for support and new feature requests."


Endless Plains [am76], plain, in Imperia, peasants: 153
Last updated Turn #144
Endless Plains [am76], plain, in Imperia, peasants: 153
------------------------------------------------------------------------
8: Drummond [x8q], Imperial Empire, with 42 soldiers, arrived from the
8: west, accompanied by:
8: Fortuis [h1m], Imperial Empire, with 26 soldiers
8: Veronica [m8d], Imperial Empire, with 21 soldiers
8: Qwerty Uiop [y8j], Imperial Empire, with ten workers
9: Garrison [hg0m], garrison, Imperial Empire, with ten soldiers now
9: guards Endless Plains [am76].
13: Stack of nazgul [ah1v] attacks Drummond [x8q]!
13:
13: Stack of nazgul [ah1v], nazgul, number: 3
13:
13: Drummond [x8q], Imperial Empire, with 32 soldiers, accompanied by:
13: Fortuis [h1m], Imperial Empire, behind 9, with 26 soldiers
13: Veronica [m8d], Imperial Empire, behind 9, with 21 soldiers
13: Qwerty Uiop [y8j], Imperial Empire, behind 9, with ten workers
13:
13: Initial missile round for the defense (Drummond [x8q]):
13: Zero missile hits!
13:
13: Combat round: one
13: Melee phase:
13: Stack of nazgul's forces hit three times.
13: Drummond's forces miss!
13: Drummond [x8q] loses three soldiers [12].
13: Combat round: two
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Drummond [x8q] loses two soldiers [12].
13: Combat round: three
13: Melee phase:
13: Stack of nazgul's forces hit three times.
13: Drummond's forces miss!
13: Drummond [x8q] loses three soldiers [12].
13: Combat round: four
13: Melee phase:
13: Stack of nazgul's forces hit three times.
13: Drummond's forces miss!
13: Drummond [x8q] loses three soldiers [12].
13: Combat round: five
13: Melee phase:
13: Stack of nazgul's forces hit three times.
13: Drummond's forces miss!
13: Drummond [x8q] loses three soldiers [12].
13: Combat round: six
13: Melee phase:
13: Stack of nazgul's forces hit three times.
13: Drummond's forces miss!
13: Drummond [x8q] loses three soldiers [12].
13: Combat round: seven
13: Melee phase:
13: Stack of nazgul's forces hit three times.
13: Drummond's forces miss!
13: Drummond [x8q] loses three soldiers [12].
13: Combat round: eight
13: Melee phase:
13: Stack of nazgul's forces hit three times.
13: Drummond's forces miss!
13: Drummond [x8q] loses three soldiers [12].
13: Combat round: nine
13: Melee phase:
13: Stack of nazgul's forces hit three times.
13: Drummond's forces miss!
13: Drummond [x8q] loses three soldiers [12].
13: Combat round: ten
13: Melee phase:
13: Stack of nazgul's forces hit three times.
13: Drummond's forces miss!
13: Drummond [x8q] loses three soldiers [12].
13: Combat round: 11
13: Melee phase:
13: Stack of nazgul's forces hit three times.
13: Drummond's forces miss!
13: Drummond [x8q] loses three soldiers [12].
13: Combat round: 12
13: Melee phase:
13: Stack of nazgul's forces hit three times.
13: Drummond's forces miss!
13: Fortuis [h1m] loses two soldiers [12].
13: Veronica [m8d] loses one soldier [12].
13: Combat round: 13
13: Melee phase:
13: Stack of nazgul's forces hit three times.
13: Drummond's forces miss!
13: Veronica [m8d] loses three soldiers [12].
13: Combat round: 14
13: Melee phase:
13: Stack of nazgul's forces hit three times.
13: Drummond's forces miss!
13: Fortuis [h1m] loses one soldier [12].
13: Veronica [m8d] loses one soldier [12].
13: Qwerty Uiop [y8j] loses one worker [11].
13: 7 workers [11] break and leave the battle!
13: Combat round: 15
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces hit one time.
13: Stack of nazgul [ah1v] loses one nazgul [55].
13: Veronica [m8d] loses one soldier [12].
13: Qwerty Uiop [y8j] loses one worker [11].
13: Combat round: 16
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Fortuis [h1m] loses one soldier [12].
13: Veronica [m8d] loses one soldier [12].
13: Combat round: 17
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Fortuis [h1m] loses one soldier [12].
13: Veronica [m8d] loses one soldier [12].
13: Combat round: 18
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Fortuis [h1m] loses two soldiers [12].
13: Combat round: 19
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Fortuis [h1m] loses one soldier [12].
13: Veronica [m8d] loses one soldier [12].
13: Combat round: 20
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Fortuis [h1m] loses one soldier [12].
13: Veronica [m8d] loses one soldier [12].
13: Combat round: 21
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Fortuis [h1m] loses one soldier [12].
13: Qwerty Uiop [y8j] loses one worker [11].
13: Combat round: 22
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Fortuis [h1m] loses two soldiers [12].
13: Combat round: 23
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Fortuis [h1m] loses one soldier [12].
13: Veronica [m8d] loses one soldier [12].
13: Combat round: 24
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Veronica [m8d] loses two soldiers [12].
13: Combat round: 25
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Fortuis [h1m] loses two soldiers [12].
13: Combat round: 26
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Fortuis [h1m] loses two soldiers [12].
13: Combat round: 27
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Veronica [m8d] loses two soldiers [12].
13: Combat round: 28
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Veronica [m8d] loses two soldiers [12].
13: Combat round: 29
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Fortuis [h1m] loses one soldier [12].
13: Veronica [m8d] loses one soldier [12].
13: Combat round: 30
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Fortuis [h1m] loses one soldier [12].
13: Qwerty Uiop [y8j] suffers a hit!
13: Combat round: 31
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Fortuis [h1m] loses two soldiers [12].
13: Combat round: 32
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Fortuis [h1m] loses one soldier [12].
13: Veronica [m8d] loses one soldier [12].
13: Combat round: 33
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Fortuis [h1m] loses two soldiers [12].
13: Combat round: 34
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Fortuis [h1m] loses one soldier [12].
13: Veronica [m8d] loses one soldier [12].
13: Combat round: 35
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Veronica [m8d] loses one soldier [12].
13: Combat round: 36
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Fortuis [h1m] loses one soldier [12].
13: Combat round: 37
13: Melee phase:
13: Stack of nazgul's forces hit one time.
13: Drummond's forces miss!
13: Veronica [m8d] suffers a hit!
13: Combat round: 38
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces miss!
13: Fortuis [h1m] suffers a hit!
13: Combat round: 39
13: Melee phase:
13: Stack of nazgul's forces hit two times.
13: Drummond's forces hit one time.
13: Stack of nazgul [ah1v] loses one nazgul [55].
13: Drummond [x8q] suffers a hit!
13:
13: Stack of nazgul [ah1v] is victorious!
13:
13: Stack of nazgul lost two nazgul.
13:
13: Drummond lost ten workers, 79 soldiers.
13: Drummond [x8q] was taken prisoner.
13: Fortuis [h1m] was taken prisoner.
13: Veronica [m8d] was taken prisoner.
13: Qwerty Uiop [y8j] was taken prisoner.
13:
14: Stack of nazgul [ah1v] slays Drummond [x8q] in cold blood.
14: Stack of nazgul [ah1v] slays Fortuis [h1m] in cold blood.
14: Stack of nazgul [ah1v] slays Veronica [m8d] in cold blood.
14: Stack of nazgul [ah1v] slays Qwerty Uiop [y8j] in cold blood.
18: His Benevolent Goodness Lord William of Pacifica [l8j], refugee,
18: arrived from the east.
20: His Benevolent Goodness Lord William of Pacifica [l8j], refugee, went
20: west.
25: Sorrow [f7m], refugee, with one peasant, arrived from the north.
26: Rond Mertian [w2j], refugee, arrived from the south.
27: Sorrow [f7m], refugee, with one peasant, went south.
30: The population grows by one peasant.
Province controlled by Hyksos Keep [y57], castle, in Imperial
Mountains [ao73]
Ruled by The Bard [s2a], duke
Entrance fees:
Routes leaving Endless Plains:
North, plain, to Endless Plains [al76], 7 days
East, plain, to Endless Plains [am77], 7 days
South, plain, to Endless Plains [an76], 7 days
Garrison [bf6l], garrison, Imperial Empire, with three soldiers
West, plain, to Endless Plains [am75], 7 days
Seen here:
Garrison [hg0m], garrison, Imperial Empire, with six soldiers
Stack of nazgul [ah1v], nazgul
Sorrow [f7m], refugee, with one peasant
Rond Mertian [w2j], refugee


Who Is JSON And Why Should I Care?
November 17th, 2014
When I was Googling for JavaScript methods yesterday, I kept reading references to this guy named JSON, and I decided I needed to figure out what this guy is all about. Okay, so I knew that JSON wasn’t really a guy, and maybe that is a bad joke, but I was still curious about what exactly JSON does and how it is related to JavaScript. This is a brief introduction to JSON and at the end I include some resources for more information.
JSON stands for: JavaScript Object Notation. It is a lightweight data-interchange format. In layman’s terms, this means that it is a way to store information in an organized, easy to access manner. JSON uses JavaScript syntax, but the JSON format is text only which means it can be read and used as a data format by any programming language.
JSON is built on two universal data structures; a collection of name/value pairs and an ordered list of values. Most modern programming languages support these structures, which helps make the data format interchangeable with these languages. In JavaScript these structures are called objects and arrays. Below is a JSON data example, notice that it is identical to an object in JavaScript:
AJAX makes it important for sites to be able to load data quickly and asynchronously (in the background without delaying page rendering). The main benefit of JSON is that it can be loaded asynchronously much more easily than XML/RSS alternatives. The example below illustrates how much simpler JSON is compared to XML:
This has been a very brief introduction to JSON. I wanted to write this post to give me a basic understanding of what exactly JSON is because of how often it kept popping up when I was researching JavaScript. Please visit the links below for more details on how to use JSON.
www.json.org
www.w3schools.com/json
www.copterlabs.com/blog/json-what-it-is-how-it-works-how-to-use-it/
Thanks for reading.