Welcome to this introduction to the world of Docker, if you want to learn a new technology, discover a DevOps tool or understand how you can make your life as a developer or system administrator easier, then look no further!
You might not become expert at the end of the day, but you will have gathered enough knowledge to improve your skills and set of tools. Furthermore, you will know how to use Docker, create your own container, make a custom development environment and deploy very easily with Docker.
Notice that this Github page is nothing more than a guide to help you through the learning process. I take the stance that to learn you need to exercise but even more importantly research. As such you won't be given every piece of info on the technology but the very basics and you will be advised to go to the doc or ask questions to have a deeper understanding and finish this workshop with success.
Before anything we will have to install docker and configure it for the first time. Sadly and as is often the case in computer science, there is no one way to install for all the operating system, but don't dispear it's an easy process noneless.
On a linux distribution Docker is as simple to install as using your package manager.
sudo apt-get install docker
sudo pacman -S docker
You could also install Docker manually, refer to the website for more info.
For windows, you can find the Docker community edition by following this link and the instruction to install.
DownloadFor Mac, you can find the Docker community edition by following this link and the instruction to install.
DownloadDocker can be controlled with a plethora of commands in the terminal. These commands can vary from helping you run, create, analyze and much more. Yet, if you wanted to learn all of them it would take you more than a day no doubt, which is why, in the table below, you will found a selection of the most important ones as well as a small description.
| Commands | Descriptions |
|---|---|
| pull | Pull an image on your local machine |
| run | Pull and run an image on your local machine |
| build | Create an image from a Dockerfile |
| ps | List the containers on you system and their infos |
| images | List the images on your system and their infos |
| rm | Remove a container from your system |
| rmi | Remove an image from your system |
As said before there are more commands associated with Docker but if you understand the ones above you're already set for a good start. However, for more info, you can use man docker command on any unix system or follow this link to some documentation.

Let's say you want a container with Ubuntu and a couple of packages already installed, plus you want it to execute a bunch of commands automatically for you. Let's look at an example:
From ubuntu
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
CMD echo "Hello world, I'm up to date."
This example can be decomposed as such, the first command of each line is part of the Dockerfile syntax followed by instruction in regard to that command. The said instruction, in the example above, are: the canvas of our image (FROM) of which you can have multiple, bash commands to execute during the creation of the container (RUN) or after it's creation (CMD). Note that you can only use "CMD" once per Dockerfile as it's set the entrypoint with an executable or a default application, like bash.
During this first part on Dockerfile we won't go much further as we shall see more complex features during the second part, but for more info here is a link to some documentation.
The best way to learn being to practice hero comes some exercises to put yourself to the test.
Pull the image "busybox"
List the existing image(s)
Run the image "hello-world"
List all the existing container(s)
Run a container "busybox" with an interactive terminal
Run a container "busybox" with an interactive terminal and the current directory as mounted volume inside the "test" directory of the container
Remove the existing container(s)
Remove the existing image(s)
Create, build and run a custom image with a Dockerfile based on "busybox" and make it output the sentence "I created my first custom image"
If you finished all the exercises before the time is up, you should either help others or improve your skills with what you learned so far.
Here comes the biggest part, we will be working on Dockerfile and Docker-Compose until 15:00. Don't worry it won't be all theory, on the contrary the goal for this part being for you to create your own development environment.
Now that you are a little more experienced with Dockerfile we will sink deeper into the rabbit hole. You can tweaks a lot of things with the help of the Docker syntax, the files you want to use, the port on which your container is listening, etc ... So during this part we will explore some of these advance features by first looking at an example:
FROM python:latest
WORKDIR /Dockerfile
ADD . /Dockerfile
RUN pip install -r requirements.txt
EXPOSE 80
ENV NAME="Marvin"
CMD ["python", "app.py"]
In this example we use the latest python version, we then tell the container that we want to work in the directory Dockerfile (for the next commands) and mount the local directory Dockerfile inside the container. After which we run a command to install dependencies, make the container listen on the port 80, create a variable of environment (NAME) and finally run the application.
By itself that might not seems like much, but you must realise that with this dockerfile you create an environment allowing you to run a python and use env variable. You can find all the files necessary to play with that example here.
The example above as shown you a couple of new features, to help you in your exercises here is a table showing them to you with a small description.
| Dockerfile element | Descriptions |
|---|---|
| FROM | Initialize the build by choosing a base image |
| RUN | Execute a command as a new layer in the image, during it's creation |
| CMD | Execute a command or set a default, there can be only one CMD per Dockerfile |
| WORKDIR | Sets the working directory for the other instructions |
| ADD | Mount files from the host to the filesystem of the container |
| EXPOSE | Tell Docker that the container is listening on the specified port |
As always you can go further and discover how much more powerful you can get!!!! For more info a link to some documentation on Dockerfile.
Create a Dockerfile based on php and make it execute a php server (the native server to php)
Use that container to create a php application and run it
Modify you Dockerfile and install laravel on it
Dockerfile are a very handy tool but that doesn't help you a lot when it comes to having simple container working together. As one of the core concept of Docker is to have one container per service for ease of comprehension, modification and management.
In that optic, we shall learn about Docker-compose, a tool created to put in relation multiple container by building them through a special configuration file (written in yaml) You will soon come to realise that a big part of the things you did in your Dockerfile will be done into a Dockercompose file now, but that in no way means you are done with them. For a better understanding, here comes an example:
version: '3'
volumes:
database_data:
driver: local
services:
nginx:
image: nginx:latest
ports:
- 8080:80
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
php:
build: ./php/
expose:
- 9000
volumes:
- .:/var/www/html
mysql:
image: mysql:latest
expose:
- 3306
volumes:
- database_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: project
MYSQL_USER: project
MYSQL_PASSWORD: project
This example might be long and seem complex but all it does is, instancing the version for the Docker-compose syntax, define the volumes and setup the services.
The first service used is nginx, for the server side, we tell it that we want the last version of nginx, we also ask the service to listen to the port 80, to be linked to the host on the port 8080 and finally to load the configuration file (stored locally) to it's rightful place inside the container.
Then comes the php service which create a custon image build based on a Dockefile stored locally, then we ask it to listen to the port 9000 and load and file in the current directory of the host to the location "/var/www/html"
Finally, we have the mysql service, we first ask it to use the last image possible then to listen to the port 3306, mount the database and we finish by setting up environment variables.
Ones again this file is part of bigger example, if you want to see it click here.
As all this might be a little to much to take in one shot, here is a table summarizing it with a small description.
| Docker-compose element | Descriptions |
|---|---|
| version | Sets the version for the Docker-compose syntax |
| volumes | Mount host path or named volumes |
| services | Sets the different container of the application, as sub-options |
| image | Tell Docker-compose to use the said image to build the container |
| ports | Link the host and the container port |
| expose | Tell the container to listen on the said port |
For more info a link to some documentation on Docker-Compose.
Create a Docker-compose with php, apache and mysql
Develop a small app to test the services
Replace apache by httpd
Ones you are finished you should start creating your custom development environment and if you're so quick that it's also finished before the end of this part, then share your wisdom to your neighbors.
There are many ways to deploy an application that as been developed with a Docker environment, but we will only see one of them here. The goal being to understand how easy it makes the deployment process to have the same environment to develop and deploy.
To deploy on a server or local machine you must install Docker, build your image and run the application as you would on your local machine.
docker build -t myimage .
docker run myimage
It's a very easy process, but tedious as you must do everything manually. A solution could be to create a small script automating the ordeal, but it wouldn't be compatible on every operating system.
You could also put your image on a dockerhub repository and simply pull and run it whenever necessary. If you put the Dockerfile on a Github repository you will of course have to pull it with git.
docker pull myimage
docker run myimage
If you have enough time you should try to automate the process, use any technology, as long as it makes everything simpler.
Develop an application with the environment you created yourself during the last part
Deploy your application on the machine of one your neighbors
Your used to it know if you're so quick that you put me to shame then help you friends, or go search the web for more information.
Here we are the workshop is finished, I hope you enjoyed and learned a lot during our time together. After all, we learned enough of Docker today for you to know if you want to spend more time using it or not. Now would probably be a good time for a little debrief.


{% extends 'base.html'%} {% import 'macros.html' as macro%} {% block styles%} {{ super() }} {% endblock %} {% block content%}
A simple application that will help list and preview news articles from various sources
Tap the buttons below to choose news sources by category. Then click on news source to view
General Business Technology Sports Entertainment


- SeeWithEars - Class in <Unnamed>
-
- SeeWithEars() - Constructor for class SeeWithEars
-
- SeeWithEars.FrequencyTable - Class in <Unnamed>
-
Class that calculates the used frequencys.
- SeeWithEars.Hilbert - Class in <Unnamed>
-
Class that sorts the pixels in the order of the hilbert curve.
- SeeWithEars.SoundProcessing - Class in <Unnamed>
-
Class that handles the sound representation.
- SeeWithEars.WebcamCapture - Class in <Unnamed>
-
Class that is used to initialize the Webcam and to fetch the images for the application.
- settings() - Method in class SeeWithEars
-
- setup() - Method in class SeeWithEars
-
Starting point of the program.
- sortedPixels - Variable in class SeeWithEars.SoundProcessing
-
Array containing the sorted pixels
- sortPixels(int[], float[], int) - Method in class SeeWithEars.Hilbert
-
Recursive function that sorts the pixels.
- SoundProcessing() - Constructor for class SeeWithEars.SoundProcessing
-
- sp - Variable in class SeeWithEars
-
The SoundProcessing object is used to initialize the sine oscillators and play them.
- state - Variable in class SeeWithEars.Hilbert
-
The state is used to determine which pixels is added next.
- state - Variable in class SeeWithEars
-
The Variables for the state Machine


Their first album pretty much defined the style we know as “bathtub reggae”, the follow up sounded like a swarm of hornets trapped in a funeral parlour, and now top beat combo Brute Beauty And Valour And Act, Oh, Air, Pride, Plume, Here / Buckle! are storming the charts again with their new release. It's a box set of cover versions of the seven Sibelius symphonies, recorded in what might best be described as Ivesian pillow-talk progpunk doo-wop. Fatima Gilliblat talked to the band outside a kiosk on a crumbling seaside pier.
Fatima : It's very windy.
Band : Yes. And have you noticed how the gulls seem tense, as if awaiting orders from some sort of gull-god?
Fatima : I am holding tight to my choc ice, for I fear it might be snatched by one of these rapacious scavenging birds.
Band : But that's the point… you see how they are just hovering, not swooping down to the pier at all, despite that pile of discarded wafers and toffee apples and seaside resort cocktail sausages in puff pastry?
Fatima : Yes, that is curious. Perhaps they're not hungry.
Band : [Hollow laughter.] Gulls are always hungry.
Fatima : Well, anyway, let's talk about this new album.
Band : Wait! See, there is broiling and tumult in the clouds over to the west.
Fatima : So there is.
Band : The gull-god is come! Put aside your choc ice, Ms Gilliblat, and clamber on to this makeshift altar we have cobbled together from rotting pier-planks and seaweed.
Fatima : OK, if you say so. But why?
Band : Because we are going to sacrifice you to the gull-god of course, and tape the blood-curdling savagery, and then pop back to the studio to incorporate the field recording into our next album.
Fatima : How exciting to think that I shall give my life for the cause of experimental sound art!
Band : That's the spirit!
Unfortunately, soon after this interview, the band split due to “artistic differences”. The latest news is that they have called a truce and are getting it together in the country, so we may yet hear Fatima Gilliblat's electronically-manipulated death throes.
UPDATE : Apparently, Fatima survived. She is in fact a descendant of mythical giant crows, and tore the gull-god to pieces with the power of her corvine brain.


In 2007, Jackie Marshall founded S&J Grab Limited, proving that a woman can make it in what is still today, a man's industry. Over the years, she has grown the business from a single grab wagon to a large fleet of vehicles and plant machinery. Through her perseverance against animosity and her dedication to providing a great service, she has proven that S&J Grab are a leading company in utility servicing, ground works, aggregate supplies and spoil removal.
Still growing and finding new ways to support the building and roadwork industries, this family firm is large enough to take on the biggest jobs, yet small enough to take pride and care in all their work.


/contents
and not /_site
.(WIP)
(Aiming to script this process eventually)
Clone the repo to your local computer.
In the student's markdown, ensure that the Navbar, heading and edit links are included. E.g.:
<frontmatter>
pageNav: 2
header: header.md
footer: footer.md
siteNav: site-nav.md
</frontmatter>

# Tell, Don't Ask

[Edit the material here! :fas-pen:](https://github.com/nus-cs2030/1920-s2/edit/master/contents/textbook/lecture01/tellNotAskAndPrivateAccessModifiersSummary/index.md)

###
Add the link to the student's new document within textbook.md accordingly:
* [Introduction to Imperative Programming](lecture01/imperativeProgramming/imperativeProgramming.html)
* [Abstraction](lecture01/abstraction/abstraction.html)
* [new document title](lecture01/newPR/newPR.html)
Commit and push your files after building and testing it locally.
Go to commits and click the yellow dot > details to see your progress.
Wait for Travis CI to run checks and push your changes to the gh-pages branch.
You should see it live on the GitHub page!


abstract fun toProxy(obj: OBJ): PROXY
Should facilitate the conversion of the third party object into the serializable local class specified by PROXY


Similarity & Differences
Design Thinking Process
Key Points for UX/UI Design
Wireframing & Prototyping
Good VS Bad Designs (example)
Question ?
A User Experience (UX) designer is responsible for designing the experience that users have when interacting with a product.
improving the usability, ease of use, and pleasure provided in the interaction between the customer and the product
User Interface design, or UI, focuses on incorporating a visual hierarchy into a design for the user to follow.
Both elements are crucial to a product and work closely together. But despite their professional relationship, the roles themselves are quite different, referring to very different parts of the process and the design discipline.
is An iterative interrogative technique that fits perfectly to elaborate a project planning.
Focus on the Experience
Make it Easy (Simplicity)
Make it scannable (use simple terms, Sentences, Images)
Use a Clear Call to Action (Use a clear label)
Assure SEO fundamentals are in place (URL, Title, Meta Description)
Click here for more details


LOGIN REGISTER
HOME
ACCOMODATION
GALLERY
FEATURES
NEWS
CONTRACTS
0123 456 789
BOOK YOU
ROOMS
WELCOME TO HOTEL
-♣-


Hey Dom,take care of the color
These button changes the back ground color
This is the text which will change whenever the mouse moves


For the next few weeks I am going to highlight some useful scripts that you can use today no matter how experienced or how much of a novice you are at PowerShell. These scripts are immediately practical and yet by taking a look at the structure of the script and how we are using the facilities of the PowerShell scripting language, we can learn a lot about how to write our own scripts.
Do you have certain software that tends to write a lot of data to disk but isn’t great about cleaning it up? Is there one specific directory you want to monitor and be alerted to once that directory’s size grows above a certain threshold? This script does that: it looks at a specific path, monitors the size of a directory, and if it grows above a threshold value, it fires a warning message to the server console session and also writes an event (event ID 9990, to be specific) to the Application event log.
Add-Type -Assembly System.Windows.Forms
New-EventLog -LogName Application -Source “Folder Size PowerShell Script”
$Threshold = 1024 * 1024 * 1024
$Path = “c:\directorytomonitor”
$WarningMessage = “The size of folder $Path exceeds the space threshold that has been established.”
$scratchpad = Get-ChildItem $Path | Measure-Object -Property Length -sum
$Value = $scratchpad.sum
if( $Value -gt $Threshold) { Write-Warning $Message Write-EventLog -LogName Application -Source “Folder Size PowerShell Script” -EntryType Information -EventID 9990 -Message $WarningMessage $ScriptResult = [System.Windows.Forms.Messagebox]::Show($WarningMessage) }
This one is fairly straightforward to walk through. First, we set up a bunch of variables to hold the directory we want to monitor, the threshold at which we want to be alerted, the message to be written out in the event the threshold is breached, and then the GCI to grab the size property from the path object. There is then simple logic equation: if that value is greater than threshold, then we’ll fire a warning message and write a new event log entry. Pretty easy.
hat tip to Paul Wolfson of Dallas Legal Technology


Hi, I'm Sydney. I grew up in Orange County, California, and now attend Cal Poly San Luis Obispo. I'm currently pursuing an undergraduate degree in Business Administration for Accounting and a minor in Psychology. I'm interested in following a career path in accounting and obtaining my CPA license.


Change the design to (pre-)register listeners by name. Then init entries and typeNames should not be necessary.
The tricky parts of this approach is what happens if you register after the log has started being played forward?
Conflict handling is also still tricky.


Sinoroc
Projects
tox-poetry-dev-dependencies
Tox plugin to help working with Poetry-based projects
Python package index:
Repositories:
deptree
Display installed Python projects as a tree of dependencies
Python package index:
Repositories:
toolmaker
Make isolated single-file builds of Python tools using zapp, shiv, or pex
Python package index:
Repositories:
zapp
Build single-file Python applications easily
Python package index:
Repositories:
kb
Bits of knowledge
Mirrors:
Repositories:
rapids
REST APIs documented and sensible
Python package index:
Repositories:
dotfiles
Repositories:
Social coding profiles
sinoroc on GitHub
sinoroc on GitLab
sinoroc on StackOverflow
sinoroc on Python Discuss


Fri Dec 1, 2006
…by using the power of social networking. Most of us living in today’s low-trust world have call display on our phones. Yet, what do you do if the number is unrecognized? If you’re like me, you just let unidentified numbers go through to your voicemail. But what if they don’t leave a message?  What if it was your long lost uncle from Barbados? What if you finally won one of those quick getaway competitions you keep filling out entries for at your local grocery store?
The answer can be found at an unobtrusive little website called Who Called Us. I’ve been using it for a while with excellent results. All you do is type in the suspicious number. Chances are, they’ve bugged other people who have recorded it here. I’ve done this to avoid calls from unscrupulous insurance companies and credit card companies who will call relentlessly for weeks until they give up. Unsurprisingly, most of the numbers in the database are from U.S. based companies (they are ruthless down there, especially if your number’s listed), but it works for Canadian numbers too.
But what do you do if your call display doesn’t even provide you with a number? If all you have is an unavailable to go on, you may want to pick up. Imagine your disappointment when you here the dreaded “Good evening Mr/Mrs [insert mangled pronunciation of name here]”. In that case, have this direct marketing counterscript form ready and give the telemarketer a taste of their own medicine. I haven’t resorted to using this yet, but I imagine it would be great fun!


Foodie Fun
This will be our slogan/tagline
This will be replaced with foodie fun facts and marketing info on wednesay
This will be replaced with foodie fun facts and marketing info on wednesay
This will be replaced with foodie fun facts and marketing info on wednesay
This will be replaced with foodie fun facts and marketing info on wednesay


Sandy Creeks Resort offers 236 spacious cabins with both garden and sea view options for travelers looking to enjoy and explore the liveliest location on Africas East Coast.
Guestrooms have been specifically designed to provide paramount comfort and luxury for all our clients. Guests may utilise leisure facilities across the resort including 3 swimming pools, dining areas and much more.


Idukki
Idukki, a landlocked district of Kerala, is one of the most nature-rich areas in Kerala with more than half of the area covered with forest. This rugged hill resort is known for its wildlife sanctuaries, beautiful bungalows, tea factories, rubber plantations and forests.
Hill View Park
Located just about a kilometre from the Idukki city centre, the Hill View Park is set up approximately 350 feet from the Idukki dam. As the name suggests, Hill View Park is one such places in Idukki that offers spectacular views of the Cheruthoni and Idukki Dams.
idukki arch dam
Idukki Arch Dam, an engineering marvel, is located in the South-Indian state of Kerala. It is an arch dam with a double curvature and is built on River Periyar. Precisely, the dam is constructed in a gorge between two hills, Kuravathi and Kuravan. It is at the height of about 550 feet and is a breathtaking sight in the otherwise rugged terrain along which has been built.


--- layout: post title: Quality Assurance categories: [] status: pending type: post published: false meta: _edit_last: '4' ---
One of the activities that is always involved in software is quality assurance. What
does that mean to Headspring and is that a focus that Headspring would ever cut time
from to ensure a timely delivery?
First and foremost, quality should be supreme and prioritized above quantity. Here
at Headspring we are all
about quality, even to the point where every project comes with a comprehensive warranty
that is included with a project's price from start to finish and after an initial
project finishes we offer an additional warranty that may continue year over year
warranting against any software failure that is encountered as a result of a defect.
(We will fix defects at no charge.)
During projects, we don't charge by the hour our rent talent. We only charge from
results. Our clients need software of a certain quality capacity. We are going to
deliver results. If we mess up and there are quite a few defects and the software
fails, per our warranties, it is our problem and we will resolve it. We're selling
end results hands down. That's it. The way we're structured as a business centers
in quality and requires quality in order to operate.
In fact, we do not have anyone on staff with the title of "tester." Now let that sink
in a little bit. How do we have such high quality requirements, yet not have anyone
on staff with the title of "tester?"
Schedule and budget risk may be introduced by developing too much software, so features
(before being codified) should be:
Then the remaining gap to fill in development may be summarized by asking: "Now that
the software is working, is it exactly as the approved specification?"
Pervasive in the entire process is automated testing at every level of the software,
and the full system testing is the most important.
There is a fad going on within the industry with unit testing, and, yes, unit testing
is important, but full system testing is where the rubber meets the road. While all
of your unit tests may pass your software may still fail if a file format is wrong.
The system tests are going to fail when there is a problem. The unit tests help developers
narrow in on problems quickly.
We recommend automated testing in general along with frequent builds and frequent
deployments to UAT environments to be put in front of a client so that they may do
the final inspection and close the long loop that has all the checkpoints along the
way. You have to sew the process together with frequent UAT checkpoints, frequent
milestone deliveries, and lots and lots of communication.
On average we like to close the loop every two weeks. For our larger and more risky
projects we do it every week to mitigate risk. On smaller projects, interestingly
enough, it has even gone out to three weeks and four weeks. In this, we find that
there is an inverse proportion between the size of a project and the length of the
iteration.
for the requirements process and automation of software. If there are no software
testers on staff, how does the automated testing happen?


Purpose
The <map> element is used to define a map which describes the relationships among a set of DITA topics. Maps consist of references to topics organized into hierarchies. Maps provide a way to express these relationships in a single common format that can be used for different outputs, such as to aggregate related topics for a single print job.The containing element for a map is the <map> element, which can take title and id attributes. Within the map, use the <topicref> element to add and organize references to the topics.
Attributes
| Name | Description | Data Type | Default Value | Required? |
|---|---|---|---|---|
| title | An identifying title for this element. | CDATA | #IMPLIED | boolean: no |
| id | This attribute is only used for debugging purposes to tell where generated links came from. | ID | #IMPLIED | boolean: no |
| class | Not for use by authors. If an editor displays class attribute values, do not edit them. The class attribute supports specialization. Its predefined values help the output transforms work correctly with ranges of related content. | CDATA | #IMPLIED | boolean: no |
Example
In this example, there are six topicrefs. They are nested and have a hierarchical relationship. Bats.xml is the parent topic and the other topics are its children.<map title="Bats" id="mybats"> Bats <topicref href="bats.xml" type="topic" <topicref href="batcaring.xml" type="task"></topicref> <topicref href="batfeeding.xml" type="task"></topicref> <topicref href="batsonar.xml" type="concept"></topicref> <topicref href="batguano.xml" type="reference"></topicref> <topicref href="bathistory.xml" type="reference"></topicref> </topicref> </map>


Here are some articles relating to the Charlie Hebdo shooting:
What
Je Suis Charlie
has become. -
The Atlantic
How the world was changed by the slogan 'Je Suis Charlie' -
BBC
L'humour à mort
(2015) - Documentary on the aftermath of the attacks
'
Je suis Charlie
' and the people who are not Charlie -
LA Times
Return to the
home page.


About
Brian is a Washington, DC-based data scientist originally from North Carolina. He likes politics, startups, and advanced baseball statistics.
Toolkit
- Python, STATA, SQL, UNIX command line tools, AWS, Google Cloud
- Natural language processing, machine learning, classification, regression, webscraping
- Presentation and data visualization tools including Tableau, Matplotlib, Seaborn, Powerpoint
Experience
General Assembly
Washington, DC
General Assembly immersive program is a full-time 12-week course that develops statistical, programming, and data communication skills.
Data Science Immersive March - May 2017
- Capstone project culminated in unsupervised natural language processing analysis of 750,000 complaints to the Consumer Financial Protection Bureau. A classification algorithm correctly identified which of 17 products a consumer’s unstructured text referred to 77% of the time.
- Other projects included a clustering analysis of higher education spending, webscraping salary classification, random forest feature importance assessment of income tax returns on county-level voting patterns in the 2016 election.
Kaiser Associates
Washington, DC
Kaiser Associates is a boutique strategy consulting firm for Fortune 500 companies in the healthcare, technology, and consumer goods sectors.
Consultant, Business Strategy & Operations November 2014 – October 2016
- Developed market assessments for products and services across industries through primary and secondary research, including: health economics analysis for $300 million medical device market, market entry for a new product category for a consumer goods company, and assessment of a firm’s value proposition for a private equity valuation and acquisition strategy.
- Presented market data on industry standards for operational benchmarks to senior leadership in the healthcare, technology, and consumer goods spaces.
The Advisory Board Company
Washington, DC
The Education Advisory Board division provides strategic research and technology to university executives through qualitative research.
Analyst, Strategic Higher Education Research October 2013 – October 2014
Research Associate, Custom Higher Education Research January – October 2013
- Produced original best practice research regarding student retention and graduation for at-risk students, conducting interviews with more than 150 university executives.
- Provided real-time data analysis of organizational trends to more than 120 university partners.
- Authored more than 30 original research reports as recommendations for institutional stakeholders on higher education issues from budget models to minority recruitment and retention.
- Conducted market opportunity analyses to inform program choices for 20+ colleges and universities.
Greenberg Quinlan Rosner Research
Washington, DC
Global strategic consultancy and political polling firm serving campaigns, non-profits and corporations.
Project Associate, Domestic Political Consulting Division January – December 2012
Research Associate, Operations Management Group September 2010 – December 2011
- Analyzed polling data and drafted messaging strategies for top-tier political candidates, issue campaigns, and campaign committees, contributing language and analyzing data for more than 20 political races in 2012.
- Managed project execution and methodology, negotiated budget expenditures of more than $1 million in qualitative and quantitative research at a net profit of at least $250,000 in 2011.
- Developed innovative sampling methodology for mobile phones, web panels and traditional landlines, improving response rates by 25% among targeted demographics.
Education
General Assembly
Data Science Immersive March – May 2017
- Full-time 12-week immersive course in the full life cycle of being a data scientist: from data ingestion, scraping, cleaning, mining to modeling (KNN, decision trees, ensembling, regression, forecasting, neural networks, clustering, Bayesian inference, etc) to deployment (AWS).
- Statistical programming taught in Python; libraries included: Pandas, NumPy, Statsmodels, SciKit-Learn, BeautifulSoup, NLTK, Gensim, PyMC
- Other programming tools included: PostgreSQL, mySQL
University of North Carolina at Chapel Hill
B.A. Economics, Political Science, Minor in Creative Writing May 2010
- Certificate in Business Journalism, Minor in Creative Writing
- Albert Ludwig University of Freiburg; Freiburg, Germany (August – December 2008)
Volunteer & Open Source Activity
- Sanctuary Sheriffs: leading ongoing project to assess law enforcement responsiveness to ICE deportation requests for every local jurisdiction in the United States.
- Daily Kos Presidential vote-by-LD project: contributor to an ongoing effort to map the US presidential vote to each legislative district in the country.


--- title: Other changes to extensions version: "5.5" tags: - "5.5" - extensions-other ---
The intl extension now requires ICU 4.0 or later.


I'm not an experienced drug user. I am pretty young and I had only done cannabis about 2 times prior to this experience. During both previous times, I did not get 'stoned nor high'. I have been drunk a couple times...but nothing big. I also believed I have tripped on DXM before, but not intentionally. I have been thinking about trying some new and better drugs.
It all started one day after school on a lazy afternoon. I was really bored and had nothing to do. I had bought about 3 bowls of kind bud the previous week. I thought this would be the best time to try it out. So I filled up my really really tiny stash pipe I bought from France, lit up, etc.
The buds were beautiful. The smell was intoxicating. I could even see crystal formations on each leaf and flower. They were in the shape of nuggets.  I live in Arizona, by Mexico, so I figured it was true. This was definetly not schwag.
My intentions were to get real baked. I don't even know what I was thinking then...I didn't know how much the average user smokes to get 'baked' or anything of that sort. In other words, I was almost clueless in smoking pot. So I took my first hit. Waited a few SECONDS, didn't feel anything. I did it again, didn't feel nothing...again. I had no idea how long weed takes to kick in, but for some reason I was thinking only a few seconds. I ended up taking 11 hits or so of HIGH POTENT bud.
I kept looking at my backyard door to see if the effects were starting yet. Nothing. I decided to give up on weed forever since this was the third or fourth time I smoked and didn't feel anything. About five minutes to ten minutes later, I began hearing a loud buzzing, humming noise. It was really wierd. I checked myself in the mirror and of course my eyes were bloodshot. I smiled to myself and thought maybe this will work afterall. Then I began to experience drymouth and an increased appetite. I smiled some more.
After about twenty minutes into the experience, my heart began palpatating. Very fast. I could feel it beat through my sweater very fast.  I began to get scared. I measured my heart rate and it was probably around 160bpm. I didn't know if this was normal or what. So I jumped on my computer straight to erowid.org to check out effects of cannabis. I found out heart rate higher than 150-180bpm could be bad news. I was terrified.
I began to panic.  I was hyperventalating...I almost lost it.  I don't know if it was impaired judgment, paranoia, or the heart fluttering that made it seem to beat faster that made me think my heart rate was 200 bpm. I was experiencing a panic attack. I don't think I knew at the time...I was just really scared. I thought my heart was going to blow up. I didn't know what to do.
I was powerwalking around my kitchen and house at this time. I was going to call 911 but thought of the consequences. BAD consequences. I was so goddamned close to calling them...I'm so glad I did not. So I called my friend. I told her what happened and she said if anything happened she would come over. I was so relieved to talk to someone but i felt my heart pumping through my chest at this point faster than ever. I measured again: 250bpm. Yikes!! Somehow, I got through it. ....slllooooowwwwwllly, I began to calm down and come down.
After this scary experience, I re analyzed. I don't think my heart was going 250 bpm. But I believe my heart rate was close enough to put me in danger. My heart is usually faster than the normal heartrate anyways, since I have low blood pressure.
I was also disappointed that I didn't even get stoned. No hallucinations, no nothing.  Ironic as it may seem, I will definetly try cannabis again, only at a much smaller dose. I know now what to do and what not to do.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Apache Flink is an excellent choice to develop and run many different types of applications due to its extensive features set. Flink’s features include support for stream and batch processing, sophisticated state management, event-time processing semantics, and exactly-once consistency guarantees for state. Moreover, Flink can be deployed on various resource providers such as YARN, Apache Mesos, and Kubernetes but also as stand-alone cluster on bare-metal hardware. Configured for high availability, Flink does not have a single point of failure. Flink has been proven to scale to thousands of cores and terabytes of application state, delivers high throughput and low latency, and powers some of the world’s most demanding stream processing applications.
Below, we explore the most common types of applications that are powered by Flink and give pointers to real-world examples.
An event-driven application is a stateful application that ingest events from one or more event streams and reacts to incoming events by triggering computations, state updates, or external actions.
Event-driven applications are an evolution of the traditional application design with separated compute and data storage tiers. In this architecture, applications read data from and persist data to a remote transactional database.
In contrast, event-driven applications are based on stateful stream processing applications. In this design, data and computation are co-located, which yields local (in-memory or disk) data access. Fault-tolerance is achieved by periodically writing checkpoints to a remote persistent storage. The figure below depicts the difference between the traditional application architecture and event-driven applications.
Instead of querying a remote database, event-driven applications access their data locally which yields better performance, both in terms of throughput and latency. The periodic checkpoints to a remote persistent storage can be asynchronously and incrementally done. Hence, the impact of checkpointing on the regular event processing is very small. However, the event-driven application design provides more benefits than just local data access. In the tiered architecture, it is common that multiple applications share the same database. Hence, any change of the database, such as changing the data layout due to an application update or scaling the service, needs to be coordinated. Since each event-driven application is responsible for its own data, changes to the data representation or scaling the application requires less coordination.
The limits of event-driven applications are defined by how well a stream processor can handle time and state. Many of Flink’s outstanding features are centered around these concepts. Flink provides a rich set of state primitives that can manage very large data volumes (up to several terabytes) with exactly-once consistency guarantees. Moreover, Flink’s support for event-time, highly customizable window logic, and fine-grained control of time as provided by the ProcessFunction
enable the implementation of advanced business logic. Moreover, Flink features a library for Complex Event Processing (CEP) to detect patterns in data streams.
However, Flink’s outstanding feature for event-driven applications is savepoint. A savepoint is a consistent state image that can be used as a starting point for compatible applications. Given a savepoint, an application can be updated or adapt its scale, or multiple versions of an application can be started for A/B testing.
Analytical jobs extract information and insight from raw data. Traditionally, analytics are performed as batch queries or applications on bounded data sets of recorded events. In order to incorporate the latest data into the result of the analysis, it has to be added to the analyzed data set and the query or application is rerun. The results are written to a storage system or emitted as reports.
With a sophisticated stream processing engine, analytics can also be performed in a real-time fashion. Instead of reading finite data sets, streaming queries or applications ingest real-time event streams and continuously produce and update results as events are consumed. The results are either written to an external database or maintained as internal state. Dashboard application can read the latest results from the external database or directly query the internal state of the application.
Apache Flink supports streaming as well as batch analytical applications as shown in the figure below.
The advantages of continuous streaming analytics compared to batch analytics are not limited to a much lower latency from events to insight due to elimination of periodic import and query execution. In contrast to batch queries, streaming queries do not have to deal with artificial boundaries in the input data which are caused by periodic imports and the bounded nature of the input.
Another aspect is a simpler application architecture. A batch analytics pipeline consist of several independent components to periodically schedule data ingestion and query execution. Reliably operating such a pipeline is non-trivial because failures of one component affect the following steps of the pipeline. In contrast, a streaming analytics application which runs on a sophisticated stream processor like Flink incorporates all steps from data ingestions to continuous result computation. Therefore, it can rely on the engine’s failure recovery mechanism.
Flink provides very good support for continuous streaming as well as batch analytics. Specifically, it features an ANSI-compliant SQL interface with unified semantics for batch and streaming queries. SQL queries compute the same result regardless whether they are run on a static data set of recorded events or on a real-time event stream. Rich support for user-defined functions ensures that custom code can be executed in SQL queries. If even more custom logic is required, Flink’s DataStream API or DataSet API provide more low-level control. Moreover, Flink’s Gelly library provides algorithms and building blocks for large-scale and high-performance graph analytics on batch data sets.
Extract-transform-load (ETL) is a common approach to convert and move data between storage systems. Often ETL jobs are periodically triggered to copy data from from transactional database systems to an analytical database or a data warehouse.
Data pipelines serve a similar purpose as ETL jobs. They transform and enrich data and can move it from one storage system to another. However, they operate in a continuous streaming mode instead of being periodically triggered. Hence, they are able to read records from sources that continuously produce data and move it with low latency to their destination. For example a data pipeline might monitor a file system directory for new files and write their data into an event log. Another application might materialize an event stream to a database or incrementally build and refine a search index.
The figure below depicts the difference between periodic ETL jobs and continuous data pipelines.
The obvious advantage of continuous data pipelines over periodic ETL jobs is the reduced latency of moving data to its destination. Moreover, data pipelines are more versatile and can be employed for more use cases because they are able to continuously consume and emit data.
Many common data transformation or enrichment tasks can be addressed by Flink’s SQL interface (or Table API) and its support for user-defined functions. Data pipelines with more advanced requirements can be realized by using the DataStream API which is more generic. Flink provides a rich set of connectors to various storage systems such as Kafka, Kinesis, Elasticsearch, and JDBC database systems. It also features continuous sources for file systems that monitor directories and sinks that write files in a time-bucketed fashion.


{% extends "_post.html" %}
{% hyde
title: "grabtweets"
snip: "A simple tool for backing up your tweets."
created: 2009-09-12 11:02:46
exclude: True
%}
{% block article %}
`grabtweets` is a simple tool to backup your tweets.
The code is in a [Mercurial repository][repository] on [BitBucket][].
[BitBucket]: http://bitbucket.org/
[TOC]
Installing
----------
`grabtweets` requires [Python][] 2.6 or later.
To install it, you can [download][] the latest version, or clone the Mercurial
repository:
:::text
hg clone http://bitbucket.org/sjl/grabtweets/
You can put it anywhere you like.
Using
-----
`grabtweets` can back up your tweets and print tweets that it has already
archived.
### Backing Up Tweets
To back up your tweets, run `grabtweets` like this:
:::console
$ grabtweets.py -u USERNAME FILE
`grabtweets` will pull down the 200 newest tweets from USERNAME and store them
in FILE.
You probably have more than 200 tweets. However, Twitter will only let you
pull down 200 at a time and hitting the server too fast will result in Twitter
cutting off your access for a while.
To deal with this, it's best to set up `grabtweets` as a cron/launchd job that
runs every couple of hours. Each time it runs, it will pull down the newest
200 tweets, plus 200 older tweets if there are any available.
It will take about `NUMBER_OF_TWEETS_YOU_HAVE/200` runs to finish archiving
your tweets. Just set it up and forget about it.
### Printing Backed Up Tweets
To print the tweets that `grabtweets` has already backed up, run it like this:
:::console
$ grabtweets.py -p FILE
[Python]: {{links.python}}
[download]: http://bitbucket.org/sjl/grabtweets/get/tip.zip
Problems, Contributing, etc
---------------------------
`grabtweets` was hacked together in an hour. There are probably bugs. If you
find any, go ahead and create an issue in the [issue tracker][].
Want to fix something or add a feature? Great! Fork the [repository][] and
send me a pull request.
[issue tracker]: http://bitbucket.org/sjl/grabtweets/issues/?status=new&status=open
[repository]: http://bitbucket.org/sjl/grabtweets/
{% endblock %}


link
On Drag
On Drag down
On Drop
On Drag start
On Drag enter
On Drag leave
On Drag end
On Drag over


CSS has the following outline properties: outline-style outline-color outline-width outline-offset outline Note: Outline differs from borders! Unlike border, the outline is drawn outside the element's border, and may overlap other content. Also, the outline is NOT a part of the element's dimensions; the element's total width and height is not affected by the width of the outline.
A dotted outline
A dashed outline
A solid outline
A double outline
A groove outline. The effect depends on the outline-color value.
A ridge outline. The effect depends on the outline-color value.
An inset outline. The effect depends on the outline-color value.
An outset outline. The effect depends on the outline-color value.
Note: None of the other outline properties will have any effect, unless the outline-style property is set!A solid red outline.
A double green outline.
An outset yellow outline.
The following example uses outline-color: invert, which performs a color inversion. This ensures that the outline is visible, regardless of color background:
A solid invert outline.
the outline-width property specifies the width of the outline, and can have one of the following values: thin (typically 1px) medium (typically 3px) thick (typically 5px) A specific size (in px, pt, cm, em, etc)
A thin outline.
A medium outline.
A thick outline.
A 4px thick outline.
Outline - Shorthand property The outline property is a shorthand property for setting the following individual outline properties: outline-width outline-style (required) outline-color The outline property is specified as one, two, or three values from the list above. The order of the values does not matter. The following example shows some outlines specified with the shorthand outline property:
A dashed outline.
A dotted red outline.
A 5px solid yellow outline.
A thick ridge pink outline.
This paragraph has an outline 15px outside the border edge.


Other things that I like
- An aptronym is a name aptly suited to its owner. A few of my favorite notable examples:
- Sara Blizzard, meteorologist
- John Carbon, American organic chemist
- Bernie Madoff, who made off with a lot of other people's money
- Marina Stepanova, former Soviet hurdler, first woman to run under 53 seconds in the 400 m hurdles
- Triathlons, especially coastal ones
- Workflow optimization–– I probably spend more time optimizing my workflow than I actually save.


Technology has been a friend of mine since the days of my youth. I lathced onto tinkering as soon as I could hold a screw driver. From there I delved more into the way things work digitally, from games to the home VCR. Fortunately enough I have been exposed to many different and diverse technologies, bot electronics and through programming. This widespread outreach into the world of technology and programming has broadened my knowledge and myself. That being said, I have not focused directly into one area of study nor field. Presently I am alleviating this with a bootcamp/cohort experience held by General Assembly. The goal now is to become a proficient web developer, perhaps more geared to back end development but leaning all features of the stack.
Completed 500+ Hour cohort
My first Javascript project. A Tic Tac Toe game that can be played in the browser.
This is the beginings of a Slack like message service. I met MVP and plan to continue working on this.
A group project, using Javascript(ES6), NodeJS, MongoDB and Express.
My Capstone project. A place to put your thoughts down for later. Using ReactJS and Ruby on Rails.
Skill sets:
Computer Information Systems: Programming


The Engineering Club at Parkland College provides students with opportunities to delve into topics in engineering and physics through hands-on projects, challenging questions, talks from industry professionals, and more. We meet every Wednesday at 2pm in room M126. It doesn't matter how much experience you have, what major you are in, or how much you hate physics, the Engineering Club is a great place to learn new things, meet some great people, and ocasionally grab a slice of pizza.
Check out our GitHub page at github.com/Parkland-Engineering-Club
| David | President |
| Jonathan | Vice President |
| Arman | Secretary |
| Joseph | Treasurer |
| Balaji | Supreme Leader |


//# Bitwise Operators Bitwise operators are used to manipulate the individual bits with a data structure. They are often used in low-level programming, such as graphics programming and device driver creation. Bitwise operators can also be useful when you work with raw data from external sources, such as encoding and decoding data for communication over a custom protocol. Swift supports all standard (~ - NOT, & - AND, | - OR, ^ - XOR) bitwise operators.


★ Overview ★ General Strategies ★ Specific Tactics ★ Tools Against Bullying
No person should ever be miserable at their place of work.
You should do what you love and love what you do.
After recently reading an Io9 article about handling Passive Aggressive behavior, I realized my definition of Paggro behavior was extremely limited. I basically condidered paggro to cover vaguebooking, where you post a vague status online, which everyone can see, but is clearly targeted towards one person. Or maybe not, who knows?
In terms of the negative & toxic behavior that passive aggressive behavior encompasses, vaguebooking isn’t really that bad. Yes, it’s immature and an ineffective ploy for attention. But in terms of the manipulation possible with passive aggressive behavior, * vaguebooking doesn’t even break the surface*. Like who cares? Ultimately, vaguebooking makes you look dumb.
Every Trick in the Book
Yup, there really is A BOOK. And here it is. With great power comes great responsibility. Some people use this book as a kind of bible. $#@! those people. Here’s a blog with a nice preview of the lovely teachings this book entails. You’re going to want to buy this book and study it.
48 Laws of Power
This book includes such lovely gems =)
★ Conceal Your Intentions
★ Play to People’s Fantasies
★ Create a Cult: Play on People’s Need to Believe
★ Disdain Things You Cannot Have
★ Use Selective Honesty to Disarm Your Victim
★ Pose as a Friend, Work as a Spy
★ Do Not Commit to Anyone
★ Get Others to Do the Work for You
★ Discover Each Man’s Thumbscrew
What great life advice! What morals! Am I right? Find a man’s vice or thumbscrew and really stick it to ‘em
Discovering people’s vices to exploit them is something the mafia and organized crime has specialized in for centuries … Super happy thumbscrews! =)
The “Other” Problem of Evil
Now, this book can be used to manipulate people. It contains dozens of amoral strategies for doing so. However, knowledge of evil can be used to fight evil – it’s a great paradox, one that I call the Other Problem of Evil, a subject for another blog post. And actually – because someone who is ethical has restraints on his behavior and someone unethical may have none – then ethical people are inherently more predictable.
And thus, from a game-theory perspective, unethical people always have the advantage. And that’s a bit depressing, isn’t it?
My point is, in order to know how to fight these strategies, you have to know them well – and if you don’t, you’ll find them used against you! Some of them aren’t so bad, but some of them are downright dirty.
So I’m going to write a multi-part series based on what I’ve experienced. Parts of these articles could be used for evil :) No, I’m serious. I’m going to provide high and low-level details on how to do this to someone else, accompanied by generic and specific details of what I’ve experienced. Not that I’m capable of doing most of this, since I have a conscience after all. But, I’m going to equip you with my experiences, so that you can prevent them from happening to someone else. I hope to provide others with the tools they need to fight back!
I have one friend who mentioned she lost her job a bully in her workplace a few months ago. These people are everywhere and I cannot stand it when they make gains from * unethical behavior. *
Sun Tzu’s Art of War
Here’s another book to read and you can even find it online for free! Read it! It’s like three pages and I recommend reading it first, then finding a version with commentary. Some of the most important topics in this book are:
- Fight a war without fighting. Don’t openly fight battles if you don’t have to. No one wants to expend unnecessary energy. Weigh your options. What are they? Can you play to your opponents motivations? Find something in common instead.
- Know thyself and know your enemy. By predicting behavior and knowing your own capabilities, you know which battles are won and which are lost before fighting them. And more.
- Focus your energy. Avoid wasting it and concetrate it where it will matter most. Some battles are not worth winning and will simply drain your energy.
- Demoralize your opponent! If you can convince them not to fight, you win. I am emphasizing this so that you avoid it.
You never want find yourself demoralized by others at work. If you do – you’ve lost.  And this is definitely a strategy you will face if you find yourself being bullied at work.
This person – hopefully, not multiple people! – will try and try to break your spirit. And once they do, they have won. Therefore, the true battle is within yourself. Only once you’ve won the battle within yourself, can you hope to excel.
And you’re going to see this over and over in life. People are going to try to convince you: it’s not worth it, there are shinier things out there with bigger rewards, it’s going to be too hard, etc, etc. They really just don’t want to fight. Don’t give up. At least make things exciting.
The Old Testament
Here’s another book.  A lot of people point to the Bible and say “But look at all that terrible stuff in there!!” Yes, there are terrible things in the Bible. They are provided as reference – * so that, if you paid attention, you won’t have to experience them! *
E.G.  And even though you didn’t, you better watch out – cuz that b!@#$ is triflin’! She was really just looking for a reason to burn you all along and she won’t hesitate to !@#$ you in order to !@#$ you.
Fools learn from their experiences – while the wise learn from history
IMO, religion has a lot of offer and those who disdain it are missing out. However terrible they may be, having adequate knowledge of how these situations may play out beforehand can be a life saver! You will definitely find yourself facing specific tactics, the significance of which you will not otherwise understand until it’s too late! You must recognize these tactics when they occur, so that you can cast light on the motivations behind your actions and so that you will not find the appearance of your actions manipulated!
“Fools learn from experience. I prefer to learn from the experience of others.” – Otto von Bismarck
But Wait! That’s Not All! – I’m also going to give you tools!
I’m going to equip you with some of the tools that you’ll need to fight back! Generic and specific strategies you can follow to avoid finding yourself in these situations. Tools that I have found invaluable myself.
Working Class Hero
Why am I writing about this?
How would you feel about getting another job if this has been your experience at most positions you’ve held? Neither my family nor my friends seem to understand my reticence to return to work or my high level of discernment in deciding my place of work.
It seems to be particularly bad in software, a field full of incredibly intelligent people wielding event-driven scripts on the internetz like magickz of yore.  And I will describe many of these specifc tactics in Part Two. I’m sure there be dragons in other fields too, but some of these software dragons are $#@!’ing vicious.
“You easily make like over $50/hr and over six figures.  Just get the first job that pays you well!”
What does an abused dog do, when you reach out to pet it?
Well, avoidance is one of primary behaviors and defense mechanisms that you’ll notice in those who have been abused, physically, sexually or, yes, even emotionally. A child that has burned his hands a few times learns to avoid hot stuff. People that have been through this will begin to confuse normal situations with those circumstances which caused them pain. If you’ve experienced a lot anxiety and repeatedly experience negative situations, one coping behavior is to avoid those situations. However, in my case, * THIS IS RUINING MY CAREER AND MY LIFE! * I have several jobs, where I have been unfairly pushed out, usually due to one person. Oh and then there’s jamskating.
Having High Functioning Autism Makes Me a Target.
And I just don’t get it honestly. And a lot of it has to do with the fact that I have Aspergers. Well, I guess I’m self diagnosed, so I don’t actually have legal rights in this regard – not that I would ever sue over this anyways. That’d be lame and immature. It’s my problem after all, right? However, my symptoms and behavior lead me to be AN EASY TARGET, who is UNABLE TO APPROPRIATELY RESPOND.
Oh, did I mention that I’m quiet and reserved? This means that when someone treats me unfairly at work, there’s a lower probability that other people will hear about it. I’ll get into this in Part Two, but workplace bullies will tend to go for who they perceive as vulnerable and likely to not fight back.
“No consequences? Perfect!” – said every sociopath, ever.
I’ve found that a handful of people abusing my autistic traits have just added insult to injury, time after time. I think of my singular focus and unique patterns of thought as gifts that contribute to my creativity. Sure, sometimes it’s harder for me to connect and establish relationships at work.  I’m sorry that I’m sometimes difficult to deal with, that I’m quiet, that sometimes it’s harder for me to read between the lines. But, I’m honestly trying as hard as I can!
Ultimately, unfairly being pushed out of jobs has led me to:
- Lack of incentive to get another job. Trust me, if you’ve been in my shoes and you’ve faced this over and over again, you’re better off at peace.
- Lack of ability to get a new job. Breaks in work experience in your resume lead you to get filtered out of a list of job applicants – fast.
- Lack of opportunities because I have had to move back to my hometown several times. While I love my hometown, it has a metropolitan population of < 300,000. Guess what? No more meetups. No job opportunities. Not for open source software anyways.
- Disrupted relationships in my personal life, driving me to depression and unnecessary anxiety. I’ve moved across the country like 5 times, just to have to return every time, terminating any new relationships. I am pushed to despair and unable to function. And while some of it is definitely my fault, the influence that others can have on your life can be catastrophic. If everything is ultimately my own fault, then why would others expend so much energy strategically planning their behavior? Would there be any point?
- Lack of acquired experience required for new opportunites. I’m at a point where I’m seriously falling behind in my career. And not for lack of talent, but because of lack of opportunities and direction. I’m doing pretty well, in spite of it all. But, honestly, it doesn’t matter how well I excel in coding while I’m alone in Roanoke. NO ONE RELEVANT IS HERE TO SEE ME SUCCEED.
Empathetic? OMG I have learned to appreciate you!
Most of the people I’ve worked with are friendly, empathetic and frank people who genuinely have your best intentions in mind. Maybe that wasn’t the best way to put it. They at least consider (and reconsider) situations from multiple perspectives, not just their own. But honestly, I’ve had to deal with a few incredibly two-faced people who almost seem trained in the art of duplicity. But, I’ve learned that, unfortunately, you can’t depend on avoiding it – you have to deal with it.
Recent studies show that up to 1 in 25 people have sociopathic tendencies.
There is almost always that one guy and I don’t get it. The person I’m talking about usually underperforms at their actual job – but they excel at manipulating people! They may lack real talent, but they won’t hesitate to take credit for yours. To this person, it’s all about the meta-game. This is the most frustrating part: they distort all your energy and talent, just to turn it against you! You work hard, you try harder – you even work after hours, logging 50+ hours per week. And even that gets turned against you!
“Well, he obviously can’t complete his work during the day!” – An example of how a workplace bully will contort your words and actions to use them against you, no matter how hard you try. And notice: the same guy who distracts you during the day at work doesn’t want you spending time working from home.
Some people just don’t play fair.
However, as it turns out, highly competitive situations attract highly competitive people. In itself, this isn’t actually a bad thing: competition is a great tool for motivating people to achieve better!
I thrive in competitive situations. It is what drives me to be better. I push myself to be challenged.
I have tried to empathize with these people. And what I’ve usually found is that they feel threatened by me. You’re just naturally faster, better, harder and stronger than them. But you’re not perfect, you have flaws they can exploit. Flaws that seem to become fractures when protrayed in just the right light.
Motivations for Passive Aggressive Behavior
The goal is to dissociate/disguise cause & effect between actions & reactions in a social setting. This makes situations more confusing and enables someone to cause problems which are inherently more difficult to react to. It becomes especially difficult for people in positions of authority to react appropriately because the true causes of negative situations are hidden and thus, their hands are tied.
Brief list of examples of Paggro Behavior
- Manipulating the Audience that Witnesses Behavior: someone may antagonize you 1-on-1, then act like a concerned friend in front of everyone else.
- Manipulating Channels of Communication: email, text, in person, phone and chatroom. A person will purposely paint a different picture across different mediums of communication.
- Willful Incompetence: someone may agree to complete a task or help you out. Not really though. They just plan on convincing you to pursue inaction, so they can leave you out to dry later.
- Play to Appearences: they ignore the truth of actions and play to what seems to happen. They play on the fears of your managers and your coworkers.
- Distorting Perceptions: this person even goes so far as to control appearances – in fact, this is where their power lies. They will psychoanalyze you and mine your social media accounts for information they can distort. They abuse channels of communication to present you in the light of their choosing. Or maybe they task you with a Fool’s Errand.
- Downplay Your Contributions: this person will attempt to manipulate how your contributions are perceived. They will make your victories seem like nothing and will draw attention to your failures.
 This is particularly bad in the entertainment industry.
Examples of manipulation through false hope
We’ve got some pretty big performances coming up. We could use your talent, you know.
Hey, how would you like that shiny new promotion? Yes, the one with the corner office. We’ll I’m going to need you to grab these chestnuts for me and they’re totally in the fire. Yes, that’s right. You’ll need to be my catspaw. But I totally pinky swear; that promotion is yours.
There’s going to be a Reality TV show and you could be on it! Don’t mess it up for everyone!
That last one didn’t get me, by the way, as Reality TV doesn’t appeal to me. But it did get a few of my friends – they were clamouring over themselves to help out who appeared to be in power. OMG I’LL BE FAMOUZ. This one is powerful – and dirty, in my opinion. It’s one thing to prepare for something you’re trying to bring about. It’s another to manipulate with false hope.
Why I would prefer not to publish this
Many people just won’t understand. To these people, I’ll probably just seem paranoid and negative. Those people probably haven’t lived a very exciting life. At least I can say I’ve lived for things worth fighting for.
Oh – did I mention that I’m looking for a job? It’s not smart to talk about former employers. But, one thing that pisses me off is being bent over a barrel and being unable to tell anyone about it!
Con artists use this trick by the way: dupe someone with a particular trick they’ll feel utterly embarrassed to tell someone about. The principle is the same: some people expect that you’ll never talk about what happened anyways, so they think they have leeway to do what they wilt ** … I cannot stand this! **If it burns me, so be it. But I’m not going to let someone get away with something because I’m paralyzed with fear.
Why am I so well acquainted with this?
That’s a really, really good question.
It seems like most of my friends my age can’t relate to what I’m saying. At least a few years ago, most hadn’t had enough experience with office politics – or they’re in a field that attracts different personality types.
It seems like everything goes perfectly for them. Maybe they’re not in as competitive situations. Or maybe I just don’t see their problems, or maybe they don’t show them. That’s one thing about this world that I can’t stand. Everyone has problems, but it’s like you’re not allowed to talk about them! Of course, everyone says you should. But really, you’re at an incredible disadvantage if you do.  And jeez – better not post it to social media. Keep that to yourself, keep yourself isolated.
Also, it seems that most people have better social models than I do. While I seem to be able to predict behavior fairly well, they are more able to react to it. Since I have Aspergers, it seems I am not as great with relationships. I’m more reserved, it can be harder for me to establish relationships, which leads to less experience with people.
Oh, and then I constantly have to move back home out of depression. So, there’s that. Goodbye, relationships I’ve been cultivating. Probably not going to see you again, for years at least.
Basically, it seems that i’m at a disadvantage in life …
… Or maybe I just have a narcissistic persecution complex, like Stephen Colbert.
That’s it for Part One.
I’m totally rambling … and psychoanalyzing myself. Not really a good combination. I’m going to pick this back up with Part Two, where I’ll describe what I’ve experienced, generally and specifically. I’ll also provide some tools to help these prevent these situations from arising.
Part Two: General Strategies
For now, my friends… Watch that clip … It’s hilarious. ^^^


Services, Products and Technologies¶
The following table identifies technologies used by Ontomatica products that implement label project services.
| Label Project Services | Ontomatica Products | Technologies |
|---|---|---|
| Application Services | Navigator | Label Classes |
| Deposition Services | OnMessage | Message deposit |
| OnLine | Web deposit | |
| OnTop | Label Classes | |
| Parser (lex ++ ) | ||
| Regular Expression | ||
| OnTask | Mathematics | |
| USDA mathematics | ||
| Work flow | ||
| Data Services | OnDemand | MySQL |
| REST | ||
| Operations Services | OnDemand | CA products |
| Infrastructure Services | OnDemand | See illustration |
| Development Services | OnTarget | Mapping |
| Building (make ++ ) | ||
| Versioning (Github ) | ||
| Migration Services | OntoMation | Dev > QA > Prod |
| Support Services | OnPoint | Sphinx documentation |
| Issue tracking (Github) | ||
| Customer Service | OnCall | telephone |


Welcome to the cloudynight, web application. Cloudynight is a tool for automated cloud detection in all-sky camera data.
This web application allows you to inspect data, label data, and make predictions using a RESTful API.
Please refer to Mommert (2020, submitted) and the cloudynight GitHub repository for more details on this project.


Welcome to the Creator Kit Beginner Code Documentation
This website act as a documentation Hub for the Beginner Code Scene Kit.
This website is similar in style to the documentation website that you can find in Unity Packages, so navigating it will familiarize you with searching and reading documentation for those package.
Usage Tips
Some tips to use documentation in Unity efficiently. When you stumble on something you don't know in code, the step you can take :
- The first step is to go on the [https://docs.unity3d.com/ScriptReference/](Scripting Reference website) and use the top right search box to search the function/class you don't know
- In most IDE, hovering above the unknown function/class will show you the full name in the form
UnitySomething.MyClass.Func
. This can give you an idea of which package that function/class is part of (e.g. something nameCinemachine.Something
is probably from the Cinemachine package). So go to the menuWindow > Package Manager
, look for package with that name, and click view documentation. This will open a website similar to that one, and click on Api Documentation on top to see the full API and search for the class there.
Using this website API Documentation
Contrary to Unity website you can search as easily for a function name on that website, you need to find which type it is part of (see above for how to find the full name containing the type). Once you have that type, you can find that class in the API Documentation and click on it. You have a menu on the right of the page on each type to quickly see Fields/Properties (variables) and methods (function) in a class. See the example below that show the methods of the class EquipmentSystem from the Creator Kit


:: com :: sun :: star :: sdbc ::
|
| constants group ColumnSearch |
- Description
- indicates in which way a column can be used in the WHERE search.
|
| Constants' Details |
NONE
const long NONE = 0;
- Description
- A possible value for column
SEARCHABLE in the
XResultSet
object returned by the method
XDatabaseMetaData::getTypeInfo()
.
Indicates that
WHERE
search clauses are not supported
for this type.
|
|
CHAR
const long CHAR = 1;
- Description
- A possible value for column
SEARCHABLE in the
XResultSet
object returned by the method
XDatabaseMetaData::getTypeInfo()
.
Indicates that the only
WHERE
search clause that can
be based on this type is
WHERE...LIKE
.
|
|
BASIC
const long BASIC = 2;
- Description
- A possible value for column
SEARCHABLE in the
XResultSet
object returned by the method
XDatabaseMetaData::getTypeInfo()
.
Indicates that one can base all
WHERE
search clauses
except
WHERE...LIKE
on this data type.
|
|
FULL
const long FULL = 3;
- Description
- A possible value for column
SEARCHABLE
in the
XResultSet
object returned by the method
XDatabaseMetaData::getTypeInfo()
.
Indicates that all
WHERE
search clauses can be
based on this type.
|
|
Top of Page
Copyright © 2013, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.


|
Connected Home over IP
672cf7684
|
#include <ble/BleLayer.h>
Public Member Functions | |
| void | SetSupportedProtocolVersion (uint8_t index, uint8_t version) |
| Set supported version value at given index in SupportedProtocolVersions. More... | |
| BLE_ERROR | Encode (const System::PacketBufferHandle &msgBuf) const |
| Must be able to reserve 20 byte data length in msgBuf. More... | |
Static Public Member Functions | |
| static BLE_ERROR | Decode (const System::PacketBufferHandle &msgBuf, BleTransportCapabilitiesRequestMessage &msg) |
Public Attributes | |
| uint8_t | mSupportedProtocolVersions [(NUM_SUPPORTED_PROTOCOL_VERSIONS/2)+(NUM_SUPPORTED_PROTOCOL_VERSIONS % 2)] |
| An array of size NUM_SUPPORTED_PROTOCOL_VERSIONS listing versions of the BLE transport protocol that this node supports. More... | |
| uint16_t | mMtu |
| The MTU that has been negotiated for this BLE connection. More... | |
| uint8_t | mWindowSize |
| The initial and maximum receive window size offered by the central, defined in terms of GATT indication payloads. More... | |
|
static |
| BLE_ERROR chip::Ble::BleTransportCapabilitiesRequestMessage::Encode | ( | const System::PacketBufferHandle & | msgBuf | ) | const |
Must be able to reserve 20 byte data length in msgBuf.
| void chip::Ble::BleTransportCapabilitiesRequestMessage::SetSupportedProtocolVersion | ( | uint8_t | index, |
| uint8_t | version | ||
| ) |
Set supported version value at given index in SupportedProtocolVersions.
uint8_t version argument is truncated to 4 least-significant bits. Index shall be 0 through number of SupportedProtocolVersions elements - 1.
| uint16_t chip::Ble::BleTransportCapabilitiesRequestMessage::mMtu |
The MTU that has been negotiated for this BLE connection.
Specified in the BleTransportCapabilitiesRequestMessage because the remote node may be unable to glean this info from its own BLE hardware/software stack, such as on older Android platforms.
A value of 0 means that the central could not determine the negotiated BLE connection MTU.
| uint8_t chip::Ble::BleTransportCapabilitiesRequestMessage::mSupportedProtocolVersions[(NUM_SUPPORTED_PROTOCOL_VERSIONS/2)+(NUM_SUPPORTED_PROTOCOL_VERSIONS % 2)] |
An array of size NUM_SUPPORTED_PROTOCOL_VERSIONS listing versions of the BLE transport protocol that this node supports.
Each protocol version is specified as a 4-bit unsigned integer. A zero-value represents unused array elements. Counting up from the zero-index, the first zero-value specifies the end of the list of supported protocol versions.
| uint8_t chip::Ble::BleTransportCapabilitiesRequestMessage::mWindowSize |
The initial and maximum receive window size offered by the central, defined in terms of GATT indication payloads.


Use this form to submit a start date, number of days to display, and country code to return a calendar or calendars containing that range of dates and the respective holidays which reside within them.


src/app/shared/models/goal.model.ts
Properties |
constructor(title, deadline, priority, difficulty, urgency, tag, children, id, parentGoal)
|
||||||||||||||||||||
|
Defined in src/app/shared/models/goal.model.ts:17
|
||||||||||||||||||||
|
Parameters :
|
| completed |
Type : number
|
|
Defined in src/app/shared/models/goal.model.ts:10
|
| completedDate |
Type : string
|
|
Defined in src/app/shared/models/goal.model.ts:11
|
| createdDate |
Type : string
|
|
Defined in src/app/shared/models/goal.model.ts:12
|
| deadline |
Type : string
|
|
Defined in src/app/shared/models/goal.model.ts:6
|
| difficulty |
Type : number
|
|
Defined in src/app/shared/models/goal.model.ts:8
|
| id |
Type : string
|
|
Defined in src/app/shared/models/goal.model.ts:15
|
| parentGoal |
Type : string
|
|
Defined in src/app/shared/models/goal.model.ts:16
|
| priority |
Type : number
|
|
Defined in src/app/shared/models/goal.model.ts:7
|
| show |
Type : boolean
|
|
Defined in src/app/shared/models/goal.model.ts:17
|
| tag |
Type : string
|
|
Defined in src/app/shared/models/goal.model.ts:13
|
| taskChildren |
Type : string[]
|
|
Defined in src/app/shared/models/goal.model.ts:14
|
| title |
Type : string
|
|
Defined in src/app/shared/models/goal.model.ts:5
|
| urgency |
Type : number
|
|
Defined in src/app/shared/models/goal.model.ts:9
|
import { Task } from './task.model';
export class Goal {
title:string;
deadline: string;
priority:number;
difficulty:number;
urgency:number;
completed:number;
completedDate:string;
createdDate:string;
tag:string;
taskChildren: string[];
id:string;
parentGoal: string; //id
show: boolean;
constructor(
title,
deadline,
priority,
difficulty,
urgency,
tag,
children,
id,
parentGoal) {
this.title = title;
this.deadline = deadline;
this.priority = priority;
this.difficulty = difficulty;
this.urgency = urgency;
this.tag = tag;
this.parentGoal = parentGoal;
this.taskChildren = children !== null ? children.map(child => child.id) : null;
this.id = id;
this.completed = 0;
this.show = true;
}
}


  Guess which it's doing now.
11/27/2007, 12:19:14 PM
Favs: 0
Retweets: 0
link


DFS spanning tree
问题描述 :
Consider a Depth-First-Search(DFS) spanning tree T of a undirected connected graph G, we define a T-Simple Circle as a path v1, v2, …, vk (v1 = vk) in G that contains at most one edge which not belongs to the DFS spanning tree T.
Given a graph G, we process DFS on G starting from vertex 1 and get a DFS spanning tree T, then you should choose some edges of G so that all T-Simple Circles contains at least one edge that you choose.
Please minimize the number of edges you choose.
Given a graph G, we process DFS on G starting from vertex 1 and get a DFS spanning tree T, then you should choose some edges of G so that all T-Simple Circles contains at least one edge that you choose.
Please minimize the number of edges you choose.
输入:
There are at most 100 test cases.
For each case, the first line contains two integers n and m denoting the number of vertices and edges. The vertexes are numbered from 1 to n.
The following m lines describe the graph. Each line contains two integers xi and yi, denoting an edge between vertex xi and yi(xi ≠ yi).
Note that the first n-1 edges of input construct a DFS spanning tree T which is generated by DFS from vertex 1.
Input ends with n = 0 and m = 0
(1 <= n <= 2000, 1 <= m <= 20000, 1 <= xi, yi <= n)
For each case, the first line contains two integers n and m denoting the number of vertices and edges. The vertexes are numbered from 1 to n.
The following m lines describe the graph. Each line contains two integers xi and yi, denoting an edge between vertex xi and yi(xi ≠ yi).
Note that the first n-1 edges of input construct a DFS spanning tree T which is generated by DFS from vertex 1.
Input ends with n = 0 and m = 0
(1 <= n <= 2000, 1 <= m <= 20000, 1 <= xi, yi <= n)
输出:
There are at most 100 test cases.
For each case, the first line contains two integers n and m denoting the number of vertices and edges. The vertexes are numbered from 1 to n.
The following m lines describe the graph. Each line contains two integers xi and yi, denoting an edge between vertex xi and yi(xi ≠ yi).
Note that the first n-1 edges of input construct a DFS spanning tree T which is generated by DFS from vertex 1.
Input ends with n = 0 and m = 0
(1 <= n <= 2000, 1 <= m <= 20000, 1 <= xi, yi <= n)
For each case, the first line contains two integers n and m denoting the number of vertices and edges. The vertexes are numbered from 1 to n.
The following m lines describe the graph. Each line contains two integers xi and yi, denoting an edge between vertex xi and yi(xi ≠ yi).
Note that the first n-1 edges of input construct a DFS spanning tree T which is generated by DFS from vertex 1.
Input ends with n = 0 and m = 0
(1 <= n <= 2000, 1 <= m <= 20000, 1 <= xi, yi <= n)
样例输入:
4 5 1 2 4 2 3 2 1 3 4 1 10 14 1 2 2 9 1 3 3 4 4 10 3 5 5 7 5 8 3 6 9 1 1 10 1 6 7 3 8 3 0 0
样例输出:
1 3HintHere is the graph G in the first test case:The solid lines denote the edge which belongs to the DFS spanning tree, and the dotted lines denote the others. For first case, we can choose one edge (1, 2) For second case, we can choose three edges (1, 2), (1, 3), (3, 5)
给定一个无向图，求出它的DFS生成树。
非树边与树边会构成环，现在选择树上的最少的边数，使得每一个环都至少有一条边被选中。
一个环对应的就是树上的一条路径，因为DFS树的性质这条路径只可能是从一个节点出发连向它的儿子。
所以问题就转化成了给定树上的一些简单链，给树上的边染黑白两色，使得每条给定的链上都至少有一条黑边，求最小黑边数量。
假如树是一条长链，则每一个链对应的就是一段区间，就成了经典的贪心问题，只需以右端点为关键字排序然后对于每一个未满足要求的区间尽量往右染即可。
在一般的树上也可以这样贪心，只需按链的父节点的深度为关键字进行排序，尽可能往“高”染色，
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <vector> #include <cstdlib> #include <cmath> #include <cctype> #include <queue> #include <stack> #include <utility> #include <set> #define pb push_back #define mp make_pair #define fi first #define se second using namespace std; typedef long long LL; typedef unsigned long long ULL; #define N 2005 int n , m , pre[N] , mcnt , f[N] , dep[N]; struct edge { int x , f , next; }e[40005]; pair<int , int> a[20005]; bool vis[N]; void dfs(int x , int fa) { f[x] = fa , dep[x] = dep[fa] + 1 , vis[x] = 1; for (int i = pre[x] ; ~i ;i = e[i].next) if (!vis[e[i].x]) e[i].f = e[i ^ 1].f = 1 , dfs(e[i].x , x); } bool cmp(pair<int , int> x, pair<int , int> y) { if (dep[x.se] == dep[y.se]) return dep[x.fi] > dep[y.fi]; return dep[x.se] > dep[y.se]; } void work() { int i , j , x , y , ans = 0; memset(pre , -1 , sizeof(pre)); mcnt = 0; for (i = 1 ; i <= m ; ++ i) { scanf("%d%d",&x,&y); a[i] = make_pair(x , y); } for (i = m ; i > 0 ; -- i) { x = a[i].fi , y = a[i].se; e[mcnt] = (edge) {y , 0 , pre[x]} , pre[x] = mcnt ++; e[mcnt] = (edge) {x , 0 , pre[y]} , pre[y] = mcnt ++; } memset(vis , 0 , sizeof(vis)); dfs(1 , 0); m = 0; for (x = 1 ; x <= n ; ++ x) for (i = pre[x] ; ~i ; i = e[i].next) if ((i & 1) && !e[i].f) { y = e[i].x; a[++ m] = make_pair(x , y); if (dep[a[m].fi] < dep[a[m].se]) swap(a[m].fi , a[m].se); } sort(a + 1 , a + m + 1 , cmp); memset(vis , 0 , sizeof(vis)); for (i = 1 ; i <= m ; ++ i) { x = a[i].fi , y = a[i].se; //cout << x <<' '<< y << endl; while (f[x] != y) if (vis[x]) break; else x = f[x]; if (!vis[x]) vis[x] = 1 , ++ ans; } printf("%d\n" , ans); } int main() { while (scanf("%d%d",&n,&m) , n || m) work(); return 0; }
版权声明：本文为博主原创文章，未经博主允许不得转载。
参考：http://blog.csdn.net/sd_invol/article/details/9963741
(adsbygoogle = window.adsbygoogle || []).push({});
Title…[...]very handful of sites that happen to be detailed beneath, from our point of view are undoubtedly very well really
键盘喷子水准太低。建议自己多学习学习在来喷把。要喷就喷点技术含量的~
键盘喷子水准太低。建议自己多学习学习在来喷把。要喷就喷点技术含量的~
键盘喷子水准太低。建议自己多学习学习在来喷把。要喷就喷点技术含量的~
键盘喷子水准太低。建议自己多学习学习在来喷把。要喷就喷点技术含量的~
键盘喷子水准太低。建议自己多学习学习在来喷把。要喷就喷点技术含量的~
键盘喷子水准太低。建议自己多学习学习在来喷把。要喷就喷点技术含量的~
键盘喷子水准太低。建议自己多学习学习在来喷把。要喷就喷点技术含量的~
键盘喷子水准太低。建议自己多学习学习在来喷把。要喷就喷点技术含量的~
键盘喷子水准太低。建议自己多学习学习在来喷把。要喷就喷点技术含量的~


Forgot your password
Please enter your username and we'll send you instructions on email on how to reset your password.
Note: If you are admin user then kindly contact system admin to reset your password.
Please enter your username and we'll send you instructions on email on how to reset your password.
Note: If you are admin user then kindly contact system admin to reset your password.


Yes
No
What is your resting blood pressure?(in mm Hg)
What is your maximum heart rate achieved?
(If you are not sure, you can calculate your maximum heart rate by subtracting your age from 220)
Start the prediction
{{ prediction_text }}


Select a neighborhood to view details:
Figure 1: Funding per capita of .
Figure 2: Funding per square mile of .


Please select your favorite genre: Rock Metal Jazz
Please select your favorite music service(s): Spotify YouTube Soundcloud


Cardinality: Zero or One (Optional)¶
There are some cases, when a text part may be present or not. Therefore, this text part is an optional and has cardinality zero or one (0..1).
The parse_type.TypeBuilder
can be used to compute the type with
cardinality zero or one based on data type with cardinality one.
See also
Use Optional Part in Step Definitions for a simpler solution to this problem by using the cardinality field in parse expressions.
Feature Example¶
Assuming you want to write something like this:
# file:datatype.features/cardinality.zero_or_one.feature
Feature: Data Type with Cardinality 0..1 (Optional Part)
Scenario: Case1 "When attacked by a ..."
Given the ninja has a black-belt
When attacked by a samurai
Scenario: Case2 "When attacked by ..."
Given the ninja has a black-belt
When attacked by Chuck Norris
# -- DESCRIPTION:
# "When attacked by ...": Once with "a ", once without it.
# Only one step should be used.
Define the Data Type¶
# file:datatype.features/steps/step_cardinality_zero_or_one.py
# ------------------------------------------------------------------------
# USER-DEFINED TYPES:
# ------------------------------------------------------------------------
from behave import register_type
from parse_type import TypeBuilder
import parse
@parse.with_pattern(r"a\s+")
def parse_word_a(text):
"""Type converter for "a " (followed by one/more spaces)."""
return text.strip()
# -- SAME:
# parse_optional_word_a = TypeBuilder.with_zero_or_one(parse_word_a)
parse_optional_word_a = TypeBuilder.with_optional(parse_word_a)
register_type(optional_a_=parse_optional_word_a)
Note
The TypeBuilder.with_optional()
function performs the magic.
It computes a regular expression pattern for the given choice of
words/strings and stores them in parse_optional_word_a.pattern
attribute.
Provide the Step Definitions¶
# file:datatype.features/steps/step_cardinality_zero_or_one.py
# ----------------------------------------------------------------------------
# STEPS:
# ----------------------------------------------------------------------------
from behave import given, when, then
from hamcrest import assert_that, equal_to, is_in
# -- OPTIONAL-PART: {:optional_a_}
# By using data type with cardinality zero or one (0..1, optional).
@when('attacked by {:optional_a_}{opponent}')
def step_attacked_by(context, a_, opponent):
context.ninja_fight.opponent = opponent
# -- VERIFY: Optional part feature.
assert_that(a_, is_in(["a", None]))
assert_that(opponent, is_in(["Chuck Norris", "samurai"]))
# ----------------------------------------------------------------------------
# MORE STEPS:
# ----------------------------------------------------------------------------
from ninja_fight import NinjaFight
@given('the ninja has a {achievement_level}')
def step_the_ninja_has_a(context, achievement_level):
context.ninja_fight = NinjaFight(achievement_level)
@then('the ninja should {reaction}')
def step_the_ninja_should(context, reaction):
assert_that(reaction, equal_to(context.ninja_fight.decision()))
Run the Test¶
Now we run this example with behave
:
$ behave ../datatype.features/cardinality.zero_or_one.feature Feature: Data Type with Cardinality 0..1 (Optional Part) # ../datatype.features/cardinality.zero_or_one.feature:1 Scenario: Case1 "When attacked by a ..." # ../datatype.features/cardinality.zero_or_one.feature:3 Given the ninja has a black-belt # ../datatype.features/steps/step_cardinality_zero_or_one.py:54 When attacked by a samurai # ../datatype.features/steps/step_cardinality_zero_or_one.py:42 Scenario: Case2 "When attacked by ..." # ../datatype.features/cardinality.zero_or_one.feature:7 Given the ninja has a black-belt # ../datatype.features/steps/step_cardinality_zero_or_one.py:54 When attacked by Chuck Norris # ../datatype.features/steps/step_cardinality_zero_or_one.py:42 1 feature passed, 0 failed, 0 skipped 2 scenarios passed, 0 failed, 0 skipped 4 steps passed, 0 failed, 0 skipped, 0 undefined Took 0m0.000s
The Complete Picture¶
# file:datatype.features/steps/step_cardinality_zero_or_one.py
# -*- coding: UTF-8 -*-
"""
Feature: Use Optional Part in Step Definitions
Scenario: Case 1 with "a "
Given ...
When attacked by a samurai
Scenario: Case 2 without "a "
Given ...
When attacked by Chuck Norris
"""
# @mark.user_defined_types
# ------------------------------------------------------------------------
# USER-DEFINED TYPES:
# ------------------------------------------------------------------------
from behave import register_type
from parse_type import TypeBuilder
import parse
@parse.with_pattern(r"a\s+")
def parse_word_a(text):
"""Type converter for "a " (followed by one/more spaces)."""
return text.strip()
# -- SAME:
# parse_optional_word_a = TypeBuilder.with_zero_or_one(parse_word_a)
parse_optional_word_a = TypeBuilder.with_optional(parse_word_a)
register_type(optional_a_=parse_optional_word_a)
# @mark.steps
# ----------------------------------------------------------------------------
# STEPS:
# ----------------------------------------------------------------------------
from behave import given, when, then
from hamcrest import assert_that, equal_to, is_in
# -- OPTIONAL-PART: {:optional_a_}
# By using data type with cardinality zero or one (0..1, optional).
@when('attacked by {:optional_a_}{opponent}')
def step_attacked_by(context, a_, opponent):
context.ninja_fight.opponent = opponent
# -- VERIFY: Optional part feature.
assert_that(a_, is_in(["a", None]))
assert_that(opponent, is_in(["Chuck Norris", "samurai"]))
# ----------------------------------------------------------------------------
# MORE STEPS:
# ----------------------------------------------------------------------------
from ninja_fight import NinjaFight
@given('the ninja has a {achievement_level}')
def step_the_ninja_has_a(context, achievement_level):
context.ninja_fight = NinjaFight(achievement_level)
@then('the ninja should {reaction}')
def step_the_ninja_should(context, reaction):
assert_that(reaction, equal_to(context.ninja_fight.decision()))


Q2 GDP print, F&O expiry among top triggers driving D-St next week
Here are the key factors that will guide the market next week.
by Shubham RajTraders and investors on Dalal Street would focus on India's second quarter GDP print, which is expected to dive further, besides taking cues from global factors in the expiry week ahead. If the GDP numbers surprise positively, that good be seen as a good omen for the economy and markets.
This apart, expiry of November series F&O contracts may mean a volatile week ahead. Besides, traders will also track FII inflows.
Going by the buzz on Dalal Street, here are the key factors that will guide the market next week:
November expiry
The market may be volatile this week, especially on Thursday, November 28, when traders will shift their positions as the November series futures and options (F&O) contracts will expire. In this series, Sensex and Nifty have remained largely flat with Sensex gaining 0.5 per cent and Nifty advancing 0.3 per cent.
India’s GDP numbers
India will release its GDP growth print for September quarter on Friday. Analysts are expecting the rate to dip below 5 per cent. SBI has cut GDP growth forecast for the second quarter to 4.2 per cent, a multi-quarter low.
FII inflows
Foreign institutional investors poured in more than Rs 5,000 crore on the last day of the week, taking net inflows to the equity market to Rs 2,683.96 crore, as per data available on NSDL. Marketmen will track foreign fund flows to Indian equities to gauge their stance. Overall, FIIs have largely been bullish on the Indian market in November, investing Rs 17,548 crore.
Global cues
A number of data will be released this week, starting from US new home sales data for October. On Wednesday, China will come out with industrial profits number for October while US GDP Q3 estimates will be released. US EIA Crude Oil stocks Change data for 22 Nov will also be published. On Thursday, US initial and continuing jobless claims numbers will be out. The similar data for Japan will be released on Friday.


| French Guiana(https://www.cdc.gov/malaria/images/map/Frenchguiana_3.14.16.jpg) |
All areas including Matoury, Macouria, and Kourou, except none in coastal areas west of Kourou and Cayenne city. |
Low |
Chloroquine |
P. vivax >70%, P. falciparum 20-30%, P. malariae rare |
Atovaquone-proguanil, doxycycline, or mefloquine |
City(ies) of travel
Administrative divisions of French Guiana |