Mapping is the process of defining how a document and fields it contains are stored and indexed. Mapping is very useful to define for following cases:
- Which string fields should be treated as full text fields?
- Which fields contain numbers, dates or geolocations?
- Whether the values of all fields in the document should be indexed into the catch-all _all field?
- Format of date values?
- Custom rules to control the mapping for dynamically added fields?
Mapping can be done in two ways in Elasticsearch
.
Dynamic Mappings
This is the default mapping provided by the Elasticsearch. Fields and mapping types do not need to be defined before being used. New mapping types and new field names will be added automatically, just by indexing document.
Explicit Mappings
Dynamic mapping can be useful to get started. But at some point, we will want to specify our own explicit mappings since we know our data more than Elasticsearch
. We can create mapping types and field mappings when we create an index. We can also add mapping types and fields to existing index with PUT
mapping API of Elasticsearch
.
We can create mapping for an index in two ways.
- Programmatically using java
- Using CLI
Programmatically using java
Mapping can be created at the time of index creation. It is recommended to create mapping before adding any data to index. Since, we know most of the fields before hand, it is very easy to do programmatically. If the mappings are present in the index, Exception will be thrown. We need to do safety check to eliminate this issue. The code looks like following:
import java.io.IOException; import org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsResponse; import org.elasticsearch.client.Client; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; public class IndexAndCreateMapping { public void prepareIndex(Client client, String indexName, String documentType) throws IOException { //looking for index if that exists already IndicesExistsResponse indexResponse = client.admin().indices().prepareExists(indexName).get(); //need to have some logic to create mapping only when the index is not created yet if (!indexResponse.isExists()) { XContentBuilder builder = getMappingBuilder(); //creating mapping client.admin().indices().prepareCreate(indexName).addMapping(documentType, builder).get(); //refeshes the index so that it can be accessed instantly client.admin().indices().prepareRefresh().get(); } } private XContentBuilder getMappingBuilder() throws IOException { return XContentFactory.jsonBuilder().prettyPrint().startObject() .startObject("movie") .startObject("properties") .startObject("Directory").field("type", "string").field("index", "not_analyzed").endObject() .startObject("Title").field("type", "string").endObject() .startObject("Generes").field("type", "string").endObject() .startObject("Year").field("type", "integer").endObject() .endObject() .endObject() .endObject(); } }
We can add new mapping types and fields to the existing index with PUT mapping API.
Using CLI
We can run PUT mapping API from command line. Following CURL command does the following.
- Creates an index called movies.
- Adds mapping types called movies.
- Specifies fields or properties in each mapping type.
- Specifies the data type and mapping for each field.
curl -XPUT 'localhost:9200/movies?pretty' -d' { "movie" : { "properties" : { "Director" : { "type" : "string", "index" : "not_analyzed" }, "Title" : { "type" : "string" }, "Generes" : { "type" : "string" }, "Year" : { "type" : "integer" } } } }'
Updating Existing Mappings
Existing type and field mappings cannot be updated unless otherwise documented. Changing the mapping would mean invalidating already indexed documents. Instead, we should create a new index with correct mappings and re-index the data. However, there are some exceptions to this rule. For instance:
- New properties can be added to object datatype fields.
- New multi-fields can be added to existing fields.
- The
ignore_above
parameter can be updated.
We can add mapping to the existing index using CLI as follows. In this example, we are adding Hero of each movie:
curl -XPUT 'localhost:9200/movies/movies/_mapping?pretty' -d' { "properties" : { "Hero" : { "type" : "string", "index" : "not_analyzed" } } }'
When we add index : not_analyzed, it will not analyzed the string while indexing the data. This means that when we search, it will match for whole word rather than keywords.
We can also update the existing mappings by updating new field as follows:
curl -XPUT 'localhost:9200/movies/movies/_mapping?pretty' -d' { "properties" : { "Hero" : { "type" : "string", "index" : "not_analyzed", "ignore_above" : 100 } } }'
ignore_above
will ignore any hero value that are longer than 100 characters.
ommand line. Since, it is one time process to create mapping, it is better to add mapping from CLI before adding data to the Elasticsearch. However, we can add programmatically as well which need constant check of index.


Privacy Policy
1. Introduction: Gadgetpinas.ph website is owned and operated by Gadgetpinas. We respect the privacy of our website users. This privacy policy
explains how we may collect, store, use, and disclose personal information that you provide to us. By accessing and using this website you confirm
your unconditional consent to us collecting, storing, using, and disclosing your personal information in the manner set out in this privacy policy.
2. Terms of use: Your use of this website is governed by our terms of use. Accordingly, this privacy policy must be read in conjunction with our terms of use.
3. Collecting your personal information: We may collect personal information from you (including, without limitation, your name, email address, phone
number, and postal address) when you use this website. You may decide not to provide your personal information to us. However, if you do not provide
it, we may not be able to provide you with access to certain information or products.
4. Automated collection: When you visit this website, we may use automated tools and methods (such as cookies, sessions, and usage monitoring
software) to collect certain information about your visit, including (without limitation):
This information will be used in aggregate form to analyse how this website is being used (for example: to analyse usage patterns in order to
improve this website). Except as set out in this privacy policy, we will not disclose any such information except in aggregate form.
5. Cookies: This website may use cookies and sessions to provide you with certain services or functionality. Cookies and sessions may be used
to identify you as an individual user of this website. We use this technology to, amongst other things:
Accepting a cookie will not give us access to any data on your computer other than the data stored in the cookie. Although you may configure your web
browser to not accept cookies, you may experience a loss of functionality as a result.
6. Additional collection: We may gather more extensive information if we are concerned, for example, about abnormal website usage patterns or website security breaches.
7. Use: We may use your personal information to:
8. Other use and disclosure: We will not sell, rent, or lease your personal information to third parties. We may disclose your personal information to
our professional advisors, contractors, business associates, related companies, and others who have agreed to treat your personal information in
accordance with this privacy policy. We will not otherwise use or disclose your personal information except:
9. Storage and security: All personal information collected on this website is collected and stored by us at premises and facilities under our control in
country and overseas. We will endeavour to protect your personal information that is held by us from unauthorised access, use, disclosure, alteration,
or destruction.
10. Third party websites: This website may contain hyperlinks to websites operated by third parties. We are not responsible for the content of such
websites, or the manner in which those websites collect, store, use, and distribute any personal information you provide. When you visit third party
websites from hyperlinks displayed on this website, we encourage you to review the privacy statements of those websites so that you can understand
how the personal information you provide may be collected, stored, used and distributed.
11. Right to access and request correction: It is important to us that the personal information we hold about you is accurate, complete and up to date.
If you are aware that this is not case and would like your personal information corrected, or simply desire access to your personal information, please
contact our Privacy Officer. You may request access to your personal information that we (or our contractors) hold. Where you make any such request:
12. Changes to our privacy policy: We reserve the right to change this privacy policy from time to time by publishing the revised privacy policy on our
website. If you continue to use this website or if you provide any personal information after we post changes to this privacy policy, this will deemed your
conclusive acceptance of any such changes.


This is the name users will see in the app.
Users will be able to connect up to this many devices.
This sets the validity period of certificates, in days.
Users with Google accounts in one of these domains will be able to set up access with no action on your part.


30 Days in April: Day 13
Click on the image to see it without distortion caused by my wordpress theme.
Props to Nate for showing me this site a while back.
Un-props to strip generator for not letting me login under my first login simply because I didn't verify it when I first signed up.
30 Days in April: Day 11
"Springtime" (2009)
The next time that it feels a LOT like springtime outside, bring a friend and a camera to a park that holds many memories for you.
Have your friend take pictures of you jumping in the air, yelling "it's time!"
Onlookers may ask, "time for what?"
***
"Mending Wall" (2009)
The next time you purchase or pay for something, strike up a small conversation with the other person involved in the transaction.
Do not rush, and do not force interest.
Do this in your neighborhood, daily, for seven days.
On a day when you don't purchase anything, there are probably other strangers you could converse with.
***
"Hover (2009)"
Travel to the nearest significant body of water.
Take off your right shoe and right sock.
Walk to the edge of the water and come as close as possible to touching the water with your foot as you can, but be sure not to get your foot wet.
Pause.
Head home.


--- layout: post title: 'HOWTO: Configure Apache+Passenger with HTTPS/SSL' date: '2009-07-14T16:21:00.049+01:00' author: Darren Bishop tags: - Rails - Apache - mod_rails - Ruby - Passenger - RoR modified_time: '2009-07-21T11:17:25.291+01:00' blogger_id: tag:blogger.com,1999:blog-3826577489563855618.post-4992435604832384068 blogger_orig_url: http://blog.darrenbishop.com/2009/07/howto-configure-apachepassenger-with.html ---
The following BASH commands assume you are in a root shell. It is quite convenient to switch using sudo -s
; this should allow for plenty cut and paste action.
apt-get update apt-get install -y ssh #... if like me you are working on a bare-bones VMAt this point I typically close my VM Server console (cause it's pants... until screw up my network and/or ssh config). I connect using keys from Cygwin; much more productive working this way.
apt-get install -y build-essential wget
apt-get -y install apache2 apache2-prefork-dev libreadline5-dev cat > /etc/apache2/httpd.conf <<EOF ServerName localhost EOF
wget http://rubyforge.org/frs/download.php/58677/ruby-enterprise-1.8.6-20090610.tar.gz tar -xzvf ruby-enterprise-1.8.6-20090610.tar.gz ./ruby-enterprise-1.8.6-20090610/installer <<EOF EOF /opt/ruby-enterprise-1.8.6-20090610/bin/gem install -y rails # specify version if necessary i.e. -v 2.1.0 cat > /etc/apache2/mods-available/passenger.load <<EOF LoadModule passenger_module /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/passenger-2.2.4/ext/apache2/mod_passenger.so EOF cat > /etc/apache2/mods-available/passenger.conf <<EOF PassengerRoot /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/passenger-2.2.4 PassengerRuby /opt/ruby-enterprise-1.8.6-20090610/bin/ruby EOF /opt/ruby-enterprise-1.8.6-20090610/bin/passenger-install-apache2-module <<EOF EOF
mkdir -p /etc/apache2/ssl/{crt,key} openssl req -new -x509 -days 365 -keyout /etc/apache2/ssl/key/server.key -out /etc/apache2/ssl/crt/server.crt -nodes -subj '/O=Working With Mr.B, Ltd/OU=WWW Security Team/CN=workingwithmrb.blogspot.com'
a2enmod rewrite a2enmod passenger a2enmod ssl
cat > /etc/apache2/sites-available/blog <<EOF <VirtualHost *:80> ServerName workingwithmrb.blogspot.com DocumentRoot /var/www_rails/blog/current/public ErrorLog /var/www_rails/blog/current/log/apache.log <Location /> RewriteEngine on RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R] </Location> </VirtualHost> <VirtualHost *:443> ServerName workingwithmrb.blogspot.com DocumentRoot /var/www_rails/blog/current/public ErrorLog /var/www_rails/blog/current/log/apache-ssl.log SSLEngine On SSLProtocol -all +TLSv1 +SSLv3 SSLCipherSuite HIGH:MEDIUM:!aNULL:+SHA1:+MD5:+HIGH:+MEDIUM SSLCertificateFile /etc/apache2/ssl/crt/server.crt SSLCertificateKeyFile /etc/apache2/ssl/key/server.key SSLVerifyClient optional SSLVerifyDepth 1 SSLOptions +StdEnvVars +StrictRequire CustomLog /var/log/apache2/ssl_request_log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" </VirtualHost> EOF a2ensite blog
sed -i 's,VirtualHost \*,VirtualHost *:80,' /etc/apache2/sites-available/default sed -i '/NameVirtualHost \*:80/ a NameVirtualHost *:443' /etc/apache2/sites-available/default
/etc/init.d/apache2 reload netstat -naptThe output from
netstat
should show Apache listening on ports 80 and 443
Remember, if you install all this stuff asroot
, you must make sure that Apache+Passenger can access the rails application aswww-data
.  A better approach would be to create a user account e.g. calledrails
that belongs to thewww-data
group and with a umask of0002
, then anything to do with Rails you should do logged-in as that user.
Hope you find this simple and useful.


Demo of dregexp
Check out View -> Developer -> Develope Tools -> Console
{"foo":"bar"}
Reload grammar


{% extends "layout.html" %} {% block body %}
Server was unable to handle your request, maybe it was too hard...
Go to the start


{% extends "base.html" %} {% load staticfiles %} {% load crispy_forms_tags %} {% block title %} FAQ {% endblock %} {% block content %}
The Genomics Data Warehouse (GDW) provides the UB community a tool for storing, searching and searching their genomic data.
The purpose of GDW is to support UB community's research. By providing them the tools to analyze their genomics data, we hope to accelerate their research.
The data for GDW comes from the UB community.
To get access to GDW please contact us at<EMAIL_ADDRESS>Mutation Set Enrichment Analysis (MSEA) attempts to discern significant clusters of mutations within genes. For a given gene, its mutations are assigned to any of 11 sets. These sets, which are not mutually exclusive, are categorized by factors of predicted pathogenicity and predicted effect on the amino acid product. The likelihood of each mutation set’s physical distribution along the length of the gene is then assessed against a simulated random distribution of the same number of mutations. This likelihood is repeated many times, reshuffling the simulated distribution each time (permutation testing). A mutation set which exhibits non-random clustering is likely to be of interest, and will be teased out using this analysis. See the Methods section of the linked paper for more details.


26 June 2016
In the JavaScript language, describe all the use cases for each of the following:
parenthese ()
Parentheses are used to call a function, and to enclose the parameters of a function. They can also used to determine order of execution - just like in basic arithmic. For example (2x3) + (2x3) = 36.
brackets []
Square brackets [] are used to create, hold, define and retrieve elements from an array. For example use var newArray = []. Then elements can be added easily to that array. Once created they are used to access the elements in the array. Square brackets [] can be used to nest arrays inside another array - to create multi-dimensional arrays. For example [[1,2,3] [4,5,6]]
braces {}
Braces are used to enclose statement when writing a function so that you know where the function begins and ends. Another use is to enclose all the properties of an object when defining it in the form of object literal notation. These braces {} are also used to group multiple statements together e.g. if multiple statements are required to be run in a loop. Don't underestimate their importance.
single quotes '' and double quote ""
Single and double quotes can be used interchangeably and are used for holding strings. A string can be any text inside double or single quotes. For example var myString = "text inside quotes". String indexes are zero-based - the first character is in position 0, the second in 1, and so on. It can be useful to use both single and double quotes to nest strings inside other strings. For example var myString = "The string said 'hello world' erday."


Edward just earned an MSc in engineering from Technical University of Denmark (DTU), and work as a mathematical modeller / software engineer at encoord in Essen, Germany.
He is familiar with techniques from mathematical simulation, mathematical modelling and graph theory. Currently, He is contributing to zequnyu/cmdict and edxu96/mgrid.
You can know more about him through https://edxu96.github.io/ and have a look at his resume. His email address is github_username[at]outlook[dot]com.
This Website
Posts are revised from time to time. No major update will be made, and all the minor updates will be summarised at the bottom of the post.
Most likely, there is a short description associated with a tag. To be directed to the description page, click the tag in the side bar. Take the tag “network-infrastructure” for example, The link is https://edxu96.github.io/tags/network-infrastructure/. In addition, some (reading) materials are recommended there.
My Resume
中文简介
许杰：
- 工学学士，重庆大学
- 工学硕士，丹麦技术大学
- 德国埃森
- 数学建模/软件工程师，encoord 公司
- 中文简历
- 请发邮件联系我，github_username[at]outlook[dot]com


Dear Dry,
Don’t let the year end without taking advantage of the last opportunity to make a tax-deductible, special gift [ https://org.salsalabs.com/o/1400/p/salsa/web/common/public/content?content_item_KEY=12737&oqd-sourcecode=EOY2015 ] to the Feminist Majority Foundation.
We just released a major digital advertising campaign asking: “When did the Right to Life Become the Right to Harass, Intimidate, and Terrorize Abortion Provides?” We are determined to expose anti-abortion extremism and violence, and we need your help to do it! [ https://org.salsalabs.com/o/1400/p/salsa/web/common/public/content?content_item_KEY=12737&oqd-sourcecode=EOY2015 ]
Our last Clinic Violence Survey revealed 51.9% abortion clinics-up from 26.6% in 2010- reported facing targeted threats and intimidation tactics, including pamphlets and WANTED-style posters targeting providers, home picketing, and stalking of doctors and staff.
FMF’s National Clinic Access Project has been on high alert all year working to protect and assist targeted clinics in FL, CA, AL, MS, NC, KS, CO, NE, MD, and VA, to mention just a few.
[ https://org.salsalabs.com/o/1400/p/salsa/web/common/public/content?content_item_KEY=12737&oqd-sourcecode=EOY2015 ]*We are moving forward in our fight for women’s equality and we can’t do it without you!* [ https://org.salsalabs.com/o/1400/p/salsa/web/common/public/content?content_item_KEY=12737&oqd-sourcecode=EOY2015 ]
We’re constantly fighting to block right-wing attacks on women’s rights in the United States. We are investing in the future by conducting the largest women’s rights campus program in the nation, now with groups in 44 states and D.C! In 2016, we will mobilize student voters, especially young women, with our Get Out Her Vote campaign.
Globally, since 1997, we have been working to help Afghan women and girls as they fight for equality. They are making impressive strides in education, health care, and employment advancement.
And if all of this is not enough, we are entering our 14th year of publishing “Ms”. Magazine, both digitally and print. “Ms.” Facebook now engages 65 million people yearly!
In good times and bad, we are moving forward for women’s rights and lives. So please give a generous, end-of-year, tax-deductible contribution. [ https://org.salsalabs.com/o/1400/p/salsa/web/common/public/content?content_item_KEY=12737&oqd-sourcecode=EOY2015 ] Thank you for all you do to support equality and women’s rights. Together we are making-and will continue to make-an historic difference.
Happy holidays!
For women’s lives and equality,
Eleanor Smeal, President
*
** P.S. Remember, your gift to FMF is tax-deductible. Gifts made by December 31 qualify for tax deductibility for 2015.* [ https://org.salsalabs.com/o/1400/p/salsa/web/common/public/content?content_item_KEY=12737&oqd-sourcecode=EOY2015 ]
You have received this e-mail because of your interest in women’s issues. To unsubscribe, please click on the link below.


Status: Passed v4 (8-1), as amended, Dec-91; v5 reflects the amendmentIssue: INITIALIZATION-FUNCTION-KEYWORD-CHECKING
Reference: Draft 10.156
<IP_ADDRESS> Initialization Arguments (p.7-6)
(which corresponds to CLtL-II <IP_ADDRESS>, p.802)
<IP_ADDRESS> Declaring the Validity of Initialization Arguments
(p.7-7) (which corresponds to CLtL-II <IP_ADDRESS>, p.803)
7.3.5 Keyword Arguments in Generic Functions and Methods
(p.7-20) (which corresponds to CLtL-II <IP_ADDRESS>, p.792)
Category: CHANGE
Edit History: Version 1, 10/2/91, Kim Barrett
Version 2, 10/8/91, Kim Barrett (Moon & JonL comments)
Version 3, 10/11/91, Kim Barrett (more Moon comments)
Version 4, 11/20/91, Kim Barrett
(clarify :allow-other-keys, make references to 10.156 draft)
Version 5, 11-Feb-92, Kent Pitman
("has no effect on" => "suppresses" per X3J13 meeting amendment)
Problem Description:
A careful reading of 88-002R indicates that users must specify
&ALLOW-OTHER-KEYS in the lambda-lists of methods for initialization functions
if the method also specifies &KEY, else risk having the generic function
keyword argument checking signal an error due to the presence of "slot
filling" initargs. (An error might not occur due to the presence of other
methods which already specify &KEY + &ALLOW-OTHER-KEYS).
Several implementors (and presumably users too) have misread the specification
as saying that &ALLOW-OTHER-KEYS in an applicable initialization method means
that initarg validation is suppressed for those protocols in which the method
takes part.
The result is that the need for and meaning of &ALLOW-OTHER-KEYS in
initialization methods differs significantly from one implementation to
another.
Proposal:
1. Change the syntax of the following generic functions to specify both &KEY
and &ALLOW-OTHER-KEYS:
ALLOCATE-INSTANCE class &key &allow-other-keys
INITIALIZE-INSTANCE object &key &allow-other-keys
MAKE-INSTANCE class &key &allow-other-keys
REINITIALIZE-INSTANCE object &key &allow-other-keys
SHARED-INITIALIZE object slot-names &key &allow-other-keys
UPDATE-INSTANCE-FOR-DIFFERENT-CLASS previous current
&key &allow-other-keys
UPDATE-INSTANCE-FOR-REDEFINED-CLASS object
added-slots discarded-slots
property-list
&key &allow-other-keys
It is of course possible to retain "&rest initargs" in the syntax description
when needed in the corresponding function description.
2. Clarify that the presence of &ALLOW-OTHER-KEYS in the lambda-list of an
applicable method relevant to the specified initarg validity checking for an
initialization protocol suppresses the validity checking.
3. Clarify that a true value for the initialization argument :ALLOW-OTHER-KEYS
disables initialization argument validation. Make the following changes Draft
10.156 in order make this clarification.
a. Remove the last sentence of the second paragraph of section <IP_ADDRESS>
(p.7-6), which says
"Error checking of initialization argument names is disabled if the keyword
argument pair whose keyword is :ALLOW-OTHER-KEYS and whose value is non-NIL
appears in the initialization argument list."
b. Replace the last sentence of section <IP_ADDRESS> (p.7-7), which says
"The meaning of:ALLOW-OTHER-KEYS is the same here as when it is passed to an
ordinary function."
with
"Validity checking of initialization arguments is disabled if the value of
the initialization argument :ALLOW-OTHER-KEYS is true."
Editorial impact:
The syntax entries for seven functions need to be modified.
A small change to "Declaring the Validity of Initialization Arguments" is
needed in order to clarify the handling of &ALLOW-OTHER-KEYS in initialization
methods.
Rationale:
Since &ALLOW-OTHER-KEYS needs to be specified somewhere if &KEY is specified
by any of the applicable methods, it is better to have the generic function
specify it, rather than requiring programmers to remember to include it in
every initialization method that also specifies &KEY.
Examples:
(defclass test ()
((slot :initarg :slot-filler))
)
(defmethod initialize-instance :after ((x test) &key) nil)
(make-instance 'test :slot-filler 5)
-> currently might signal an error
-> returns instance of test under proposed change.
Current Practice:
Both Lucid 4.0 and IIM 3.4 specify only &REST in the lambda-lists of the
listed generic functions and the specified methods for those functions, with
the implication that user defined methods which specify &KEY must also specify
&ALLOW-OTHER-KEYS in order to inhibit keyword argument checking by the generic
function from signaling an error due to the presence of "slot filling"
initargs. However, because generic function keyword checking has not yet been
implemented in either Lucid 4.0 or IIM 3.4, users may not be aware of this
requirement. In fact, in IIM 3.4 there are system-supplied initialization
methods that fail to meet this requirement, so there are some implementors who
aren't aware of this problem either.
Franz Allegro 4.0 appears to have the same behavior as described above for
Lucid 4.0 and IIM 3.4. In particular, generic function keyword checking has
not yet been implemented.
Symbolics CLOS and Chestnut's Lisp-to-C translator both specify &KEY and
&ALLOW-OTHER-KEYS in the lambda-lists of the listed generic functions. In
addition, if an applicable method for one of the protocols specifies
&ALLOW-OTHER-KEYS then the specified initarg checking for the protocol is not
performed.
Macintosh Common Lisp 2.0b3c4 has "&KEY &ALLOW-OTHER-KEYS" in the lambda list
for MAKE-INSTANCE, but all the others just use "&REST". This asymmetry is an
oversight due to the fact that the method combination code special cases them,
and elides normal generic function keyword checking for all of them (hence it
has never appeared as a "bug"). MCL (like Symbolics and Chestnut) also
provides the additional behavior that if one of the applicable methods
specifies &ALLOW-OTHER-KEYS then the initarg checking for the protocol is not
performed.
Cost to Implementors:
Some possibly tricky code in the implementation may have to be reexamined. In
some implementations it looks like this may involve simply ripping out some
special cases.
Cost to Users:
Probably none in most cases. Since none of the implementations surveyed ever
signal an error for the described problem case, it is unlikely that any user
code exists which depends on an error being signaled.
Users can eliminate unnecessary &ALLOW-OTHER-KEYS from initialization methods
at their leisure, since its presence or absence has no effect.
However, those users who have made use of the fairly common but non-portable
meaning of &ALLOW-OTHER-KEYS in applicable methods as a means of suppressing
initarg validation would have to find some other mechanism for this purpose.
One possibility would be to define appropriate :AROUND or primary methods on
MAKE-INSTANCE that add :ALLOW-OTHER-KEYS T to the initialization arguments.
Performance Impact:
None.
Benefits:
Users and implementors will know what &ALLOW-OTHER-KEYS in an initialization
method's lambda-list means. Programmers writing initialization methods that
specify keywords won't have to remember to include &ALLOW-OTHER-KEYS
explicitly.
Aesthetics:
Requiring all initialization methods that specify &KEY to also specify
&ALLOW-OTHER-KEYS is clearly unaesthetic, so this change is an improvement.
Discussion:
Interestingly, for one reason or another, none of the implementations surveyed
perform generic function keyword checking (as opposed to initarg checking) for
the functions affected by this proposal.
The possibility of having &ALLOW-OTHER-KEYS in the lambda-list of an
applicable initialization method mean that initarg validation should be
inhibited was discussed, especially in light of the fact that several of the
implementations surveyed already provide this behavior. However, some people
questioned whether this was really such a good idea, being unmodular and
perhaps *too* convenient. Also, making such a change would add a real cost to
users who weren't expecting this extension, since they would have to examine
occurances of &ALLOW-OTHER-KEYS in initialization methods to decide whether
they were left over from the time when it was (at least theoretically) needed
to inhibit generic function keyword checking or actually there to do the new
thing.


Chinese National Denies Stealing Monsanto Trade Secrets
by JOE HARRISST. LOUIS (CN) – A Chinese national pleaded not guilty Monday to federal charges that he stole trade secrets from Monsanto, which prosecutors say is part of a pattern of Beijing encouraging the theft of U.S. intellectual property.
Haitao Xiang, 42, appeared before U.S. Magistrate Judge John M. Bodenhausen in St. Louis. He wore a jail-issued green and white jumpsuit and was cuffed at the wrists and legs.
His attorney, Eric M. Selig of Rosenblum Schwartz in Clayton, Mo., had no comment for reporters after leaving the courtroom.
Xiang was arrested in June 2017 at a U.S. airport with a one-way ticket to China and was in possession of software developed by Monsanto to help farmers improve crop yields, the Department of Justice said last week in an announcement about the espionage charges.
The Chinese national had worked at Monsanto and its subsidiary, The Climate Corporation, for nearly 10 years beginning in 2008.
He is charged with one count of conspiracy to commit economic espionage, three counts of economic espionage, one count of conspiracy to commit theft of trade secrets and three counts of theft of trade secrets. Xiang is currently being held in the Randolph County, Missouri jail.
Assistant Attorney General John Demers said in a statement that the indictment alleges another instance of the Chinese government encouraging “employees to steal intellectual property from their U.S. employers.”
Chinese foreign ministry spokesman Geng Shuang, meanwhile, said the U.S. government is trying to use the case to back its accusations that China steals technology from American companies.
“We resolutely oppose the U.S. side’s attempts to use the case, which we regard as an ordinary, isolated incident, to hype up claims of China’s organized and systematic attempts to steal intellectual property from the US,” Geng said at a regular briefing Friday, according to an Agence France-Presse report.
Xiang faces up to 15 years in jail and a $5 million fine for each of the three counts of espionage against him, and 10 years in jail and $250,000 in fines on the other counts.
Selig said during Monday’s arraignment that he plans to file a complex case motion for discovery. Bodenhausen said he will likely accept it, pushing any further hearing dates to early next year.
Copyright © 2019 courthousenews.com


bWAPP is a PHP web application which is intentionnally crackable. It covers a very large set of common vulns but also some unusual case you can meet on the Internet.
The goal here is to train your development skill and hacking knowledge to be able to write a better (more secure) code. Compared to DVWA, you have to consider bWAPP as a much more advanced level of difficulty.
Below the impressive list of bugs implemented:
Injection
HTML Injection - Reflected (GET)
HTML Injection - Reflected (POST)
HTML Injection - Reflected (Current URL)
HTML Injection - Stored (Blog)
iFrame Injection
LDAP Injection (Search)
Mail Header Injection (SMTP)
OS Command Injection
OS Command Injection - Blind
PHP Code Injection
Server-Side Includes (SSI) Injection
SQL Injection (GET/Search)
SQL Injection (GET/Select)
SQL Injection (POST/Search)
SQL Injection (POST/Select)
SQL Injection (AJAX/JSON/jQuery)
SQL Injection (CAPTCHA)
SQL Injection (Login Form/Hero)
SQL Injection (Login Form/User)
SQL Injection (SQLite)
SQL Injection (Drupal)
SQL Injection - Stored (Blog)
SQL Injection - Stored (SQLite)
SQL Injection - Stored (User-Agent)
SQL Injection - Stored (XML)
SQL Injection - Blind - Boolean-Based
SQL Injection - Blind - Time-Based
SQL Injection - Blind (SQLite)
SQL Injection - Blind (Web Services/SOAP)
XML/XPath Injection (Login Form)
XML/XPath Injection (Search)
Broken Auth. & Session Mgmt.
Broken Authentication - CAPTCHA Bypassing
Broken Authentication - Forgotten Function
Broken Authentication - Insecure Login Forms
Broken Authentication - Logout Management
Broken Authentication - Password Attacks
Broken Authentication - Weak Passwords
Session Management - Administrative Portals
Session Management - Cookies (HTTPOnly)
Session Management - Cookies (Secure)
Session Management - Session ID in URL
Session Management - Strong Sessions
Cross-Site Scripting (XSS)
Cross-Site Scripting - Reflected (GET)
Cross-Site Scripting - Reflected (POST)
Cross-Site Scripting - Reflected (JSON)
Cross-Site Scripting - Reflected (AJAX/JSON)
Cross-Site Scripting - Reflected (AJAX/XML)
Cross-Site Scripting - Reflected (Back Button)
Cross-Site Scripting - Reflected (Custom Header)
Cross-Site Scripting - Reflected (Eval)
Cross-Site Scripting - Reflected (HREF)
Cross-Site Scripting - Reflected (Login Form)
Cross-Site Scripting - Reflected (phpMyAdmin)
Cross-Site Scripting - Reflected (PHP_SELF)
Cross-Site Scripting - Reflected (Referer)
Cross-Site Scripting - Reflected (User-Agent)
Cross-Site Scripting - Stored (Blog)
Cross-Site Scripting - Stored (Change Secret)
Cross-Site Scripting - Stored (Cookies)
Cross-Site Scripting - Stored (SQLiteManager)
Cross-Site Scripting - Stored (User-Agent)
Insecure Direct Object References
Insecure DOR (Change Secret)
Insecure DOR (Reset Secret)
Insecure DOR (Order Tickets)
Security Misconfiguration
Arbitrary File Access (Samba)
Cross-Domain Policy File (Flash)
Cross-Origin Resource Sharing (AJAX)
Cross-Site Tracing (XST)
Denial-of-Service (Large Chunk Size)
Denial-of-Service (Slow HTTP DoS)
Denial-of-Service (SSL-Exhaustion)
Denial-of-Service (XML Bomb)
Insecure FTP Configuration
Insecure SNMP Configuration
Insecure WebDAV Configuration
Local Privilege Escalation (sendpage)
Local Privilege Escalation (udev)
Man-in-the-Middle Attack (HTTP)
Man-in-the-Middle Attack (SMTP)
Old/Backup & Unreferenced Files
Robots File
Sensitive Data Exposure
Base64 Encoding (Secret)
BEAST/CRIME/BREACH Attacks
Clear Text HTTP (Credentials)
Heartbleed Vulnerability
Host Header Attack (Reset Poisoning)
HTML5 Web Storage (Secret)
POODLE Vulnerability
SSL 2.0 Deprecated Protocol
Text Files (Accounts)
Missing Functional Level Access Control
Directory Traversal - Directories
Directory Traversal - Files
Host Header Attack (Cache Poisoning)
Host Header Attack (Reset Poisoning)
Local File Inclusion (SQLiteManager)
Remote & Local File Inclusion (RFI/LFI)
Restrict Device Access
Restrict Folder Access
Server Side Request Forgery (SSRF)
XML External Entity Attacks (XXE)
Cross-Site Request Forgery (CSRF)
Cross-Site Request Forgery (Change Password)
Cross-Site Request Forgery (Change Secret)
Cross-Site Request Forgery (Transfer Amount)
Using Known Vulnerable Components
Buffer Overflow (Local)
Buffer Overflow (Remote)
Drupal SQL Injection (Drupageddon)
Heartbleed Vulnerability
PHP CGI Remote Code Execution
PHP Eval Function
phpMyAdmin BBCode Tag XSS
Shellshock Vulnerability (CGI)
SQLiteManager Local File Inclusion
SQLiteManager PHP Code Injection
SQLiteManager XSS
Unvalidated Redirects & Forwards
Unvalidated Redirects & Forwards (1)
Unvalidated Redirects & Forwards (2)
Other bugs…
ClickJacking (Movie Tickets)
Client-Side Validation (Password)
HTTP Parameter Pollution
HTTP Response Splitting
HTTP Verb Tampering
Information Disclosure - Favicon
Information Disclosure - Headers
Information Disclosure - PHP version
Information Disclosure - Robots File
Insecure iFrame (Login Form)
Unrestricted File Upload
Extras
A.I.M. - No-authentication Mode
Client Access Policy File
Cross-Domain Policy File
Evil 666 Fuzzing Page
Manual Intervention Required!
Unprotected Admin Portal
We Steal Secrets… (html)
We Steal Secrets… (plain)
WSDL File (Web Services/SOAP)
Have fun !


Start of a Wonderful Experience
Jan 17, 2015
My Experience at CMU Winter School
Last year I visited CMU-NITK Winter School organised by Carnegie Mellon University at National Institute of Technology, Karnataka. It was a wonderful opportunity and exposed me to large number of interesting topics in the field of machine learning.
The Winter School began on 10 December. After some introductory lectures, we were asked to brainstorm and come up with some interesting ideas that we would like to execute in a short span of just 15 days. This whole procedure was quite interesting and we came across a lot of interesting ideas. We had a group of four team members each from different background. This was very helpful as it exposed us to lot of new interesting ideas and approaches.
Despite the fact that we had only a span of 15 days for the project, we came up with a rather ambitious idea. We decided to make an application that can generate commentary for any match given just its video. This was an interesting problem and more importantly it was a great learning experience.
After some excellent guidance from the mentors, we were able to modularize the whole problem statement into discrete parts. Owing to the non availability of data, we restricted ourselves to generation of commentary for tennis matches. Given a video of a tennis match, we tried to find the key elements that can characterise the important information of the match. We divided the whole problem statement as:
- Court Detection
- Object Recognition
- Action Recognition
- Audio Analysis
- Ball tracking
- Commentary Generation
We divided the task among the four team members and set on to our tasks individually. However, we had to face a lot of challenges in the early phase before we can formalise our approach. The major drawback was the non availability of action labelled data for any sports dataset. We were not left with any other choice but to annotate data ourselves. We created a HTML 5 application utilising HTML 5 canvas that required the user to move around the rectangles, find the bounding box for the action region and label the corresponding part. We will try improving the code and provide it as an annotation tool as well share the annotated sports action dataset for tennis matches.
Next, we plunged to the job of object recognition. We discovered that RCNN (Regions with Convoluted Neural Networks) gave pretty superior results for object recognition as compared to other techniques and had a pre trained model on imagenet dataset which can be used directly. Since running the code for RCNN required a GPU, we were provided GPU access from IIT Bombay. Thereafter this began the next challenging part, installation of caffe and rcnn toolbox on the GPU………………
Share


Navbar
All Videos
Video Title
last played
X
minutes ago
never played
Video added by:
Base score:
0.xxxx
, recency score:
0.xxxx
, votes score:
0.xxxx
X
votes
Footer


User commands could do whatever they want on your computer.
The project can also run the following commands:
If in doubt, block commands.


Hello World Books
Home
New Book
Book List
Add a New Book
Create Book
Update Book
Update Book
Do you want to delete?
Delete Book?


Help donate to /u/WoollyMuffler so he can get his $1M dollars! Sadly, I can't make transaction-enabled web pages, so I urge you to send you prayers instead:
+1 PRAYER


You can setup IP banning (blacklisting) and exceptions (whitelisting) on this page. Blacklisting should only be used as a last resort.


We no longer support deploying to AWS. However, you can still use Amazon S3 for storage and Amazon SQS for the audit queue if you like.
| Variable | Description |
|---|---|
AWS_API_KEY |
The AWS API key. |
AWS_API_SECRET |
The AWS API secret. |
AWS_S3_BUCKET_NAME |
The name of the S3 bucket. |
AWS_S3_REGION |
The region of the S3 bucket. Default is us-west-2 . See a list of available AWS Regions and Enpoints. |
AWS_S3_VERSION |
The S3 API version. Default is 2006-03-01 . |
AWS_SQS_QUEUE_LH |
The name of the SQS queue for the Lighthouse Server. |
AWS_SQS_QUEUE_PHPCS |
The name of the SQS queue for the PHPCS Server. |
AWS_SQS_REGION |
The region of the SQS queue. Default is us-west-2 . See a list of available AWS Regions and Enpoints. |
AWS_SQS_VERSION |
The SQS API version. Default is 2012-11-05 . |


2015-03-21
Most companies are obsessed with the concept of minimum viable products (MVP) these days.
Having spent the past three years entrenched in the Lean Startup world, I have an extremely biased perspective. There was a period of time I treated certain books as gospel and became dismissive of alternative views. However, there were a handful of times I was unable to defend these principles.
Joshua Porter’s piece on MVP’s recently came up. It refers to Apple’s design culture, and how they do not conform to the concept of MVP’s — they only release when something is “magical” [1]. The most interesting quote from the culture article was:
If you’re launching something in a space where there are a lot of people trying to do something similar–for example, a consumer product–then the bar for MVP should be ridiculously high.
This was particularly impactful on me as it embodied a concept I had yet to put my finger on. The concept of levels.
The term “viable” is frequently misunderstood in the context of an MVP. It is an extremely flexible word, which is precisely why it is so applicable when it comes to product development.
Viability is like art, it depends on who is looking at it.
When you are pushing the boundaries of science and technology, or anything else that creates a new market, the level of MVP you must achieve is low. Customers don’t know what they want. Most can’t see or explain the solution. The only job of your MVP at this stage is to validate a problem exists.
When you enter an existing market, the level naturally rises. And the more crowded it is, the higher it goes. I experience this every time I see a new productivity app. There are so many now, with such great features, you cannot release something without a certain level already achieved [2].
This concept is easily applied to new startups building products for the first time, or companies refining existing products. I plan to reference this concept in the future, and hope it helps others who have struggled with MVP’s in mature markets.
———
[1] The other advantage Apple has is an enormous pool of internal resources to leverage for testing and feedback. The Apple workforce is probably a surprisingly accurate representation of their target customers. Therefore, they are able to test rather thoroughly without “releasing” anything to the public, and waiting for it to be truly magical.
[2] The exception is if you approach this category from the side, instead of head on. If you can do something truly unique that is not meant to replace an existing workflow, but support it, you may have lower expectations.


Leading operator in LatinAmerica and Caribbean
Operating in 20 consumer markets and over 30 B2B markets
Extensive and unique subsea network, connecting over 40 markets
Revenue:
$3.9 Billion1
Employees:
10.8002
7.4 million homes passed
6.0 million RGUs (video, internet, and fixed-line telephony subscribers)
3.7 million mobile subscribers


BrainControl Object - Actions
Start Recording
Connect device (specified COM Port) and start reading brain signal continuously. Last sample values are stored.
This action takes 1 argument:Stop Recording
Stop reading brain signal. The device is also disconnected.
This action takes no argument.


In this project, you'll use generative adversarial networks to generate new images of faces.
You'll be using two datasets in this project:
Since the celebA dataset is complex and you're doing GANs in a project for the first time, we want you to test your neural network on MNIST before CelebA. Running the GANs on MNIST will allow you to see how well your model trains sooner.
If you're using FloydHub, set data_dir
to "/input" and use the FloydHub data ID "R5KrjnANiKVhLWAkpXhNBe".
data_dir = './data'
# FloydHub - Use with data ID "R5KrjnANiKVhLWAkpXhNBe"
#data_dir = '/input'
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
import helper
helper.download_extract('mnist', data_dir)
helper.download_extract('celeba', data_dir)
show_n_images = 25
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
%matplotlib inline
import os
from glob import glob
from matplotlib import pyplot
mnist_images = helper.get_batch(glob(os.path.join(data_dir, 'mnist/*.jpg'))[:show_n_images], 28, 28, 'L')
pyplot.imshow(helper.images_square_grid(mnist_images, 'L'), cmap='gray')
The CelebFaces Attributes Dataset (CelebA) dataset contains over 200,000 celebrity images with annotations. Since you're going to be generating faces, you won't need the annotations. You can view the first number of examples by changing show_n_images
.
show_n_images = 25
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
mnist_images = helper.get_batch(glob(os.path.join(data_dir, 'img_align_celeba/*.jpg'))[:show_n_images], 28, 28, 'RGB')
pyplot.imshow(helper.images_square_grid(mnist_images, 'RGB'))
Since the project's main focus is on building the GANs, we'll preprocess the data for you. The values of the MNIST and CelebA dataset will be in the range of -0.5 to 0.5 of 28x28 dimensional images. The CelebA images will be cropped to remove parts of the image that don't include a face, then resized down to 28x28.

You'll build the components necessary to build a GANs by implementing the following functions below:
model_inputs
discriminator
generator
model_loss
model_opt
train
This will check to make sure you have the correct version of TensorFlow and access to a GPU
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
from distutils.version import LooseVersion
import warnings
import tensorflow as tf
# Check TensorFlow Version
assert LooseVersion(tf.__version__) >= LooseVersion('1.0'), 'Please use TensorFlow version 1.0 or newer. You are using {}'.format(tf.__version__)
print('TensorFlow Version: {}'.format(tf.__version__))
# Check for a GPU
if not tf.test.gpu_device_name():
warnings.warn('No GPU found. Please use a GPU to train your neural network.')
else:
print('Default GPU Device: {}'.format(tf.test.gpu_device_name()))
Implement the model_inputs
function to create TF Placeholders for the Neural Network. It should create the following placeholders:
image_width
, image_height
, and image_channels
.z_dim
.Return the placeholders in the following the tuple (tensor of real input images, tensor of z data)
import problem_unittests as tests
def model_inputs(image_width, image_height, image_channels, z_dim):
"""
Create the model inputs
:param image_width: The input image width
:param image_height: The input image height
:param image_channels: The number of image channels
:param z_dim: The dimension of Z
:return: Tuple of (tensor of real input images, tensor of z data, learning rate)
"""
# TODO: Implement Function
real_input = tf.placeholder(tf.float32, shape=(None, image_width, image_height, image_channels), name = 'real_input')
z = tf.placeholder(tf.float32,shape= (None, z_dim), name = 'z')
learning_rate = tf.placeholder(tf.float32, shape=(), name = 'learning_rate')
return real_input, z, learning_rate
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_model_inputs(model_inputs)
Implement discriminator
to create a discriminator neural network that discriminates on images
. This function should be able to reuse the variabes in the neural network. Use tf.variable_scope
with a scope name of "discriminator" to allow the variables to be reused. The function should return a tuple of (tensor output of the generator, tensor logits of the generator).
alpha = 0.2
def discriminator(images, reuse=False):
"""
Create the discriminator network
:param image: Tensor of input image(s)
:param reuse: Boolean if the weights should be reused
:return: Tuple of (tensor output of the discriminator, tensor logits of the discriminator)
"""
# TODO: Implement Function
alpha = 0.1
with tf.variable_scope('discriminator', reuse=reuse):
x1 = tf.layers.conv2d(images, 128, 5, strides=2, kernel_initializer=tf.random_normal_initializer(stddev=0.02), padding='same')
relu1 = tf.maximum(alpha * x1, x1)
x2 = tf.layers.conv2d(relu1, 256, 5, strides=2, kernel_initializer=tf.random_normal_initializer(stddev=0.02), padding='same')
bn2 = tf.layers.batch_normalization(x2, training=True)
relu2 = tf.maximum(alpha * bn2, bn2)
x3 = tf.layers.conv2d(relu2, 512, 5, strides=2, kernel_initializer=tf.random_normal_initializer(stddev=0.02), padding='same')
bn3 = tf.layers.batch_normalization(x3, training=True)
relu3 = tf.maximum(alpha * bn3, bn3)
flat = tf.reshape(relu3, (-1, 4*4*512))
logits = tf.layers.dense(flat, 1)
out = tf.sigmoid(logits)
return out, logits
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_discriminator(discriminator, tf)
Implement generator
to generate an image using z
. This function should be able to reuse the variabes in the neural network. Use tf.variable_scope
with a scope name of "generator" to allow the variables to be reused. The function should return the generated 28 x 28 x out_channel_dim
images.
def generator(z, out_channel_dim, is_train=True):
"""
Create the generator network
:param z: Input z
:param out_channel_dim: The number of channels in the output image
:param is_train: Boolean if generator is being used for training
:return: The tensor output of the generator
"""
# TODO: Implement Function
kinit = tf.random_normal_initializer(stddev=0.02)
with tf.variable_scope('generator', reuse=(not is_train)):
x1 = tf.layers.dense(z, 7*7*512)
x1 = tf.reshape(x1, (-1, 7, 7, 512))
x1 = tf.layers.batch_normalization(x1, training=is_train)
x1 = tf.maximum(alpha * x1, x1)
#x1 = tf.nn.dropout(x1, 0.5)
x2 = tf.layers.conv2d_transpose(x1, 256, 5, strides=2, kernel_initializer=tf.random_normal_initializer(stddev=0.02), padding='same')
x2 = tf.layers.batch_normalization(x2, training=is_train)
x2 = tf.maximum(alpha * x2, x2)
#x2 = tf.nn.dropout(x2, 0.5)
x3 = tf.layers.conv2d_transpose(x2, 126, 5, strides=2, kernel_initializer=tf.random_normal_initializer(stddev=0.02), padding='same')
x3 = tf.layers.batch_normalization(x3, training=is_train)
x3 = tf.maximum(alpha * x3, x3)
#x3 = tf.nn.dropout(x3, 0.5)
logits = tf.layers.conv2d_transpose(x3, out_channel_dim, 3, strides=1, kernel_initializer=tf.random_normal_initializer(stddev=0.02), padding='same')
out = tf.tanh(logits)
return out
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_generator(generator, tf)
Implement model_loss
to build the GANs for training and calculate the loss. The function should return a tuple of (discriminator loss, generator loss). Use the following functions you implemented:
discriminator(images, reuse=False)
generator(z, out_channel_dim, is_train=True)
def model_loss(input_real, input_z, out_channel_dim):
"""
Get the loss for the discriminator and generator
:param input_real: Images from the real dataset
:param input_z: Z input
:param out_channel_dim: The number of channels in the output image
:return: A tuple of (discriminator loss, generator loss)
"""
# TODO: Implement Function
g_model = generator(input_z, out_channel_dim)
d_model_real, d_logits_real = discriminator(input_real)
d_model_fake, d_logits_fake = discriminator(g_model, reuse=True)
smooth = 0.1
d_loss_real = tf.reduce_mean(
tf.nn.sigmoid_cross_entropy_with_logits(logits=d_logits_real, labels=tf.ones_like(d_model_real) * (1 - smooth)))
d_loss_fake = tf.reduce_mean(
tf.nn.sigmoid_cross_entropy_with_logits(logits=d_logits_fake, labels=tf.zeros_like(d_model_fake)))
g_loss = tf.reduce_mean(
tf.nn.sigmoid_cross_entropy_with_logits(logits=d_logits_fake, labels=tf.ones_like(d_model_fake)))
d_loss = d_loss_real + d_loss_fake
return d_loss, g_loss
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_model_loss(model_loss)
Implement model_opt
to create the optimization operations for the GANs. Use tf.trainable_variables
to get all the trainable variables. Filter the variables with names that are in the discriminator and generator scope names. The function should return a tuple of (discriminator training operation, generator training operation).
def model_opt(d_loss, g_loss, learning_rate, beta1):
"""
Get optimization operations
:param d_loss: Discriminator loss Tensor
:param g_loss: Generator loss Tensor
:param learning_rate: Learning Rate Placeholder
:param beta1: The exponential decay rate for the 1st moment in the optimizer
:return: A tuple of (discriminator training operation, generator training operation)
"""
# TODO: Implement Function
t_vars = tf.trainable_variables()
d_vars = [var for var in t_vars if var.name.startswith('discriminator')]
g_vars = [var for var in t_vars if var.name.startswith('generator')]
# Optimize
with tf.control_dependencies(tf.get_collection(tf.GraphKeys.UPDATE_OPS)):
d_train_opt = tf.train.AdamOptimizer(learning_rate, beta1=beta1).minimize(d_loss, var_list=d_vars)
g_train_opt = tf.train.AdamOptimizer(learning_rate, beta1=beta1).minimize(g_loss, var_list=g_vars)
return d_train_opt, g_train_opt
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_model_opt(model_opt, tf)
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
import numpy as np
def show_generator_output(sess, n_images, input_z, out_channel_dim, image_mode):
"""
Show example output for the generator
:param sess: TensorFlow session
:param n_images: Number of Images to display
:param input_z: Input Z Tensor
:param out_channel_dim: The number of channels in the output image
:param image_mode: The mode to use for images ("RGB" or "L")
"""
cmap = None if image_mode == 'RGB' else 'gray'
z_dim = input_z.get_shape().as_list()[-1]
example_z = np.random.uniform(-1, 1, size=[n_images, z_dim])
samples = sess.run(
generator(input_z, out_channel_dim, False),
feed_dict={input_z: example_z})
images_grid = helper.images_square_grid(samples, image_mode)
pyplot.imshow(images_grid, cmap=cmap)
pyplot.show()
Implement train
to build and train the GANs. Use the following functions you implemented:
model_inputs(image_width, image_height, image_channels, z_dim)
model_loss(input_real, input_z, out_channel_dim)
model_opt(d_loss, g_loss, learning_rate, beta1)
Use the show_generator_output
to show generator
output while you train. Running show_generator_output
for every batch will drastically increase training time and increase the size of the notebook. It's recommended to print the generator
output every 100 batches.
def train(epoch_count, batch_size, z_dim, learning_rate, beta1, get_batches, data_shape, data_image_mode):
"""
Train the GAN
:param epoch_count: Number of epochs
:param batch_size: Batch Size
:param z_dim: Z dimension
:param learning_rate: Learning Rate
:param beta1: The exponential decay rate for the 1st moment in the optimizer
:param get_batches: Function to get batches
:param data_shape: Shape of the data
:param data_image_mode: The image mode to use for images ("RGB" or "L")
"""
# TODO: Build Model
input_real, input_z, lr = model_inputs(data_shape[1], data_shape[2], data_shape[3], z_dim)
d_loss, g_loss = model_loss(input_real, input_z, data_shape[3])
d_opt, g_opt = model_opt(d_loss, g_loss, learning_rate, beta1)
print_every=10
show_every=100
steps = 0
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
for e in range(epochs):
for x in get_batches(batch_size):
steps += 1
x *= 2
# Sample random noise for G
batch_z = np.random.uniform(-1, 1, size=(batch_size, z_dim))
# Run optimizers
_ = sess.run(d_opt, feed_dict={input_real: x, input_z: batch_z, lr: learning_rate})
_ = sess.run(g_opt, feed_dict={input_z: batch_z, input_real: x, lr: learning_rate})
if steps % print_every == 0:
# At the end of each epoch, get the losses and print them out
train_loss_d = d_loss.eval({input_z: batch_z, input_real: x})
train_loss_g = g_loss.eval({input_z: batch_z})
print("Epoch {}/{}...".format(e+1, epochs),
"Discriminator Loss: {:.4f}...".format(train_loss_d),
"Generator Loss: {:.4f}".format(train_loss_g))
if steps % show_every == 0:
show_generator_output(sess, 25, input_z, data_shape[3], data_image_mode)
Test your GANs architecture on MNIST. After 2 epochs, the GANs should be able to generate images that look like handwritten digits. Make sure the loss of the generator is lower than the loss of the discriminator or close to 0.
batch_size = 64
z_dim = 100
learning_rate = 0.0002
beta1 = 0.5
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
epochs = 2
mnist_dataset = helper.Dataset('mnist', glob(os.path.join(data_dir, 'mnist/*.jpg')))
with tf.Graph().as_default():
train(epochs, batch_size, z_dim, learning_rate, beta1, mnist_dataset.get_batches,
mnist_dataset.shape, mnist_dataset.image_mode)
Run your GANs on CelebA. It will take around 20 minutes on the average GPU to run one epoch. You can run the whole epoch or stop when it starts to generate realistic faces.
batch_size = 32
z_dim = 100
learning_rate = 0.0001
beta1 = 0.5
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
epochs = 1
celeba_dataset = helper.Dataset('celeba', glob(os.path.join(data_dir, 'img_align_celeba/*.jpg')))
with tf.Graph().as_default():
train(epochs, batch_size, z_dim, learning_rate, beta1, celeba_dataset.get_batches,
celeba_dataset.shape, celeba_dataset.image_mode)
When submitting this project, make sure to run all the cells before saving the notebook. Save the notebook file as "dlnd_face_generation.ipynb" and save it as a HTML file under "File" -> "Download as". Include the "helper.py" and "problem_unittests.py" files in your submission.


--- layout: default nav: tutorial ---
This example offers an inline click-to-edit UI for a contact. When you click the button below the current UI will be replaced with an editing UI, without a full browser refresh. You can then update the user information or cancel the edit.
Note that the "server side" implementation is mocked out using mockjax, so you can see the entire implementation. Click the "Source Code" tab to see the code.
ic-get-from
to
issue a GET to /contact/1/edit
, and targets the div surrounding the entire Contact UI using
ic-target
ic-put-to
to issue a PUT to /contact/1
and
targets the same enclosing div.
ic-get-from
to
issue a GET to /contact/1
and targets the same div. The server-side handler at /contact/1
should use the ic-request
or ic-target
parameter to differentiate between a full
window request and this partial request.


Country star Sam Hunt arrested for DUI in Tennessee
NASHVILLE, Tenn. (AP) — Country singer Sam Hunt was arrested for driving under the influence and violation of the open container law after police in Nashville stopped him for driving the wrong way down a one-way road.
Hunt was arrested Thursday morning, booked into jail and released on $2,500 bond, according to WKRN-TV.
According to an arrest warrant, police found a vehicle traveling south in the northbound lanes of Ellington Parkway and swerving in and out of his lane. Police said the driver, identified as Sam Hunt, had two empty beer containers next to him and said he had been drinking alcohol "recently."
A representative for Hunt didn't immediately respond to a request for comment. Hunt's hits include "Body Like a Back Road," "House Party" and "Take Your Time."
___
Information from: WKRN-TV, http://www.wkrn.com/
Copyright 2019 Associated Press. All rights reserved.


This is an inbox layout.
Check one item
Hold down your Shift key
Check a lower item
Everything inbetween should also be set to checked
Try do it with out any libraries
Just regular JavaScript
Good Luck!
Don't forget to tweet your result!


During summer months, the average humidity should weigh in between 30-45 percent (below the 50% mark). Winter may require lower than 40% relative humidity to avoid condensation on your windows. By staying in the proper ranges, problems can be prevented.


Lecture 14 - Scientific Visualization
More about scientific visualization
We talked a little bit about publishing, networks, and scientific viz.
Also, here is a slightly more in-depth explaination of path/ray tracing:
Lecture 14 - Scientific Visualization
More about scientific visualization
In class notebook - (download)
Placeholder for in class coding
Prep Notebook, Week 14, Part 1 - (download)
Prep notebook for this week, Part 1
Prep Notebook, Week 14, Part 2 - (download)
Prep notebook for this week, Part 1
Past Notebook: Examples from Spring 2019 - (download)
MRI scan of a brain
Galaxy Particle Simulation files (77Mb)
Downsampled output files from a particle simulation of a galaxy merger
Isolated Galaxy dataset (292 Mb)
A single snapshot in time of a grid simulation of an isolated galaxy


perc_calculator_example.Rmd
Reardon (2011) introduced a very interesting concept in which he calculates percentile differences from ordered categorical variables. He explains his procedure very much in detail in the appendix of the book chapter but no formal implementation has been yet available on the web. With this package I introduce a function that applies the procedure, following a step-by-step Stata script that Sean Reardon kindly sent me.
In this vignette I show you how to use the function and match the results to the Stata code provided by Reardon himself.
We’ll be using a real world data set, the General Social Survey, that surveys American citizens on attitudes, behaviors and attributes. For this example we’ll need the packages below.
Let’s prepare the data.
set.seed(213141)
data("GSSvocab")
gss <-
as_tibble(GSSvocab) %>%
filter(year == '1978') %>%
mutate(weight = sample(1:3, size = nrow(.), replace = TRUE, prob = c(0.1, 0.5, 0.4))) %>%
select(ageGroup, vocab, weight)
gss
## # A tibble: 1,532 x 3
## ageGroup vocab weight
## <fct> <dbl> <int>
## 1 50-59 10 2
## 2 60+ 6 2
## 3 30-39 4 3
## 4 50-59 9 2
## 5 40-49 6 2
## 6 18-29 6 3
## 7 18-29 4 1
## 8 50-59 7 2
## 9 40-49 8 2
## 10 18-29 3 1
## # … with 1,522 more rows
This is the minimum dataset that the function will accept. This means that it needs to have at least one categorical variable (ageGroup
) and a continuous variable (vocab
) (the vector of weights is optional). The first variable is the typical age variable but asked in age brackets rather than in a continuous fashion. The second one measures the number of words out of 10 correct on a vocabulary test.
The package is called perccalc
, short for percentile calculator and we can install and load it with this code:
devtools::install_github("cimentadaj/perccalc")
library(perccalc)
The package only has two functions called perc_diff
and perc_dist
. They’re very easy to use, we just specify the data, the name of the categorical and continuous variable and the percentile difference we want.
Let’s put it to use!
## Error in category_summary(data_model, variable_name, continuous_name, : is_ordered_fct is not TRUE
I generated that error on purpose to raise a very important requirement of the function: the categorical variable needs to be an ordered factor. This is very important because otherwise we could be calculating percentile differences from categorical variables which have no apparent order such as married, single and widowed.
We can turn the previous into an ordered factor with the code below.
Now it’ll work.
## difference se
## 0.2185802 0.3905549
We can play around with other percentiles
## difference se
## 0.8618113 0.3403813
And we can add a vector of weights
perc_diff(gss, ageGroup, vocab, weight)
## difference se
## 0.1760728 0.3775078
Now, how are we sure that these estimates are as accurate as the Reardon (2011) implementation? We can compare the Stata output using this data set.
# Saving the dataset to a path
gss %>%
write_dta(path = "C:\\Users\\cimentadaj\\Downloads\\gss_data.dta", version = 13)
Running the code below using the gss_data.dta
..
*--------
use "/Users/cimentadaj/Downloads/gss_data.dta", clear
drop if missing(ageGroup)
drop if missing(vocab)
tab ageGroup, gen(inc)
*--------
/*-----------------------
Making a data set that has
one observation per age group category
and has mean and se(mean) in each category
and percent of population in the category
------------------------*/
tempname memhold
tempfile results
postfile `memhold' agegroup mean se_mean per using `results'
forv i = 1/5 {
sum inc`i' [aw=weight]
loc per`i' = r(mean)
qui sum vocab if inc`i'==1
if `r(N)'>0 {
qui regress vocab if inc`i'==1 [aw=weight]
post `memhold' (`i') (_b[_cons]) (_se[_cons]) (`per`i'')
}
}
postclose `memhold'
/*-----------------------
Making age group categories
into percentiles
------------------------*/
use `results', clear
sort agegroup
gen cathi = sum(per)
gen catlo = cathi[_n-1]
replace catlo = 0 if agegroup==1
gen catmid = (catlo+cathi)/2
/*-----------------------
Calculate age group
vocabulary gaps
------------------------*/
sort agegroup
g x1 = catmid
g x2 = catmid^2 + ((cathi-catlo)^2)/12
g x3 = catmid^3 + ((cathi-catlo)^2)/4
g cimnhi = mean + 1.96*se_mean
g cimnlo = mean - 1.96*se_mean
reg mean x1 x2 x3 [aw=1/se_mean^2]
twoway (rcap cimnhi cimnlo catmid) (scatter mean catmid) ///
(function y = _b[_cons] + _b[x1]*x + _b[x2]*x^2 + _b[x3]*x^3, ran(0 1))
loc hi_p = 90
loc lo_p = 10
loc d1 = [`hi_p' - `lo_p']/100
loc d2 = [(`hi_p')^2 - (`lo_p')^2]/(100^2)
loc d3 = [(`hi_p')^3 - (`lo_p')^3]/(100^3)
lincom `d1'*x1 + `d2'*x2 + `d3'*x3
loc diff`hi_p'`lo_p' = r(estimate)
loc se`hi_p'`lo_p' = r(se)
di "`hi_p'-`lo_p' gap: `diff`hi_p'`lo_p''"
di "se(`hi_p'-`lo_p' gap): `se`hi_p'`lo_p''"
I get that the 90/10 difference is 0.1760
with a standard error of 0.377
. Does it sound familiar?
perc_diff(gss, ageGroup, vocab, weight)
## difference se
## 0.1760728 0.3775078
Finally, there’s perc_dist
that shares a lot of similarity with perc_diff
. It calculates the estimate for every percentile. You can use this to perform your own analysis. For example,
## # A tibble: 6 x 3
## percentile estimate std.error
## <int> <dbl> <dbl>
## 1 1 0.0590 0.0588
## 2 2 0.117 0.115
## 3 3 0.173 0.169
## 4 4 0.227 0.220
## 5 5 0.281 0.268
## 6 6 0.333 0.315
We can also add the optional set of weights and graph it in a more convenient way.
gss %>%
perc_dist(ageGroup, vocab, weight) %>%
mutate(ci_low = estimate - 1.96 * std.error,
ci_hi = estimate + 1.96 * std.error) %>%
ggplot(aes(percentile, estimate)) +
geom_point() +
geom_errorbar(aes(ymin = ci_low, ymax = ci_hi))
Please note that for calculating the difference between two percentiles it is more accurate to use the perc_diff
function. The perc_diff
function calculates the difference through a linear combination of coefficients.
For example:
perc_dist(gss, ageGroup, vocab, weight) %>%
filter(percentile %in% c(90, 10)) %>%
summarize(diff = diff(estimate),
se_diff = diff(std.error))
## # A tibble: 1 x 2
## diff se_diff
## <dbl> <dbl>
## 1 0.176 0.312
compared to
## difference se
## 0.1760728 0.3775078
Note how the coefficients are the same but the standard error is different.
I hope this was a convincing example, I know this will be useful for me. All the intellectual ideas come from Sean Reardon, as well as the Stata code. The R implementation is my own work.


We redefine bitcoin!
- implement clicks-and-mortar e-tailers
- exploit collaborative mindshare
- implement cutting-edge markets
- benchmark bricks-and-clicks eyeballs
- generate bricks-and-clicks technologies
- streamline killer systems
- redefine next-generation methodologies
- maximize leading-edge interfaces
- repurpose seamless models


“SINCE MORE THAN 27 YEARS AGO,MEMCO ENGINEERING CO. HAS STARTED FROM HUMBLE BEGINNINGS TO EMERGED INTO ONE OF THE ESTABLISHED FIRMS IN THE UAE IN PROVIDING ENGINEERING WORK TO SEVERAL DIFFERENT PLAYERS IN THE CONSTRUCTION INDUSTRY.
WE BELIEVE THAT TO BE AHEAD OF THE PACK, WE NEED TO ANTICIPATE THE MARKET NEEDS, WORK CLOSELY WITH CLIENTS AND ITS REPRESENTATIVES AND COORDINATE HONESTLY WITH SUPPLIERS.  WE HAD PROVEN THAT WE CAN DO SO BY BEING TRANSPARENT IN OUR DEALINGS WITH ALL THE CLIENTS, SUPPLIERS AND TO ITS OWN WORKING STAFF.
TODAY, AS WE HAVE GREAT OPPORTUNITIES IN THE COMING YEARS, memco LOOKS FORWARD TO TAKING ON NEW CHALLENGES IN THE FUTURE WITH THE CONTINUED SUPPORT OF OUR CUSTOMERS AND INTERNAL WORK FORCE.
LAST BUT NOT LEAST, WE ARE EXTREMELY GRATEFUL TO THE UAE GOVERNMENT FOR ENABLING OUR CONTINUED SUCCESS AND PROSPERITY IN THE BUSINESS”
ISAM AL SHARABATI
Founder / Managing Director


CONTAINS: 2.2 MG SODIUM FLUORIDE
EACH TABLET CONTAINS 1 MG FLUORIDE
PPM FLUORIDE IONDAILY DOSAGE
IN DRINKING WATERAGE 6 MO. – 3 YRS.AGE 3-6 YRS.AGE 6-16 YRS.
LESS THAN 0.3 PPM0.25 MG 0.50 MG1 MG
0.3 TO 0.6 PPMNONE 0.25 MG 0.50 MG
OVER 0.6 PPMNONENONENONE
KEEP OUT OF REACH OF CHILDREN.
CAUTION: FEDERAL (U.S.A.) LAW PROHIBITS DISPENSING WITHOUT PRESCRIPTION.
DIRECTIONS: ONE TABLET PER DAY, CHEWED OR PARTIALLY DISSOLVED IN MOUTH BEFORE SWALLOWING, PREFERABLY AT NIGHT AFTER BRUSHING TEETH.
INACTIVE INGREDIENTS: LACTOSE, FLAVOR, SACCHARIN SODIUM, MAGNESIUM STEARATE
PRECAUTION -RECOMMEND DOSAGE ON CHART BELOW SHOULD NOT BE EXCEEDED AS PROLONGED OVERDOSE MAY RESULT IN DENTAL FLUOROSIS.


Summary
Events are the key to status monitoring. Any change in status is considered an event. The four status types in PerfStat are: OK, CRIT, WARN, and nostatus. If event logging is enabled events will be written to a log. Each service has an event log containing events for all that services metrics. Event logging must be enabled in order to do alerting.
Enable Events
1) Ensure EVENTLOG is enabled in perf-conf and set to "Y" by running the following command:
/perfhome/bin/tools/perfconfig -list
2) To change any of the perf-conf settings run the following command:
/perfhome/bin/tools/perfconfig -server
Note: if you are logged in as root you will need to run the perfconfig command with "-root" flag. You can also simply cat the /perfhome/etc/perf-conf file.
Configure Event Log Size
The size is the number of lines in the event log file. The event log will grow to the size (lines) of the LOGSIZE value in perf-conf and then will truncate old log entries to make room for new log entries when it reaches that size.
1) Set LOGSIZE to the maximum size (lines) that you want the event logs to be by running the following command:
/perfhome/bin/tools/perfconfig -server
Note: if you are logged in as root you will need to run the perfconfig command with "-root" flag. You can also simply vi the /perfhome/etc/perf-conf file.
Configure Event Thresholds (Optional)
In the PerfStat application you can configure WARN and CRIT thresholds. The thresholds are the levels at which an event is triggered. Below is how events are triggered:
WARN - A WARN event is generated when the value for a metric is at or above the WARN threshold and below the CRIT threshold
CRIT - A CRIT event is generated when the value for a metric is at or above the CRIT threshold
OK - A OK event is generated when a metric has a status of WARN or CRIT and the value falls below that of the WARN level
NOSTATUS - A NOSTATUS event is generated when the PerfStat application has not recieved data for that metric and the Status Interval (set in perf-conf) expires
1) Select "App Configs->Host Config" within the PerfStat application
2) Under the "Manage Hosts" section select "Config" to configure thresholds for a host
3) Under the "Configure Services" section select the service you would like to configure thresholds for
4) Under the service section configure the warn threshold, crit threshold, and/or threshold unit for a metric
5) Under the service section select "Update" to save your changes
Disable Service Events (Optional)
In the PerfStat application you can diable events at the service level by configuring the /perfhome/etc/events-disable file. This allows you to get more granular with your event logging policy. Disabled events can not be alerted on.
1) Using an editor such as vi open the /perfhome/etc/events-disable file.
2) Disable event(s) using the template within the file.
The events-disable file uses the following format:
hostname:<service1>:<service2>
A host followed by a comma separated list of services. You can also use the wildcard (*) to indicate all services such as follows:
hostname:*
Disable Metric Events (Optional)
In the PerfStat application you can disable events at the metric level. This allows for the most granular event policy.
1) Select "App Configs->Host Config" within the PerfStat application
2) Under the "Manage Hosts" section select "Config" to configure thresholds for a host
3) Under the "Configure Services" section select the service you would like to configure thresholds for
4) Under the service section configure the warn and/or crit thresholds for a metric
5) Under the service section select "Update" to save your changes


git bug
A distributed bug tracker that uses git's internal storage, so no files are added in your project.
You may submit your problems to the same git remote you use to interact with others, much like commits and branches.
More information: home page
- Create a new identity:
git bug user create
- Create a new bug:
git bug add
- You can push your new entry to a remote:
git bug push
- You can pull for updates:
git bug pull
- List existing bugs:
git bug ls
- Filter and sort bugs using a query:
git bug ls "status:open sort:edit"
- Search for bugs by text content:
git bug ls "search_query" baz


Usage of constraints
Functions from the constraints
module allow setting constraints (eg. non-negativity) on network parameters during optimization.
The penalties are applied on a per-layer basis. The exact API will depend on the layer, but the layers Dense
, Conv1D
, Conv2D
and Conv3D
have a unified API.
These layers expose 2 keyword arguments:
kernel_constraint
for the main weights matrixbias_constraint
for the bias.
from keras.constraints import max_norm
model.add(Dense(64, kernel_constraint=max_norm(2.)))
Available constraints
MaxNorm
keras.constraints.MaxNorm(max_value=2, axis=0)
MaxNorm weight constraint.
Constrains the weights incident to each hidden unit to have a norm less than or equal to a desired value.
Arguments
- max_value: the maximum norm for the incoming weights.
- axis: integer, axis along which to calculate weight norms.
For instance, in a
Dense
layer the weight matrix has shape(input_dim, output_dim)
, setaxis
to0
to constrain each weight vector of length(input_dim,)
. In aConv2D
layer withdata_format="channels_last"
, the weight tensor has shape(rows, cols, input_depth, output_depth)
, setaxis
to[0, 1, 2]
to constrain the weights of each filter tensor of size(rows, cols, input_depth)
.
References
NonNeg
keras.constraints.NonNeg()
Constrains the weights to be non-negative.
UnitNorm
keras.constraints.UnitNorm(axis=0)
Constrains the weights incident to each hidden unit to have unit norm.
Arguments
- axis: integer, axis along which to calculate weight norms.
For instance, in a
Dense
layer the weight matrix has shape(input_dim, output_dim)
, setaxis
to0
to constrain each weight vector of length(input_dim,)
. In aConv2D
layer withdata_format="channels_last"
, the weight tensor has shape(rows, cols, input_depth, output_depth)
, setaxis
to[0, 1, 2]
to constrain the weights of each filter tensor of size(rows, cols, input_depth)
.
MinMaxNorm
keras.constraints.MinMaxNorm(min_value=0.0, max_value=1.0, rate=1.0, axis=0)
MinMaxNorm weight constraint.
Constrains the weights incident to each hidden unit to have the norm between a lower bound and an upper bound.
Arguments
- min_value: the minimum norm for the incoming weights.
- max_value: the maximum norm for the incoming weights.
- rate: rate for enforcing the constraint: weights will be
rescaled to yield
(1 - rate) * norm + rate * norm.clip(min_value, max_value)
. Effectively, this means that rate=1.0 stands for strict enforcement of the constraint, while rate<1.0 means that weights will be rescaled at each step to slowly move towards a value inside the desired interval. - axis: integer, axis along which to calculate weight norms.
For instance, in a
Dense
layer the weight matrix has shape(input_dim, output_dim)
, setaxis
to0
to constrain each weight vector of length(input_dim,)
. In aConv2D
layer withdata_format="channels_last"
, the weight tensor has shape(rows, cols, input_depth, output_depth)
, setaxis
to[0, 1, 2]
to constrain the weights of each filter tensor of size(rows, cols, input_depth)
.


--- title: "Working with Databases from R - Alex Axthelm" slug: "jul2018" date: 2018-07-19 ---
The abstract of the talk and link to presented material are below.
Alex gave a demo of how to use R code to access and process data form SQL server.


{% extends "base.html" %} {% block content %}
Create email based reminders for yourself and others.
Create reminder
{{ reminder.description }}: {{ reminder.date_and_time }}


CLASSIC PEACE LILY
POPULAR HOUSE PLANT
$18
Classic Peace Lily is a spathiphyllum floor plant arranged in a bamboo planter with a blue & red ribbon and a butterfly pick.
POPULAR HOUSE PLANT
$18
Classic Peace Lily is a spathiphyllum floor plant arranged in a bamboo planter with a blue & red ribbon and a butterfly pick.


Police: Teen mayhem at NYC mall leads to arrest, injuries
by Associated PressNEW YORK (AP) — Police say a throng of teenagers got out of hand at a New York City mall, and the commotion devolved into fights, injuries and an arrest as police and security officers cleared the crowd.
The Queens Center mall mayhem began around 1:30 p.m. Friday. The local precinct captain noted many local schools had dismissed students early.
Police say mall staffers asked them to intervene after the youths began running around and creating a ruckus.
Police say that as the teens were ushered outside, skirmishes and fights broke out. One person was taken into custody, two were taken to a hospital and two others were injured but declined medical attention.
A message was sent to a mall manager.
WABC-TV says a mall spokesperson expressed disappointment in the teens’ actions.


{% include no-linenos.html content=collection.content %} {{ content | markdownify | strip_html | truncate: 200 }}
--- layout: page # The Collections page layout --- {% include lang.html %} {% assign library = site.library %}
{% include no-linenos.html content=collection.content %} {{ content | markdownify | strip_html | truncate: 200 }}


1. God - There is one God, who exists eternally in three distinct but equal persons: the Father, the Son, and the Holy Spirit. God is unchangeable in his holiness, justice, wisdom and love. He is the almighty Creator; Saviour and Judge who sustains and governs all things according to his sovereign will for his own glory.
2. The Bible - God has revealed himself in the Bible, which consists of the Old and New Testaments alone. Every word was inspired by God through human authors, so that the Bible as originally given is in its entirety the Word of God, without error and fully reliable in fact and doctrine. The Bible alone speaks with final authority and is always sufficient for all matters of belief and practice.
3. The Human Race - All men and women, being created in the image of God, have inherent and equal dignity and worth. Their greatest purpose is to obey, worship and love God. As a result of the fall of our first parents, every aspect of human nature has been corrupted and all men and women are without spiritual life, guilty sinners and hostile to God. Every person is therefore under the just condemnation of God and needs to be born again, forgiven and reconciled to God in order to know and please him.
4. The Lord Jesus Christ - The Lord Jesus Christ is fully God and fully man. He was conceived by the Holy Spirit, born of a virgin, and lived a sinless life in obedience to the Father. He taught with authority and all his words are true. On the cross he died in the place of sinners, bearing God’s punishment for their sin, redeeming them by his blood. He rose from the dead and in his resurrection body ascended into heaven where he is exalted as Lord of all. He intercedes for his people in the presense of the father.
6. The Holy Spirit - The Holy Spirit has been sent from heaven to glorify Christ and to apply his work of salvation. He convicts sinners, imparts spiritual life and gives a true understanding of the Scriptures. He indwells all believers, brings assurance of salvation and produces increasing likeness to Christ. He builds up the Church and empowers its members for worship, service and mission.
7. The Church - The universal Church is the body of which Christ is the head and to which all who are saved belong. It is made visible in local churches, which are congregations of believers who are committed to each other for the worship of God, the preaching of the Word, the administering of Baptism and the Lord’s Supper; for pastoral care and discipline, and for evangelism. The unity of the body of Christ is expressed within and between churches by mutual love, care and encouragement. True fellowship between churches exists only where they are faithful to the gospel.
8. Baptism and the Lord’s Supper - Baptism and the Lord’s Supper have been given to the churches by Christ as visible signs of the gospel. Baptism is a symbol of union with Christ and entry into his Church but does not impart spiritual life. The Lord’s Supper is a commemoration of Christ’s sacrifice offered once for all and involves no change in the bread and wine. All its blessings are received by faith.
9. The Future - The Lord Jesus Christ will return in glory. He will raise the dead and judge the world in righteousness. The wicked will be sent to eternal punishment and the righteous will be welcomed into a life of eternal joy in fellowship with God. God will make all things new and will be glorified forever.


Hello World
Objective
In this section, you'll take a focused look at creating Titanium Mobile applications. This section sets the stage for the remainder of this book, during which we'll dig deep into the various aspects of creating mobile applications with Titanium.
Contents
Before we can build our first app, we need to create a mobile project in Titanium Studio. During this process, we'll discuss the following critical aspects of Titanium mobile projects:
-
The meta-information necessary for project creation
-
The default project structure
-
Launching projects in the simulator/emulator
You can create a new project in Titanium Studio one fo two ways:
-
From the menu, select File -> New Project
-
From the toolbar, click the New Project button
After you have selected "Titanium Mobile Project", the following dialog box will be displayed:
In the new mobile project dialog, you'll need to fill in the following fields:
-
A project name – This will become your app's name as seen by users.
-
App Id – Titanium's version of the Android Package Name or CF Bundle Identifier. Typically, you enter a name in reverse domain name format with your app's name at the end (i.e., com.yourdomain.yourappname). Avoid spaces and special characters. More details on the app ID are covered in the Deployment & Distribution chapter.
-
Company/Personal URL
-
Titanium SDK Version
-
Deployment Target – you can create a single project to target Android, iPhone, and iPad
Once this is complete, Studio creates a default project structure for you, based on the given meta-information.
-
Resources folder – your project's code files and graphics are stored in this folder
-
app.js – your project's bootstrap file. Every project has one; it's the file loaded first when your app is launched
-
tiapp.xml – The details you enter in the new project wizard are used to populate the tiapp.xml file and the manifest file.
Those are basically the only required files, but you can augment the project with others. For example, you don't have to put all of your code into app.js. (Later in this guide, we'll show one method for dividing up code into multiple files.) You could put all your graphics in the Resources directory, or you could put them into subfolders. We'll dig more deeply into cross-platform development later, but the android and iphone directories within Resources are locations for your platform-specific assets.
Running your app
To build and run your app, simply click the Run button as shown in the following graphic. Then, choose the appropriate target.
Simulator/Emulator
It's more than simple semantics, but with iOS the desktop software that runs your app is called a simulator; on Android, it's an emulator. Whether writing a native Objective-C app or a Titanium app, your iPhone/iPad code is cross-compiled and turned into an OS X executable. It's then run by OS X, simulating the environment within an iOS device. With Android, the emulator provides a virtual hardware environment that runs the actual Android operating system, platform components, and your app's code.
With both platforms, the test environment isn't a perfect representation of the actual mobile device. Some subtle (and not-so-subtle) differences can will present themselves. You should always test your app on a physical device before publishing it.
We'll try to be generic in this guide by saying simulator/emulator when referring to the virtual software device thingie. But, forgive us if we say simulator or emulator alone.
Under the covers
Let's take a high-level look at how your source code is turned into a native app. Titanium's tools include a pre-compiler, front-end compiler, and a set of python build scripts that interact with the native SDK tools.
To start, Titanium precompiles your Javascript to minify it. Titanium's pre-compiler statically analyzes your code and builds a dependency hierarchy of all the Titanium APIs used by your application. The front-end compiler's job is to create native stub files. These include appropriate platform-specific native code, a native project (if necessary), and build any specific code that is necessary to compile Titanium for a given platform compiler. Finally, Titanium calls out to the platform-specific compiler tools (for example, xcodebuild for iOS) to compile the final native application.
On the iOS side, your Javascript is Base64 encoded, inlined as a variable in a C file, and is then compiled. Your Javascript is not converted to Objective-C. It remains Javascript and is interpreted at runtime using the JavaScriptCore interpreter. On Android, your Javascript is precompiled to bytecode. At runtime, your code is interpreted by the Rhino Javascript interpreter. In both cases, your original code is not retrievable in any sort of human-readable form.
Hands-on Practice
Goal
In this activity, you will create a default project and examine the resulting files.
Steps
-
In Titanium Studio, use the New Project wizard to create a new Titanium Mobile project. Create a test project named HelloWorld with an app ID of com.yourname.helloworld. Select appropriate build targets (e.g. iPhone and/or Android).
-
Once the project is created, close the tiapp.xml file.
-
Examine the code of the app.js file. The default project creates a simple two-tab application. Each tab contains a window. Each window contains a label.
-
Update the label on window 1 to read 'Hello World!' and save your changes.
-
Click the Run button, then choose the appropriate build target.
-
Test the application in the simulator/emulator. Close the simulator when you're done.
-
Using Finder/Explorer, examine the project files created by Studio.
References and Further Reading
Titanium Wiki
Getting Started with Titanium
Titanium Architecture
Summary
In this chapter, you took a brief look at creating Titanium Mobile applications. In the remainder of this course, we'll dig deep into the various aspects of creating mobile applications with Titanium, such as user interface construction, networking, localization, and much more.


CSS Diner Shopping list
Let's go to the mall!
A lot of pickles
(for the next lessons about CSS)
10 appels
(for more CSS manipulations)
20 oranges
(because they are awesome)
13 plates
(hm... they always disappear)
15 bentos
1 bottle of Sake ^_^
(for my friends)


| Interface | Description |
|---|---|
| CacheEntryListenerProvider<K,V> |
Provides underlying (wrapped)
CacheEntryListener instance. |
| CacheEventData |
Internal event data wrapper used during publishing and dispatching events.
|
| CacheEventListener |
Cache Event Listener interface is designated for handling cache events internally such as delegating events
to cache event listener.
|
| CacheOperationProvider |
Provide InMemoryFormat specific operations for cache
|
| CacheSyncListenerCompleter |
used to state that a sync event completed and any resources waiting for it should be released
|
| ICacheInternal<K,V> |
Internal API for
ICache implementations. |
| ICacheRecordStore |
ICacheRecordStore is the core contract providing internal functionality to
ICache implementations on partition scope. |
| ICacheService |
| Class | Description |
|---|---|
| AbstractCacheRecordStore<R extends CacheRecord,CRM extends SampleableCacheRecordMap<Data,R>> | |
| AbstractCacheService | |
| AbstractClusterWideIterator<K,V> |
AbstractClusterWideIterator provides the core iterator functionality shared by its descendants. |
| AbstractHazelcastCacheManager |
Abstract
HazelcastCacheManager (also CacheManager as indirect) implementation
provides shared functionality to server and client cache managers. |
| AbstractHazelcastCachingProvider |
Abstract
CachingProvider implementation providing shared functionality to server and client caching
providers. |
| CacheClearResponse |
This class is a simple object wrapper to be used by
CacheClearOperation . |
| CacheDataSerializerHook |
CacheDataSerializerHook contains all the ID hooks for IdentifiedDataSerializable classes used
inside the JCache framework. |
| CacheDistributedObject |
Basic distributed object which serves as an accessor to
CacheService and NodeEngine . |
| CacheEntry<K,V> |
Simple
Cache.Entry implementation for wrapping a "key,value" pair. |
| CacheEntryEventImpl<K,V> |
CacheEntryEvent implementation is the actual event object received by sub-interfaces of
CacheEntryListener . |
| CacheEntryProcessorEntry<K,V,R extends CacheRecord> |
This class is an implementation of
MutableEntry which is provided into
EntryProcessor.process(javax.cache.processor.MutableEntry, Object...) . |
| CacheEntryProcessorResult<T> |
This simple implementation of
EntryProcessorResult wraps the result returned or exception thrown in a
single object so that multiple exceptions from multiple entry processes can be returned. |
| CacheEventDataImpl |
Implementation of
CacheEventData . |
| CacheEventListenerAdaptor<K,V> |
This implementation of
CacheEventListener uses the adapter pattern for wrapping all cache event listener
types into a single listener. |
| CacheEventSet |
Internal Set wrapper of
CacheEventData items used during publishing and dispatching events. |
| CacheKeyIteratorResult |
Response data object returned by
CacheKeyIteratorOperation . |
| CacheMXBeanImpl |
Implementation of
CacheMXBean . |
| CachePartitionSegment |
Cache Partition Segment
|
| CachePortableHook |
CachePortableHook contains all the ID hooks for classes used inside the JCache framework which implement
Portable . |
| CacheProxy<K,V> |
ICache implementation
|
| CacheProxyUtil |
Static util methods for ICache implementations.
|
| CacheRecordStore |
On-Heap implementation of the
ICacheRecordStore |
| CacheService |
Cache Service is the main access point of JCache implementation.
|
| CacheStatisticsImpl |
CacheStatistics implementation for ICache . |
| CacheStatisticsMXBeanImpl |
Implementation of
CacheStatisticsMXBean |
| ClusterWideIterator<K,V> |
Cluster-wide iterator for
ICache . |
| DefaultOperationProvider |
Provide operations other then
InMemoryFormat.NATIVE |
| HazelcastServerCacheManager |
Hazelcast
CacheManager for server implementation. |
| HazelcastServerCachingProvider |
Provides server cachingProvider implementation.
|
| MXBeanUtil |
MXBean utility methods related to registration of the beans.
|
| TCKMBeanServerBuilder |
An MBeanServer builder required by TCK tests.
|
| TCKMBeanServerBuilder.RIMBeanServerDelegate |
| Enum | Description |
|---|---|
| CacheEntryProcessorEntry.State | |
| CacheEventType |
Hazelcast JCache implementation's internal event types.
|
Hazelcast JSR-107 aka JCache implementation
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.