In the greenest of our valleys
By good angels tenanted,
Once a fair and stately palace—
Radiant palace—reared its head.
In the monarch Thought’s dominion,
It stood there!
Never seraph spread a pinion
Over fabric half so fair!
Banners yellow, glorious, golden,
On its roof did float and flow
(This—all this—was in the olden
Time long ago)
And every gentle air that dallied,
In that sweet day,
Along the ramparts plumed and pallid,
A wingèd odor went away.
Wanderers in that happy valley,
Through two luminous windows, saw
Spirits moving musically
To a lute’s well-tunèd law,
Round about a throne where, sitting,
Porphyrogene!
In state his glory well befitting,
The ruler of the realm was seen.
And all with pearl and ruby glowing
Was the fair palace door,
Through which came flowing, flowing, flowing
And sparkling evermore,
A troop of Echoes, whose sweet duty
Was but to sing,
In voices of surpassing beauty,
The wit and wisdom of their king.
But evil things, in robes of sorrow,
Assailed the monarch’s high estate;
(Ah, let us mourn!—for never morrow
Shall dawn upon him, desolate!)
And round about his home the glory
That blushed and bloomed
Is but a dim-remembered story
Of the old time entombed.
And travellers, now, within that valley,
Through the red-litten windows see
Vast forms that move fantastically
To a discordant melody;
While, like a ghastly rapid river,
Through the pale door
A hideous throng rush out forever,
And laugh—but smile no more.
Once upon a midnight dreary, while I pondered, weak and weary,
Over many a quaint and curious volume of forgotten lore—
While I nodded, nearly napping, suddenly there came a tapping,
As of some one gently rapping, rapping at my chamber door.
“’Tis some visitor,” I muttered, “tapping at my chamber door—
Only this and nothing more.”
Ah, distinctly I remember it was in the bleak December;
And each separate dying ember wrought its ghost upon the floor.
Eagerly I wished the morrow;—vainly I had sought to borrow
From my books surcease of sorrow—sorrow for the lost Lenore—
For the rare and radiant maiden whom the angels name Lenore—
Nameless here for evermore.
And the silken, sad, uncertain rustling of each purple curtain
Thrilled me—filled me with fantastic terrors never felt before;
So that now, to still the beating of my heart, I stood repeating
“’Tis some visitor entreating entrance at my chamber door—
Some late visitor entreating entrance at my chamber door;—
This it is and nothing more.”
Presently my soul grew stronger; hesitating then no longer,
“Sir,” said I, “or Madam, truly your forgiveness I implore;
But the fact is I was napping, and so gently you came rapping,
And so faintly you came tapping, tapping at my chamber door,
That I scarce was sure I heard you”—here I opened wide the door;—
Darkness there and nothing more.
Deep into that darkness peering, long I stood there wondering, fearing,
Doubting, dreaming dreams no mortal ever dared to dream before;
But the silence was unbroken, and the stillness gave no token,
And the only word there spoken was the whispered word, “Lenore?”
This I whispered, and an echo murmured back the word, “Lenore!”—
Merely this and nothing more.
Back into the chamber turning, all my soul within me burning,
Soon again I heard a tapping somewhat louder than before.
“Surely,” said I, “surely that is something at my window lattice;
Let me see, then, what thereat is, and this mystery explore—
Let my heart be still a moment and this mystery explore;—
’Tis the wind and nothing more!”
Open here I flung the shutter, when, with many a flirt and flutter,
In there stepped a stately Raven of the saintly days of yore;
Not the least obeisance made he; not a minute stopped or stayed he;
But, with mien of lord or lady, perched above my chamber door—
Perched upon a bust of Pallas just above my chamber door—
Perched, and sat, and nothing more.
Then this ebony bird beguiling my sad fancy into smiling,
By the grave and stern decorum of the countenance it wore,
“Though thy crest be shorn and shaven, thou,” I said, “art sure no craven,
Ghastly grim and ancient Raven wandering from the Nightly shore—
Tell me what thy lordly name is on the Night’s Plutonian shore!”
Quoth the Raven “Nevermore.”
Much I marvelled this ungainly fowl to hear discourse so plainly,
Though its answer little meaning—little relevancy bore;
For we cannot help agreeing that no living human being
Ever yet was blessed with seeing bird above his chamber door—
Bird or beast upon the sculptured bust above his chamber door,
With such name as “Nevermore.”
But the Raven, sitting lonely on the placid bust, spoke only
That one word, as if his soul in that one word he did outpour.
Nothing farther then he uttered—not a feather then he fluttered—
Till I scarcely more than muttered “Other friends have flown before—
On the morrow he will leave me, as my Hopes have flown before.”
Then the bird said “Nevermore.”
Startled at the stillness broken by reply so aptly spoken,
“Doubtless,” said I, “what it utters is its only stock and store
Caught from some unhappy master whom unmerciful Disaster
Followed fast and followed faster till his songs one burden bore—
Till the dirges of his Hope that melancholy burden bore
Of ‘Never—nevermore’.”
But the Raven still beguiling all my fancy into smiling,
Straight I wheeled a cushioned seat in front of bird, and bust and door;
Then, upon the velvet sinking, I betook myself to linking
Fancy unto fancy, thinking what this ominous bird of yore—
What this grim, ungainly, ghastly, gaunt, and ominous bird of yore
Meant in croaking “Nevermore.”
This I sat engaged in guessing, but no syllable expressing
To the fowl whose fiery eyes now burned into my bosom’s core;
This and more I sat divining, with my head at ease reclining
On the cushion’s velvet lining that the lamp-light gloated o’er,
But whose velvet-violet lining with the lamp-light gloating o’er,
She shall press, ah, nevermore!
Then, methought, the air grew denser, perfumed from an unseen censer
Swung by Seraphim whose foot-falls tinkled on the tufted floor.
“Wretch,” I cried, “thy God hath lent thee—by these angels he hath sent thee
Respite—respite and nepenthe from thy memories of Lenore;
Quaff, oh quaff this kind nepenthe and forget this lost Lenore!”
Quoth the Raven “Nevermore.”
“Prophet!” said I, “thing of evil!—prophet still, if bird or devil!—
Whether Tempter sent, or whether tempest tossed thee here ashore,
Desolate yet all undaunted, on this desert land enchanted—
On this home by Horror haunted—tell me truly, I implore—
Is there—is there balm in Gilead?—tell me—tell me, I implore!”
Quoth the Raven “Nevermore.”
“Prophet!” said I, “thing of evil!—prophet still, if bird or devil!
By that Heaven that bends above us—by that God we both adore—
Tell this soul with sorrow laden if, within the distant Aidenn,
It shall clasp a sainted maiden whom the angels name Lenore—
Clasp a rare and radiant maiden whom the angels name Lenore.”
Quoth the Raven “Nevermore.”
“Be that word our sign of parting, bird or fiend!” I shrieked, upstarting—
“Get thee back into the tempest and the Night’s Plutonian shore!

Leave my loneliness unbroken!—quit the bust above my door!
Take thy beak from out my heart, and take thy form from off my door!”
Quoth the Raven “Nevermore.”
And the Raven, never flitting, still is sitting, still is sitting
On the pallid bust of Pallas just above my chamber door;
And his eyes have all the seeming of a demon’s that is dreaming,
And the lamp-light o’er him streaming throws his shadow on the floor;
And my soul from out that shadow that lies floating on the floor
Shall be lifted—nevermore!
It was many and many a year ago,
In a kingdom by the sea,
That a maiden there lived whom you may know
By the name of Annabel Lee;
And this maiden she lived with no other thought
Than to love and be loved by me.
I was a child and she was a child,
In this kingdom by the sea,
But we loved with a love that was more than love—
I and my Annabel Lee—
With a love that the wingèd seraphs of Heaven
Coveted her and me.
And this was the reason that, long ago,
In this kingdom by the sea,
A wind blew out of a cloud, chilling
My beautiful Annabel Lee;
So that her highborn kinsmen came
And bore her away from me,
To shut her up in a sepulchre
In this kingdom by the sea.
The angels, not half so happy in Heaven,
Went envying her and me—
Yes!—that was the reason (as all men know,
In this kingdom by the sea)
That the wind came out of the cloud by night,
Chilling and killing my Annabel Lee.
But our love it was stronger by far than the love
Of those who were older than we—
Of many far wiser than we—
And neither the angels in Heaven above
Nor the demons down under the sea
Can ever dissever my soul from the soul
Of the beautiful Annabel Lee;
For the moon never beams, without bringing me dreams
Of the beautiful Annabel Lee;
And the stars never rise, but I feel the bright eyes
Of the beautiful Annabel Lee;
And so, all the night-tide, I lie down by the side
Of my darling—my darling—my life and my bride,
In her sepulchre there by the sea—
In her tomb by the sounding sea.
In visions of the dark night
I have dreamed of joy departed—
But a waking dream of life and light
Hath left me broken-hearted.
Ah! what is not a dream by day
To him whose eyes are cast
On things around him with a ray
Turned back upon the past?
That holy dream—that holy dream,
While all the world were chiding,
Hath cheered me as a lovely beam
A lonely spirit guiding.
What though that light, thro' storm and night,
So trembled from afar—
What could there be more purely bright
In Truth's day-star?

And, in parting from you now,
Thus much let me avow —
You are not wrong, who deem
That my days have been a dream;
Yet if hope has flown away
In a night, or in a day,
In a vision, or in none,
Is it therefore the less gone?
All that we see or seem
Is but a dream within a dream.
I stand amid the roar
Of a surf-tormented shore,
And I hold within my hand
Grains of the golden sand —
How few! yet how they creep
Through my fingers to the deep,
While I weep — while I weep!
O God! Can I not grasp
Them with a tighter clasp?
O God! can I not save
One from the pitiless wave?
Is all that we see or seem
But a dream within a dream?


December 5 - 7, 2023
Pensacola, Florida, USA
Knowledge has played a fundamental role since the inception of artificial intelligence. While the forms in which algorithms have leveraged knowledge have evolved over time, the need for efficient representations is ever more critical. Indeed, recent advances of AI, such as the stunning performance of large language models have relied on the large amount of data available on the Web. There is growing agreement among researchers that it's important to look beyond the sheer volume of data, and instead also prioritize the development of methods that are accurate, precise, and efficient for capturing knowledge.
The International Conference on Knowledge Capture, K-CAP, aims at bringing together an interdisciplinary group of researchers on a diverse set of topics with interest in the development of knowledge capture. This involves the design and development of formalisms, methods and tools that enable efficient and precise extraction and organization of knowledge from different sources and for different modalities of use including, for example, automated reasoning, machine learning and human-machine teaming.
To enable a vibrant and constructive discussion on scalable and precise knowledge capture, K-CAP 2023, calls for the participation of researchers from diverse areas of artificial intelligence, including, but not limited to, knowledge representation and reasoning, knowledge acquisition, semantic web, intelligent user interfaces for knowledge acquisition and retrieval, query processing and question answering over heterogeneous knowledge bases, novel evaluation paradigms, problem-solving and reasoning, ethics and AI, explainability, neurosymbolic AI, agents, information extraction from structured or unstructured data, machine learning and representation learning, information enrichment and visualization, as well as researchers interested in cyber-infrastructures to foster the publication, retrieval, reuse, and integration of data.


123
Will return the following nodes:
[div, 1, span, 2, 3]
With the following depths
[1, 1, 2, 2, 1]
Imagining |
represents iterator position, the traversal stops at
each of the following locations:

|1||2|3|
The iterator can also be used in reverse mode, which will return the nodes and states in the opposite order. The depths will be slightly different since, like in normal mode, the depth is computed *after* the last move. Lastly, it is possible to create an iterator that is unconstrained, meaning that it will continue iterating until the end of the document instead of until exiting the start node.


XYZ Community
XYZ Community
XYZ Community
XYZ Community
XYZ Community
XYZ Community
XYZ Community
Back
Next


cards v0.1.0 Cards
Provides methods for creating and handling a deck of cards
Link to this section Summary
Functions
Return a list of strings which represent a deck of playing cards
Piped: Creates a deck of cards, shuffles it and then deals it based on hand size
Non-Piped: Creates a deck of cards, shuffles it and then deals it based on hand size
creates the card collection
Loads the file from erlang binary
Link to this section Functions
Link to this function
contains?(deck, card)
Link to this function
create_deck()
Return a list of strings which represent a deck of playing cards
Link to this function
create_hand(hand_size)
Piped: Creates a deck of cards, shuffles it and then deals it based on hand size
Link to this function
create_hand_without_pipe(hand_size)
Non-Piped: Creates a deck of cards, shuffles it and then deals it based on hand size
Link to this function
deal(deck, cardsToBeDealt)
Link to this function
doubleComprehension(values, suits)
creates the card collection
Link to this function
doubleLoopDeckGeneration(values, suits)
Link to this function
help()
Link to this function
load1(filename)
Loads the file from erlang binary
Link to this function
load2(filename)
Link to this function
save(deck, filename)
Link to this function
shuffle(deck)


Ok party people! It’s that time again! It’s time for Minnow University and the Peace Academy.
On Minnow University we’ll be focusing on Minnows! The goal is to provide some helpful advice on how to grow your account on the Steem Blockchain. This is of course in the scope of the Minnow Support Project where we strive to spread the values of Peace, Abundance, and Liberty, help the steem ecosystem grow, and train and retain new members on the platform!
Speaking of Peace we’ll have the Peace Academy right after.
Logistics
Find us on mspwaves.com/listen. We’ll have a dlive stream go up through @msp-waves.
You can also catch us on Discord through the largest off chain Discord group ie the Peace, Abundance, and Liberty Network. You can find the proper Discord url on the @minnowsupport page or just check us out at minnowpond.org
See you in a few minutes live on air!
PS there’s this guy named Kevin. He’ll be there too. I think his lovely wife Isaria will be there too!
This page is synchronized from the post: ‘Minnow University and Peace Academy tonight starting in 15 minutes on msp-waves’


Deploy¶
-
module
windows.
Deploy
¶ -
DeployWindow : public QWidget
The DeployWindow class is a PySide2 Graphical User Interface (GUI) window that is called by MainWindow class in order to configure a custom session and write to session_config.txt.
Public Functions
-
__init__
(self, debug=False)¶ The constructor.
Sets the size of the window and configurations for session_config. Checks if the session_config.txt file exists. If true, configure accordingly. Otherwise, assign default values. Calls setButtons function to populate window with button.
-
setButtons
(self)¶ A Mutator function that defines all buttons in DeployWindow.
-
deployPackage
(self)¶ A Mutator function that runs a bash script that checks if the _is_running boolean flag is True or not.
If False, run bash script to run ROS2 package with session_config.txt and usecase_config.txt Otherwise, run bash script to kill ROS2 package processes remotely.
-
doesFileExist
(self, input_filepath)¶ A Getter function that checks if a given file exists.
-
setVisualizeFlag
(self)¶ A function is triggered by the button labelled, Visualize/Action.
-
setUseCase
(self, index)¶ A function is triggered by the DropDown Menu labelled, UseCase.
-
updateSessionConfig
(self)¶ A Mutator function that updates the session_config.txt file.
-
setModel
(self)¶ A function is triggered by the button labelled, ONNX Model.
-
setLabelList
(self)¶ A function is triggered by the button labelled, Label List.
-
-


Move me, but you can only drop me in one of these containers.
If you try to drop me somewhere other than these containers, I'll just come back.
Item 3.
Item 6.
You can drop me in the left container, otherwise I'll stay here.
Item 4.
Item 5.
// JS
controller('Directive', ['$scope', 'dragularService', function TodoCtrl($scope) {
$scope.dragularOptions = {
classes: {
mirror: 'custom-green-mirror'
},
nameSpace: 'common' // just connecting left and right container
};
}])

Move me, but you can only drop me in one of these containers.

If you try to drop me somewhere other than these containers, I'll just come back.

Item 3.

Item 6.

You can drop me in the left container, otherwise I'll stay here.

Item 4.

Item 5.


The Certificate Manager plugin adds functionality to Openfire that relates to administration of its certificate stores.
Copy certificatemanager.jar into the plugins directory of your Openfire installation. The plugin will then be automatically deployed. To upgrade to a new version, copy the new certificatemanager.jar file over the existing file.
The plugin is configured via the Openfire Admin Console. After installation, a new Admin Console page is available. The page can be found under in the "Server", "TLS/SSL Certificates" tab. There, this plugin adds a new item on the side-bar, named "Management".
This plugin allows Openfire to monitor file changes in a particular directory (which, by default, is <OPENFIRE_HOME>/resources/security/hotdeploy/). Whenever a set of files is found that consists of a PEM-encoded private key and a PEM-encoded certificate chain, this plugin will attempt to install them in the Openfire identity store.
The directory watcher mechanism, described above, is an excellent way to make use of the periodically updated data that's generated by Let's Encrypts Certbot. Openfire can be configured to monitor the directory in which certbot places renewed data. This can, however, lead to file-permission issues (the certbot directories are often not readable by the Openfire process). An alternative solution is to use certbots post-hook to copy the data into a directory that can be used by Openfire.
The icon used in this plugin is designed by Flaticon.


Details
| Name | |
|---|---|
| UID | |
| Namespaces | |
| Labels | |
| Annotations | |
| Created time |
Resource Info
| Type | |
|---|---|
| Clusters IP | |
| Session Affinity | |
| Selector |
End Points
| Host | Ports (Name, Port, Protocol) | Nodes | Ready |
|---|
Pods
| Name | Namespaces | Labels | Status | Restarts | Created time |
|---|
Events
| Message | Source | Sub-object | Count | First seen | Last seen |
|---|


Account Login
Sign in
{{ err }}
New user? |
Sign Up
Sign Up
{{ err }}
License expiry date (*)
Birth date (*)
Gender:
Male
Female
{{userImg.name.substr(0,50)}}
My Cars
Delete Car
Car Registration:
{{car.matricula}}
Model:
{{car.model}}
Color:
{{car.color}}
Add the cars which you will use with
DRIVER
.
Add Car
Sign Up


[Erowid Note:
Coricidin Cough & Cold contains chlorpheniramine maleate which can be dangerous and/or fatal at high doses. This product should
not be used as a source for recreational DXM.]
[Erowid Note: This is an unconfirmed report of a death related to Coricidin, we initially published it because we had received an email about a death a few weeks earlier, but after several weeks of trying to find any confirming information without any success, we've decided to put it into the cellar. Let us know if you know of any information about this death.]
I got a call early in the morning from my son's dad. He said he had a situation. Our son, Justin, apparently was very high on something. The next call I got was to tell me he had stopped breathing before the paramedics got there to take him to the pediatric intensive care unit at Hermann Hospital in Houston. We found multiple flats of Coricidan Cough & Cold (with CPM in his room. He had passed the last plateau in his dosage.
Two days later the coolest of neurologists came into the room and explained how the brain works. The high-octane part, the ganglia, had been deprived of oxygen too long to ever function again. My beloved, gorgeous, talented son was brain dead. I got to sign the papers to remove his life support.
What a trip! Wow!
Then I got into the history section of my computer. I found out that sweet Justin had learned a lot about drugs from sites like this.
My mindset was one of sympathy for people who provided a leg on his journey to his death (present company included).
The setting is the rest of my life without a cherished son.
I made preparations for the experience by loving and providing for him for almost 17 years before he reached for the secret too soon.
Dosage was a lot. Timing was after midnight after his parents went to bed. It was too late to pump his stomach.
What I learned from the experience is that freedom of expression comes with the responsibility not to abuse that freedom. I also learned to educate all the parents of teenagers I know about sites like this one, not to mention a few congressmen and legislators, and the news media.
The cool patterns I saw came through the tracks of endless tears.
I would really like it if you published my experience.
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.


import numpy as np
import pandas as pd
from cis_interface import serialize
from cis_interface.communication.AsciiTableComm import AsciiTableComm
from cis_interface.schema import register_component
from cis_interface.serialize.PandasSerialize import PandasSerialize
[docs]def pandas_send_converter(obj):
r"""Performs conversion from a limited set of objects to a Pandas data frame
for sending to a file via PandasFileComm. Currently supports converting from
structured numpy arrays, lists/tuples of numpy arrays, and dictionaries.
Args:
obj (object): Object to convert.
Returns:
pandas.DataFrame: Converted data frame (or unmodified input if conversion
could not be completed.
"""
if isinstance(obj, (list, tuple)):
obj = serialize.list2pandas(obj)
elif isinstance(obj, np.ndarray):
obj = serialize.numpy2pandas(obj)
elif isinstance(obj, dict):
obj = serialize.dict2pandas(obj)
return obj
[docs]def pandas_recv_converter(obj):
r"""Performs conversion to a limited set of objects from a Pandas data frame
for receiving from a file via PandasFileComm. Currently supports converting to
lists/tuples of numpy arrays.
Args:
obj (pandas.DataFrame): Data frame to convert.
Returns:
list: pandas.DataFrame: Converted data frame (or unmodified input if conversion
could not be completed.
"""
return serialize.pandas2list(obj)
[docs]@register_component
class PandasFileComm(AsciiTableComm):
r"""Class for handling I/O from/to a pandas csv file on disk.
Args:
name (str): The environment variable where communication address is
stored.
delimiter (str, optional): String that should be used to separate
columns. Defaults to '\t'.
**kwargs: Additional keywords arguments are passed to parent class.
"""
_filetype = 'pandas'
_default_serializer = PandasSerialize
def _init_before_open(self, **kwargs):
r"""Set up dataio and attributes."""
kwargs.setdefault('send_converter', pandas_send_converter)
kwargs.setdefault('recv_converter', pandas_recv_converter)
super(PandasFileComm, self)._init_before_open(**kwargs)
self.read_meth = 'read'
[docs] @classmethod
def get_testing_options(cls, as_frames=False, no_names=False):
r"""Method to return a dictionary of testing options for this class.
Args:
as_frames (bool, optional): If True, the test objects will be Pandas
data frames. Defaults to False.
no_names (bool, optional): If True, an example is returned where the
names are not provided to the deserializer. Defaults to False.
Returns:
dict: Dictionary of variables to use for testing. Key/value pairs:
kwargs (dict): Keyword arguments for comms tested with the
provided content.
send (list): List of objects to send to test file.
recv (list): List of objects that will be received from a test
file that was sent the messages in 'send'.
contents (bytes): Bytes contents of test file created by sending
the messages in 'send'.
"""
out_seri = PandasSerialize.get_testing_options(no_names=no_names)
out = {'kwargs': out_seri['kwargs'],
'send': out_seri['objects'],
'recv': [pd.concat(out_seri['objects'], ignore_index=True)],
'dict': serialize.pandas2dict(out_seri['objects'][0]),
'contents': out_seri['contents'],
'msg_array': serialize.pandas2numpy(out_seri['objects'][0])}
if not as_frames:
out['recv'] = [serialize.pandas2list(x) for x in out['recv']]
out['send'] = [serialize.pandas2list(x) for x in out['send']]
out['msg'] = out['send'][0]
for k in ['format_str', 'as_array']:
if k in out['kwargs']:
del out['kwargs'][k]
return out
@property
def header_was_written(self):
r"""bool: True if head has been written to the current file."""
return getattr(self, '_header_was_written', False)
@header_was_written.setter
def header_was_written(self, header_was_written):
r"""Set for header_was_written property."""
if getattr(self, 'serializer', None) is not None:
if not header_was_written:
self.serializer.write_header = True
else:
self.serializer.write_header = False
elif header_was_written: # pragma: debug
raise Exception("header_was_written set before serializer created")
self._header_was_written = header_was_written
[docs] def read_header(self):
r"""Read header lines from the file and update serializer info."""
return
[docs] def write_header(self):
r"""Write header lines to the file based on the serializer info."""
# This will result in header only being sent for first message
if not self.header_was_written:
self.header_was_written = True
return


---
layout: layouts/post.njk
title: "Creative Side Projects: A How-To Guide"
permalink: /creative-side-projs/
date: '2017-03-08'
comments: true
tags:
- interview
- podcast
- history
- personal
description: "The best way to learn any new skill is through practice. This post is about how to come up with creative and effective side projects for developers to keep up with today's ever-changing technology."
link-out: https://www.shopify.com/partners/blog/creative-side-projects-a-how-to-guide
---
If you are not redirected, please visit this think!


Hiya, you found me!Here's where I put all of my personal internet stuff, feel free to click the things! — Snuggle
Tap here for social media stuff!Made with by Evie Snuggle, whose pronoun.is/she.


!Secret Agent Collin: Right, don't mess up this time. I need you to convince Kuta to hand you over one of his possessions. As soon as you have it, get back here and I'll assess your progress. Remember: move fast, avoid water. Go!


PyData London 2017, write up
This is a post about my experience at PyData London 2017. About what I liked, what I learnt... Note that having 4 tracks, and so many people, my opinions are very biased. If you want to know how your experience would be, it'll be amazing, but...


JQuery Narrative Select Plugin by gdakram
From
-
If this is
,
then you are
.
-
Date:
To
-
If this is
,
then you are
.
-
Date:
Why, When
-
Make your drop-down list look uniform cross-platform.
-
Enables you to include a drop-down list as part of a 'narrative' form, where your user
input fields look uniform.
How
<!-- CSS -->
<style type="text/css">
@import url("/path/to/jquery.narrativeselect/jquery.narrativeselect.css");
</style>
<!-- JS -->
<script type="text/javascript" src="/path/to/jquery.latest.js"></script>
<script type="text/javascript" src="/path/to/jquery.narrativeselect.min.js"></script>
<script type="text/javascript">
//--<![CDATA[
$("select").narrativeselect();
//--]]>
</script>
Customization
-
CSS
Edit jquery.narrativeselect.css file however which way floats your boat!
-
Javascript
<script type="text/javascript">
//--<![CDATA[
$("select").narrativeselect({
tooltip_opacity : 0.80, // defaults to 0.90
tooltip_max_height : 300, // defaults to 200, in px.
});
//--]]>
</script>
Don't want it anymore? :'(
<!-- JS -->
<script type="text/javascript">
//--<![CDATA[
$("select").narrativeselect("destroy");
//--]]>
</script>
To Do (Current Limitations)
- Doesn't work with "multiple='multiple'" select elements. Yet.
- No key-stroke event handler for searching through the "option" elements.
License
MIT License
Author/Contact
Shahrier Akram<EMAIL_ADDRESS>Download
You can download this project in either
zip or
tar formats.
You can also clone the project with Git
by running:
$ git clone git://github.com/gdakram/jquery-narrative-select.git
get the source code on GitHub : gdakram/jquery-narrative-select


Make your orders online or give us a call at +259722222333 between 8.30am - 9.30pm for deliveries
Best ingredients and wood fired pizza. THE FRESHEST LOCALLY-GROWN INGREDIENTS AND HANDCRAFTED CRUST. Ye-Gon Pizza has created a menu featuring local ingredients, precisely cooked and brought together on the plate to create a lasting impression so you keep coming back for more.


RT @confreaks: New Video! @cascadiaruby -How Not to Be Lonely: An Extrovert's Guide to Working Alone by @_jnf http://confreaks.com/videos/4148-cascadiaruby2014-how-not-to-be-lonely-an-extrovert-s-guide-to-working-alone
8/21/2014, 1:11:57 PM
Favs: 0
Retweets: 0
link


--- title: Starbucks iOS App Analysis author: Kathryn Daugherty date: '2019-09-16' slug: starbucks-ios-app-analysis categories: [] tags: [] css: [] description: '' highlight: yes scripts: [] ---
Have you ever wanted to see more detail behind apps on your iOS device? There’s an R package called ‘itunesr’ that allows for free extracts of user ratings and reviews. Combining that with some sentiment analysis, you can examine any trends for apps of interest.
First, you’ll need to identify an app of interest. I use the
Starbucks app quite a bit and have read numerous articles about it’s success. So, let’s see if ‘itunesr’ tells a similar story.
Let’s install the needed programs.
# Set CRAN Mirror
options(repos = c(CRAN = "http://cran.rstudio.com"))
# Set time zone
options(tz="America/New_York")
# install itunesr directly from CRAN:
install.packages("itunesr")
## Installing package into '/Users/kathryn_daugherty/Library/R/3.5/library'
## (as 'lib' is unspecified)
##
## The downloaded binary packages are in
## /var/folders/gb/t5w_mwv15mv1rqgt0c4n0m500000gn/T//RtmpdBqZ3E/downloaded_packages
# the development version from GitHub:
# install.packages("devtools")
# devtools::install_github("amrrs/itunesr")
library(itunesr)
Now, let’s find the app’s ID. To do this, you must search for it in the apple online store and you’ll find the number in the URL. Here is Starbucks’ page and you’ll note that its ID is 331177714.
# Starbucks page: https://apps.apple.com/us/app/starbucks/id331177714
# Latest (Page 1) Starbucks Reviews for the Country: US
sbux_reviews <- getReviews(331177714,'us',1)
head(sbux_reviews,2)
## Title
## 1 Takes forever!
## 2 Beautifully designed and functional
## Author_URL Author_Name App_Version
## 1 https://itunes.apple.com/us/reviews/id489505113 Revelaine 5.10
## 2 https://itunes.apple.com/us/reviews/id143796547 hbomb7 5.10
## Rating
## 1 2
## 2 5
## Review
## 1 The new Starbucks store in Kearny NJ us ridiculously slow. When I use the app, it has taken up to 50 minutes to get my order. One time, I waited and asked them to verify that they had received my order. They said they had, then 10 minutes later, said they had run out of the product. It’s a new store and perhaps they are working thru some kinks but they need to resolve this soon.
## 2 Love this app! It was beautifully designed (great UI/UX) and functions virtually flawlessly. Not a huge deal, but my only suggestion would be to be able to load an exiting gift card with another gift card’s balance, rather than having to create a new card, transfer the balance, then delete the card. Thank you.
## Date
## 1 2019-09-16 17:11:22
## 2 2019-09-16 16:34:37
This is a lot of data! Let’s start off by looking at the numerical ratings/scores that users have given the app.
# Ratings Trend
install.packages("highcharter")
## Installing package into '/Users/kathryn_daugherty/Library/R/3.5/library'
## (as 'lib' is unspecified)
##
## The downloaded binary packages are in
## /var/folders/gb/t5w_mwv15mv1rqgt0c4n0m500000gn/T//RtmpdBqZ3E/downloaded_packages
# install.packages("lubridate")
# install.packages("dplyr")
library(highcharter)
## Warning: package 'highcharter' was built under R version 3.5.2
## Highcharts (www.highcharts.com) is a Highsoft software product which is
## not free for commercial and Governmental use
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(lubridate)
##
## Attaching package: 'lubridate'
## The following object is masked from 'package:base':
##
## date
dt <- sbux_reviews
dt$Date <- as.Date(dt$Date)
dt$Rating <- as.numeric(dt$Rating)
dt <- dt %>% select(Date,Rating) %>% group_by(Date) %>% summarise(Rating = round(mean(Rating),2))
# Plot
highchart() %>% hc_add_series_times_values(dt$Date,dt$Rating, name = 'Average Rating')
We see that the rating is generally pretty high. But, this doesn’t take advantage of all the text users have provided. To measure that, let’s use Bing’s defined sentiments to illustrate how positive/negative the feedback is.
# Sentiment Analysis
install.packages("sentimentr")
## Installing package into '/Users/kathryn_daugherty/Library/R/3.5/library'
## (as 'lib' is unspecified)
##
## The downloaded binary packages are in
## /var/folders/gb/t5w_mwv15mv1rqgt0c4n0m500000gn/T//RtmpdBqZ3E/downloaded_packages
library(sentimentr)
## Warning: package 'sentimentr' was built under R version 3.5.2
library(tidytext)
library(stringr)
# identify and define sentiments/words
get_sentiments("bing")
## # A tibble: 6,788 x 2
## word sentiment
## <chr> <chr>
## 1 2-faced negative
## 2 2-faces negative
## 3 a+ positive
## 4 abnormal negative
## 5 abolish negative
## 6 abominable negative
## 7 abominably negative
## 8 abominate negative
## 9 abomination negative
## 10 abort negative
## # ... with 6,778 more rows
Next, we’ll want to combine the sentiment scores with the words used in the reviews.
# pull in sbux info
reviews_only <- as.character(sbux_reviews$Review)
head(reviews_only,2)
## [1] "The new Starbucks store in Kearny NJ us ridiculously slow. When I use the app, it has taken up to 50 minutes to get my order. One time, I waited and asked them to verify that they had received my order. They said they had, then 10 minutes later, said they had run out of the product. It’s a new store and perhaps they are working thru some kinks but they need to resolve this soon."
## [2] "Love this app! It was beautifully designed (great UI/UX) and functions virtually flawlessly. Not a huge deal, but my only suggestion would be to be able to load an existing gift card with another gift card’s balance, rather than having to create a new card, transfer the balance, then delete the card. Thank you."
sentiment_scores <- reviews_only %>% sentiment_by(by=NULL)
# plot findings
highchart() %>% hc_xAxis(sentiment_scores$element_id) %>% hc_add_series(sentiment_scores$ave_sentiment, name = 'Reviews Sentiment Scores')
Now we have two visualizations that give us information on our app of interest: Starbucks. This can easily be duplicated for any others… and it’s absolutely FREE.
[THE END]


From the Browse view (see: Browsing), any file can be launched and is done so using the program associated with the file extension on your machine.
When opening search results, ReSearcher supports the specifying and configuring of particular viewer applications, see: Configuring, Viewers for more information.


Try out our Premium Member services: Virtual Legal Assistant, Query Alert Service and an ad-free experience. Free for one month and pay only if you like it.
IN THE HIGH COURT OF JHARKHAND AT RANCHI A.B.A. No. 1610 of 2019 ------
Munna Baraik @ Navin Kumar ... Petitioner Versus The State of Jharkhand ... Opposite Party
------
CORAM: HON'BLE MR. JUSTICE ANIL KUMAR CHOUDHARY
------
For the Petitioner : Mr. R.K. Gupta, Advocate For the State : Addl. P.P. ------ Order No.04 Dated- 23.04.2019
Apprehending his arrest, the petitioner has moved this Court for grant of privilege of anticipatory bail in connection with Sikidiri P.S. Case No.11 of 2017 (G.R. No. 1206 of 2017) registered under sections 379 of the Indian Penal Code and under section 21(1), 21(6) of the Mines Minerals Concession Rules, 2004 and section 54 of Jharkhand Minerals Dealers Rules and under section 21(A)/37 of the Air Prevention and Control of Pollution Act.
Heard the learned counsel for the petitioner and learned Addl. P.P. for the State.
The Learned counsel for the petitioner submits that the allegation against the petitioner is that he along with the co-accused persons were involved in running illegal crusher and storage of huge quantity of stones, stone chips etc. It is further submitted that the allegation against the petitioner are all false and the crusher machine of the petitioner was closed since long. It is then submitted by the learned counsel for the petitioner that the petitioner has been implicated in this case on the basis of suspicion only. It is next submitted that the petitioner is ready and willing to deposit Rs.32,000/- with the informant-Assistant Mining Officer, Ranchi subject to final decision of the case and undertakes to cooperate with the investigation of the case. It is lastly submitted that the co-accused persons whose case stands on the similar footing has already been given the privilege of anticipatory bail by a coordinate Bench of this Court vide order dated 28.08.2018 in A.B.A. No.4920 of 2018, vide order dated 04.10.2018 in A.B.A. No.6033 of 2018 and vide order dated 04.01.2019 in A.B.A. No.6304 of 2018. Hence, it is submitted that the petitioner be given the privilege of anticipatory bail.
Learned Addl. P.P. opposes the prayer for grant of anticipatory bail.
Considering the submissions of the counsels and the fact as discussed above, I am of the opinion that it is a fit case where the above named petitioner be given the privilege of anticipatory bail. Hence, in the event of his arrest or surrender within a period of four weeks from the date of this order, he shall be released on bail on showing the proof of deposit of Rs.32,000/- with the informant- Assistant Mining Officer, Ranchi and on furnishing bail bond of Rs. 25,000/- (Rupees Twenty Five Thousand) with two sureties of the like amount each to the satisfaction of learned Judicial Magistrate, Ranchi, in connection with Sikidiri P.S. Case No.11 of 2017 (G.R. No. 1206 of 2017) with the condition that the petitioner will cooperate with the investigation of the case and appear before the Investigating Officer as and when noticed by him and will furnish his mobile number and a copy of his Aadhar Card in the court below with the undertaking that he will not change his mobile number during the pendency of the case subject to the conditions laid down under section 438 (2) Cr. P.C.
(Anil Kumar Choudhary, J.) Sonu/Gunjan-


Welcome to the third project of the Machine Learning Engineer Nanodegree! In this notebook, some template code has already been provided for you, and it will be your job to implement the additional functionality necessary to successfully complete this project. Sections that begin with 'Implementation' in the header indicate that the following block of code will require additional functionality which you must provide. Instructions will be provided for each section and the specifics of the implementation are marked in the code block with a 'TODO'
statement. Please be sure to read the instructions carefully!
In addition to implementing code, there will be questions that you must answer which relate to the project and your implementation. Each section where you will answer a question is preceded by a 'Question X' header. Carefully read each question and provide thorough answers in the following text boxes that begin with 'Answer:'. Your project submission will be evaluated based on your answers to each of the questions and the implementation you provide.
Note: Code and Markdown cells can be executed using the Shift + Enter keyboard shortcut. In addition, Markdown cells can be edited by typically double-clicking the cell to enter edit mode.
In this project, you will analyze a dataset containing data on various customers' annual spending amounts (reported in monetary units) of diverse product categories for internal structure. One goal of this project is to best describe the variation in the different types of customers that a wholesale distributor interacts with. Doing so would equip the distributor with insight into how to best structure their delivery service to meet the needs of each customer.
The dataset for this project can be found on the UCI Machine Learning Repository. For the purposes of this project, the features 'Channel'
and 'Region'
will be excluded in the analysis — with focus instead on the six product categories recorded for customers.
Run the code block below to load the wholesale customers dataset, along with a few of the necessary Python libraries required for this project. You will know the dataset loaded successfully if the size of the dataset is reported.
# Import libraries necessary for this project
import numpy as np
import pandas as pd
from IPython.display import display # Allows the use of display() for DataFrames
# Import supplementary visualizations code visuals.py
import visuals as vs
# Pretty display for notebooks
%matplotlib inline
# Load the wholesale customers dataset
try:
data = pd.read_csv("customers.csv")
data.drop(['Region', 'Channel'], axis = 1, inplace = True)
print("Wholesale customers dataset has {} samples with {} features each.".format(*data.shape))
except:
print("Dataset could not be loaded. Is the dataset missing?")
In this section, you will begin exploring the data through visualizations and code to understand how each feature is related to the others. You will observe a statistical description of the dataset, consider the relevance of each feature, and select a few sample data points from the dataset which you will track through the course of this project.
Run the code block below to observe a statistical description of the dataset. Note that the dataset is composed of six important product categories: 'Fresh', 'Milk', 'Grocery', 'Frozen', 'Detergents_Paper', and 'Delicatessen'. Consider what each category represents in terms of products you could purchase.
# Display a description of the dataset
display(data.describe())
To get a better understanding of the customers and how their data will transform through the analysis, it would be best to select a few sample data points and explore them in more detail. In the code block below, add three indices of your choice to the indices
list which will represent the customers to track. It is suggested to try different sets of samples until you obtain customers that vary significantly from one another.
# TODO: Select three indices of your choice you wish to sample from the dataset
indices = [19, 230, 401]
# Create a DataFrame of the chosen samples
samples = pd.DataFrame(data.loc[indices], columns = data.keys()).reset_index(drop = True)
print("Chosen samples of wholesale customers dataset:")
display(samples)
Consider the total purchase cost of each product category and the statistical description of the dataset above for your sample customers.
Hint: Examples of establishments include places like markets, cafes, delis, wholesale retailers, among many others. Avoid using names for establishments, such as saying "McDonalds" when describing a sample customer as a restaurant. You can use the mean values for reference to compare your samples with. The mean values are as follows:
Knowing this, how do your samples compare? Does that help in driving your insight into what kind of establishments they might be?
Answer:
I compare using the means of the products given, and I drive me to say that there is atleast 3 customer segments, as we didn't see all samples
First person seems to be super-market or grocery store.
One interesting thought to consider is if one (or more) of the six product categories is actually relevant for understanding customer purchasing. That is to say, is it possible to determine whether customers purchasing some amount of one category of products will necessarily purchase some proportional amount of another category of products? We can make this determination quite easily by training a supervised regression learner on a subset of the data with one feature removed, and then score how well that model can predict the removed feature.
In the code block below, you will need to implement the following:
new_data
a copy of the data by removing a feature of your choice using the DataFrame.drop
function.sklearn.cross_validation.train_test_split
to split the dataset into training and testing sets.test_size
of 0.25
and set a random_state
.random_state
, and fit the learner to the training data.score
function.def SelectFeature(feature):
# TODO: Make a copy of the DataFrame, using the 'drop' function to drop the given feature
new_data = data.drop([feature], axis = 1)
# TODO: Split the data into training and testing sets(0.25) using the given feature as the target
from sklearn.model_selection import train_test_split
# Set a random state.
X_train, X_test, y_train, y_test = train_test_split(new_data, data[feature], test_size=0.25, random_state = 19)
# TODO: Create a decision tree regressor and fit it to the training set
from sklearn import tree
regressor = tree.DecisionTreeRegressor()
regressor.fit(X_train,y_train)
# TODO: Report the score of the prediction using the testing set
score = regressor.score(X_test,y_test)
print ("{}'s score = {}".format(feature, score))
features = ['Fresh', 'Milk', 'Grocery', 'Frozen', 'Detergents_Paper','Delicatessen']
for feature in features:
SelectFeature(feature)
Hint: The coefficient of determination, R^2
, is scored between 0 and 1, with 1 being a perfect fit. A negative R^2
implies the model fails to fit the data. If you get a low score for a particular feature, that lends us to beleive that that feature point is hard to predict using the other features, thereby making it an important feature to consider when considering relevance.
Answer:
To get a better understanding of the dataset, we can construct a scatter matrix of each of the six product features present in the data. If you found that the feature you attempted to predict above is relevant for identifying a specific customer, then the scatter matrix below may not show any correlation between that feature and the others. Conversely, if you believe that feature is not relevant for identifying a specific customer, the scatter matrix might show a correlation between that feature and another feature in the data. Run the code block below to produce a scatter matrix.
# Produce a scatter matrix for each pair of features in the data
pd.scatter_matrix(data, alpha = 0.3, figsize = (14,8), diagonal = 'kde');
Hint: Is the data normally distributed? Where do most of the data points lie? You can use corr() to get the feature correlations and then visualize them using a heatmap(the data that would be fed into the heatmap would be the correlation values, for eg: data.corr()
) to gain further insight.
Answer:
import seaborn as sns; sns.set()
sns.heatmap(data.corr(), annot=True)
In this section, you will preprocess the data to create a better representation of customers by performing a scaling on the data and detecting (and optionally removing) outliers. Preprocessing data is often times a critical step in assuring that results you obtain from your analysis are significant and meaningful.
If data is not normally distributed, especially if the mean and median vary significantly (indicating a large skew), it is most often appropriate to apply a non-linear scaling — particularly for financial data. One way to achieve this scaling is by using a Box-Cox test, which calculates the best power transformation of the data that reduces skewness. A simpler approach which can work in most cases would be applying the natural logarithm.
In the code block below, you will need to implement the following:
log_data
after applying logarithmic scaling. Use the np.log
function for this.log_samples
after applying logarithmic scaling. Again, use np.log
.# TODO: Scale the data using the natural logarithm
log_data = np.log(data)
# TODO: Scale the sample data using the natural logarithm
log_samples = np.log(samples)
# Produce a scatter matrix for each pair of newly-transformed features
pd.scatter_matrix(log_data, alpha = 0.3, figsize = (14,8), diagonal = 'kde');
After applying a natural logarithm scaling to the data, the distribution of each feature should appear much more normal. For any pairs of features you may have identified earlier as being correlated, observe here whether that correlation is still present (and whether it is now stronger or weaker than before).
Run the code below to see how the sample data has changed after having the natural logarithm applied to it.
# Display the log-transformed sample data
display(log_samples)
Detecting outliers in the data is extremely important in the data preprocessing step of any analysis. The presence of outliers can often skew results which take into consideration these data points. There are many "rules of thumb" for what constitutes an outlier in a dataset. Here, we will use Tukey's Method for identfying outliers: An outlier step is calculated as 1.5 times the interquartile range (IQR). A data point with a feature that is beyond an outlier step outside of the IQR for that feature is considered abnormal.
In the code block below, you will need to implement the following:
Q1
. Use np.percentile
for this.Q3
. Again, use np.percentile
.step
.outliers
list.NOTE: If you choose to remove any outliers, ensure that the sample data does not contain any of these points!
Once you have performed this implementation, the dataset will be stored in the variable good_data
.
from collections import Counter
outlier_freq = Counter();
# For each feature find the data points with extreme high or low values
for feature in log_data.keys():
# TODO: Calculate Q1 (25th percentile of the data) for the given feature
Q1 = np.percentile(log_data[feature], 25)
# TODO: Calculate Q3 (75th percentile of the data) for the given feature
Q3 = np.percentile(log_data[feature], 75)
# TODO: Use the interquartile range to calculate an outlier step (1.5 times the interquartile range)
step = (Q3 - Q1) * 1.5
# Display the outliers
print("Data points considered outliers for the feature '{}':".format(feature))
outliers_one_feature = log_data[~((log_data[feature] >= Q1 - step) & (log_data[feature] <= Q3 + step))];
for ind in outliers_one_feature.index:
outlier_freq[ind] += 1
display(outliers_one_feature)
# OPTIONAL: Select the indices for data points you wish to remove
outliers = []
for e in outlier_freq:
if outlier_freq[e] > 1:
outliers.append(e)
print(outliers)
# Remove the outliers, if any were specified
good_data = log_data.drop(log_data.index[outliers]).reset_index(drop = True)
outliers
list to be removed, explain why.Hint: If you have datapoints that are outliers in multiple categories think about why that may be and if they warrant removal. Also note how k-means is affected by outliers and whether or not this plays a factor in your analysis of whether or not to remove them.
Answer:
Yes
Yes, It should, as it would make the dataset skewed, effect the mean, and variance, also would not give use correct answers.
In this section you will use principal component analysis (PCA) to draw conclusions about the underlying structure of the wholesale customer data. Since using PCA on a dataset calculates the dimensions which best maximize variance, we will find which compound combinations of features best describe customers.
Now that the data has been scaled to a more normal distribution and has had any necessary outliers removed, we can now apply PCA to the good_data
to discover which dimensions about the data best maximize the variance of features involved. In addition to finding these dimensions, PCA will also report the explained variance ratio of each dimension — how much variance within the data is explained by that dimension alone. Note that a component (dimension) from PCA can be considered a new "feature" of the space, however it is a composition of the original features present in the data.
In the code block below, you will need to implement the following:
sklearn.decomposition.PCA
and assign the results of fitting PCA in six dimensions with good_data
to pca
.log_samples
using pca.transform
, and assign the results to pca_samples
.# TODO: Apply PCA by fitting the good data with the same number of dimensions as features
from sklearn.decomposition import PCA
pca = PCA(n_components=6).fit(good_data)
# TODO: Transform log_samples using the PCA fit above
pca_samples = pca.transform(log_samples)
# Generate PCA results plot
pca_results = vs.pca_results(good_data, pca)
Hint: A positive increase in a specific dimension corresponds with an increase of the positive-weighted features and a decrease of the negative-weighted features. The rate of increase or decrease is based on the individual feature weights.
Answer:
Run the code below to see how the log-transformed sample data has changed after having a PCA transformation applied to it in six dimensions. Observe the numerical value for the first four dimensions of the sample points. Consider if this is consistent with your initial interpretation of the sample points.
# Display sample log-data after having a PCA transformation applied
display(pd.DataFrame(np.round(pca_samples, 4), columns = pca_results.index.values))
When using principal component analysis, one of the main goals is to reduce the dimensionality of the data — in effect, reducing the complexity of the problem. Dimensionality reduction comes at a cost: Fewer dimensions used implies less of the total variance in the data is being explained. Because of this, the cumulative explained variance ratio is extremely important for knowing how many dimensions are necessary for the problem. Additionally, if a signifiant amount of variance is explained by only two or three dimensions, the reduced data can be visualized afterwards.
In the code block below, you will need to implement the following:
good_data
to pca
.good_data
using pca.transform
, and assign the results to reduced_data
.log_samples
using pca.transform
, and assign the results to pca_samples
.# TODO: Apply PCA by fitting the good data with only two dimensions
pca = PCA(n_components=2).fit(good_data)
# TODO: Transform the good data using the PCA fit above
reduced_data = pca.transform(good_data)
# TODO: Transform log_samples using the PCA fit above
pca_samples = pca.transform(log_samples)
# Create a DataFrame for the reduced data
reduced_data = pd.DataFrame(reduced_data, columns = ['Dimension 1', 'Dimension 2'])
Run the code below to see how the log-transformed sample data has changed after having a PCA transformation applied to it using only two dimensions. Observe how the values for the first two dimensions remains unchanged when compared to a PCA transformation in six dimensions.
# Display sample log-data after applying PCA transformation in two dimensions
display(pd.DataFrame(np.round(pca_samples, 4), columns = ['Dimension 1', 'Dimension 2']))
A biplot is a scatterplot where each data point is represented by its scores along the principal components. The axes are the principal components (in this case Dimension 1
and Dimension 2
). In addition, the biplot shows the projection of the original features along the components. A biplot can help us interpret the reduced dimensions of the data, and discover relationships between the principal components and original features.
Run the code cell below to produce a biplot of the reduced-dimension data.
# Create a biplot
vs.biplot(good_data, reduced_data, pca)
Once we have the original feature projections (in red), it is easier to interpret the relative position of each data point in the scatterplot. For instance, a point the lower right corner of the figure will likely correspond to a customer that spends a lot on 'Milk'
, 'Grocery'
and 'Detergents_Paper'
, but not so much on the other product categories.
From the biplot, which of the original features are most strongly correlated with the first component? What about those that are associated with the second component? Do these observations agree with the pca_results plot you obtained earlier?
In this section, you will choose to use either a K-Means clustering algorithm or a Gaussian Mixture Model clustering algorithm to identify the various customer segments hidden in the data. You will then recover specific data points from the clusters to understand their significance by transforming them back into their original dimension and scale.
Hint: Think about the differences between hard clustering and soft clustering and which would be appropriate for our dataset.
Answer:
Depending on the problem, the number of clusters that you expect to be in the data may already be known. When the number of clusters is not known a priori, there is no guarantee that a given number of clusters best segments the data, since it is unclear what structure exists in the data — if any. However, we can quantify the "goodness" of a clustering by calculating each data point's silhouette coefficient. The silhouette coefficient for a data point measures how similar it is to its assigned cluster from -1 (dissimilar) to 1 (similar). Calculating the mean silhouette coefficient provides for a simple scoring method of a given clustering.
In the code block below, you will need to implement the following:
reduced_data
and assign it to clusterer
.reduced_data
using clusterer.predict
and assign them to preds
.centers
.pca_samples
and assign them sample_preds
.sklearn.metrics.silhouette_score
and calculate the silhouette score of reduced_data
against preds
.score
and print the result.# TODO: Apply your clustering algorithm of choice to the reduced data
from sklearn.mixture import GaussianMixture
for i in range (2,9):
clusterer = GaussianMixture(n_components = i,random_state= 19).fit(reduced_data)
# TODO: Predict the cluster for each data point
preds = clusterer.predict(reduced_data)
# TODO: Find the cluster centers
centers = clusterer.means_
# TODO: Predict the cluster for each transformed sample data point
sample_preds = clusterer.predict(pca_samples)
# TODO: Calculate the mean silhouette coefficient for the number of clusters chosen
from sklearn.metrics import silhouette_score
score = silhouette_score(reduced_data, preds)
print("@ i={}, score={}".format(i, score))
vs.cluster_results(reduced_data, preds, centers, pca_samples)
# Optimal One
# TODO: Apply your clustering algorithm of choice to the reduced data
clusterer = GaussianMixture(n_components = 2,random_state= 19).fit(reduced_data)
# TODO: Predict the cluster for each data point
preds = clusterer.predict(reduced_data)
# TODO: Find the cluster centers
centers = clusterer.means_
# TODO: Predict the cluster for each transformed sample data point
sample_preds = clusterer.predict(pca_samples)
# TODO: Calculate the mean silhouette coefficient for the number of clusters chosen
from sklearn.metrics import silhouette_score
score = silhouette_score(reduced_data, preds)
Answer:
Once you've chosen the optimal number of clusters for your clustering algorithm using the scoring metric above, you can now visualize the results by executing the code block below. Note that, for experimentation purposes, you are welcome to adjust the number of clusters for your clustering algorithm to see various visualizations. The final visualization provided should, however, correspond with the optimal number of clusters.
# Display the results of the clustering from implementation
vs.cluster_results(reduced_data, preds, centers, pca_samples)
Each cluster present in the visualization above has a central point. These centers (or means) are not specifically data points from the data, but rather the averages of all the data points predicted in the respective clusters. For the problem of creating customer segments, a cluster's center point corresponds to the average customer of that segment. Since the data is currently reduced in dimension and scaled by a logarithm, we can recover the representative customer spending from these data points by applying the inverse transformations.
In the code block below, you will need to implement the following:
centers
using pca.inverse_transform
and assign the new centers to log_centers
.np.log
to log_centers
using np.exp
and assign the true centers to true_centers
.# TODO: Inverse transform the centers
log_centers = pca.inverse_transform(centers)
# TODO: Exponentiate the centers
true_centers = np.exp(log_centers)
# Display the true centers
segments = ['Segment {}'.format(i) for i in range(0,len(centers))]
true_centers = pd.DataFrame(np.round(true_centers), columns = data.keys())
true_centers.index = segments
display(true_centers)
Hint: A customer who is assigned to 'Cluster X'
should best identify with the establishments represented by the feature set of 'Segment X'
. Think about what each segment represents in terms their values for the feature points chosen. Reference these values with the mean values to get some perspective into what kind of establishment they represent.
Answer:
Run the code block below to find which cluster each sample point is predicted to be.
# Display the predictions
for i, pred in enumerate(sample_preds):
print("Sample point", i, "predicted to be in Cluster", pred)
Answer:
In this final section, you will investigate ways that you can make use of the clustered data. First, you will consider how the different groups of customers, the customer segments, may be affected differently by a specific delivery scheme. Next, you will consider how giving a label to each customer (which segment that customer belongs to) can provide for additional features about the customer data. Finally, you will compare the customer segments to a hidden variable present in the data, to see whether the clustering identified certain relationships.
Companies will often run A/B tests when making small changes to their products or services to determine whether making that change will affect its customers positively or negatively. The wholesale distributor is considering changing its delivery service from currently 5 days a week to 3 days a week. However, the distributor will only make this change in delivery service for customers that react positively.
Hint: Can we assume the change affects all customers equally? How can we determine which group of customers it affects the most?
Answer:
Additional structure is derived from originally unlabeled data when using clustering techniques. Since each customer has a customer segment it best identifies with (depending on the clustering algorithm applied), we can consider 'customer segment' as an engineered feature for the data. Assume the wholesale distributor recently acquired ten new customers and each provided estimates for anticipated annual spending of each product category. Knowing these estimates, the wholesale distributor wants to classify each new customer to a customer segment to determine the most appropriate delivery service.
Hint: A supervised learner could be used to train on the original customers. What would be the target variable?
Answer:
At the beginning of this project, it was discussed that the 'Channel'
and 'Region'
features would be excluded from the dataset so that the customer product categories were emphasized in the analysis. By reintroducing the 'Channel'
feature to the dataset, an interesting structure emerges when considering the same PCA dimensionality reduction applied earlier to the original dataset.
Run the code block below to see how each data point is labeled either 'HoReCa'
(Hotel/Restaurant/Cafe) or 'Retail'
the reduced space. In addition, you will find the sample points are circled in the plot, which will identify their labeling.
# Display the clustering results based on 'Channel' data
vs.channel_results(reduced_data, outliers, pca_samples)
Answer:
Note: Once you have completed all of the code implementations and successfully answered each question above, you may finalize your work by exporting the iPython Notebook as an HTML document. You can do this by using the menu above and navigating to
File -> Download as -> HTML (.html). Include the finished document along with this notebook as your submission.


Move the mouse over a button inside the tabbed menu:
Software development is a process of writing and maintaining the source code.
A design is a plan to make something. “Design is a plan for arranging elements in such a way as best to accomplish a particular purpose.
Business development executive is to find new targets and leads to promote the sales and services of the company or organization.
Back end development refers to the server side of an application and everything that communicates between the database and the browser.


YView module.
MIT. See LICENSE for full details.
These are common commands that apply to all widgets that have them injected.
Get floating point values which represent the viewable portion of the text. Each element is a real fraction between 0 and 1; together they describe the vertical span that is visible in the window. For example, if the first element is .2 and the second element is .6, 20% of the entry's text is off-screen to the bottom, the middle 40% is visible in the window, and 40% of the text is off-screen to the bottom.
An array containing two floating point values.
Adjusts the view in the window so that the position appears at the top edge of the window. Position must be a fraction between 0.0 (start of the text) and 1.0 (end of the text).
| double position | The character index to scroll to. |
This widget to aid method chaining.
Adjusts the view in the window so that the character index passed is displayed at the top edge of the window.
| int charIndex | The character index to scroll to. |
This widget to aid method chaining.
Scroll the text by a specified amount of characters. Positive values scroll text to the down, negative values scroll text up.
| int numberOfChars | The number of characters to scroll by. |
This widget to aid method chaining.
Scroll the text by a specified amount of pages. Positive values scroll text up, negative values scroll text down.
| int numberOfPages | The number of characters to scroll by. |
This widget to aid method chaining.


Policy has a Request variable named "request", this may lead to unexpected side effects.
Rename the Request variable.


Address
Persons
Countries
Array of strings
Array of objects
Array of objects with single property binding
Array of objects (with groupBy)


T-Junction Experiment
-
p
for screenshot
Top Subdivisions:
Bottom Subdivisions:
Mesh Scale:
Show edges:


Entities and Attributes
User
- userId (primary key)
- userActivationToken
- userEmail
- userHash
- userName
- userRole
Folder
- folderId (primary key)
- folderUserId (foreign key)
- folderDateCreated
- folderDateModified
- folderName
- folderPath
File
- fileId (primary key)
- fileUserId (foreign key)
- fileFolderId (foreign key)
- fileDateUploaded
- fileDateModified
- fileName
- filePath
Share
- shareUserId (foreign key)
- shareFolderId (foreign key)
- shareEmail
- shareLink
- shareMessage
- sharePermissions
Relations
One User can create many Folders - (1 to many)
One User can upload many Files - (1 to many)
One Folder can include many Files - (1 to many)
Many Users can Share many Folders - (many to many)


The goal of {canlang} is to easily share language data collected in the 2016 Canadian census. This data was retreived from the 2016 Canadian census data set using the {cancensus} R package.
This package contains three data sets:
can_lang
: Contains the counts of the total number of Canadians that report each language as their mother tongue, which language they speak most often at home, which language they use most often at work, and which language they have knowledge for.
region_lang
: For each census division, it contains the counts of how many Canadians report each language as their mother tongue, which language they speak most often at home, which language they use most often at work, and which language they have knowledge for.
region_data
: For each census division, it contains the statistics for number of households, land area, population and number of dwellings.
You can install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("ttimbers/canlang")
can_lang
The data set can_lang
contains the counts of the total number of Canadians that report each language as their mother tongue, which language they speak most often at home, which language they use most often at work, and which language they have knowledge for. This data was recorded in the 2016 Census:
library(canlang) head(can_lang) #> category language #> 1 Aboriginal languages Aboriginal languages, n.o.s. #> 2 Non-Official & Non-Aboriginal languages Afrikaans #> 3 Non-Official & Non-Aboriginal languages Afro-Asiatic languages, n.i.e. #> 4 Non-Official & Non-Aboriginal languages Akan (Twi) #> 5 Non-Official & Non-Aboriginal languages Albanian #> 6 Aboriginal languages Algonquian languages, n.i.e. #> mother_tongue most_at_home most_at_work lang_known #> 1 590 235 30 665 #> 2 10260 4785 85 23415 #> 3 1150 445 10 2775 #> 4 13460 5985 25 22150 #> 5 26895 13135 345 31930 #> 6 45 10 0 120
library(ggplot2) ggplot2::ggplot(data = can_lang, aes(x = most_at_home, y = mother_tongue, colour = category, shape = category)) + geom_point(alpha = 0.7) + scale_color_manual(values = c("blue3","red3","black")) + scale_y_log10(name = "Number of Canadians reporting the \n language as their mother tongue", labels = scales::comma) + scale_x_log10(name = "Number of Canadians speaking the language \n as their primary language at home", labels = scales::comma) + annotation_logticks() + theme_bw()
region_lang
For each census metropolitan area (CMA), the data set region_lang
contains the counts of how many Canadians report each language as their mother tongue, which language they speak most often at home, which language they use most often at work, and which language they have knowledge for.
library(canlang) library(dplyr) region_lang %>% filter(region == "Vancouver") %>% arrange(desc(mother_tongue)) %>% head() #> # A tibble: 6 x 7 #> region category language mother_tongue most_at_home most_at_work lang_known #> <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> #> 1 Vancou… Official… English 1316635 1622735 1330555 2289515 #> 2 Vancou… Non-Offi… Cantonese<PHONE_NUMBER>85 22890 223700 #> 3 Vancou… Non-Offi… Mandarin<PHONE_NUMBER>80 23195 250175 #> 4 Vancou… Non-Offi… Punjabi …<PHONE_NUMBER>55 13125 187530 #> 5 Vancou… Non-Offi… Tagalog … 66825 30695 635 96290 #> 6 Vancou… Non-Offi… Korean 45990 34225 5075 50640
region_data
For each census metropolitan area (CMA), the data set region_data
contains the statistics for number of households, land area, population and number of dwellings.
library(canlang) library(dplyr) region_data %>% arrange(desc(population)) %>% head() #> # A tibble: 6 x 5 #> region households area population dwellings #> <chr> <dbl> <dbl> <dbl> <dbl> #> 1 Toronto 2135909 6270. 5928040 2235145 #> 2 Montréal 1727310 4638. 4098927 1823281 #> 3 Vancouver<PHONE_NUMBER>. 2463431 1027613 #> 4 Calgary<PHONE_NUMBER>. 1392609 544870 #> 5 Ottawa - Gatineau<PHONE_NUMBER>. 1323783 571146 #> 6 Edmonton<PHONE_NUMBER>. 1321426 537634
We have included several different plain text files, an excel files and a SQLite database file in this repo to be used for practice importing from these filetypes. Specifically, they are:
can_lang.csv
: the same dataset available via canlang::can_lang
stored as a vanilla .csv
file.can_lang-meta-data.csv
: the same dataset available via canlang::can_lang
stored as a vanilla .csv
file with two rows of metadata that should be skipped.can_lang.tsv
: the same dataset available via canlang::can_lang
stored as a .tsv
(tab separated) file and has no column names.can_lang.xlsx
: the same dataset available via canlang::can_lang
stored as a .xlsx
file. Can be read in using the {readxl} package.can_lang.db
: the same dataset available via canlang::can_lang
stored as a SQLite database (.db
) file. Can be read in using the {RSQLite} package.vancouver_lang.csv
& calgary_lang.csv
: data for Vancouver, BC and Calgary, AB, respectively, stored as a vanilla .csv
file.victoria_lang.csv
: data for Victoria, BC stored as a vanilla .tsv
file.kelowna_lang.csv
: data for Kelowna, BC stored as a .csv
file (csv2 flavour) with metadata in the header and footer that should be skipped.abbotsford_lang.xlsx
: data for Abbotsford, BC stored as a .xlsx
file where sheet 1 is the column names, and sheet 2 is the data with no column names. Can be read in using the {readxl} package.edmonton_lang.xlsx
: data for Edmonton, AB stored as a .xlsx
file where all the data is in sheet 1.The data-raw
directory contains the the scripts necessary to create everything in this package, including the R data objects and the plain text, excel and SQLite database files.
Data originally published in:
Package development resources:


By enabling local authors to publish their expertise on mobile phones, Sutro Media is making it easier and more fun for you to explore the world!
If you are enjoying this guide, please take a moment to review it on the App Store for others
If you have any comments or suggestions for improvement, we'd love to hear from you -<EMAIL_ADDRESS>See more of our other guides below.


{% extends "publisher/publisher_base.html" %} {% block publisher_content %}
Here are some resources to help you with the main Publisher features of DOAJ.
{% if app.config.get("REAPPLICATION_ACTIVE", False) %}If you have 10 or fewer journals in DOAJ, you will need to log into your Publisher's Area and process your reapplications online. We have created two documents that you must read before you start:
If you have more than 10 journals, you will need to log into your Publishers Area and download the CSV file that we have created for you. We have created two documents that you must read before you start:
Guides to filling in the Application Form are available in other languages. Download the language of your choice and refer to it when filling in the form.
For help with creating DOAJ XML and details on XML tags, read the File Upload Info section on our Features pages and the Uploading content section on our 'For Publishers' page.
For problems with XML file uploads, read the What to do if your XML upload fails and Troubleshooting your XML upload sections on our 'For Publishers' page.
If you need to correct an article on DOAJ, upload it to us again. Read How to correct an error in Article Metadata? on our 'For Publishers' page.
If an article or a range of articles needs to be deleted, please Contact Us. Please email us ALL of the following information: