One of the approaches to understanding a large amount of data is to characterize it using a few numbers. Statistics such as minimum, maximum, and the various kinds of averages tell you global properties. Sometimes they are enough to reveal information about individuals. This is why databases that give only statistical information are an issue for privacy advocates: Enough statistical questions can reveal personal data.
Consider a simple game between a questioner Quentin and a responder Rosalba. Quentin can ask only about global properties of a group of numbers, e.g., are they all whole numbers, are they distinct, and the statistics - mean, median, minimum, and maximum.
Rosalba always tells the truth. She may refuse to answer, however, if she knows the answer may divulge all the numbers. As we’ll see, the refusal to answer may itself divulge all the numbers. Sometimes, she will volunteer information just for the fun of it.
Rosalba: “I have five integers, all distinct.”
Quentin: “What is the minimum?”
Rosalba: “15.”
Quentin: “What is the maximum?”
Rosalba: “I won’t tell, because you would know everything.”
What are the numbers?
Because the numbers are all distinct, the maximum would tell everything only if it were 19. Then the collection consists of 15, 16, 17, 18, and 19. Okay, this was easy, but the deductions will get more interesting.
Before we go on, though, let me remind you of the definition of the mean and median. The mean of a collection of numbers is their sum divided by the number in the collection. For example the mean of 20, 22, 22, 40, and 101 is 205/5 = 41. The median is the middle number in the sorted order, so 22 for this example. That is, the median is the middle in a sorted ordering of the values (our examples will always have an odd number of values).
Rosalba: “I have five integers that may or may not be distinct.”
Quentin: “What is the minimum?”
Rosalba: “20.”
Quentin: “Which of these would not allow me to infer all their values: number distinct, mean, maximum, or median?”
Rosalba: “Only the median.”
Quentin: “Great. I know the numbers.”
What are they?
Rosalba: “I have seven integers that may or may not be distinct.”
Quentin: “What is the minimum?”
Rosalba: “20.”
Quentin: “Which of these are you willing to tell me (i.e., would not allow me to infer all their values): mean, median, and maximum?”
Rosalba: “All of them.”
Quentin: “Ok, what is the maximum?”
Rosalba: “21.”
Quentin: “I know which of mean and median you’re willing to tell me now.”
Which? Why?
Rosalba: “Can you find some situation in which I would be happier to tell you the mean rather than the median?”
Quentin: “Could you give me a hint?”
Rosalba: “In an example I can think of, there are three numbers, two of them distinct.” Give it a try.
Rosalba: “Can you find some situation in which all of minimum, maximum, mean, and median are necessary and sufficient to find the identities of five numbers that are all integers?”
Rosalba: “So far we’ve been playing games with just a few numbers. I’ve given you hints and you’ve been able to infer them all. But just a handful of numbers are not interesting. Let’s try for more.
“Before we do that, let me define one new global property: the total distance to a point. Let’s say we have the five numbers 10, 15, 20, 30, 60. The total distance to a point - say, 22 - is the sum of (22-10), (22-15), (22-20), (30-22), and (60-22). Mathematically, the total distance to x from a set of numbers is the sum of the absolute values of the differences between each number and x.
Rosalba: “Now we are ready. There are 17 numbers that are not all distinct. Their minimum is 30, mean is 34, and median is 35.”
Quentin: “What is their total distance to 35?”
Rosalba: “I won’t tell you, but the total distance to 35 is five less than the total distance to 38. Whoops! I shouldn’t have told you that.”
Quentin laughing: “You’re right. Now I know the numbers.”
What are they?
How would your answer to this question change if there were 1701 numbers, but otherwise the same information as in the previous question?


The goal of this website is to try to monitor contributions. All to often we here about big political donations but we end up finding out about them too late. Wouldn't it be better if we could try and track contributions as close to real time as possible? That's what this website tries to accomplish. Every time you refresh this page it makes a call to the New York Times web api and loads in the latest data!
| Name | Party | Total From PAC's | Coverage Date From: | Coverage Date To: |
|---|
| Name | Party | Total Contributions | Coverage Date From: | Coverage Date To: |
|---|
| Name | Party | Total Contributions From Individuals | Coverage Date From: | Coverage Date To: |
|---|


Image: Yoda
Image: Luke Skywalker
Audio: The Force will be with you Always
Video: Leaves on the Lake
Flash: SWF Song + Video
Video: FLV Race + Video
MP3: Many Kinds of Perfect (demo)
HTML: Home Page


The Invisible Man
by H.G. Wells
The Invisible Man is a suspense novel by H.G. Wells, narrating the tale of "Griffin", a scientist who undergoes an irreversible procedure, the results of which eventually drive him insane.
Science fiction explores the consequences of scientific innovation. Science fiction is likely to be set in the future and involve high technology.
The Invisible Man is a suspense novel by H.G. Wells, narrating the tale of "Griffin", a scientist who undergoes an irreversible procedure, the results of which eventually drive him insane.
The Time Machine is a book by H. G. Wells, first published in 1895
The book’s protagonist is an amateur inventor or scientist living in London identified simply as The Time Traveller. Having demonstrated to friends using a miniature model that time is a fourth dimension, and that a suitable apparatus can move back and forth in this fourth dimension, he completes the building of a larger machine capable of carrying himself. He then immediately sets off on a journey into the future.
The Time Traveller details the experience of time travel and the evolution of his surroundings as he moves through time. While travelling through time, his machine allows him to observe the changes of the outside world in fast motion. He observes the sun and moon traversing the sky and the changes to the buildings and landscape around him as he travels through time. His machine produces a sense of disorientation to its occupant, and a blurring or faintness of the surroundings outside the machine.
Twenty Thousand Leagues Under the Sea (French: Vingt mille lieues sous les mers) is a classic science fiction novel by French writer Jules Verne, published in 1870. It is about the fictional Captain Nemo and his submarine, Nautilus, as seen by one of his passengers, Professor Pierre Aronnax.
The War of the Worlds, by H. G. Wells, is an early science fiction novel which describes an invasion of England by aliens from Mars. It is one of the best-known depictions of an alien invasion of Earth.
Monos and Una discuss the destructive nature of man.
Eiros and Charmion discuss the events that led to the end of life on Earth.
A sailor recounts his experience with the Maelstrom, a dangerous whirlpool off the coast of Norway.


Fixing your IPsec VPN following upgrade to NSX 6.4
With the upgrade to NSX version 6.4, VMware have made a security change to the default settings of the NSX edge gateway's IPsec VPN service. The new default for IPsec VPN service is to use the DH-14 (Diffie–Hellman group 14) algorithm during phase 1 negotiation of the VPN tunnel. You have the option of selecting a different version of Diffie-Hellman in the advanced gateway GUI. The following versions are supported:
DH-2 (Diffie–Hellman group 2)
DH-5 (Diffie–Hellman group 5)
DH-14 (Diffie–Hellman group 14)
DH-15 (Diffie–Hellman group 15)
DH-16 (Diffie–Hellman group 16)
However, during the upgrade of one of our regions we discovered that for edges that have not been converted to advanced gateways that have VPNs configured, the upgrade changes the config on the VPN tunnels to use the DH-14 algorithm instead of the previously only available DH-2.
As a result, VPN tunnels are then broken until either of the following is performed:
The edge with the affected VPN is upgraded to an advanced gateway and the VPN config is changed from DH-14 back to DH-2
The peer end config is amended to use DH-14 for its ike negotiation
UKCloud support staff can change the VPN config back to DH-2 on a temporary basis until the edge is converted, however the setting is not persistent, and under certain configuration changes to an edge, the setting of DH-14 may be reapplied. Converting to an advanced gateway does not require any downtime nor cause any outage during the conversion.
Follow the steps below to convert your edge to an advanced gateway and configure your VPN back to DH-2. To complete these steps, you must have access to the UKCloud Portal and VMware Cloud Director.
Change your VPN settings
To change the DH setting on your broken VPN:
In the VMware Cloud Director Virtual Data Center dashboard, select the VDC that contains the edge with the broken VPN.
In the left navigation panel, under Networking, select Edges.
On the Edge Gateways page, select the edge that you want to configure and click Services.
On the Edge Gateway page, select the VPN tab, then the IPsec VPN tab.
Select the IPsec VPN Sites tab.
Select the VPN tunnel that is broken and click the edit icon.
From the Diffee-Hellman Group list, select DH2.
You may need to scroll the window to the bottom of the page to find the list.
When you're done, click Keep.
Repeat the steps 6 and 7 for any other VPNs that are broken and when you're ready to save the configuration, click Save Changes at the top of the page.
Check the state of the VPN by clicking the Statistics tab at the top of the screen and selecting IPsec VPN to view the health of your VPN.
Feedback
If you find a problem with this article, click Improve this Doc to make the change yourself or raise an issue in GitHub. If you have an idea for how we could improve any of our services, send an email to feedback@ukcloud.com.


method of class JsNgram
Description
Add to index by a list of files
and append to json index files using jsngram.json2.json_append
function.
Example
self.add_files_to_json(['a/b.txt', 'a/c.txt'], True)
Usage
add_files_to_json(paths, verbose)
Argument paths is a list of relative paths of the files.
Relative to the property src
.
And each path will be an id of each document.
Prints debugging informations if verbose = True
.


England book Italy friendly at Wembley ahead of Euro 2020
England will host four-time World Cup winners Italy as they step up their preparations for the Euro 2020 finals.
The Azzurri, who were crowned European champions in 1968, will head for Wembley in Friday, March 27 in the first of four friendlies in the build-up to next summer's tournament.
An FA statement said: "Italy will visit Wembley Stadium connected by EE to face England on Friday 27 March 2020 (8pm kick-off).
"The fixture will be the first of four tests to help the Three Lions prepare for next summer's UEFA EURO 2020.
"The occasion will also be designated as 'The Heads Up International' in support of The FA's charitable partnership with HRH The Duke of Cambridge's Heads Together mental health initiative."
The Italians have been drawn in the same group as Wales, and Gareth Southgate's men will face another fellow finalist four days later when Denmark head for Wembley.
They will complete their pre-tournament programme with a trip to Vienna to face Austria at the Ernst Happel Stadion on Tuesday, June 2 before a home clash with Romania at a venue still to be confirmed five days later.
England's campaign gets under way against Croatia on Sunday, June 14 with the winner of the play-off path featuring Scotland, Israel, Norway and Serbia their next opponents on Friday, June 19 and the Czech Republic waiting in the wings for the final Group D fixture on Tuesday, June 23 with all three games taking place at Wembley.
body check tags ::


RxCpp -> The first simple example
Intro
I've been away from C++ for a while now, but it's always important to come back to your roots. All that being said, there is always lots to learn from using different programming languages, libraries and environments. I've been working in the Android world for sometime, keeping up with the latest trends and libraries supported on the platform.
When you start a new project there is always those libraries you add without even thinking and now RxJava/RxKotlin was an interesting addition to this scenario. Rx stands for reactive, and this is suppose to introduce the concept of reactive programming. I like to think of this as anything to do with taking in some input and throwing the output elsewhere. This is essentially what most programs consist of, whether it be listening on the network, taking inputs from an user or periodically completing a task.
I want to leave any more explanation of Rx to other blog posts and tutorials as there are many out there due to the support across many languages. I'd rather focus a little more on the usage in C++ by the accompanying library RxCpp which can be found here on github.
Project setup / Code
I'll be setting this project up using cmake as I believe this is the quickest way to get started. So first you'll need a empty folder and within this, a folder called modules. The empty folder will hold a CMakeLists.txt and a main.cpp file so go ahead and create them. You should have the following layout.
Now we need to populate the CMakeList.txt to pull in the RxCpp resources and compile main.cpp. I'm not going to go into this file as this is not a tutorial for cmake.
cmake_minimum_required(VERSION 3.5)
project(rxcpp_test)
if(NOT DEFINED RXCPP_SOURCE_DIR)
message(FATAL_ERROR "Please define RXCPP_SOURCE_DIR on the command line. -DRXCPP_SOURCE_DIR=pathToRxCppSource" )
endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/modules")
find_package(RxCpp REQUIRED)
message(STATUS "RXCPP_INCLUDE_DIR: " ${RXCPP_INCLUDE_DIR} )
set(CMAKE_CXX_STANDARD 11)
set(SOURCE_FILES main.cpp)
include_directories(${RXCPP_INCLUDE_DIRS})
add_executable(main ${SOURCE_FILES})
Inside the modules folder we now need to create a file called FindRxCpp.cmake. This will allow us to find the header files for the RxCpp library we want to include. Here is what the contents will look like.
# Finds the C++ (RXCPP) Library
#
# RXCPP_INCLUDE_DIRS - Directory to include to get RXCPP headers
SET(_RXCPP_REQUIRED_VARS RXCPP_INCLUDE_DIR RXCPP_INCLUDE_DIRS )
#
### FIRST STEP: Find the headers.
#
FIND_PATH(
RXCPP_INCLUDE_DIR rxcpp/rx.hpp
PATH "${RXCPP_SOURCE_DIR}"
DOC "rxcpp include directory")
MARK_AS_ADVANCED(RXCPP_INCLUDE_DIR)
SET(RXCPP_INCLUDE_DIRS
${RXCPP_INCLUDE_DIR}/Rx/CPP/src
${RXCPP_INCLUDE_DIR}/Ix/CPP/src
${RXCPP_INCLUDE_DIR})
Now to write the main.cpp. This is going to be really simple so lets go through it.
#include <iostream>
#include "rxcpp/rx.hpp"
int main() {
auto observable = rxcpp::observable<>::create<const int>(
[](rxcpp::subscriber<const int> subscriber){
subscriber.on_next(1);
subscriber.on_next(2);
subscriber.on_next(3);
subscriber.on_completed();
});
observable.subscribe(
[](const int receivedData){ std::cout << "Received integer : " << receivedData << std::endl;},
[](){ std::cout << "OnCompleted" << std::endl; }
);
}
One of the first things that will hit you will be the heavy use of lambdas. Lambdas are really useful when working with Rx as we are firing small segments of code from many different places and "reacting" to different situations.
On the first line you'll see the observable being created with a template parameter of const int. This is telling the Observable we are going to be firing ints to the observer. A lambda is passed to the create method which fires the on_next events along with any on_error and on_complete which may occur. This is where you can create your own custom streams of data.
After that you will see the subscriber (observer) which holds two lambdas. The first of which is the code sequence to run when on_next is called and the second is the same for on_complete. I have omitted the on_error in this example as we explicitly know that it will not be fired, but it is always good practice to handle.
Clone RxCpp library
In any location you wish pull down the RxCpp library from github for later use.
git clone --recursive https://github.com/Reactive-Extensions/RxCpp.git
cd RxCpp
Compile
First we need to run cmake.
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DRXCPP_SOURCE_DIR=pathToRxCppRepo ..
RXCPP_SOURCE_DIR is the folder in which you cloned the rxcpp into.
Run
Now, within the build directory you can run main and you should see the following.
./main
Received integer : 1
Received integer : 2
Received integer : 3
OnCompleted
Summary
And that's it. There's not too much to discuss yet as we have pretty much just got the project setup. You can see how an observable is subscribed to and the data flows to the given code to execute. Pretty simple, it doesn't show much yet but the semantics. So next is the exploration of whats possible.


Play Pig Dice
Player 1 : Name
Player 2 : Name
Start
Pig Dice
Player 1
roll
hold
Dice Roll:
Round Total:
Summation Score:
Total Score:
Player 2
roll
hold
Dice Roll:
Round Total:
Summation Score:
Total Score:
New game


Navigation
Reset operation
Adjacent Matrix
Node Operation
Edge Operation
Traversal
Shortest Path
Minimum Spanning Tree
Search


| Jackie is a CCTV operator. Each day, she watches over a small part of the world, protecting the people living their lives under her gaze. One day, a man shows his face on her monitor, a man she thought she would never see again, a man she hoped never to see again. Now she has no choice and is compelled to confront him. | |
| Genres: | Drama, Mystery, Thriller |
| Director: | Andrea Arnold |
| Writer: | Andrea Arnold, Lone Scherfig, Anders Thomas Jensen |
Cast: | Jackie - Kate Dickie Clyde - Tony Curran Stevie - Martin Compston April - Natalie Press Avery - Paul Higgins Alfred - Andrew Armour Cleaner - Carolyn Calder Man With Dog - John Comerford Bronwyn - Jessica Angus Angus - Martin McCardie Frank - Martin O'Neill Jo - Cora Bisset Broomfield Barman - Charles Brown Aunt Kath - Annie Bain Woman in Denim Skirt - Frances Kelly Broomfield Barman - John McDonald Stevie's Dad - William Cassidy Police Woman - Sarah Haworth Kind Lady on Bus - Elizabeth Allan Brenda - Anne Kidd Rob - Allan Sawers Woman Who Flirts with Clyde - Frances McEwan Purple Coat with Cat - Anne McColgan Top Man Jacket - Graeme Wright Blonde Cleaner - Sanije Robeli Lawyer - Neil Cairns |


|
PEREGRINOS (Pilgrims) is the most recent series of photographs of the duo Atelier Morales.
The works represent the romantic need of human beings to follow and reach their idols wherever there is a historic landmark.
Over time mankind has idealized mythical or real heroes and identified with their allure.
Today idols such as writers, actors, musicians, politicians and legendary or charismatic figures are revered all over the world.
Pilgrims go to fascinating places to look for the poetic essence of someone who left songs, books, films, ideas, art and good will as a cultural heritage to mankind.
Thus the Atelier Morales’ photographs capture pilgrimages to where Charlie Chaplin, El Che, Frida and Diego, Lady Di, Gainsbourg, Hemmingway or Lennon can be found, or to a cemetery where an anonymous mother grants miracles.
An earlier series, Viaje Equinoccial, Homenaje a A. Von Humboldt y A. Bompland, has had an important curatorial acclaim and refers to the traces left by historical travelers and tourism today in a globalized world.
Atelier Morales was selected to participate at the Third Beijing International Art Biennial, China, 2008 with works from this series.
All ten pieces were presented in a collective at the Schrin Kunsthalle, Frankfurt, 2008 and in a solo show at the Heidelberger Kunstverein, 2007.
With photography as a mediating tool and using poetic language and images, the duo’s artistic work is conceptual and refers to history and memory.
|


{% extends "base.html" %} {% load static %} {% block title %}Todo{% endblock %} {% block body %}
This is a simple todo app. Here you can manage your tasks by adding tasks here.
Login Here »


{% if skip %}
No experiment found. Add an experiment with slug "city" to see experiment in action.
{% else %}
I heard you like the
{% if baseball %}
{{baseball}}
{% endif %}
{% if hockey %}
{{hockey}}
{% endif %}
{% if basketball %}
{{basketball}}
{% endif %}
{% endif %}


Your demand has been registered, you will recieve a mail shortly.
Please confirm your registration by clicking the link provided in the mail.


Edit Campaign
Campaign Owner
Type
Select
Advertisement
Banner Ads
Conference
Direct Mail
Email
Partners
Public Relations
Referral Program
Trade Show
Webinar
*Campaign Name
Product Name
Select
Building Material
Purchased
Status
Select
Active
Deactive
Location
Select
Mumbai
{/*
Deactive
*/}
Industry
Select
ASP
Government
Large Enterprise
ManagementISV
MSP(Management Service Provider)
Network Equipment(Enterprise)
Optical Networking
Service Provider
Small/Medium Enterprise
Storage Equipment
Storage service Provider
System Integrator
Telecom OEM
Wireless Industry
Start Date
End Date
Expected Revenue
Budgeted Cost
Actual Cost
Expected Response
Description


| Concession Name | {{ selected.concession.concession_name }} |
| Owner | {{ selected.concession.owner }} |
| Address | {{ selected.concession.address }} |
| Country | {{ selected.concession.country }} |
| City | {{ selected.concession.city }} |
| Resource | {{ selected.concession.resource }} |
| Reserves | {{ selected.concession.reserves }} |
| Annual Production | {{ selected.concession.annual_production }} |
| Stockpile Capacity | {{ selected.concession.stockpile_capacity }} |
| Contracted Volume | {{ selected.concession.contracted_volume }} |
| Stripping Ratio | {{ selected.concession.stripping_ratio }} |
| Size | {{ selected.concession.size }} |
| Stockpile Distance | {{ selected.concession.stockpile_distance }} |
| Stockpile Coverage | {{ selected.concession.stockpile_coverage }} |
| Remaining Volume | {{ selected.concession.remaining_volume }} |
| Hauling Road Name | {{ selected.concession.hauling_road_name }} |
| License Type | {{ selected.concession.license_type }} |
| License Expiry Date | {{ selected.concession.license_expiry_date }} |


Welcome,
John Doe
Total transactions
188,756
4% From last day
Total alerts
12,350
3% From last day
Total cases
2,500
34% From last Week
Total accounts
1,567
12% From last Week
Transactions Graph title sub-title
December 30, 2014 - January 28, 2015
Recent Cases
Accounts
Most active accounts past week
Fraud type
|


The following Categories will be created on SmugMug during the next sync:
The following SubCategories will be created under the shown Category on SmugMug during the next sync:
The following Albums will be created with the given Category and SubCategory on SmugMug during the next sync:
The following breaks out by album the number of images that need to be uploaded and/or downloaded:


ncutil 3User's Guide |
Locations and Services |
Today's computers typically have more than one network interface associated with them: my PowerBook G4 has a 56k modem, built-in ethernet, AirPort wireless card, and Bluetooth modem capability. And the fact that the computer in question is a laptop implies that I may need to have configuration information available for many different locales.
The SystemConfiguration framework and the configd daemon that run on every Darwin-based host make it easy to juggle all these interfaces and a myriad of configurations. A network service consists of a reference to the network interface it configures and properties to setup each protocol that run atop that interface. For example, Listing 8 shows the contents of a network service that is associated with the built-in ethernet interface:Here we see that the Built-in Ethernet interface is used by the network service and protocol configuration entities for AppleTalk, IP version 4 and 6, DNS, and proxy server settings are all present.
Listing 8: A Built-in Ethernet network service. [0 ]$ list 9 drw 10 Built-in Ethernet Interface drw 11 Proxies Protocol drw 12 AppleTalk Protocol drw 13 IPv4 Protocol drw 14 DNS Protocol drw 15 IPv6 Protocol
A location (also called a network set) contains multiple network services, one for each available network interface, typically. Of course, one can remove or add network services to a location: if no network services exist for a particular interface then that interface simply is not configured when that location is in-use. If in the context of a location multiple network services exist for a single interface, then the service order for that location determines in what sequence each network service will be consulted in order to get the network interface transmitting.In this case, there are two network services associated with the built-in ethernet interface: the first (Built-in Ethernet) uses a static IP address while the second (DHCP) requests an address from a DHCP server. If the interface were to fail to come up with the first service's static address, the second service would be tried.
Listing 9: The name and service order for the Office location. [0 ]$ read 7 -rw name = Office -rw service-order = { Built-in Ethernet DHCP Built-in FireWire Internal Modem Bluetooth AirPort }
Let us see how locations and network services are created and removed using ncutil.
Creating a Location
Each location must have a unique name to identify it to the user, so first choose a name for the new location (you can modify the name later, too). We will create a new location called At Home. The command to create this new location is quite simple:The new location is automatically populated with one network service for each available network interface.
Listing 10: Creating and examining the At Home location. [0 ]$ create-location "At Home" [0 ]$ ls dr- 1 Interfaces Directory drw 7 Office Location drw 45 On the Road Location drw 90 At Home Location [0 ]$ ls 90 drw 91 NetInfo Global NetInfo drw 92 Internal Modem Service drw 99 Bluetooth Service drw 106 Built-in Ethernet Service drw 113 Built-in FireWire Service drw 119 AirPort Service
Creating a Network Service
Having configured all of the network services in the At Home location (in a flurry of commands not cited here) we shall now add another network service to use DHCP to configure the built-in ethernet interface. As with locations, each network service within a location should have a unique name associated with it: we will call the new service DHCP. Listing the /Interfaces directory, we find that the built-in ethernet template resides at directory ID 4 (or /Interfaces/Built-in Ethernet). The location to which you wish to add the new service must be the first argument to the command; the network interface template directory is the second argument; and the name for the service is the third.In the next chapter we will configure this new network service, but for now, let us move on to removing services and locations.
Listing 11: Creating and examining the DHCP service. [0 ]$ create-service 90 4 DHCP [0 ]$ ls 90 drw 91 NetInfo Global NetInfo drw 92 Internal Modem Service drw 99 Bluetooth Service drw 106 Built-in Ethernet Service drw 113 Built-in FireWire Service drw 119 AirPort Service drw 127 DHCP Service [0 ]$ ls 127 drw 128 Built-in Ethernet Interface drw 129 IPv4 Protocol drw 130 DNS Protocol drw 131 IPv6 Protocol drw 132 AppleTalk Protocol drw 133 Proxies Protocol
Removing a Network Service
To remove a network service, make note of its directory ID or path and then issue the destroy-service {directory} command. That's it.
Removing a Location
You cannot remove the current location, so first and foremost the current location must be switched if this is the case. The name of the current location is a property of the root directory.A location is removed using the destroy-location {directory} command, where the directory is the directory ID or path of the location to be removed.
Listing 12: Determining the current location. [0 ]$ readprop 0 current-location Office
Previous Chapter Table of Contents Next Chapter
| Copyright © 2005 | Jeffrey T. Frey |


Beranek and Newman, Inc. (BBN) unveils the final version of the Interface Message Processor (IMP) specifications. BBN wins ARPANET contract.
The first Internet Service Provider (ISP) is born with the introduction of a commercial version of ARPANET, known as Telenet.
The National Science Foundation (NSF) provided a grant to establish the Computer Science Network (CSNET) to provide networking services to university computer scientists.
The dot-com bubble bursts. Web sites such as Yahoo! and eBay are hit by a large-scale denial of service attack, highlighting the vulnerability of the Internet. AOL merges with Time Warner


| I l@ve RuBoard |
14.7 Administrative ToolsNow that we have finished implementing a Python-powered, web-enabled, concurrently accessible report database, and published web pages and scripts that make that database accessible to the cyberworld at large, we can sit back and wait for reports to come in. Or almost; there still is no way for the site owner to view or delete records offline. Moreover, all records are tagged as "not yet verified" on submission, and must somehow be verified or rejected. This section lists a handful of tersely documented PyErrata scripts that accomplish such tasks. All are Python programs shipped in the top-level AdminTools directory and are assumed to be run from a shell command line on the server (or other machine, after database downloads). They implement simple database content dumps, database backups, and database state-changes and deletions for use by the errata site administrator. These tasks are infrequent, so not much work has gone into these tools. Frankly, some fall into the domain of "quick and dirty" hackerage and aren't as robust as they could be. For instance, because these scripts bypass the database interface classes and speak directly to the underlying file structures, changes in the underlying file mechanisms will likely break these tools. Also in a more polished future release, these tools might instead sprout GUI- or web-based user interfaces to support over-the-net administration. For now, such extensions are left as exercises for the ambitious reader. 14.7.1 Backup ToolsSystem backup tools simply spawn the standard Unix tar and gzip command-line programs to copy databases into single compressed files. You could write a shell script for this task too, but Python works just as well, as shown in Examples Example 14-24 and Example 14-25. Example 14-24. PP2E\Internet\Cgi-Web\PyErrata\AdminTools\backupFiles.py#!/usr/bin/python import os os.system('tar -cvf DbaseFiles.tar ../DbaseFiles') os.system('gzip DbaseFiles.tar') Example 14-25. PP2E\Internet\Cgi-Web\PyErrata\AdminTools\backupShelve.py#!/usr/bin/python import os os.system('tar -cvf DbaseShelve.tar ../DbaseShelve') os.system('gzip DbaseShelve.tar') 14.7.2 Display ToolsThe scripts in Examples Example 14-26 and Example 14-27 produce raw dumps of each database structure's contents. Because the databases use pure Python storage mechanisms (pickles, shelves), these scripts can work one level below the published database interface classes; whether they should depends on how much code you're prepared to change when your database model evolves. Apart from printing generated record filenames and shelve keys, there is no reason that these scripts couldn't be made less brittle by instead calling the database classes' loadSortedTable methods. Suggested exercise: do better. Example 14-26. PP2E\Internet\Cgi-Web\PyErrata\AdminTools\dumpFiles.py#!/usr/bin/python import glob, pickle def dump(kind): print '\n', kind, '='*60, '\n' for file in glob.glob("../DbaseFiles/%s/*.data" % kind): print '\n', '-'*60 print file print pickle.load(open(file, 'r')) dump('errataDB') dump('commentDB') Example 14-27. PP2E\Internet\Cgi-Web\PyErrata\AdminTools\dumpShelve.py#!/usr/bin/python import shelve e = shelve.open('../DbaseShelve/errataDB') c = shelve.open('../DbaseShelve/commentDB') print '\n', 'Errata', '='*60, '\n' print e.keys( ) for k in e.keys( ): print '\n', k, '-'*60, '\n', e[k] print '\n', 'Comments', '='*60, '\n' print c.keys( ) for k in c.keys( ): print '\n', k, '-'*60, '\n', c[k] Running these scripts produces the following sorts of results (truncated at 80 characters to fit in this book). It's not nearly as pretty as the web pages generated for the user in PyErrata, but could be piped to other command-line scripts for further offline analysis and processing. For instance, the dump scripts' output could be sent to a report-generation script that knows nothing of the Web: [mark@toy .../Internet/Cgi-Web/PyErrata/AdminTools]$ python dumpFiles.py errataDB ============================================================ ------------------------------------------------------------ ../DbaseFiles/errataDB/937907956.159-5157.data {'Page number': '42', 'Type': 'Typo', 'Severity': 'Low', 'Chapter number': '3'... ------------------------------------------------------------ ...more... commentDB ============================================================ ------------------------------------------------------------ ../DbaseFiles/commentDB/937908410.203-5352.data {'Submit date': '1999/09/21, 06:06:50', 'Submitter email': 'bob@bob.com',... ------------------------------------------------------------ ...more... [mark@toy .../Internet/Cgi-Web/PyErrata/AdminTools]$ python dumpShelve.py Errata ============================================================ ['938245136.363-20046', '938244808.434-19964'] 938245136.363-20046 ------------------------------------------------------------ {'Page number': '256', 'Type': 'Program bug', 'Severity': 'High', 'Chapter nu... 938244808.434-19964 ------------------------------------------------------------ {'Page number': 'various', 'Type': 'Suggestion', 'Printing Date': '', 'Chapte... Comments ============================================================ ['938245187.696-20054'] 938245187.696-20054 ------------------------------------------------------------ {'Submit date': '1999/09/25, 03:39:47', 'Submitter email'<EMAIL_ADDRESS>'Re... 14.7.3 Report State-Change ToolsOur last batch of command-line tools allows the site owner to mark reports as verified or rejected and to delete reports altogether. The idea is that someone will occasionally run these scripts offline, as time allows, to change states after investigating reports. And this is the end to our quest for errata automation: the investigation process itself is assumed to require both time and brains. There are no interfaces in the database's classes for changing existing reports, so these scripts can at least make a case for going below the classes to the physical storage mediums. On the other hand, the classes could be extended to support such update operations too, with interfaces that could also be used by future state-change tools (e.g., web interfaces). To minimize some redundancy, let's first define state-change functions in a common module listed in Example 14-28, so they may be shared by both the file and shelve scripts. Example 14-28. PP2E\Internet\Cgi-Web\PyErrata\AdminTools\verifycommon.py################################################################# # put common verify code in a shared module for consistency and # reuse; could also generalize dbase update scan, but this helps ################################################################# def markAsVerify(report): report['Report state'] = 'Verified by author' def markAsReject(report): reason = '' # input reject reason text while 1: # prepend to original desc try: line = raw_input('reason>') except EOFError: break reason = reason + line + '\n' report['Report state'] = 'Rejected - not a real bug' report['Description'] = ('Reject reason: ' + reason + '\n[Original description=>]\n' + report['Description']) To process state changes on the file -based database, we simply iterate over all the pickle files in the database directories, as shown in Example 14-29. Example 14-29. PP2E\Internet\Cgi-Web\PyErrata\AdminTools\verifyFiles.py#!/usr/bin/python ######################################################## # report state change and deletion operations; # also need a tool for anonymously publishing reports # sent by email that are of general interest--for now, # they can be entered with the submit forms manually; # this is text-based: the idea is that records can be # browsed in the errata page first (sort by state to # see unverified ones), but an edit gui or web-based # verification interface might be very useful to add; ######################################################## import glob, pickle, os from verifycommon import markAsVerify, markAsReject def analyse(kind): for file in glob.glob("../DbaseFiles/%s/*.data" % kind): data = pickle.load(open(file, 'r')) if data['Report state'] == 'Not yet verified': print data if raw_input('Verify?') == 'y': markAsVerify(data) pickle.dump(data, open(file, 'w')) elif raw_input('Reject?') == 'y': markAsReject(data) pickle.dump(data, open(file, 'w')) elif raw_input('Delete?') == 'y': os.remove(file) # same as os.unlink print 'Errata...'; analyse('errataDB') print 'Comments...'; analyse('commentDB') When run from the command line, the script displays one report's contents at a time and pauses after each to ask if it should be verified, rejected, or deleted. Here is the beginning of one file database verify session, shown with line wrapping so you can see what I see (it's choppy but compact): [mark@toy .../Internet/Cgi-Web/PyErrata/AdminTools]$ python verifyFiles.py Errata... {'Page number': '12', 'Type': 'Program bug', 'Printing Date': '', 'Chapter numbe r': '', 'Submit date': '1999/09/21, 06:17:13', 'Report state': 'Not yet verified ', 'Submitter name': 'Lisa Lutz', 'Submitter email': '', 'Description': '1 + 1 = 2, not 3...\015\012', 'Submit mode': '', 'Part number': '', 'Severity ': 'High'} Verify?n Reject?n Delete?n {'Page number': '', 'Type': 'Program bug', 'Printing Date': '', 'Chapter number' : '16', 'Submit date': '1999/09/21, 06:20:22', 'Report state': 'Not yet verified ', 'Submitter name': 'jerry', 'Submitter email': 'http://www.jerry.com', 'Descri ption': 'Help! I just spilled coffee all over my\015\012computer...\015\012 ', 'Submit mode': '', 'Part number': '', 'Severity': 'Unknown'} Verify?n Reject?y reason>It's not Python's fault reason>(ctrl-d) ...more... Verifications and rejections change records, but deletions actually remove them from the system. In verifycommon, a report rejection prompts for an explanation and concatenates it to the original description. Deletions delete the associated file with os.remove; this feature may come in handy if the system is ever abused by a frivolous user (including me, while writing examples for this book). The shelve -based version of the verify script looks and feels similar, but deals in shelves instead of flat files, as shown in Example 14-30. Example 14-30. PP2E\Internet\Cgi-Web\PyErrata\AdminTools\verifyShelve.py#!/usr/bin/python ######################################################## # like verifyFiles.py, but do it to shelves; # caveats: we should really obtain a lock before shelve # updates here, and there is some scan logic redundancy ######################################################## import shelve from verifycommon import markAsVerify, markAsReject def analyse(dbase): for k in dbase.keys( ): data = dbase[k] if data['Report state'] == 'Not yet verified': print data if raw_input('Verify?') == 'y': markAsVerify(data) dbase[k] = data elif raw_input('Reject?') == 'y': markAsReject(data) dbase[k] = data elif raw_input('Delete?') == 'y': del dbase[k] print 'Errata...'; analyse(shelve.open('../DbaseShelve/errataDB')) print 'Comments...'; analyse(shelve.open('../DbaseShelve/commentDB')) Note that the verifycommon module helps ensure that records are marked consistently and avoids some redundancy. However, the file and shelve verify scripts still look very similar; it might be better to further generalize the notion of database update scans by moving this logic into the storage-specific database interface classes shown earlier. Short of doing so, there is not much we can do about the scan-logic redundancy or storage-structure dependencies of the file and shelve verify scripts. The existing load-list database class methods won't help, because they don't provide the generated filename and shelve key details we need to rewrite records here. To make the administrative tools more robust, some database class redesign would probably be in order -- which seems as good a segue to the next section as any. |
| I l@ve RuBoard |


Choose the algorithm: PSO
Population Size: ;
Maximum Iterations: ;
Dimensional Size:
Upper Bound: ;
Lower Bound:


Temporary bollards are back in Upper Parliament Street to stop drivers turning right
Nottingham City Council previously said the bollards in 2018 had a "noticeable improvement" and "positive impact" on traffic
by Ben ReidTemporary bollards have been installed a busy road in Nottingham city centre to help alleviate traffic.
The bollards were previously installed last year to help address traffic problems caused by drivers turning into and out of the Euro Car Park in Upper Parliament Street during the busy festive period.
Drivers heading east along the road in one lane are no longer able to turn right into the car park.
There are two lanes on the road heading west towards Tollhouse Hill. Drivers are still able to turn left into the car park from that side of the road.
The bollards span along the road to The Three Crowns pub near the tram tracks and finish just past the Euro Car Park.
Nottingham City Council previously said the bollards in 2018 had a "noticeable improvement" and "positive impact" on traffic.
Work to install them took place on Wednesday night, November 20.
It is not yet known how long they will be in place for.
With the General Election approaching we want to give you all the results and reactions as they happen. Join our new WhatsApp service to receive breaking news alerts throughout the night by texting ELECTION to<PHONE_NUMBER>2. The first messages will go out December 12 after polls close.


Trying out something new this weekend: spending some time doing a weekly review, along similar lines to what Ben Kuhn does… if a bit more limited on the time allocated to the review.


Refreshed Porsche Panamera Could Have 911-Inspired Changes
But to be honest, it doesn't look much different.
by Martin BiggThe second-generation Porsche Panamera has only been on sale since 2017, but the time has already come for the luxury sedan to receive a mid-cycle facelift. Spy photos have shown the updated Panamera being put through its paces with minimal camouflage. This has allowed talented artist Nikita Chuyko at Kolesa to produce some convincing-looking renders showing us what it will look like when the covers come off. Unsurprisingly, the subtle styling changes will be heavily inspired by the 992-generation Porsche 911.
At the front, the new Panamera facelift will feature a new bumper with c-shaped LED lights for the turn signals. Elsewhere, the rear will be updated with new rear lights connected by a full-width light strip. The changes are subtle, but they should help keep the Panamera looking fresh against the competition while keeping the design language consistent with the current 911, Cayenne, and Macan.
Don't expect any significant changes inside the cabin, as recent spy shots showed the only notable update will be a new steering wheel from taken from the 2020 Porsche 911 Carrera and possibly updated infotainment software.
You Might Also Like
Bigger changes will be found in the powertrain department, however. While the S and 4S models are expected to use the same 2.9-liter twin-turbo V6 as the current Panamera, both models will reportedly adopt the 48-volt mild hybrid system and electric compressor electrical architecture that was added to the 2020 Audi S6 and S7.
A new range-topping "Lion" variant could also join the lineup packing at least 750 hp or as much as 820 hp. Porsche is allegedly building the new track-focused Panamera as a one-off special to attempt a new Nurburgring lap record, but we're hoping it will also enter production. The updated Porsche Panamera will likely debut sometime next year, but Porsche hasn't made any official announcements yet.


Software Engineer - Intern
Houghton Mifflin Harcourt - Dublin
As part of this internship i worked on HMH flagship product.
HMH ED
i worked on bug fixes, improvements to the system and
implementing new features, writing integration, and unit
test using jest, during the busy time of there back to
school release of HMH ED, while collaborating with across
the engineering teams to ensure good quality code is
delivered to production.
06/2021 - 08/2021
IRELAND


Ocean [ar03], ocean, in The Outer Sea
Last updated Turn #116
Ocean [ar03], ocean, in The Outer Sea
------------------------------------------------------------------------
3: The Savvy Aardvark [ha5r], ship, 2 hulls, 1 rowing port, 6 sails,
3: 7% damaged, arrived from Ocean [ar04], owner:
3: Phantasm [n4b], Imperial Empire, earl, with two workers,
3: eight sailors
4: The Savvy Aardvark [ha5r], ship, 2 hulls, 1 rowing port, 6 sails,
4: 7% damaged, departed for Ocean [ar02].
Routes leaving Ocean:
North, to Ocean [aq03], 6 days
East, to Ocean [ar04], 6 days
South, to Ocean [as03], 6 days
West, to Ocean [ar02], 6 days
Inner locations:
Island [aa3s], island, 1 day, owner:
Giant spider [cu7p], giant spiders, number: 18


{% include shopping.order/tmpl.order_view.warnings.html %}
{% include shopping.order/tmpl.order_view.details.html %}
{% include shopping.order/tmpl.order_view.state_and_actions.html %}
{% include shopping.order/tmpl.order_view.products_table.html %}
{% include shopping.order/tmpl.order_view.cost_details.html %}


Well, what can I say, we had homework on a weekly basis!
Hah. To anyone reading this from whoever taught me in the past in Parsons, sorry but this one was my favorite unit taught by Paolo :)
I learned so much and heaps more during these lessons and managed to find absolute diamonds in the process which I believe even Paolo didn't preliminarily know. I got quite enrolled late into this unit and I didn't know it'd be him teaching but hey, that's how it turned out and you know, there was homework on a weekly basis which was hard yet motivating and I got invited to help out at a Unity Showcase/conference at Microsoft at Times Square where I learned of VFX Graph which became by primary focus later on.
There was lots of experimentation and assets creation and Parsons-motivated freedom for Artists to create what they want to create within a specific not-so-super-tight yet still quite clearly defined frame. I think the entire philosophy of how it all went with precise teaching delivered by Paolo along with assets and the way of showcasing that 'anyone can do this!' got me to the point that I actually produced some really cool things along with pretty cool presentations, of which I made a focus as well.
I don't remember everything but I remember I wanted to produce something I'd be on one hand perhaps later on proud of and on the other something that would put the class in awe once they saw what I produced. It all kind of stemmed from my feeling of inferiority once I arrived and got to, well, Parsons but also meaning to just really show myself also that it wasn't blind luck or oversight of fate in regards to where I landed in the end. And I think I managed producing one of my favorite things I've ever created in the end.


Why?
Tech Shed Frome is organised as an ‘unincorporated association’ run by its members.
As a member you are entitled to:
- take part in Tech Shed sessions and projects;
- use Tech Shed equipment and facilities;
- attend and vote at any general meetings;
and are eligible for election to the Committee.
Who?
Membership is open to anyone who is aged at least 16 years old and supports the aims of Tech Shed
Frome.
If you are under 16 years of age you can still come to meetings, but you must be accompanied by a
member.
Our aims, from the Constitution, are:
“
- To support the tech community in Frome and the surrounding area
- To provide a space where the tech community can meet to experiment, tinker, collaborate,
share skills and socialise
- To organise open events to demystify technology and share tech skills and knowledge
- To serve the wider community by undertaking projects that solve local problems
- To grow the pool of tech talent
… where ‘tech’ is intended as a broad term to include software, hardware, analogue and digital
electronics, robotics,
and other related areas”
How?
Membership runs for a calendar year, and you need to re-join every year. You do this by:
Membership fee
The annual membership fee is currently £5.
(We also charge a per-session fee for in-person Tech Shed sessions, though the regular online sessions are currently free.)
You can make your payment:
- to our bank account:
- Sort Code: 60-08-31
- Account Name: TECHSHED FROME
- Account No: 63769387
- Reference: your name
- or in cash:
Please complete the registration form below


Console Text Image Example
1. Open the console panel on chrome browser.
2. Increase the horizontal size of the panel enough.
3. Click images below.


We will use the Wine Quality Data Set for red wines created by P. Cortez et al. It has 11 variables and 1600 observations.
Data science problem: Find out which features of wine are important to determine its quality.
We will use the Wine Quality Data Set for red wines created by P. Cortez et al. It has 11 variables and 1600 observations.
Steps to be taken from a data science perspective:
- Set the research goal: We want to explain what properties of wine define the quality.
- Acquire data: We will download the data set from a repository.
- Prepare data: We will prepare data for the analysis.
- Build model: Build machine learning model you want to use for data analysis.
1. Research goal
We want to investigate what properties of wine define its quality.
We also want to see which of those properties are required to predict the quality of wine. This way we can safely ignore the unnecessary information next time we collect new data.
2. Acquire data
import numpy as np
import pandas as pd
url = 'http://archive.ics.uci.edu/ml/machine-learning-databases/wine-quality/winequality-red.csv'
data = pd.read_csv(url, sep=";")
Let’s see the first few rows of the dataset:
data.head()
| fixed acidity | volatile acidity | citric acid | residual sugar | chlorides | free sulfur dioxide | total sulfur dioxide | density | pH | sulphates | alcohol | quality | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 7.4 | 0.70 | 0.00 | 1.9 | 0.076 | 11.0 | 34.0 | 0.9978 | 3.51 | 0.56 | 9.4 | 5 |
| 1 | 7.8 | 0.88 | 0.00 | 2.6 | 0.098 | 25.0 | 67.0 | 0.9968 | 3.20 | 0.68 | 9.8 | 5 |
| 2 | 7.8 | 0.76 | 0.04 | 2.3 | 0.092 | 15.0 | 54.0 | 0.9970 | 3.26 | 0.65 | 9.8 | 5 |
| 3 | 11.2 | 0.28 | 0.56 | 1.9 | 0.075 | 17.0 | 60.0 | 0.9980 | 3.16 | 0.58 | 9.8 | 6 |
| 4 | 7.4 | 0.70 | 0.00 | 1.9 | 0.076 | 11.0 | 34.0 | 0.9978 | 3.51 | 0.56 | 9.4 | 5 |
3. Prepare data
The last column is the target variable. We will use the rest as predictor variables. Slice from first column to one before the last.
X = data.loc[:,'fixed acidity':'alcohol']
y = data['quality']
Double check:
X.columns # X is a pandas data frame
Index(['fixed acidity', 'volatile acidity', 'citric acid', 'residual sugar',
'chlorides', 'free sulfur dioxide', 'total sulfur dioxide', 'density',
'pH', 'sulphates', 'alcohol'],
dtype='object')
y.name # y is a pandas series
'quality'
Before performing PCA, the dataset has to be standardized (i.e. subtracting mean, dividing by the standard deviation) The scikit-learn PCA package probably performs this internally, but we will do it anyway.
from sklearn import preprocessing
scaler = preprocessing.StandardScaler().fit(X)
scaler
StandardScaler(copy=True, with_mean=True, with_std=True)
We can see the mean and STD of each variable used for standardization:
print('Mean of each variable:')
print(scaler.mean_)
print('\nStd of each variable:')
print(scaler.scale_)
Mean of each variable:
[ 8.31963727 0.52782051 0.27097561 2.5388055 0.08746654 15.87492183
46.46779237 0.99674668 3.3111132 0.65814884 10.42298311]
Std of each variable:
[1.74055180e+00 1.79003704e-01 1.94740214e-01 1.40948711e+00
4.70505826e-02 1.04568856e+01 3.28850367e+01 1.88674370e-03
1.54338181e-01 1.69453967e-01 1.06533430e+00]
Perform transformation:
X = scaler.transform(X)
4. Model selection
a. Initial inspection
We want to use PCA and take a closer look at the latent variables.
from sklearn.decomposition import PCA
pca = PCA() # creates an instance of PCA class
results = pca.fit(X) # applies PCA on predictor variables
Z = results.transform(X) # create a new array of latent variables
import matplotlib.pyplot as plt
%matplotlib inline
import seaborn as sns
sns.set()
plt.plot(results.explained_variance_ratio_*100) # scree plot
plt.show()
The above is called a scree plot. It shows the variances explained by each latent variable. The first component explains approx. 28% of the variance in the whole dataset.
Ideally, we would like to see an elbow shape in order to decide which PCs to keep and which ones to disregard. In practice, this rarely happens. Most of the time, we use enough PCs so that they explain 95% or 99% of the variation in the data.
By examining the above figure, we can conclude that first 6 variables contain most of the information inside the data.
b. Interpreting the results
Once we apply the PCA, we are no longer in our familiar domain. We are in a different domain in which the latents are the linear combinations of the original variables, but they don’t represent any meaningful properties. Thus, it is impossible to interpret them by themselves.
We usually look at the correlation between the latent variable and original variables. If any of the original variables correlate well with the first few PCs, we usually conclude that the PCs are mainly influenced by the said variables, thus they must be the important ones.
The other approach is that we look at the PCA coefficients. These coefficients tell us how much of the original variables are used in creating the PCs. The higher the coefficient, the more important is the related variable.
Let’s put the component (PCA coefficients) into a data frame to see more comfortably:
pd.DataFrame(results.components_)
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0.489314 | -0.238584 | 0.463632 | 0.146107 | 0.212247 | -0.036158 | 0.023575 | 0.395353 | -0.438520 | 0.242921 | -0.113232 |
| 1 | -0.110503 | 0.274930 | -0.151791 | 0.272080 | 0.148052 | 0.513567 | 0.569487 | 0.233575 | 0.006711 | -0.037554 | -0.386181 |
| 2 | -0.123302 | -0.449963 | 0.238247 | 0.101283 | -0.092614 | 0.428793 | 0.322415 | -0.338871 | 0.057697 | 0.279786 | 0.471673 |
| 3 | -0.229617 | 0.078960 | -0.079418 | -0.372793 | 0.666195 | -0.043538 | -0.034577 | -0.174500 | -0.003788 | 0.550872 | -0.122181 |
| 4 | -0.082614 | 0.218735 | -0.058573 | 0.732144 | 0.246501 | -0.159152 | -0.222465 | 0.157077 | 0.267530 | 0.225962 | 0.350681 |
| 5 | 0.101479 | 0.411449 | 0.069593 | 0.049156 | 0.304339 | -0.014000 | 0.136308 | -0.391152 | -0.522116 | -0.381263 | 0.361645 |
| 6 | -0.350227 | -0.533735 | 0.105497 | 0.290663 | 0.370413 | -0.116596 | -0.093662 | -0.170481 | -0.025138 | -0.447469 | -0.327651 |
| 7 | -0.177595 | -0.078775 | -0.377516 | 0.299845 | -0.357009 | -0.204781 | 0.019036 | -0.239223 | -0.561391 | 0.374604 | -0.217626 |
| 8 | -0.194021 | 0.129110 | 0.381450 | -0.007523 | -0.111339 | -0.635405 | 0.592116 | -0.020719 | 0.167746 | 0.058367 | -0.037603 |
| 9 | -0.249523 | 0.365925 | 0.621677 | 0.092872 | -0.217671 | 0.248483 | -0.370750 | -0.239990 | -0.010970 | 0.112320 | -0.303015 |
| 10 | 0.639691 | 0.002389 | -0.070910 | 0.184030 | 0.053065 | -0.051421 | 0.068702 | -0.567332 | 0.340711 | 0.069555 | -0.314526 |
The above is the coefficient matrix. The first row is the coefficients that generated the first PC. In other words, the first PC was generated using the following formula:
PC1 = (fixed acidity * 0.489314) + (volatile acidity * -0.238584) + … + (alcohol * -0.113232)
If we choose to use the first 6 PCs, what do we call them? This is a bit tricky, because they are wieghted combinations of the original variables. Thus, a wine expert may help us to name them. Let’s assume that the expert gave us the following names for the new (latent) variables: 1.Acidity, 2.Sulfides, 3.More alcohol, 4.Chlorides, 5.More residual sugar, 6. Less pH
pd.DataFrame(Z[:,:6], columns=list(
[u'Acidity', u'Sulfides', u'More alcohol', u'Chlorides', u'More residual sugar', u'Less pH'])).head(10)
| Acidity | Sulfides | More alcohol | Chlorides | More residual sugar | Less pH | |
|---|---|---|---|---|---|---|
| 0 | -1.619530 | 0.450950 | -1.774454 | 0.043740 | 0.067014 | -0.913921 |
| 1 | -0.799170 | 1.856553 | -0.911690 | 0.548066 | -0.018392 | 0.929714 |
| 2 | -0.748479 | 0.882039 | -1.171394 | 0.411021 | -0.043531 | 0.401473 |
| 3 | 2.357673 | -0.269976 | 0.243489 | -0.928450 | -1.499149 | -0.131017 |
| 4 | -1.619530 | 0.450950 | -1.774454 | 0.043740 | 0.067014 | -0.913921 |
| 5 | -1.583707 | 0.569195 | -1.538286 | 0.023750 | -0.110076 | -0.993626 |
| 6 | -1.101464 | 0.608015 | -1.075915 | -0.343959 | -1.133382 | 0.175000 |
| 7 | -2.248708 | -0.416835 | -0.986837 | -0.001203 | -0.780435 | 0.286057 |
| 8 | -1.086887 | -0.308569 | -1.518150 | 0.003315 | -0.226727 | -0.512634 |
| 9 | 0.654790 | 1.665207 | 1.209476 | -0.824635 | 1.718501 | -0.476497 |
Usually, naming the new variables is dangerous unless we confidently conclude that the latent variables represent known properties. This requires expert knowledge.
c. Predictive model
We can compare the prediction powers of the original variables and latent variables.  We will use KNN for this purpose.
1. Using the original data set
from sklearn.neighbors import KNeighborsClassifier
from sklearn.metrics import confusion_matrix, accuracy_score
neigh = KNeighborsClassifier(n_neighbors=3)
neigh.fit(X,y)
pred = neigh.predict(X)
print('Confusion matrix:')
print(confusion_matrix(pred,y))
print('\nAccuracy:')
print(accuracy_score(pred,y))
Confusion matrix:
[[ 6 5 2 0 0 0]
[ 0 18 10 13 0 0]
[ 2 17 589 87 18 2]
[ 2 12 75 511 36 7]
[ 0 1 4 27 144 7]
[ 0 0 1 0 1 2]]
Accuracy:
0.7942464040025016
2. Using the first 6 PCs
neigh = KNeighborsClassifier(n_neighbors=3)
neigh.fit(Z[:,:6],y)
pred = neigh.predict(Z[:,:6])
print('Confusion matrix:')
print(confusion_matrix(pred,y))
print('\nAccuracy:')
print(accuracy_score(pred,y))
Confusion matrix:
[[ 7 4 5 1 0 0]
[ 0 18 11 11 3 0]
[ 2 16 584 92 26 4]
[ 1 14 75 507 37 6]
[ 0 1 6 27 132 5]
[ 0 0 0 0 1 3]]
Accuracy:
0.7823639774859287
Using 6 variables instead of 11, we achive almost the same accuracy in our prediction.
Note: Here, we used the training set for prediction. Ideally, we would want to use two separate sets for training the model and testing it.
Resources
- D. Cielen, A. Meysman, M. Ali, Introducing Data Science: Big Data Machine Learning and more using Python tools, Manning Publications, 2016.
- Scikit-learn: Machine Learning in Python, Pedregosa et al., JMLR 12, pp. 2825-2830, 2011.
- P. Cortez, A. Cerdeira, F. Almeida, T. Matos and J. Reis. Modeling wine preferences by data mining from physicochemical properties. In Decision Support Systems, Elsevier, 47(4):547-553, 2009.
Link to GitHub repo
You can download the Notebook from my GitHub page


com.epimorphics.android.myrivers.activities / DataViewActivity / onConnectionFailed
onConnectionFailed
@Override fun onConnectionFailed(): void
Called when there is an error connecting the client to the service
Parameters
connectionResult
- connection result


Cookie “Saved” Authentication
This authentication middleware saves the current REMOTE_USER, REMOTE_SESSION, and any other environment variables specified in a cookie so that it can be retrieved during the next request without requiring re-authentication. This uses a session cookie on the client side (so it goes away when the user closes their window) and does server-side expiration.
Following is a very simple example where a form is presented asking for a user name (no actual checking), and dummy session identifier (perhaps corresponding to a database session id) is stored in the cookie.
>>> from paste.httpserver import serve
>>> from paste.fileapp import DataApp
>>> from paste.httpexceptions import *
>>> from paste.auth.cookie import AuthCookieHandler
>>> from paste.wsgilib import parse_querystring
>>> def testapp(environ, start_response):
... user = dict(parse_querystring(environ)).get('user','')
... if user:
... environ['REMOTE_USER'] = user
... environ['REMOTE_SESSION'] = 'a-session-id'
... if environ.get('REMOTE_USER'):
... page = 'Welcome %s (%s)'
... page %= (environ['REMOTE_USER'], environ['REMOTE_SESSION'])
... else:
... page = ('<form><input name="user" />'
... '<input type="submit" /></form>')
... return DataApp(page, content_type="text/html")(
... environ, start_response)
>>> serve(AuthCookieHandler(testapp))
serving on...
save/restore environ entries via digially signed cookie
This class converts content into a timed and digitally signed cookie, as well as having the facility to reverse this procedure. If the cookie, after the content is encoded and signed exceeds the maximum length (4096), then CookieTooLarge exception is raised.
The timeout of the cookie is handled on the server side for a few reasons. First, if a ‘Expires’ directive is added to a cookie, then the cookie becomes persistent (lasting even after the browser window has closed). Second, the user’s clock may be wrong (perhaps intentionally). The timeout is specified in minutes; and expiration date returned is rounded to one second.
Constructor Arguments:
secret
This is a secret key if you want to syncronize your keys so that the cookie will be good across a cluster of computers. It is recommended via the HMAC specification (RFC 2104) that the secret key be 64 bytes since this is the block size of the hashing. If you do not provide a secret key, a random one is generated each time you create the handler; this should be sufficient for most cases.timeout
This is the time (in minutes) from which the cookie is set to expire. Note that on each request a new (replacement) cookie is sent, hence this is effectively a session timeout parameter for your entire cluster. If you do not provide a timeout, it is set at 30 minutes.maxlen
This is the maximum size of the signed cookie; hence the actual content signed will be somewhat less. If the cookie goes over this size, a CookieTooLarge exception is raised so that unexpected handling of cookies on the client side are avoided. By default this is set at 4k (4096 bytes), which is the standard cookie size limit.
the actual handler that should be put in your middleware stack
This middleware uses cookies to stash-away a previously authenticated user (and perhaps other variables) so that re-authentication is not needed. This does not implement sessions; and therefore N servers can be syncronized to accept the same saved authentication if they all use the same cookie_name and secret.
By default, this handler scans the environ for the REMOTE_USER and REMOTE_SESSION key; if found, it is stored. It can be configured to scan other environ keys as well – but be careful not to exceed 2-3k (so that the encoded and signed cookie does not exceed 4k). You can ask it to handle other environment variables by doing:
environ['paste.auth.cookie'].append('your.environ.variable')
Constructor Arguments:
application
This is the wrapped application which will have access to the environ['REMOTE_USER'] restored by this middleware.cookie_name
The name of the cookie used to store this content, by default it is PASTE_AUTH_COOKIE.scanlist
This is the initial set of environ keys to save/restore to the signed cookie. By default is consists only of REMOTE_USER and REMOTE_SESSION; any tuple or list of environment keys will work. However, be careful, as the total saved size is limited to around 3k.signer
This is the signer object used to create the actual cookie values, by default, it is AuthCookieSigner and is passed the remaining arguments to this function: secret, timeout, and maxlen.
At this time, each cookie is individually signed. To store more than the 4k of data; it is possible to sub-class this object to provide different environ_name and cookie_name
a list of environment keys to be saved via cookie
An instance of this object, found at environ['paste.auth.cookie'] lists the environ keys that were restored from or will be added to the digially signed cookie. This object can be accessed from an environ variable by using this module’s name.
This middleware uses cookies to stash-away a previously authenticated user (and perhaps other variables) so that re-authentication is not needed. This does not implement sessions; and therefore N servers can be syncronized to accept the same saved authentication if they all use the same cookie_name and secret.
By default, this handler scans the environ for the REMOTE_USER and REMOTE_SESSION key; if found, it is stored. It can be configured to scan other environ keys as well – but be careful not to exceed 2-3k (so that the encoded and signed cookie does not exceed 4k). You can ask it to handle other environment variables by doing:
environ['paste.auth.cookie'].append('your.environ.variable')
Configuration:
cookie_name
The name of the cookie used to store this content, by default it is PASTE_AUTH_COOKIE.scanlist
This is the initial set of environ keys to save/restore to the signed cookie. By default is consists only of REMOTE_USER and REMOTE_SESSION; any space-separated list of environment keys will work. However, be careful, as the total saved size is limited to around 3k.secret
The secret that will be used to sign the cookies. If you don’t provide one (and none is set globally) then a random secret will be created. Each time the server is restarted a new secret will then be created and all cookies will become invalid! This can be any string value.timeout
The time to keep the cookie, expressed in minutes. This is handled server-side, so a new cookie with a new timeout is added to every response.maxlen
The maximum length of the cookie that is sent (default 4k, which is a typical browser maximum)


Kigali , RWANDA
ALAN BRONZE CREATIONS provide many services to clients! Those services include Live Streaming on youtube platforms and facebook, Photo-shooting and video-graphing, Editing and animating videos!
Open
Closed
Pre-register to get a priority access to the event. Fares will be published later on. You may also register to Our Website in order to help you to


Fortran From 1954 to 1958 American computer scientist John Backus of International Business Machines, Inc. (IBM) developed Fortran, an acronym for Formula Translation. It became a standard programming language because it could process mathematical formulas. Fortran and its variations are still in use today, especially in physics. |


Home
Management
Teams
Umumba
Patna Pirates
Puneri Paltan
Jaipur Panthers
Bengaluru Bulls
Dabang Delhi
Bengal Warriors
Telugu Titans
Gallery
Table
Login
MEET THE HEROS
Ajay Thakur
Anup Kumar
Deepak Nivas Hooda
Wazir Singh
Manjeet Chillar
Rakesh Kumar
Rahul Chaudhari
Nilesh Shinde


WORLD WIDE SHIPPING
?HELP
for any queries about indian custom rules, click on following external links
central board of excise and customs
indian customs compendium on code & compliance
Director General of Shipping
Shipping Corporation of India
goi web directory
Ministry of Shipping


This program carries out rotations of orientation data (azimuth of dip/ angle
of dip) around an arbitrarily oriented rotation axis. The
calculation is done with the use of a rotation tensor.(WALLBRECHER, 1986:24ff).
The menu "Data input" is the same as
in the program "Calculations". Manual
input is also possible for universal stage data azimuth and tilt angle
of axes (i.e. quartz-c-axes) or normals to planes (i.e. poles to
miaca-planes). These data are converted to azimuths
of dip and angles of dip internally.
All further processing of these data is done in this format. The type
of data must be set in the menu "Fabric type".
In the menu "angle" you choose input in the 1..360° or 1..400gon
scale.
For data input from a file, the fabric types "U-stage-axes" and
"U-stage-poles“ are not active, because U-stage data are saved in *.LIN files.


Introduction
DSL for creating courses on Clojurecademy
Rationale
The main motivations for creating Clojurecademy are:
-
I want Clojure community to grow and try to help with this project to make it happen.
-
Making Clojure adoption as much easy as possible for new comers.(without initial setup etc.)
-
Making possible to teach anything related to programming in Clojure(e.g. Algorithms & Data Structures to Data Science).
-
Having good Clojure resources in any field by contributing Clojurecademy’s courses together.
-
Giving back to the community.
Requirements
-
Clojure 1.8
-
Java 8
-
Leiningen 2.7.1+
Getting Started
Let’s create new lein project
lein new app sample-course
The easiest way to use DSL in a Clojure project is by including it as a dependency in your project.clj:
[clojurecademy "0.1.0"]
Also, you need to add lein plugin for DSL as well:
[lein-clojurecademy "0.1.55"]
Also you need to create ~/.java.policy file in your home directory and add the following code:
grant {
permission java.security.AllPermission;
};
Components
There are several components to create a course such as manifest
, course
, chapter
,
sub-chapter
, subject
, instruction
, sub-instruction
and so on, now we
are going to examine those components in detail.
manifest
Every Clojurecademy course needs a manifest which specifies main characteristics of a course such as a name, descriptions and so on.
Let’s open core.clj file and define our manifest.
(ns clj.core
(:require [clojurecademy.dsl.core :refer :all]))
(def my-manifest
(manifest :title "Sample Course"
:report-bug-email-or-link "https://github.com/clojurecademy/sample-course/issues"
:name 'sample-course
:skip? true
:short-description "Sample Course Project for Clojurecademy DSL"
:long-description "It's designed to teach \"How to make a course on Clojurecademy?\""
:who-is-this-course-for :no-programming-experience))
:title |
Title of a course. |
:report-bug-email-or-link |
Email address or URL that related to the course(e.g. GitHub issue page URL) so users of your course can submit a bug report to you. |
:name |
Unique identifier for your project if you change it you will be creating new course so keep it that way unless you want same course couple of times. |
:skip? |
When it’s false that means users can’t jump into chapters randomly they need to go step by step from scratch, if it’s true they can jump into any chapter randomly and skip it whenever they want. |
:short-description |
Short description for a course which is limited to 125 characters. |
:long-description |
Long description for a course which is limited to 600 characters. |
:who-is-this-course-for |
Defining who should enroll this course such as people with no programming experience or people with some Clojure experience and so on.There are 3 predefined keywords(that turn into some strings). |
3 predefined options of :who-is-this-course-for
Keyword |
Equivalent String |
:clojure-experience |
"This course requires some Clojure experience." |
:programming-experience |
"This course requires some programming experience, Clojure experience is NOT required." |
:no-programming-experience |
"This course does not require any programming experience, it’s for total beginners to programming." |
*or you can override it with a string, such as: |
"This course is for …….." |
course
Now we are going to construct a course, let’s define our course like this(don’t worry we will talk about every component in detail later on):
;;We name it like course-map because under the hood DSL creates huge map data structure basically
;;all components made from Clojure maps
(def course-map
(course my-manifest
(chapter 'ch-intro ;name identifier for chapter
"Intro to Clojure" ;title for chapter
(sub-chapter
'sub-ch-basics ;name identifier for sub chapter
"Basics" ;title for sub chapter
(subject
'sub-about-clojure ;name identifier for subject
"Aobut Clojure" ;title for subject
(learn ;learn part for subject
(text
(p "Clojure is a functional programming language that runs on JVM."))))))))
We created our simple course without any instructions(we will talk about it) so what do we have up there?:
-
Course takes one manifest and multiple chapters as parameters.
-
Chapter takes name identifier, title and multiple sub chapters as parameters.
-
Sub Chapter takes name identifier, title and multiple subjects as parameters.
-
Subject takes name identifier, title and one instruction(and optional other components as well).
We need to make sure that our course is valid and going to run this command:
lein clojurecademy test
Got the following error:
Missing :clojurecademy
option in project.clj. You need to have a line in your project.clj
file that looks like:
:clojurecademy {:course-map your.ns/course-map}
That output means we need to define our course-map in project.clj file so let’s open our project.clj file and add this line:
:clojurecademy {:course-map clj.core/course-map}
Also we have to add this option as well:
:eval-in :leiningen
Then try again that lein clojurecademy test
, you should get the following output:
Map is valid. There is no test var defined.Please add defcoursetest for testing.
Now we get this success output which means our course is valid and we need to have at least one subject which has instruction then we will be able to deploy to Clojurecademy.
Now we are going to extend our course with an instruction so we will be able to expect users to provide some input
and validate their input that it’s valid or not.Here is the extended version that one subject(subj-hello-world
)
added to sub chapter called sub-ch-basics
:
(sub-chapter
'sub-ch-basics
"Basics"
(subject
'subj-about-clojure
"About Clojure"
(learn
(text
(p "Clojure is a functional programming language that runs on JVM."))))
(subject
'subj-hello-world
"Hello, World"
(learn
(text
(p "Now we are going to use Clojure's print functionality to see some output.Please follow the instructions")))
(instruction 'ins-clojure-helloworld ;name identifier
(run-pre-tests? false)
(initial-code :none)
(rule :no-rule? true)
(sub-instruction 'sub-ins-hello-world ;name identifier
(text
(p "Please print \"Hello, World\" to console "
"then click the Run button to see the result"))
(testing
(is (form-used? (println "Hello, World"))))))
'hello-world))
As you can see in this instruction we are asking users to write (println "Hello, World")
and click
Run button, so we can validate their input. We are going to talk about components that used in
here(run-pre-tests?
, initial-code
, etc.) in the following sections.
Instruction can have multiple sub-instruction
components and we have one here, every sub-instruction
can have one text
(for telling the user what to do) and one testing
component, since we can
have multiple is
components within testing it’s easy to write many is
assertions
to validate given input.
In the example is
component takes a form which is supposed to return either true or
false if it is true test passes if not it fails. form-used?
is a predefined function in the
platform basically it checks the given form that exists in the user’s code. You can check Predefined Functions.
At the bottom 'hello-world
indicates namespace of our subject.
Let’s run our command to be sure that we are on the right track:
lein clojurecademy test
Here what we get(again):
Map is valid. There is no test var defined.Please add defcoursetest for testing.
Let’s focus on this message: There is no test var defined.Please add defcoursetest for testing.
which means we need to write a test(not the test we know of) that validates our instruction so we will be sure that
this instruction has a working solution, the thing is we are going to write user’s code(code
that users provide to pass instruction).
Before writing test we need to add required ns:
[clojurecademy.dsl.test :refer [defcoursetest]]
Now, please add following code under the course-map, then run lein clojurecademy test
:
(defcoursetest my-test
[ch-intro sub-ch-basics subj-hello-world ins-clojure-helloworld sub-ins-hello-world]
(println "Hello, World"))
Here is the output which indicates everything is fine and you are ready to deploy your course to Clojurecademy:
Map is valid.
Hello, World
1 routes passed.
Every sub-instruction
needs defcoursetest
and you can define your test where ever you like
in clj files. Let’s examine defcoursetest
in depth:
my-test
is name identifier for defcoursetest
which should be unique it
works like def in Clojure.
[ch-intro sub-ch-basics subj-hello-world ins-clojure-helloworld sub-ins-hello-world]
indicates route for
this sub instruction. From chapter
to sub-instruction
(using name identifiers)
(println "Hello, World")
it’s assumed that users code (code that provided by user)
If you want to see your course on Clojurecademy immediately you can check here(Deployment),
you can regularly deploy your course as you add/change something in your course and see it visually all the time.
We said that instruction can have multiple sub-instruction
components so let’s add new subject
called subj-math-fns
under the subj-hello-world
:
(subject
'subj-math-fns
"Let's write some math functions"
(learn
(text
(p "To understand Clojure comprehensively we are going to write some basic math functions in this section.")))
(instruction 'ins-subj-math-fns
(run-pre-tests? false)
(initial-code :none)
(rule :no-rule? true)
(sub-instruction 'sub-ins-my-add
(text
(p "Please write a function called "
(hi "my-add")
" which adds given numbers"))
(testing
(is (= (my-add 1) 1))
(is (= (my-add 1 2) 3))
(is (= (my-add 1 2 3 4 5 6) 21))))
(sub-instruction 'sub-ins-my-subs
(text
(p "Please write a function called "
(hi "my-subs")
" which subtracts given numbers"))
(testing
(is (= (my-subs 1) -1))
(is (= (my-subs 2 1) 1))
(is (= (my-subs 100 1 2 3 4 5) 85)))))
'subj-math-fns)
And it’s defcourtests
would be like this:
(defcoursetest my-test-2
[ch-intro sub-ch-basics subj-math-fns ins-subj-math-fns sub-ins-my-add]
(defn my-add
[& args]
(apply + args)))
(defcoursetest my-test-3
[ch-intro sub-ch-basics subj-math-fns ins-subj-math-fns sub-ins-my-subs]
(defn my-subs
[& args]
(apply - args)))
run-pre-tests?
run-pre-tests?
can have either true or false as a parameter, if it is
true sub instructions before current sub instruction going to be checked(e.g. before executing 3. instruction 1.
and 2. instructions going to be executed to check that they pass or not), if false current sub instruction
will be checked only.
initial-code
initial-code
is Clojure code that will be provided in the editor to users, there are couple of ways to
initialize initial-code
.
Since initial-code
is a macro you can provide simple Clojure code like this:
(initial-code (println "Hello, World"))
You should use such a form when you don’t need formatting(single line codes are perfect for that purpose)
You can provide code in a string form(it’s good when you need nice formatting in the editor):
(initial-code "(defn my-add\n [a b]\n (+ a b))")
Also initial-code
treats to str function differently, when you want to provide long
and formatted code, probably it won’t fit into your editor nicely so you can separate into small chunk of
strings like this:
(initial-code (str "\n\n(println \"Scalars: \\n\")\n\n\n"
"(println \"Type of 1 is: \" (type 1) \"\\n\")\n\n\n"
"(println \"Type of 1.2 is: \" (type 1.2) \"\\n\")\n\n\n"
"(println \"Type of 1N is: \" (type 1N) \"\\n\")\n\n\n"
"(println \"Type of 'my-s is: \" (type 'my-s) \"\\n\")"))
|
Note
|
If you provide namespace in initial-code then you don’t have to declare ns in subject, for example: |
(subject
'subj-initial-code-ns-ex
"Let's see some initial code"
(learn
(text
(p "Check code in the editor")))
(instruction 'ins
(run-pre-tests? true)
;; ns will be fetched from initial-code
(initial-code "\n(ns clj.core\n (:require [clojure.string :as str]))\n\n(defn your-fn\n []\n )")
(rule :no-rule? true)
(sub-instruction 'sub-ins
(text
(p "Please click the Run button"))
(testing
;;mock true for demo
(is (true? true))))))
rule
rule
allows us to have some control over user’s code and it has a couple of powerful options such
as :restricted-fns
, :required-fns
and :only-use-one-fn?
.
When you want to restrict couple of functions/symbols you need to use :restricted-fns
;; users can't use last and reduce functions in their code
(rule :restricted-fns '[last reduce])
There will be some times you might want users to provide only one function(form) and you need to use
:only-use-one-fn?
;; users can only provide one function/form they can not write multiple functions in their editor, if they do they will get an exception
(rule :only-use-one-fn? true)
Also you might want users to use specific functions to construct their code and you will need to use
:required-fns
;;also you have to use :only-use-one-fn? with :required-fns, the reason is we want to control those functions used in a function.
(rule :required-fns '[reduce]
:only-use-one-fn? true)
is
is
components will be defined within a testing
component, basically is
components are test assertions and form after is returns either true(test passes) or false(test fails):
(is (= (my-last [1 2 3 4 5]) 5))
;;returns true
(is (= (my-last [1 2 3 4 5]) 4))
;; Error: (= 5 4) -> This assertion does not return true!
;You can override error message if you want to:
(is (= (my-last [1 2 3 4 5]) 4) "Overwritten error message, it fails!")
;; Error: (= 5 4) -> Overwritten error message, it fails!
;;There are couple of error messages types such as :none, :simple(default one) and :advanced
(is (= (my-last [1 2 3 4 5]) 4) "Overwritten error message, it fails!" :none)
;; Error: Overwritten error message, it fails!
(is (= (my-last [1 2 3 4 5]) 4) "Overwritten error message, it fails!" :simple)
;; Error: (= 5 4) -> Overwritten error message, it fails!
(is (= (my-last [1 2 3 4 5]) 4) "Overwritten error message, it fails!" :advanced)
;; Error: (= (my-last [1 2 3 4 5]) 4) => (= 5 4) -> Overwritten error message, it fails!
(is (= (my-last [1 2 3 4 5]) 4) :default :advanced)
;; Error: (= (my-last [1 2 3 4 5]) 4) => (= 5 4) -> This assertion does not return true!
|
Important
|
Also is component treats macros differently when it comes to error message representation(:advanced error message type), if you want to use a macro in is component, check error messages before releasing it, the reason is sometimes error messages might not make sense(especially having nested and long codes). |
text
text
can take 2 different sub text components called p(paragraph)
and
code
.You can define as many p
or code
components as you want within text:
(text
(p "Clojure is a" (hi "functional programming") "language."
"It runs on " (italic "JVM") " and " (bold "other platforms(JavaScript, CLR)")
"Check Clojure's Official site: " (link "Clojure Site" "https://clojure.org"))
(p "Here is the Clojure code:")
(code (println "Hello, world"))
(p "Also you can write Clojure code like this:")
(code "(defn my-fn\n [x]\n (println x))")
(p "You wanna show some " (hi "Ruby") " code?")
(code "ruby" "puts 'Hello, world!'")
(p "Or some " (hi "python") "?")
(code "python" "def printme( str ):\n print str\n return;"))
code
supports 9+ programming languages
clojure (default) |
ruby |
clike (c/c++, java etc.) |
haskell |
javascript |
python |
scheme |
commonlisp |
erlang |
Also code
treats str function in a same way with initial-code
so you can
split your long formatted codes into smaller strings.
Ordering
Ordering your component is an important thing to pay attention, I’ll show you how to not make critical mistakes.
Let’s assume you have course structure like this:
(course my-manifest
(chapter 'ch-intro ...)
(chapter 'ch-examples ...))
And you want to re-order your chapters(you can do for all components as well) take a look at the following code(which is totally okay):
;;re-ordered, that's fine
(course my-manifest
(chapter 'ch-examples ...)
(chapter 'ch-intro ...))
But let’s say you wanted to change name identifier of ch-intro to ch-basics and have something like this:
(course my-manifest
(chapter 'ch-examples ...)
(chapter 'ch-basics ...))
|
Important
|
This is the critical part if you change name identifier of any component that(ch-basics) component will be deactivated(new component will be created ch-basics) in course and if you have existing course and some users enrolled that course they won’t be able to see that chapter so the thing is you can change name identifiers of components that’s fine but before doing that take those outcomes into account but if you are just in development stage that’s fine. |
|
Note
|
Like we said if you change name identifier that component will be deactivated(not deleted) so you can re-change name identifier to old name it will show up again(no data loss). |
Predefined Functions
Predefined functions are built-in functions of Clojurecademy that we use to validate user’s code in is
components.
Let’s use predefined functions on following code that provided by a user:
(ns clojure-intro)
(println "Hello, world")
(defn my-add
[& args]
(apply + args))
(- 3 2 1)
(defn my-fn
[]
(do
(println "I'm Here!")))
(defn throw-runtime-ex
[]
(throw (RuntimeException. "Damn!")))
(+ 1 2 3)
Usage:
(all-forms) ;returns user's code as a data structure except ns form
(all-forms true) ;returns user's code as a data structure including ns form
(is (= '(println "Hello, world") (first (all-forms))))
(form-used? <form>) ;checks that form used at top level in code
(is (form-used? (println "Hello, world")))
(form-used-nes? <form>) ;checks that form used anywhere(nested structure) in code
(is (form-used-nes? (println "I'm Here!")))
(ns-form) ;returns ns form of the code
(is (= 'clojure-intro (second (ns-form))))
(first-form) ;returns first form of the code(ns excluded)
(is (= '(println "Hello, world") (first-form)))
(second-form) ;returns second form of the code(ns excluded)
(is (= '(defn my-add [& args] (apply + args)) (second-form)))
(nth-form) ;returns nth form of the code(ns excluded)
(is (= '(- 3 2 1) (nth-form 2)))
(eval-ds <form>) ;evaluates the given form and returns the result
(is (= 6 (eval-ds (last (all-forms)))))
(throws? ...) ;checks the given code that throws an exception or not
(is (throws? RuntimeException (throw-runtime-ex)))
Helper Functions
As an author, you can define your own functions to validate user’s input and it reduces the duplicate code for validation.
First of all, let’s create helper-fns.clj in the same directory with core.clj and write the following code:
;;checks that str/join function declared in user'scode
(defn str-join-used?
[all-forms]
((complement not-any?) (fn [form]
(and (= 'str/join (first form))
(vector? (second form))
(= 2 (count (second form)))))
(filter list? all-forms)))
Also, you need to specify your helper namespace in project.clj to be able to use it:
:helper-fns-ns clj.helper-fns
;now you can use your helper fn in your is component
(is (str-join-used? (all-forms)))
Plugin Commands
There are a couple of commands that you can benefit from when writing a course.
lein clojurecademy [options…]
test |
validates course |
test [debug or -d] |
shows stages while validating course |
test [debug or -d] [advanced or -a] |
shows stages and creates all data structure while validating course |
autotest |
detects file changes and runs test, it’s infinite process |
autotest [debug or -d] |
like autotest, shows stages |
autotest [debug or -d] [advanced or -a] |
like autotest, shows stages and creates all data structure |
deploy |
deploys course to Clojurecademy site |
blacklist |
shows blacklisted namespaces, packages, symbols and objects |
blacklist [namespace or -n] |
shows blacklisted namespaces only |
blacklist [package or -p] |
shows blacklisted packages only |
blacklist [symbol or -s] |
shows blacklisted symbols only |
blacklist [object or -o] |
shows blacklisted objects only |
course |
shows routes and defcoursetests of course |
course [route or -r] |
shows routes of course only |
course [test or -t] |
shows defcoursetests of course only |
Deployment
When you are done with your course it’s time to deploy to Clojurecademy and the procedure is very easy, only thing you need to do is that type the following command:
lein clojurecademy deploy
Then you will be asked to provide your Clojurecademy username/email and password, after providing your credentials course going to be deployed/committed to the site.
|
Note
|
If you don’t want to provide your credentials every time you deploy it you can add your credentials to your ~/.lein/profiles.clj file: |
:clojurecademy {:username-or-email "your-username-or-email"
:password "your-password"}
Now you deployed your course to Clojurecademy but your course won’t be released until you release it in the UI so
you need to go to Clojurecademy site and follow these steps: Log In → Learn → Created Courses →
Your Course → Click Release Button → Release It!
|
Note
|
Now users will be able to see your course, if course existed before they will get new changes. |
|
Important
|
When you commit(deploy) your course you don’t have to Release It you will always get the latest version of your course because you are the author so please do release when your course is ready for users. |
Source Code
Sample Course is open source and can be found on GitHub.
License
MIT License
Copyright 2017 Ertuğrul Çetin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


13. Testnet Wallet Transactions - Bitcoin Core v0.17:
# Bitcoin Core v0.17 Instructions
If you are not using Bitcoin Core Version 0.17, you can skip this section.
In this section, we will go over:
- Getting Started with the Debug Console
- Basic Debug Console Commands
- Creating Separate Wallets
- Transferring Coins
We're going through these steps in this version because features have changed in the software since the original recording of the lesson video.
Note 1: These are instructions to transfer money between wallets, if you are using Bitcoin core 0.17.
** Note 2: **By default, When you open up the Bitcoin software, it creates a default wallet for you.
** Note 3:** Since we are working on the same software right now, these instructions will show you how to make separate wallets using your same Bitcoin software running.
# Getting Started with the Debug Console
After installation, you can now access the debug console.
Steps to Open the Debug Console
- Open your Bitcoin software
- Go to HELP
- Select Debug Window
- Click Console
# Debug Console Commands
You can type help to look at the commands available to you in the console.
Type help
# Create Separate Wallets
In this section, we’ll create 2 wallets so that we can interact between them.
** Command: ** The command used to create a wallet is: ** createWallet < walletName >**
Run this command and choose a name for your wallet. Once you do this, view the top of the screen to see that a wallet has been created for you.
Next, try creating a second wallet. You’ll use this to interact with the first wallet you created.
**NOTE: ** **createWallet ** also creates a ** walletName.dat ** file for you. You can go to this wallet by clicking on it.
# Wallet Debug Console Commands
Now that we have our wallets, we can use the debug console to get more information about each of them. Try running each of these commands to see information about the wallets you created.
getWalletInfo: Gives the wallet information of the currently loaded wallet.
loadWallet: Loads the contents of an existing wallet.
# Main Screen
After running a few commands in the console, navigate back to the main screen.
When you create a wallet, the bitcoin core software only creates an empty wallet.
No addresses are created for you.
*You’ll need to create a wallet address yourself. *
- Click on the Receive tab to create an address.
- Now click on ** Request Payment**. You can just leave this all empty for now.
- Do this for each wallet.
You should now have an account address for each wallet.
# Transfer Coins
*After creating addresses for each of the wallets, we can now transfer coins between them. *
NOTE: To transfer coins, you’ll need to have coins available in the wallet you created. You can get coins into your wallet by using any available testnet faucet.
- Use the **Send **tab to transfer money from one wallet to another.
# Conclusion
At this point you have set up 2 wallets and successfully transferred coins between them using the testnet.
You can continue transferring coins and investigating these wallets using the bitcoin core software and debug console.


Group:
Edit
Group info:
Name:
Path:
Description:
Created on:
Feb 6, 2017 2:58pm
Storage:
0 Bytes
( 0 Bytes repositories, 0 Bytes build artifactsFile, 0 Bytes LFS )
Group Git LFS status:
Enabled for all projects
Projects
0
Add user(s) to the group:
Read more about project permissions
here
No matches found
Guest
Guest
Reporter
Developer
Master
Owner
Add users to group
mobile
group members
3
Manage Access
박영일
@baramboy
Joined
3 minutes ago
Owner
chiang
@chiangpero
Joined
3 minutes ago
Owner
Administrator
@root
It's you
Joined
41 minutes ago
Owner


SPASS-Meter
a non-intrusive variant-aware monitoring framework for Java applications
See resources/manual.pdf for application.
Do not call any method in the data gatherer before starting the Recorder. Even
if this may work in an usual environment, it may fail in OSGi. Furthermore,
avoid using the javassist special terms $sig, $type, $cflow and new inner
classes as they require Javassist runtime support which, in turn, complicate
using OSGi.


Brett Zamir
on 2012-06-11 04:44:34
@CyberCrasher: Please note the field that it depends on "setlocale", another function.
CyberCrasher
on 2012-06-11 04:02:40
It produces this error:
Uncaught TypeError: Object [object Window] has no method 'setlocale'


Elsewhere on GOV.UK Your rights as an agency worker Advisory, Conciliation and Arbitration Service (Acas)


Motivation to Get to Lifting
“The only way to be a champion is by going through these forced reps and the torture and pain. That’s way I call it the torture routine. Because it’s like forced torture. Torturing my body. What helps me is to think of this pain as pleasure. Pain makes me grow. Growing is what I want. Therefore, for me pain is pleasure. And so when I am experiencing pain I’m in heaven. It’s great. People suggest this is masochistic. But they’re wrong. I like pain for a particular reason. I don’t like needle’s stuck in my arm. But I do like the pain that is necessary to be a champion.”"What I'm doing is the thing I want to do. I don't care what other people think. Even if they disagree and say I shouldn't I will still be a bodybuilder. I love it. I love the feelings in my muscles, I love the competition, and i love the things it gives me, I have never really had to work in my whole life. I have never had an eight to six job. I've always made good money. I've traveled all over the world competing and giving exhibitions. I've made a profession out of a past time, which perhaps only five percent of the population can do. The other ninety-five percent are frustrated workers, working for someone else. I'm totally in dependent. So i feel if I would live again or if I would be born again, I would do exactly the same thing."
- Arnold Schwarzenegger


RED MOTHER Gets a Creepy Trailer for the First Issue Due in December
by Tommy WilliamsThe Red Mother is an upcoming comic series from author Jeremy Haun and artist Danny Luckert being published by BOOM! Studios. The story sounds pretty creepy in and of itself, and now there’s a creepy trailer to go along with the creepy synopsis.
There are dark things just beyond this reality. Horrors that we cannot quite see. Things wanting to get in. After losing her eye and the man she loves during a brutal attack in an alley, Daisy McDonough is left trying to put the pieces of her life back together. Just when she thinks she can start the process of healing and moving on, she begins to see strange things through her new prosthetic eye.
She can see the Red Mother. And the Red Mother can see her right back!
The Red Mother #1 will be available on December 11 with print copies exclusive to local comic book stores. The main cover was created by Haun and a variant was created by Luckert.


As part of the Continuous Release team my task involves creation of tools in Python, feature enhancement for processes that deal with deployment of OpenShift Clusters on AWS Starter environment.
Porting OpenShift Client Python repository from Python 2 to Python 2/3.
Feature enhancement for Quarantine tool that uses AWS SimpleDB using Boto3 to store quarantine cluster namespace records.
Created Statuspage tool in Python used in pipelines to update Starter Production cluster Status on statuspage.io.
Updating a Prometheus Gauge metric to accommodate an extra label.
Creation and modification of pipelines including a linter check for JenkinsFile syntax.
Creating script for OpenShift logging deployment & integrating it into installation pipeline.
Software Engineer
July, 2017 - August, 2018
Pune, India
Primarily developing & testing the source code (Go and C) for a Multi-node Cluster Management Firmware. Also, worked on bug-fixes and minor functionalities.
Imported Open Source tools for the in-house development of a Multi-node (>30 VMs) VM-cluster (this cluster was an alternative to the limited 3 to 5 node hardware cluster). Utilized VMware, Vagrant, Ansible, Docker and Kubernetes(K8s) for operating an in-house cluster.
Automated deployment of product via Ansible and shell scripts reducing deployment time by more than 50% on the in-house cluster.


{$message}
Edit your information
First name:
Last name:
Email:
City:
Address:
Zip code:
Phone number:


expect class WorkerFactory
A factory which creates and returns Worker instances.
val current: Worker
Returns the current worker which invoked this getter. |
|
val main: Worker
Returns the worker backed by the main thread. |
fun newBackgroundWorker(): Worker
Creates and returns a new background worker. |
expect fun <T> T.toImmutable(): T
Returns an immutable instance of an object. |