Get your fitness back on track
We offer a wide varienty of memeberships fit for everyone. Fit for U! Available memberships include: Free, Student, and Premium
Go somewhereHear real life testimonials about people who use FitU and actually have seen results.
Go somewhere


|
SimpleITK
2.1.0
|
Generate an n-dimensional image of a Gabor filter. More...
#include <sitkGaborImageSource.h>
Public Types | |
| using | PixelIDTypeList = BasicPixelIDTypeList |
| using | Self = GaborImageSource |
| Public Types inherited from itk::simple::ImageFilter | |
| using | Self = ImageFilter |
| Public Types inherited from itk::simple::ProcessObject | |
| using | Self = ProcessObject |
Public Member Functions | |
| Image | Execute () |
| GaborImageSource () | |
| std::vector< double > | GetDirection () const |
| double | GetFrequency () const |
| std::vector< double > | GetMean () const |
| std::string | GetName () const |
| std::vector< double > | GetOrigin () const |
| PixelIDValueEnum | GetOutputPixelType () const |
| std::vector< double > | GetSigma () const |
| std::vector< unsigned int > | GetSize () const |
| std::vector< double > | GetSpacing () const |
| Self & | SetDirection (std::vector< double > Direction) |
| Self & | SetFrequency (double Frequency) |
| Self & | SetMean (double value) |
| Self & | SetMean (std::vector< double > Mean) |
| Self & | SetOrigin (std::vector< double > Origin) |
| Self & | SetOutputPixelType (PixelIDValueEnum OutputPixelType) |
| Self & | SetSigma (double value) |
| Self & | SetSigma (std::vector< double > Sigma) |
| Self & | SetSize (std::vector< unsigned int > Size) |
| Self & | SetSpacing (std::vector< double > Spacing) |
| std::string | ToString () const |
| virtual | ~GaborImageSource () |
| Public Member Functions inherited from itk::simple::ImageFilter | |
| ImageFilter () | |
| virtual | ~ImageFilter ()=0 |
| Public Member Functions inherited from itk::simple::ProcessObject | |
| virtual void | Abort () |
| virtual int | AddCommand (itk::simple::EventEnum event, const std::function< void()> &func) |
| Directly add a callback to observe an event. More... | |
| virtual int | AddCommand (itk::simple::EventEnum event, itk::simple::Command &cmd) |
| Add a Command Object to observer the event. More... | |
| virtual float | GetProgress () const |
| An Active Measurement of the progress of execution. More... | |
| virtual bool | HasCommand (itk::simple::EventEnum event) const |
| Query of this object has any registered commands for event. More... | |
| ProcessObject () | |
| virtual void | RemoveAllCommands () |
| Remove all registered commands. More... | |
| virtual | ~ProcessObject () |
| virtual void | DebugOn () |
| virtual void | DebugOff () |
| virtual bool | GetDebug () const |
| virtual void | SetDebug (bool debugFlag) |
| virtual void | SetNumberOfThreads (unsigned int n) |
| virtual unsigned int | GetNumberOfThreads () const |
| virtual void | SetNumberOfWorkUnits (unsigned int n) |
| virtual unsigned int | GetNumberOfWorkUnits () const |
Private Types | |
| using | MemberFunctionType = Image(Self::*)() |
Private Member Functions | |
| template<class TImageType > | |
| Image | ExecuteInternal () |
Private Attributes | |
| std::vector< double > | m_Direction {std::vector<double>()} |
| double | m_Frequency {0.4} |
| std::vector< double > | m_Mean {std::vector<double>(3, 32.0)} |
| std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > | m_MemberFactory |
| std::vector< double > | m_Origin {std::vector<double>(3, 0.0)} |
| PixelIDValueEnum | m_OutputPixelType {itk::simple::sitkFloat32} |
| std::vector< double > | m_Sigma {std::vector<double>(3, 16.0)} |
| std::vector< unsigned int > | m_Size {std::vector<unsigned int>(3, 64)} |
| std::vector< double > | m_Spacing {std::vector<double>(3, 1.0)} |
Friends | |
| struct | detail::MemberFunctionAddressor< MemberFunctionType > |
Additional Inherited Members | |
| Static Public Member Functions inherited from itk::simple::ProcessObject | |
| static bool | GetGlobalDefaultDebug () |
| static void | GlobalDefaultDebugOff () |
| static void | GlobalDefaultDebugOn () |
| static void | SetGlobalDefaultDebug (bool debugFlag) |
| static void | GlobalWarningDisplayOn () |
| static void | GlobalWarningDisplayOff () |
| static void | SetGlobalWarningDisplay (bool flag) |
| static bool | GetGlobalWarningDisplay () |
| static double | GetGlobalDefaultCoordinateTolerance () |
| Access the global tolerance to determine congruent spaces. More... | |
| static void | SetGlobalDefaultCoordinateTolerance (double) |
| Access the global tolerance to determine congruent spaces. More... | |
| static double | GetGlobalDefaultDirectionTolerance () |
| Access the global tolerance to determine congruent spaces. More... | |
| static void | SetGlobalDefaultDirectionTolerance (double) |
| Access the global tolerance to determine congruent spaces. More... | |
| static bool | SetGlobalDefaultThreader (const std::string &threader) |
| Set/Get the default threader used for process objects. More... | |
| static std::string | GetGlobalDefaultThreader () |
| Set/Get the default threader used for process objects. More... | |
| static void | SetGlobalDefaultNumberOfThreads (unsigned int n) |
| static unsigned int | GetGlobalDefaultNumberOfThreads () |
| Set/Get the default threader used for process objects. More... | |
| Protected Member Functions inherited from itk::simple::ImageFilter | |
| void | CheckImageMatchingDimension (const Image &image1, const Image &image2, const std::string &image2Name) |
| void | CheckImageMatchingPixelType (const Image &image1, const Image &image2, const std::string &image2Name) |
| void | CheckImageMatchingSize (const Image &image1, const Image &image2, const std::string &image2Name) |
| Protected Member Functions inherited from itk::simple::ProcessObject | |
| virtual unsigned long | AddITKObserver (const itk::EventObject &, itk::Command *) |
| virtual itk::ProcessObject * | GetActiveProcess () |
| virtual void | OnActiveProcessDelete () |
| virtual void | onCommandDelete (const itk::simple::Command *cmd) noexcept |
| virtual void | PreUpdate (itk::ProcessObject *p) |
| virtual void | RemoveITKObserver (EventCommand &e) |
| Protected Member Functions inherited from itk::simple::NonCopyable | |
| NonCopyable ()=default | |
| NonCopyable (const NonCopyable &)=delete | |
| NonCopyable & | operator= (const NonCopyable &)=delete |
| Static Protected Member Functions inherited from itk::simple::ImageFilter | |
| template<class TImageType > | |
| static void | FixNonZeroIndex (TImageType *img) |
| Static Protected Member Functions inherited from itk::simple::ProcessObject | |
| template<class TImageType > | |
| static TImageType::ConstPointer | CastImageToITK (const Image &img) |
| template<class TPixelType , unsigned int VImageDimension, unsigned int VLength, template< typename, unsigned int > class TVector> | |
| static Image | CastITKToImage (itk::Image< TVector< TPixelType, VLength >, VImageDimension > *img) |
| template<class TImageType > | |
| static Image | CastITKToImage (TImageType *img) |
| static const itk::EventObject & | GetITKEventObject (EventEnum e) |
| template<typename T > | |
| static std::ostream & | ToStringHelper (std::ostream &os, const T &v) |
| static std::ostream & | ToStringHelper (std::ostream &os, const char &v) |
| static std::ostream & | ToStringHelper (std::ostream &os, const signed char &v) |
| static std::ostream & | ToStringHelper (std::ostream &os, const unsigned char &v) |
Generate an n-dimensional image of a Gabor filter.
GaborImageSource generates an image of either the real (i.e. symmetric) or complex (i.e. antisymmetric) part of the Gabor filter with the orientation directed along the x-axis. The GaborKernelFunction is used to evaluate the contribution along the x-axis whereas a non-normalized 1-D Gaussian envelope provides the contribution in each of the remaining N dimensions. Orientation can be manipulated via the Transform classes of the toolkit.
The output image may be of any dimension.
This implementation was contributed as a paper to the Insight Journal https://hdl.handle.net/1926/500
Definition at line 46 of file sitkGaborImageSource.h.
|
private |
Setup for member function dispatching
Definition at line 156 of file sitkGaborImageSource.h.
Define the pixels types supported by this filter
Definition at line 58 of file sitkGaborImageSource.h.
Definition at line 48 of file sitkGaborImageSource.h.
|
virtual |
Destructor
| itk::simple::GaborImageSource::GaborImageSource | ( | ) |
Default Constructor that takes no arguments and initializes default parameters
| Image itk::simple::GaborImageSource::Execute | ( | ) |
Execute the filter on the input image
|
private |
|
inline |
Definition at line 138 of file sitkGaborImageSource.h.
|
inline |
Set/Get the modulation frequency of the sine or cosine component.
Definition at line 114 of file sitkGaborImageSource.h.
|
inline |
Set/Get the mean in each direction.
Definition at line 104 of file sitkGaborImageSource.h.
|
inlinevirtual |
Name of this class
Implements itk::simple::ProcessObject.
Definition at line 141 of file sitkGaborImageSource.h.
|
inline |
Definition at line 122 of file sitkGaborImageSource.h.
|
inline |
Definition at line 70 of file sitkGaborImageSource.h.
|
inline |
Set/Get the the standard deviation in each direction.
Definition at line 91 of file sitkGaborImageSource.h.
|
inline |
Definition at line 78 of file sitkGaborImageSource.h.
|
inline |
Definition at line 130 of file sitkGaborImageSource.h.
|
inline |
Definition at line 134 of file sitkGaborImageSource.h.
|
inline |
Set/Get the modulation frequency of the sine or cosine component.
Definition at line 109 of file sitkGaborImageSource.h.
|
inline |
Set the values of the Mean vector all to value
Definition at line 99 of file sitkGaborImageSource.h.
|
inline |
Set/Get the mean in each direction.
Definition at line 96 of file sitkGaborImageSource.h.
References itk::simple::Mean().
|
inline |
Definition at line 118 of file sitkGaborImageSource.h.
|
inline |
Definition at line 66 of file sitkGaborImageSource.h.
|
inline |
Set the values of the Sigma vector all to value
Definition at line 86 of file sitkGaborImageSource.h.
|
inline |
Set/Get the the standard deviation in each direction.
Definition at line 83 of file sitkGaborImageSource.h.
|
inline |
Definition at line 74 of file sitkGaborImageSource.h.
|
inline |
Definition at line 126 of file sitkGaborImageSource.h.
|
virtual |
Print ourselves out
Reimplemented from itk::simple::ProcessObject.
|
friend |
Definition at line 160 of file sitkGaborImageSource.h.
|
private |
Definition at line 180 of file sitkGaborImageSource.h.
|
private |
Definition at line 173 of file sitkGaborImageSource.h.
|
private |
Definition at line 171 of file sitkGaborImageSource.h.
|
private |
Definition at line 162 of file sitkGaborImageSource.h.
|
private |
Definition at line 175 of file sitkGaborImageSource.h.
|
private |
Definition at line 165 of file sitkGaborImageSource.h.
|
private |
Definition at line 169 of file sitkGaborImageSource.h.
|
private |
Definition at line 167 of file sitkGaborImageSource.h.
|
private |
Definition at line 177 of file sitkGaborImageSource.h.


<<< Back
Submit >>>
title
desc
Input Specifications
subt
Output Specifications
inpt
Subtasks
outp
Sample Input
1
Sample Output
2
Sample Input
3
Sample Output
4


1 dead, another wounded in Bronx tobacco store shooting: cops
by Daniel CassadyOne man was killed and another injured late Wednesday night during a shooting inside Bronx a tobacco store, police said.
An unidentified gunman walked into King of NY Tobacco Shop on E. 167th Street in Concourse Village just after 11 p.m. and started shooting, cops said.
Kashka Richards, 23, was shot in the head and a 32 year-old man in the leg, police said.
The 32-year-old was able to flee the store and call 911 from a block away on Sheridan Street and E. 168th Street, according to police.
Richards was pronounced dead at the scene of the shooting by EMS while the other victim was taken to NYC Health + Hospitals/Lincoln in stable condition, police said.
It’s not immediately clear whether the gunman intended on robbing the store or whether the two men, who don’t appear to have known each other, were targeted, police said.


Mercedes Formula E boss Ian James says he is living "childhood dream" ahead of debut race
EXCLUSIVE: Mercedes make their debut in Formula E next week as they join the most competitive grid in world motorsport in an exciting new era for F1's power brokers
by Aaron Flanagan, https://www.mirror.co.uk/authors/aaron-flanagan/Ian James admits he is living a “childhood dream” as he leads Mercedes into a new era of motorsport.
F1 juggernauts Mercedes make their bow in Formula E at next week’s season opener in Saudi Arabia, as they look to take their success from Grands Prix to E-Prix.
James has been something of an unsung hero in Mercedes motorsport, having been instrumental in the reintroduction of KERS in F1 in 2011, leading to Mercedes’ first race win since 1955 - and then the development of the power units that led to 2014 and 2015 world titles and subsequent success that has followed.
But now James comes out from behind the shadows and leads Mercedes into an exciting new electric world. He puts on a professional face, but the giddiness is clear for all to see.
“It has been an incredibly varied career so far but this is the culmination of a childhood dream,” said James.
“To be able to on one side get back into motorsport and with something as exciting and as cutting edge as Formula E, but at the same time, in a truer sense of the word, start up a start-up organisation and bring the necessary ingredients together is something that comes along very seldom.
“As cheesy as it might sound, it really is a once in a lifetime opportunity.”
James, 42, has worked his way through the ranks in a 15-year career with Mercedes, which has seen him live in Germany - learning the language on the job - and Alabama, United States.
The Coventry University graduate is now back in the UK, living alongside his wife Claire and two children, Cameron, 10, and Chloe, 8.
But he knows there will be no home comforts as he faces the busiest period of his career.
Despite his new job title, James refuses to be known as the Toto Wolff of Formula E - because the F1 chief is very much down the end of the phone keeping him in check.
“Since I have come on board, we have struck quite a nice balance between him being there for advice when needed and really acting as a consultant for any of the key issues that we have.
“But at the same time, he has left me to my own devices and let me make my own mistakes along the way.
“I have no doubt that on WhatsApp and other media, he will definitely be keeping me on my toes!”
- Experience the thrill of electric racing at Formula E’s season finale on the 25th and 26th July 2020 at ExCel London. Tickets on sale from 1pm on Friday at www.FIAFormulaE.com/london
- Every race of the 2019/20 Formula E season will be shown on the BBC iPlayer, Red Button and on the BBC Sport website - with races in Rome and Marrakesh on live terrestrial TV.


Now that the JSON:API spec has hit 1.0 and Ember Data has adopted it as a default, it’s important to be able to mock it out with Mirage. We’re taking this opportunity to make Mirage a bit more flexible to handle JSON:API and other backends by adding a serializer layer.
Until this layer lands, you’ll have to do a bit more work in your route definitions to work with JSON:API. For a GET request to /users/1
, JSON:API expects a response that looks something like this:
{
"data": {
"type": "users",
"id": "1",
"attributes": {
"first-name": "Sam",
"last-name": "Selikoff"
}
}
}
To mock this out in Mirage, first be sure that your factory uses hyphenated keys, so your db field names match the expected format:
//mirage/factories/user.js
import Mirage, { faker } from 'ember-cli-mirage';
export default Mirage.Factory.extend({
'first-name'() { return faker.name.firstName(); },
'last-name'() { return faker.name.lastName(); }
});
Then, write your route handler. It may look something like this:
this.get('/users/:id', function(db, request) {
let id = request.params.id;
return {
data: {
type: 'users',
id: id,
attributes: db.users.find(id)
}
};
})
A response for a collection (GET /users
) may look like this:
this.get('/users', function(db, request) {
return {
data: db.users.map(attrs => (
{ type: 'users', id: attrs.id, attributes: attrs }
))
};
})
For now, mocking a JSON:API backend with Mirage requires a bit more work, but soon the serializer layer and updated shorthands will make things much simpler.


Staff
What is Dubstep, Techno, and Electro? a fun, enjoyable, chilled, nice community centered around great music and great people.
ping rules facebook op eta dc givespot help Staff noskip reload kill meh Fun Doge
Replies "pong!" when DTE bot is running
Displays the DTE room rules
Links to DTE's Facebook
Displays the DTE OverPlayed list
Displays your Estimated Time of Arrival
Moves you to your lost spot, in case you disconnect
Gives your spot to another user
Links this help site
Disables automatically skipping the next song
Reloads the bot
Kills the bot
DO NOT USE UNDER ANY CIRCUMSTANCES OTHER THAN WHEN IT IS NEEDED
Sets required amount of Meh's to skip a song
This site was made by Meamme with the help of the css library Materialize
For some reason firefox hates Materialize, so no luck to FF users.


Toggle navigation
Matthew Roskam
About me
Portfolio
Contact
Contact
Name
email
Message
Submit
Connect with me
Connect with Me


Internship is very crucial for each and every Graduated student. It helps connecting the dots developed
during educational years.
Real life problems-solutions, process, organization, all phases of an application development and
business communication all learned together makes bright future of Computing and develops intelligence
and innovation in you.


Register Device
Register a device
Registering a device with Clutch means you can turn on development mode and we’ll update the code on your phone without your even needing to recompile.
If you’re having trouble with the device identifier, remember to include this bit of code somewhere, and look in XCode’s console log to see the identifier:
[ClutchView logDeviceIdentifier];Need more help? View the Docs.


Intel XDK: Develop Once, Deploy Everywhere
Over the last couple of months, Intel has been improving the various aspects of the Intel XDK. Intel XDK uses HTML5 to enable the development of cross-platform applications for both Desktop and Mobile.
Intel promotes HTML5 because of the many advantages that HTML5 offers developers globally. Intel believes in the importance of helping experienced developers transition to this Intel XDK cross-platform approach aids new developers to quickly deploy their apps & games on virtually all modern computing platforms.
Intel XDK allows developers to code once with HTML5 and produce applications to many platforms without having to know the various languages that correspond to the specific target platforms. In other words, developers do need not know Java to make Android Apps. Intel XDK gives developers permission to build applications as:
- A mobile application: For iOS Ad Hoc, iOS Production, Android, Crosswalk for Android (new in v0505), Windows 8 Store, Windows Phone 8, Tizen, Nook and Cordova for Android(*new in v0505).
- A web application: A Web app, Chrome App and a Facebook App.
From what was initially a web browser service, the XDK has evolved and become a full software development kit with the following features: The XDK has a built in environment that enables developers emulate their apps on several virtual devices and get to know how their app will look like on each device (IPhone, Microsoft Surface Pro, and Motorola Droid 2 among others) as they develop their apps
Users can get to test their app on their phones (iOS, Android, Windows and Tizen devices). In addition, the same app can also be run as a desktop application (for users of Windows 8 & 8.1). This feature, which enables developers to deploy their apps on their devices as they are developing, helps in producing quick prototypes. This is achievable from the “Test”, “Debug” and “Profile” tabs on the Intel XDK.
Developers also have the ability to store code in the cloud for free, and are able to retrieve it on any device at any location in the world once they log in to their accounts. Thanks to Intel’s XDK’s cloud storage system, a developer can retrieve their build codes and proceed to work on their projects. This cloud service is free and developers do not have pay for it.
Improved documentation, tutorials and a growing user base has made it easy for XDK users to get quick help to their development problems.
Featured Android app made with the XDK developed by a Kenyan developer
FoodBei is a mobile app that was made using the Intel XDK. It is intended to assist in getting an easy access to food items from major Kenyan towns, as well as getting to know the prices of the various basic food items - cereals, vegetables, meat, eggs and fruits. The developer, Juma Owori, took 2 weeks to develop his app, which is a client server mobile application using the Intel XDK.
For making apps using the XDK, developers require:
- App Idea
- Intel XDK
- Intel Developer Zone Account (For access to a wide range of free tools and resources to enable them to optimise their applications)
- HTML5 & CSS3 skills
Start using Intel’s XDK today. Grab your latest copy for Windows, Linux or Mac from: http://xdk-software.intel.com/
Get more hybrid app secrets
Build powerful hybrid apps for Android or Cordova / PhoneGap more reliably with tips from the Intel Crosswalk team.


When it comes to money, every little bit counts. Every penny you save today could help improve your life tomorrow. It all adds up in the long run, right?
Knowing this, you should always be on the lookout for new ways to increase your income - even if only by a tiny bit.
Using the following apps isn’t going to make you rich. But putting in the minimal effort that goes into utilizing each of them will leave you with a decent amount of cash at the end of the year.
Just don’t spend it all in one place. (Or, you know…do that. It’s your money, after all!)
S’more App
If you’re a fan of making money for doing absolutely nothing, S’more is the app for you.
With S’more, you collect reward points for allowing the app to show ads on your phone’s lock screen. Once you reach a certain amount of reward points, you can redeem them for gift cards at various retailers and online stores. The points are redeemed and the gift cards sent via email, so the entire process is quick and easy.
After installing and setting up S’more, you don’t have to do anything at all to start earning reward points. It’s also a good incentive to unglue your eyes from your phone, for a change.
One of the usual concerns with this type of app is battery life. However, S’more’s developers have optimized the app to ensure it uses as little of your phone’s battery as possible.
Due to Apple regulations, S’more is currently available for Android devices, meaning iPhone users will have to find another way to earn passive income.
Fiverr
Fiverr is a freelancing database that connects people in need of specific services with people who specialize in these various areas. Fiverr is great for picking up quick and easy jobs that have no strings attached in exchange for a quick five bucks. While there is a wide variety of services offered on Fiverr, the most popular categories are writing, graphic design, audio/visual work, programming, and marketing. There’s also a “fun and bizarre” category, where people offer others money to do things like play pranks on friends or complete daredevil stunts.
The projects offered are usually not very involved, either. A talented individual could likely complete many of the tasks in 30 minutes or less. While this certainly isn’t enough to allow you to quit your dayjob, it’s a good way to make some side cash while doing what you love. First of all, there’s always something interesting being offered on Fiverr.
Fiverr is also great for people just getting started within an industry. The projects you pick up on Fiverr can be added to your ever-increasing portfolio of work, which will one day land you jobs that pay much more than five dollars a pop.
The downside, of course, is that $5 might not be worth the effort you’ll put into a job. But for others across the globe, $5 is a lot of money. The worldwide competition for interesting gigs tends to get a little hectic, so you might not always get the job you wanted.
Though it’s a good way to build your portfolio, you shouldn’t be making Fiverr one of your main sources of income. But it can be difficult to break out into the world of higher-paying gigs once you’ve gotten comfortable with a specific system. Don’t let that happen.
Ibotta
Ibotta helps you earn cash rebates whenever you make a purchase at your local grocery store. You simply take a picture of your receipt and upload it through the app, and your Ibotta account will be credited accordingly.
Though not every item you purchase will go toward the rebate, many store brand items (and some national brands) are part of the deal. If you use Ibotta regularly, you will almost certainly net hundreds of dollars over the course of a year. You can also join “teams” and earn more after you and your teammates reach certain purchasing milestones.
Ibotta partners with over 180 stores throughout the country, so you likely won’t have any trouble earning rebates while shopping at the grocery store you’ve always shopped at.
Ibotta offers a variety of methods for cashing out your earnings. You can receive actual money via Venmo or PayPal, or elect to be sent gift cards for various retailers.
On the downside, Ibotta is a bit labor intensive. If convenience is what you want, you may not have the patience to snap a photo of your receipt after every grocery visit. But if you’re willing to put up with a little inconvenience, you can achieve great earnings.
In exchange for the rebates, you’ll have to deal with ads while using Ibotta. Probably nothing you’re not used to, but just a little fair warning.
Shopkick
Shopkick is similar to Ibotta, but it focuses specifically on department stores.
With Shopkick, you earn reward points simply for going to a store and checking in, scanning items (before purchasing them), purchasing them with a credit card you’ve connected to your Shopkick account, and scanning your receipts.
Your rewards, or “kicks,” can then be redeemed for cold, hard cash.
Shopkick works at many major retail and department stores, meaning anyone from sports enthusiasts to those interested in home decorating will find a use for the app.
As mentioned, you don’t even need to buy anything when using Shopkick to rack up reward points. Of course, purchasing items will earn you much more than simply checking in to a store.
While you eventually redeem your “kicks” for cash, you don’t earn money directly (as you do with Ibotta). Earning enough reward points to make a substantial amount of money will likely take some time.
If you’re really into privacy, you’ll be unhappy to know that Shopkick requires that you let it see your location in order to verify that you’re actually at the store you’ve checked in to. You can still turn the service off when you’re not using it, though.


The Tale of Brownie Beaver
by Arthur Scott Bailey
Chapter 14: “Was it a Gun?”
Additional Information
- Year Published: 1916
- Language: English
- Country of Origin: United States of America
- Source: Bailey, A. S. (1916). The Tale of Brownie Beaver. New York: Grosset and Dunlap.
-
Readability:
- Flesch–Kincaid Level: 5.0
- Word Count: 556
- Genre: Fantasy
- Keywords: 20th century literature, american literature, children's stories, sleepy-time tales
- ✎ Cite This
Downloads
Everybody in the village where Brownie Beaver lived was very much upset. Most people were angry, too. And no doubt it was natural that they should feel that way, because while they were taking their midday naps a man had come and paddled about their village in a boat.
Brownie Beaver was the first to hear him and he quickly spread the alarm. There was a great scurrying as all the villagers stole out of their houses and swam away under water to hide in holes in the bank of the pond and in other places they knew.
Toward night, when they all came back again, the man had gone. But Brownie and his neighbors were still angry. You must remember that their rest had been disturbed and they were feeling somewhat sleepy.
So far as they could see, the man had done no damage either to their houses or to the dam. But people felt a bit uneasy just the same, until old Grandaddy Beaver looked all around and reported that the man had set no traps. You see, Grandaddy knew a great deal about traps. He had been caught in one when he was young. Luckily, he managed to get away; and he learned a few things that he never forgot.
Now, Brownie Beaver had begun to cut down a tree the night before. Something had interrupted him and he had left the tree not quite gnawed through and needing only a few more bites to bring it down. He was intending to finish his task soon after dark—which was the time he liked best for working.
Accordingly, after Brownie had finished his supper and had called at every house in the village to talk over the visit of the strange man, he swam to the shore of the pond and made his way to the slanting tree, which stood a short distance from the water.
It was quite dark. And that was what Brownie liked, because he could work without being disturbed—at least, that was what he thought.
Since he could see quite well in spite of the dark he had no trouble in finding his tree. And he lost no time in setting to work on it again.
He began to gnaw at it once more. But he hadn’t moved more than half-way around the tree-trunk when something happened that almost frightened him out of his skin.
Right out of the darkness came a blinding flash of light.
Just for a moment Brownie Beaver was stiff with fear. But when the darkness closed in upon him again he ran for his life toward the pond. And plunging into the water he swam quickly to the bottom and hurried up his winding hall into his bedroom, where he crouched trembling upon his bed, wondering whether he had been shot.
Brownie knew that at night a gun made a flash of light. But this gun (if it was a gun) made no roar such as was made by the guns Brownie had sometimes heard at a distance in the woods. He wished that old Grandaddy Beaver was there. For he did not doubt that the old gentleman could tell him exactly what had happened.


MPI-1 provides datatype objects, which allow users to specify an arbitrary layout of data in memory. The layout information, once put in a datatype, could not be decoded from the datatype. There are several cases, however, where accessing the layout information in opaque datatype objects would be useful.
The two functions in this section are used together to decode datatypes to recreate the calling sequence used in their initial definition. These can be used to allow a user to determine the type map and type signature of a datatype.
| MPI_TYPE_GET_ENVELOPE(datatype, num_integers, num_addresses, num_datatypes, combiner) | |
| IN datatype | datatype to access (handle) |
| OUT num_integers | number of input integers used in the call constructing combiner (nonnegative integer) |
| OUT num_addresses | number of input addresses used in the call constructing combiner (nonnegative integer) |
| OUT num_datatypes | number of input datatypes used in the call constructing combiner (nonnegative integer) |
| OUT combiner | combiner (state) |
int MPI_Type_get_envelope(MPI_Datatype datatype, int *num_integers, int *num_addresses, int *num_datatypes, int *combiner)
MPI_TYPE_GET_ENVELOPE(DATATYPE, NUM_INTEGERS, NUM_ADDRESSES, NUM_DATATYPES, COMBINER, IERROR)
INTEGER DATATYPE, NUM_INTEGERS, NUM_ADDRESSES, NUM_DATATYPES, COMBINER, IERROR
void MPI::Datatype::Get_envelope(int& num_integers, int& num_addresses, int& num_datatypes, int& combiner) const
For the given datatype, MPI_TYPE_GET_ENVELOPE returns information on the number and type of input arguments used in the call that created the datatype. The number-of-arguments values returned can be used to provide sufficiently large arrays in the decoding routine MPI_TYPE_GET_CONTENTS. This call and the meaning of the returned values is described below. The combiner reflects the MPI datatype constructor call that was used in creating datatype.
Rationale.
By requiring that the combiner reflect the constructor used in the creation of the datatype, the decoded information can be used to effectively recreate the calling sequence used in the original creation. One call is effectively the same as another when the information obtained from MPI_TYPE_GET_CONTENTS may be used with either to produce the same outcome. C calls MPI_Type_hindexed and MPI_Type_create_hindexed are always effectively the same while the Fortran call MPI_TYPE_HINDEXED will be different than either of these in some MPI implementations. This is the most useful information and was felt to be reasonable even though it constrains implementations to remember the original constructor sequence even if the internal representation is different.
The decoded information keeps track of datatype duplications. This is
important as one needs to distinguish between a predefined datatype
and a dup of a predefined datatype. The former is a constant object
that cannot be freed, while the latter is a derived datatype that can
be freed.
( End of rationale.)
The list below has the values that can be returned in
combiner on the left and the call associated with them on the
right.
MPI_COMBINER_NAMEDa named predefined datatype
MPI_COMBINER_DUP MPI_TYPE_DUP
MPI_COMBINER_CONTIGUOUS MPI_TYPE_CONTIGUOUS
MPI_COMBINER_VECTOR MPI_TYPE_VECTOR
MPI_COMBINER_HVECTOR_INTEGER MPI_TYPE_HVECTOR from Fortran
MPI_COMBINER_HVECTOR MPI_TYPE_HVECTOR from C or C++
and in some case Fortran
or MPI_TYPE_CREATE_HVECTOR
MPI_COMBINER_INDEXED MPI_TYPE_INDEXED
MPI_COMBINER_HINDEXED_INTEGER MPI_TYPE_HINDEXED from Fortran
MPI_COMBINER_HINDEXED MPI_TYPE_HINDEXED from C or C++
and in some case Fortran
or MPI_TYPE_CREATE_HINDEXED
MPI_COMBINER_INDEXED_BLOCK MPI_TYPE_CREATE_INDEXED_BLOCK
MPI_COMBINER_STRUCT_INTEGER MPI_TYPE_STRUCT from Fortran
MPI_COMBINER_STRUCT MPI_TYPE_STRUCT from C or C++
and in some case Fortran
or MPI_TYPE_CREATE_STRUCT
MPI_COMBINER_SUBARRAY MPI_TYPE_CREATE_SUBARRAY
MPI_COMBINER_DARRAY MPI_TYPE_CREATE_DARRAY
MPI_COMBINER_F90_REAL MPI_TYPE_CREATE_F90_REAL
MPI_COMBINER_F90_COMPLEX MPI_TYPE_CREATE_F90_COMPLEX
MPI_COMBINER_F90_INTEGER MPI_TYPE_CREATE_F90_INTEGER
MPI_COMBINER_RESIZED MPI_TYPE_CREATE_RESIZED
If combiner is MPI_COMBINER_NAMED then datatype is a named predefined datatype.
For calls with address arguments, we sometimes need to differentiate whether the call used an integer or an address size argument. For example, there are two combiners for hvector: MPI_COMBINER_HVECTOR_INTEGER and MPI_COMBINER_HVECTOR. The former is used if it was the MPI-1 call from Fortran, and the latter is used if it was the MPI-1 call from C or C++. However, on systems where MPI_ADDRESS_KIND = MPI_INTEGER_KIND (i.e., where integer arguments and address size arguments are the same), the combiner MPI_COMBINER_HVECTOR may be returned for a datatype constructed by a call to MPI_TYPE_HVECTOR from Fortran. Similarly, MPI_COMBINER_HINDEXED may be returned for a datatype constructed by a call to MPI_TYPE_HINDEXED from Fortran, and MPI_COMBINER_STRUCT may be returned for a datatype constructed by a call to MPI_TYPE_STRUCT from Fortran. On such systems, one need not differentiate constructors that take address size arguments from constructors that take integer arguments, since these are the same. The new MPI-2 calls all use address sized arguments.
Rationale.
For recreating the original call, it is important to know if address
information may have been truncated. The MPI-1 calls from Fortran for a few
routines could be
subject to truncation in the case where the default INTEGER size is
smaller than the size of an address.
( End of rationale.)
The actual arguments used in the creation call for a datatype
can be obtained from the call:
| MPI_TYPE_GET_CONTENTS(datatype, max_integers, max_addresses, max_datatypes, array_of_integers, array_of_addresses, array_of_datatypes) | |
| IN datatype | datatype to access (handle) |
| IN max_integers | number of elements in array_of_integers (non-negative integer) |
| IN max_addresses | number of elements in array_of_addresses (non-negative integer) |
| IN max_datatypes | number of elements in array_of_datatypes (non-negative integer) |
| OUT array_of_integers | contains integer arguments used in constructing datatype (array of integers) |
| OUT array_of_addresses | contains address arguments used in constructing datatype (array of integers) |
| OUT array_of_datatypes | contains datatype arguments used in constructing datatype (array of handles) |
int MPI_Type_get_contents(MPI_Datatype datatype, int max_integers, int max_addresses, int max_datatypes, int array_of_integers[], MPI_Aint array_of_addresses[], MPI_Datatype array_of_datatypes[])
MPI_TYPE_GET_CONTENTS(DATATYPE, MAX_INTEGERS, MAX_ADDRESSES, MAX_DATATYPES, ARRAY_OF_INTEGERS, ARRAY_OF_ADDRESSES, ARRAY_OF_DATATYPES, IERROR)
INTEGER DATATYPE, MAX_INTEGERS, MAX_ADDRESSES, MAX_DATATYPES, ARRAY_OF_INTEGERS(*), ARRAY_OF_DATATYPES(*), IERROR
INTEGER(KIND=MPI_ADDRESS_KIND) ARRAY_OF_ADDRESSES(*)
void MPI::Datatype::Get_contents(int max_integers, int max_addresses, int max_datatypes, int array_of_integers[], MPI::Aint array_of_addresses[], MPI::Datatype array_of_datatypes[]) const
datatype must be a predefined unnamed or a derived datatype; the call is erroneous if datatype is a predefined named datatype.
The values given for max_integers, max_addresses, and max_datatypes must be at least as large as the value returned in num_integers, num_addresses, and num_datatypes, respectively, in the call MPI_TYPE_GET_ENVELOPE for the same datatype argument.
Rationale.
The arguments max_integers, max_addresses, and
max_datatypes allow for error checking in the call. This is
analogous to the topology calls in MPI-1.
( End of rationale.)
The datatypes returned in array_of_datatypes are handles to
datatype objects that are equivalent to the datatypes used in the
original construction call. If these were derived datatypes, then
the returned datatypes are new datatype objects, and the
user is responsible for freeing these datatypes with
MPI_TYPE_FREE.
If these were predefined datatypes, then
the returned datatype is equal to that (constant) predefined datatype
and cannot be freed.
The committed state of returned derived datatypes is undefined, i.e., the datatypes may or may not be committed. Furthermore, the content of attributes of returned datatypes is undefined.
Note that MPI_TYPE_GET_CONTENTS can be invoked with a datatype argument that was constructed using MPI_TYPE_CREATE_F90_REAL, MPI_TYPE_CREATE_F90_INTEGER, or MPI_TYPE_CREATE_F90_COMPLEX (an unnamed predefined datatype). In such a case, an empty array_of_datatypes is returned.
Rationale.
The definition of datatype equivalence implies that equivalent
predefined datatypes are equal.
By requiring the same handle for named predefined datatypes, it is
possible to use the == or .EQ. comparison operator to determine the
datatype involved.
( End of rationale.)
Advice
to implementors.
The datatypes returned in array_of_datatypes must appear to the
user as if each is an equivalent copy of the datatype used in the type
constructor call.
Whether this is done by
creating a new datatype or via another mechanism such as a reference
count mechanism is up to the implementation as long as the semantics
are preserved.
( End of advice to implementors.)
Rationale.
The committed state and attributes of the returned datatype is
deliberately left vague. The datatype used in the original
construction may have been modified since its use in the constructor
call. Attributes can be added, removed, or modified as well as having
the datatype committed. The semantics given allow for a
reference count implementation without having to track these changes.
( End of rationale.)
In the MPI-1 datatype constructor calls, the address arguments in Fortran are of type INTEGER. In the new MPI-2 calls, the address arguments are of type INTEGER(KIND=MPI_ADDRESS_KIND). The call MPI_TYPE_GET_CONTENTS returns all addresses in an argument of type INTEGER(KIND=MPI_ADDRESS_KIND). This is true even if the old MPI-1 calls were used. Thus, the location of values returned can be thought of as being returned by the C bindings. It can also be determined by examining the new MPI-2 calls for datatype constructors for the deprecated MPI-1 calls that involve addresses.
Rationale.
By having all address arguments returned in the
array_of_addresses argument, the result from a C and Fortran
decoding of a datatype gives the result in the same
argument. It is assumed that an integer
of type INTEGER(KIND=MPI_ADDRESS_KIND) will be at least as large as
the INTEGER argument used in datatype construction with the old MPI-1
calls so no loss of information will occur.
( End of rationale.)
The following defines what values are placed in each entry of the
returned arrays depending on the datatype constructor used for
datatype. It also specifies the size of the arrays needed
which is the values returned by MPI_TYPE_GET_ENVELOPE.
In Fortran, the following calls were made:
PARAMETER (LARGE = 1000) INTEGER TYPE, NI, NA, ND, COMBINER, I(LARGE), D(LARGE), IERROR INTEGER(KIND=MPI_ADDRESS_KIND) A(LARGE) ! CONSTRUCT DATATYPE TYPE (NOT SHOWN) CALL MPI_TYPE_GET_ENVELOPE(TYPE, NI, NA, ND, COMBINER, IERROR) IF ((NI .GT. LARGE) .OR. (NA .GT. LARGE) .OR. (ND .GT. LARGE)) THEN WRITE (*, *) "NI, NA, OR ND = ", NI, NA, ND, & " RETURNED BY MPI_TYPE_GET_ENVELOPE IS LARGER THAN LARGE = ", LARGE CALL MPI_ABORT(MPI_COMM_WORLD, 99) ENDIF CALL MPI_TYPE_GET_CONTENTS(TYPE, NI, NA, ND, I, A, D, IERROR)or in C the analogous calls of:
#define LARGE 1000 int ni, na, nd, combiner, i[LARGE]; MPI_Aint a[LARGE]; MPI_Datatype type, d[LARGE]; /* construct datatype type (not shown) */ MPI_Type_get_envelope(type, &ni, &na, &nd, &combiner); if ((ni > LARGE) || (na > LARGE) || (nd > LARGE)) { fprintf(stderr, "ni, na, or nd = %d %d %d returned by ", ni, na, nd); fprintf(stderr, "MPI_Type_get_envelope is larger than LARGE = %d\n", LARGE); MPI_Abort(MPI_COMM_WORLD, 99); }; MPI_Type_get_contents(type, ni, na, nd, i, a, d);The C++ code is in analogy to the C code above with the same values returned.
In the descriptions that follow, the lower case name of arguments is used.
If combiner is MPI_COMBINER_NAMED then it is erroneous to call MPI_TYPE_GET_CONTENTS.
If combiner is MPI_COMBINER_DUP then
| Constructor argument | C & C++ location | Fortran location |
| oldtype | d[0] | D(1) |
If combiner is MPI_COMBINER_CONTIGUOUS then
| Constructor argument | C & C++ location | Fortran location |
| count | i[0] | I(1) |
| oldtype | d[0] | D(1) |
If combiner is MPI_COMBINER_VECTOR then
| Constructor argument | C & C++ location | Fortran location |
| count | i[0] | I(1) |
| blocklength | i[1] | I(2) |
| stride | i[2] | I(3) |
| oldtype | d[0] | D(1) |
If combiner is MPI_COMBINER_HVECTOR_INTEGER or MPI_COMBINER_HVECTOR then
| Constructor argument | C & C++ location | Fortran location |
| count | i[0] | I(1) |
| blocklength | i[1] | I(2) |
| stride | a[0] | A(1) |
| oldtype | d[0] | D(1) |
If combiner is MPI_COMBINER_INDEXED then
| Constructor argument | C & C++ location | Fortran location |
| count | i[0] | I(1) |
| array_of_blocklengths | i[1] to i[i[0]] | I(2) to I(I(1)+1) |
| array_of_displacements | i[i[0]+1] to i[2*i[0]] | I(I(1)+2) to I(2*I(1)+1) |
| oldtype | d[0] | D(1) |
If combiner is MPI_COMBINER_HINDEXED_INTEGER or MPI_COMBINER_HINDEXED then
| Constructor argument | C & C++ location | Fortran location |
| count | i[0] | I(1) |
| array_of_blocklengths | i[1] to i[i[0]] | I(2) to I(I(1)+1) |
| array_of_displacements | a[0] to a[i[0]-1] | A(1) to A(I(1)) |
| oldtype | d[0] | D(1) |
If combiner is MPI_COMBINER_INDEXED_BLOCK then
| Constructor argument | C & C++ location | Fortran location |
| count | i[0] | I(1) |
| blocklength | i[1] | I(2) |
| array_of_displacements | i[2] to i[i[0]+1] | I(3) to I(I(1)+2) |
| oldtype | d[0] | D(1) |
If combiner is MPI_COMBINER_STRUCT_INTEGER or MPI_COMBINER_STRUCT then
| Constructor argument | C & C++ location | Fortran location |
| count | i[0] | I(1) |
| array_of_blocklengths | i[1] to i[i[0]] | I(2) to I(I(1)+1) |
| array_of_displacements | a[0] to a[i[0]-1] | A(1) to A(I(1)) |
| array_of_types | d[0] to d[i[0]-1] | D(1) to D(I(1)) |
If combiner is MPI_COMBINER_SUBARRAY then
| Constructor argument | C & C++ location | Fortran location |
| ndims | i[0] | I(1) |
| array_of_sizes | i[1] to i[i[0]] | I(2) to I(I(1)+1) |
| array_of_subsizes | i[i[0]+1] to i[2*i[0]] | I(I(1)+2) to I(2*I(1)+1) |
| array_of_starts | i[2*i[0]+1] to i[3*i[0]] | I(2*I(1)+2) to I(3*I(1)+1) |
| order | i[3*i[0]+1] | I(3*I(1)+2] |
| oldtype | d[0] | D(1) |
If combiner is MPI_COMBINER_DARRAY then
| Constructor argument | C & C++ location | Fortran location |
| size | i[0] | I(1) |
| rank | i[1] | I(2) |
| ndims | i[2] | I(3) |
| array_of_gsizes | i[3] to i[i[2]+2] | I(4) to I(I(3)+3) |
| array_of_distribs | i[i[2]+3] to i[2*i[2]+2] | I(I(3)+4) to I(2*I(3)+3) |
| array_of_dargs | i[2*i[2]+3] to i[3*i[2]+2] | I(2*I(3)+4) to I(3*I(3)+3) |
| array_of_psizes | i[3*i[2]+3] to i[4*i[2]+2] | I(3*I(3)+4) to I(4*I(3)+3) |
| order | i[4*i[2]+3] | I(4*I(3)+4) |
| oldtype | d[0] | D(1) |
If combiner is MPI_COMBINER_F90_REAL then
| Constructor argument | C & C++ location | Fortran location |
| p | i[0] | I(1) |
| r | i[1] | I(2) |
If combiner is MPI_COMBINER_F90_COMPLEX then
| Constructor argument | C & C++ location | Fortran location |
| p | i[0] | I(1) |
| r | i[1] | I(2) |
If combiner is MPI_COMBINER_F90_INTEGER then
| Constructor argument | C & C++ location | Fortran location |
| r | i[0] | I(1) |
If combiner is MPI_COMBINER_RESIZED then
| Constructor argument | C & C++ location | Fortran location |
| lb | a[0] | A(1) |
| extent | a[1] | A(2) |
| oldtype | d[0] | D(1) |
Example
This example shows how a datatype can be decoded. The routine
printdatatype prints out the elements of the datatype. Note the use
of MPI_Type_free for datatypes that are not predefined.
/* Example of decoding a datatype. Returns 0 if the datatype is predefined, 1 otherwise */ #include <stdio.h> #include <stdlib.h> #include "mpi.h" int printdatatype( MPI_Datatype datatype ) { int *array_of_ints; MPI_Aint *array_of_adds; MPI_Datatype *array_of_dtypes; int num_ints, num_adds, num_dtypes, combiner; int i; MPI_Type_get_envelope( datatype, &num_ints, &num_adds, &num_dtypes, &combiner ); switch (combiner) { case MPI_COMBINER_NAMED: printf( "Datatype is named:" ); /* To print the specific type, we can match against the predefined forms. We can NOT use a switch statement here We could also use MPI_TYPE_GET_NAME if we prefered to use names that the user may have changed. */ if (datatype == MPI_INT) printf( "MPI_INT\n" ); else if (datatype == MPI_DOUBLE) printf( "MPI_DOUBLE\n" ); ... else test for other types ... return 0; break; case MPI_COMBINER_STRUCT: case MPI_COMBINER_STRUCT_INTEGER: printf( "Datatype is struct containing" ); array_of_ints = (int *)malloc( num_ints * sizeof(int) ); array_of_adds = (MPI_Aint *) malloc( num_adds * sizeof(MPI_Aint) ); array_of_dtypes = (MPI_Datatype *) malloc( num_dtypes * sizeof(MPI_Datatype) ); MPI_Type_get_contents( datatype, num_ints, num_adds, num_dtypes, array_of_ints, array_of_adds, array_of_dtypes ); printf( " %d datatypes:\n", array_of_ints[0] ); for (i=0; i<array_of_ints[0]; i++) { printf( "blocklength %d, displacement %ld, type:\n", array_of_ints[i+1], array_of_adds[i] ); if (printdatatype( array_of_dtypes[i] )) { /* Note that we free the type ONLY if it is not predefined */ MPI_Type_free( &array_of_dtypes[i] ); } } free( array_of_ints ); free( array_of_adds ); free( array_of_dtypes ); break; ... other combiner values ... default: printf( "Unrecognized combiner type\n" ); } return 1; }


--- title: Contact description: Get in touch with us about commissions, our range or just to say hi! email<EMAIL_ADDRESS>hero: Get in touch ---
Questions about your order or our products? Want to speak to us about a commission? Want to just say hi?
Send us a message using the form below and we'll get back to you as soon as we can.


--- layout: page title: Fogo Docs --- {% include JB/setup %}
#include <hwpl/types.h>
#include <time.h>
Classes | |
| struct | loc_coord_t |
| GPS coordinate. More... | |
| struct | loc_ecef_t |
| Earth Centered Coords. More... | |
| struct | loc_velocity_t |
| Velocity (speed and direction) More... | |
| struct | loc_nav_sat_info_t |
| Satellite Info. More... | |
| struct | loc_sys_t |
| System Location Data. More... | |
| struct | loc_activity_t |
| Location activity log entry. More... | |


-
Create Your PAC File
Navigate to the Create page to get started.
Give your custom PAC file a friendly name, a description and an optional password to protect the config.
Add the URLs you wish to reach through the uncensored proxies.
Click Create
-
Share Your PAC File
The View page provides an overview of your custom PAC file.
It also allows anyone with the password to add or remove URLs from the PAC configuration.
Other users can clone the PAC file to make their own version so they can add or remove URLs without affecting the original.
-
Configure Your Browser To Use A PAC
Check the How-to section for advice on how to configure your browser to work with these PAC files.
-
Browse An Uncensored Internet - Free
You're now able to browse the Internet and should be able to reach websites that were previously censored.
ISPs are deploying more pervasive technology in order to keep up with the demands of laws such as the Data Retention and Investigatory Powers Act and the Regulation of Investigatory Powers Act. A side effect of which is the ability to perform Deep Packet Inspection which can defeat simple proxy configs.
If you still find yourself censored then visit Brass Horn Communications or SurviveTheClairePerryInter.net for more technical advice on how to defeat most ISP censorship.


mashtree
Makes a fast tree from genomes.
Does not make a phylogeny.
More information: home page
- Fastest method in mashtree to create a tree from fastq and/or fasta files using multiple threads, piping into a newick file:
mashtree --numcpus 12 *.fastq.gz *.fasta > mashtree.dnd
- Most accurate method in mashtree to create a tree from fastq and/or fasta files using multiple threads, piping into a newick file:
mashtree --mindepth 0 --numcpus 12 *.fastq.gz *.fasta > mashtree.dnd
- Most accurate method to create a tree with confidence values (note that any options for `mashtree` itself has to be on the right side of the `--`):
mashtree_bootstrap.pl --reps 100 --numcpus 12 *.fastq.gz -- --min-depth 0 > mashtree.bootstrap.dnd


| Name | : Dins Simon |
|---|---|
| Address |
: Ayathupadathu [H] Koduvely P O,685582 Thodupuzha,Idukki |
| DOB | : 06/09/1992 |
| Sex | : Male |
| Marital Status | : Married |
| Phone | : +919544757296 |
|<EMAIL_ADDRESS>|
| Course | Board/University | Percentage | Year of Passing |
| B.Tech | MG University | 85 | 2014 |
| Higher Secondary | BHSC Kerala | 93 | 2010 |
| SSLC | SSLC Kerala | 95 | 2008 |
| Firm Name | Years |
| 1. IBS SoftwareServices PVT.LTD | 2014-2018 |
| 2. Gadgeon SoftwareServices PVT.LTD | 2019-present |


Enabling/Disabling PayPal Sandbox
How to enable or disable the PayPal sandbox or test mode on the Store using the Store Admin module. Enabling the sandbox allows orders to be sent to the payment gateway without taking live transactions. This tutorial assumes PayPal has already been configured as the gateway. See "Configuring PayPal as the Payment Gateway Provider"
- Go to the Store Admin module.
- If the Store Info page isn't displayed, click the Store Info link.
- At Use PayPal Sandbox, select from the following options:
- Mark the check box to use the store in test mode only. Transactions are not live in this mode.
- Unmark the check box to begin accepting payments.
-
Click the Update button.


Kendrick Lamar Duckworth (born June 17, 1987) is an American rapper, songwriter, and record producer. Since his debut into the mainstream with Good Kid, M.A.A.D City (2012), Lamar has been regarded as one of the most influential artists of his generation, and one of the greatest rappers of all time. Aside from his solo career, he is also known as a member of the hip hop supergroup Black Hippy alongside his Top Dawg Entertainment (TDE) label-mates Ab-Soul, Jay Rock, and Schoolboy Q.
Raised in Compton, California, Lamar embarked on his musical career as a teenager under the stage name K-Dot, releasing a mixtape that garnered local attention and led to his signing with indie record label Top Dawg Entertainment. He began to gain recognition in 2010 after his first retail release, Overly Dedicated. The following year, he independently released his first studio album, Section.80, which included his debut single "HiiiPoWeR". By that time, he had amassed a large online following and collaborated with several prominent hip hop artists, including The Game, Busta Rhymes, and Snoop Dogg.
Lamar's major label debut album, Good Kid, M.A.A.D City, was released in 2012 to critical acclaim. It was later certified Platinum by the Recording Industry Association of America (RIAA). His third album To Pimp a Butterfly (2015) incorporated elements of funk, soul, jazz, and spoken word. It became his first number one album on the Billboard 200, and was the most acclaimed album of the 2010s. It was followed by Untitled Unmastered (2016), a collection of unreleased demos that originated during the recording sessions for To Pimp a Butterfly. He released his fourth album, Damn (2017) to further acclaim; its lead single "Humble" topped the US Billboard Hot 100, while the album became the first non-classical and non-jazz album to be awarded the Pulitzer Prize for Music.
Lamar has received many accolades over the course of his career, including 13 Grammy Awards, two American Music Awards, five Billboard Music Awards, a Brit Award, 11 MTV Video Music Awards, a Pulitzer Prize, and an Academy Award nomination. In 2012, MTV named him the Hottest MC in the Game on their annual list. Time named him one of the 100 most influential people in the world in 2016. In 2015, he received the California State Senate's Generational Icon Award.
|
Overly Dedicated 2010 Top Dawg |
Section.80 2011 Top Dawg |
|
Good Kid, M.A.A.D City 2012 Aftermath |
To Pimp a Butterfly 2015 Aftermath |
Untitled Unmastered 2016 Aftermath |
DAMN 2017 Aftermath |


Counter-Strike: Global Offensive (CS:GO) is a multiplayer first-person shooter video game developed by Hidden Path Entertainment and Valve Corporation. Similar to previous Counter-Strike games, Global Offensive is an objective-based multiplayer first-person shooter. Players play as Terrorists or Counter Terrorists, and must complete objectives while attempting to eliminate the enemy team.
Learn Moreosu! is a freeware rhythm game developed by Dean "peppy" Herbert. Game levels are called beatmaps. In each beatmap, a song will play and different Beats hit elements (hit circles, sliders and spinners) will appear on the play field. Players must use a pointing device to manipulate these elements in time with the playing song's rhythm in order to earn points. The use of a graphics tablet in combination with a keyboard is common in osu!, although some players do use a mouse.
Learn MoreLeague of Legends (abbreviated LoL) is a multiplayer online battle arena video game. In League of Legends, players assume the role of an unseen "summoner" that controls a "champion" with unique abilities and battle against a team of other players or computer-controlled champions. The goal is usually to destroy the opposing team's "nexus", a structure which lies at the heart of a base protected by defensive structures.
Learn More


{% extends 'base.html' %} {% block title %}{{ block.super }}: Overview{% endblock %} {% block progress %}{% include "partials/dashnav.html" with active_page=active_page %}{% endblock %} {% block content %}
Ask the registry staff when and how you should check in to find out if a judge has looked at your divorce document and has granted your divorce.
The divorce will become effective on the 31st day after the order has been signed by the judge. This doesn't mean the 31st day of that month. It means that from the date the judge signed your order, you count 31 days. On the 31st day, your divorce becomes final. For example, if your divorce was granted on September 15, your divorce will become effective on October 16.
You can't remarry until your divorce has been granted (that is, not until 31 days after the divorce order has been signed by the judge).


Talk Selection
You can create a selection committee that will decide the final agenda. This page explains how to compose the selection committee and the mechanics of the selection process.
Forming a selection committee
Simple events with a small number of proposals typically rely on one person that hand-picks the talks for the agenda, but for more complex events with hundreds of proposals you may need to put together a committee.
To invite a set of users to the selection committee of a request for proposals:
-
Go to the edit page of your event.
-
Select the Request for proposals tab and click on the R4P.
-
Select the Edit » Selection committee tab.
-
Introduce the uuid of the user that you want to add to the committee. You can add as many members as needed.
- To save your changes, click the Save button.
The new members will receive an e-mail with instructions to participate in the talk selection process.
Selecting talks
Every member of the selection committee can open the R4P page and vote their preferred talks with a rating between 1 and 5.
While voting, you can filter the list of talk proposals by free text (searching by talk title, description, or username/bio), by state, speaker gender, or by any category assigned by you when creating the R4P. You can also sort the talks by creation date or by rating.
Once the committee has finished voting, select “Rating” and “Descending” in the Sort by drop down to see the talks with the highest rating first. To download the list of talk proposals, click the Download as CSV button.
Diversity
For some events, composing a diverse agenda requires lots of effort. Koliseo can help by filtering proposals by gender of the speaker (male, female, other or non-disclosed).
To filter talks, pick a value from the Gender drop down. The filter will only display proposals with at least one speaker of the selected gender.
The platform will deduce the gender of the speaker automatically from their first name, but the speaker can override it in their User Edit Page.
Talk state
Each talk can be in one of four states:
- Not selected: This is the default state of a talk that has just been submitted.
- Selected: Talks with this state are available when defining the final agenda. To toggle the Selected state of a talk, click the Selected / Not selected link in the talk.
- Assigned: These are talks that have been assigned a slot in the agenda.
- Waitlisted: The talk is in a waitlist, intended to be included in the agenda when a spot becomes available.
Sending E-mail
You can send communications from the R4P page.
- In the form on top, click on the Selected tag to filter only selected talks.
- Click the E-mail button.
- Select “Accepted talk” in the Template drop-down to display a predefined template to send to the selected speakers.
- Modify the subject and body of the message as needed and click the Send e-mails button.
The form displays the number of users that will receive this e-mail when sent. For talks with multiple speakers, each speaker will receive a copy of the message.
You can use notifications at any point in the lifecycle of the R4P, like to send notifications about the assigned track and time, for example. To this purpose, you can use the following variables in the subject and body of the message:
| Parameter | Attributes | Description |
|---|---|---|
event |
name , uuid |
The information of the event associated with this R4P. |
talk |
title , description , state |
The information of the talk. |
day , track , slot |
name |
The assigned day, track and slot (for talks already in the agenda) |


Magic words:
Some interesting flags (to see all, use -h
or
--help
depending on your psql version): - -E
:
will describe the underlaying queries of the \
commands (cool
for learning!) - -l
: psql will list all databases and then
exit (useful if the user you connect with doesn’t has a default database,
like at AWS RDS)
Most \d
commands support additional param of
__schema__.name__
and accept wildcards like *.*
\?
: Show help (list of available commands with an
explanation)
\q
: Quit/Exit\c __database__
: Connect to a database\d __table__
: Show table definition (columns, etc.)
including triggers
\d+ __table__
: More detailed table definition including
description and physical disk size
\l
: List databases\dy
: List events\df
: List functions\di
: List indexes\dn
: List schemas\dt *.*
: List tables from all schemas (if
*.*
is omitted will only show SEARCH_PATH ones)
\dT+
: List all data types\dv
: List views\dx
: List all extensions installed\df+ __function__
: Show function SQL code.\x
: Pretty-format query results instead of the
not-so-useful ASCII tables
\copy (SELECT * FROM __table_name__) TO 'file_path_and_name.csv' WITH
CSV
: Export a table as CSV
\des+
: List all foreign servers\dE[S+]
: List all foreign tables\! __bash_command__
: execute
__bash_command__
(e.g. \! ls
)
User Related: - \du
: List users -
\du __username__
: List a username if present. -
create role __test1__
: Create a role with an existing
username. -
create role __test2__ noinherit login password __passsword__;
: Create a role with username and password. -
set role __test__;
: Change role for current session to
__test__
. - grant __test2__ to __test1__;
: Allow
__test1__
to set its role as __test2__
. -
\deu+
: List all user mapping on server
sudo service postgresql stop
sudo service postgresql start
sudo service postgresql restart
sudo vim /etc/postgresql/9.3/main/postgresql.conf
# Uncomment/Change inside:
log_min_messages = debug5
log_min_error_statement = debug5
log_min_duration_statement = -1
sudo service postgresql restart
tail -f /var/log/postgresql/postgresql-9.3-main.log
postgresql.conf
):
log_line_prefix = '%t %u %d %a '
Check Extensions enabled in postgres:
SELECT * FROM pg_extension;
Show available extensions:
SELECT * FROM pg_available_extension_versions;
There are many CREATE
choices, like
CREATE DATABASE __database_name__
,
CREATE TABLE __table_name__
… Parameters differ but can be
checked
at the official documentation.
SELECT * FROM pg_proc WHERE proname='__procedurename__'
:
List procedure/function
SELECT * FROM pg_views WHERE viewname='__viewname__';
: List
view (including the definition)
SELECT
pg_size_pretty(pg_total_relation_size('__table_name__'));
: Show DB table space in use
SELECT pg_size_pretty(pg_database_size('__database_name__'));
: Show DB space in use
show statement_timeout;
: Show current user’s statement
timeout
SELECT * FROM pg_indexes WHERE tablename='__table_name__' AND
schemaname='__schema_name__';
: Show table indexes
SELECT
t.relname AS table_name,
i.relname AS index_name,
a.attname AS column_name
FROM
pg_class t,
pg_class i,
pg_index ix,
pg_attribute a,
pg_namespace n
WHERE
t.oid = ix.indrelid
AND i.oid = ix.indexrelid
AND a.attrelid = t.oid
AND a.attnum = ANY(ix.indkey)
AND t.relnamespace = n.oid
AND n.nspname = 'kartones'
ORDER BY
t.relname,
i.relname
SELECT datname, application_name, pid, backend_start, query_start, state_change, state, query
FROM pg_stat_activity
WHERE datname='__database_name__';
SELECT
pg_stat_get_backend_pid(s.backendid) AS procpid,
pg_stat_get_backend_activity(s.backendid) AS current_query
FROM (SELECT pg_stat_get_backend_idset() AS backendid) AS s;
SELECT datname, numbackends FROM pg_stat_database;
Casting: - CAST (column AS type)
or
column::type
- '__table_name__'::regclass::oid
:
Get oid having a table name
Query analysis: - EXPLAIN __query__
: see the query plan for
the given query - EXPLAIN ANALYZE __query__
: see and execute
the query plan for the given query - ANALYZE [__table__]
:
collect statistics
Generating random data (source): -
INSERT INTO some_table (a_float_value) SELECT random() * 100000 FROM
generate_series(1, 1000000) i;
Get sizes of tables, indexes and full DBs:
select current_database() as database,
pg_size_pretty(total_database_size) as total_database_size,
schema_name,
table_name,
pg_size_pretty(total_table_size) as total_table_size,
pg_size_pretty(table_size) as table_size,
pg_size_pretty(index_size) as index_size
from ( select table_name,
table_schema as schema_name,
pg_database_size(current_database()) as total_database_size,
pg_total_relation_size(table_name) as total_table_size,
pg_relation_size(table_name) as table_size,
pg_indexes_size(table_name) as index_size
from information_schema.tables
where table_schema=current_schema() and table_name like 'table_%'
order by total_table_size
) as sizes;
COPY table_name [ ( column_name [, ...] ) ]
FROM { 'filename' | STDIN }
[ [ WITH ] ( option [, ...] ) ]
COPY { table_name [ ( column_name [, ...] ) ] | ( query ) }
TO { 'filename' | STDOUT }
[ [ WITH ] ( option [, ...]
Available on the APT repository from apt.postgresql.org
.
SELECT inet_server_addr();
hostname:port:database:username:password
):
chmod 600 ~/.pgpass
ANALYZE VERBOSE;
EXPLAIN
,
EXPLAIN ANALYZE
, VACUUM
, configuration
parameters and more. Quite interesting if you need to tune-up a postgres
setup.
psql -c "\l+" -H -q postgres > out.html
: Generate a html
report of your databases (source:
Daniel Westermann)


Atoms are essentially the individual html elements. Most of these are not too useful by themselves, except maybe for user entered content. Things to get into this pattern library:
home / global
- Hero banner
- logo slider
- featured work slider
- featured work slide
- drunk stone henge?
- Newsletter sign up (input combo?)
- big quote
- Static image bg panel
/about
- /our-team
- /alliances-partnerships
- /careers
- /delphic-dna
/work
- hub page
- client hub
- project
- /client-list
/services
- textured header
- Grey box thing
- Link grid
- Interested banner
/blog
- post list page
- post detail page
- category list page?


Turma 19
O que é a Aceleradora Ágil?
Lorem ipsum is simply dummy text of the printing and typesetting industry. Lorem ipsum has been the industry´s standard dummy text ever since the 1500s, when an unknown pinter t
Lorem ipsum is simply dummy text of the printing and typesetting industry. Lorem ipsum has been the industry´s standard dummy text ever since the 1500s, when an unknown pinter t


Angular 2 Form with file upload to file system, image path stored to Mongo. Project is built using the MEA2N/MEAN2 stack. This project could be used as an angular2-seed.
TODO
- Resize the image client-side in order to reduce bandwidth of the server.
- Edit users in admin area
- User Profile page
Angular 2 Form
This project was generated with angular-cli version 1.0.0-beta.21.
The goal of this project is to submit a form with one file upload and two text fields. The form is submitted to back end, the file is stored in the uploadsFolder
and then the file path/url is stored in MongoDB among the two text fields. At the end, the form ID is assinged to the signed in user ID (via Ref) for later viewing all the form fields and file in the front end.
Prerequisites
- MongoDB installed and running (http://mongodb.org)
- Node.js and NPM installed (http://nodejs.org)
- ImageMagick or GraphicsMagick installed, more info in gm page on how to install depending your Operating System. If installing ImageMagick on Windows, please check "Install Legacy Utitities (e.g. convert") during installation otherwise node will report errors.
Specs
- User login/signup using JSON Web Token (jwt)
- User password reset via email (nodemailer & SendGrid)
- Toastr Notifications (& Error Handling)
- Multipart form submission with image preview before upload (some of the upload logic is taken from primeng ui).
- Storing images to file system
- Storing image path to MongoDB among text fields
- Triple check if image is actually a file by checking it's mime type in both back end and in front end (
gm
in back end checks if file is an image too by reading first bytes of the file, need to fix this to not allow form to be submitted at all) - Double check for the image size in both back end and front end, file limit now is 5.000.000 bytes (5MB)
- Image resize server side using GraphicsMagick
- Form deletion among the file from filesystem, user forms array is updated too.
- Edit form, user can edit the text inputs and the image or update only the image or update only the text fields.
- Admin area, admin can edit or delete all forms in database
Packages Used
Angular-cli v1.0.0-beta.21
Angular v2.2.4
Webpack
Node v6.9.1
MongoDB v3.2.10
Mongoose v4.7.1
Express v4.14.0
angular2-jwt v0.1.25
(only for checking the expiration date of the jwt token and the user role (admin or user))
jsonwebtoken v7.1.9
Multer v1.2.0
ng2-toastr v1.3.2
ng2-progress-bar 0.0.5
gm v1.23.0
BootStrap 3
(css is included in assets
folder)
Font Awesome
(css is included in assets
folder)
Glyphicons
(found in fonts
folder under assets
)
Installing Dependecies
- Clone this repo from Git
- Run
npm install
in your command line. - Edit
config.js
in/server/config
folder. - Run
node seed.js
to insert the admin user. Admin email<EMAIL_ADDRESS>and password istestpass
. Make sure mongod is running. - After login navigate to
localhost:3000/#/admin
to access admin panel.
Building the Angular2 app
Run ng build
A new dist
folder will be created with all files needed to run the Angular 2 app in front end.
If you want to make changes on the Angular2 app and auto-refresh the dist
folder then run the following command in your terminal:
ng build --watch
Running the server
Run npm start
If you want to make changes on the Server and auto refresh the back end code then run: nodemon npm start
. If you don't have nodemon installed, run npm install nodemon -g
.
Viewing the App
Open your favourite web browser and point to http://localhost:3000
Enjoy!
Help with angular-cli
To get more help on the angular-cli
use ng --help
or go check out the Angular-CLI README.


To launch The Studio, you should use the desktop shortcut provided for you when you installed the application. The shortcut is a wrapper around a Windows batch script that configures the environment required to run The Studio. If you used the installation defaults, then the batch script can be found at "C:\Program Files\WizzerWorks\MagicLanternJava2DStudio\mlejava2dstudio.bat". Figure 1.1 shows the icon for the mlejava2dstudio.bat shortcut.
Figure 1.1: Magic Lantern Java2D Studio Desktop Shortcut
Double-click on this icon to launch the Magic Lantern Java2D Studio. If you are running The Studio for the first time, then the application should look like this (Figure 1.2)
Figure 1.2: Start-up Window for Magic Lantern Java2D Studio
Note: An altenative way to launch The Studio would be to use the menu entry found in the main Windows Start Menu. Selecting "Start->All Programs->Magic Lantern->Magic Lantern Java2d Studio" will also execute the mlejava2dstudio.bat script, launching the application.
The studio starts up in the Magic Lantern perspective. The perspective is a collection of utilities used to develop Magic Lantern titles. The developer will navigate between the Magic Lantern, Java and Debug perspecitives during title development, depending upon the activity he/she is involved with. For example, the Magic Lanter perspective provides utiities for developing and validating Digital Workprints. The Java perspecitve, however, is a better environment for writing the Java title and Actor code. The Debug perspective facilitates source-level debugging.
The first task in writing a Java2D title is to create a new Magic Lantern Project. This task will establish a Java project containing the build environment and dependencies for compiling your new title. More details can be found here, Creating a Magic Lantern Project.


Pipelines¶
Automation helps us speed those manual boring tasks. The ability to automate means you can spend time working on other more thought-intensive projects.
Automation adds monitoring and logging tasks:
| ✅ Easy to automate | ❌ Difficult to automate | | ————————————– | ——————————– | | Regularly scheduled reports | One-off or non-scheduled tasks | | Clear success/failure outcomes | Unclear success/failure outcomes | | Input that can be handled via machines | Requires deeper human input |
Steps to automation¶
Whenever you consider automating a task ask the following questions:
When should this task begin?
Does this task have a time limit?
What are the inputs for this task?
What is success or failure within this task? (How can we clearly identify the outcomes?)
If the task fails what should happen?
What does the task provide or produce? In what way? To whom?
What (if anything) should happen after the task concludes?
Top tip
If your project is too large or loosely defined, try breaking it up into smaller tasks and automate a few of those tasks. Perhaps your task involves a report which downloads two datasets, runs cleanup and analysis, and then sends the results to different groups depending on the outcome. You can break this task into subtasks, automating each step. If any of these subtasks fail, stop the chain and alert the whoever is responsible for maintaining the script so it can be investigated further.What is a data pipeline?¶
Roughly this is how all pipelines look like:
they consist mainly of three distinct parts: data engineering processes, data preparation, and analytics. The upstream steps and quality of data determine in great measure the performance and quality of the subsequent steps.
Why do pipelines matter?¶
Analytics and batch processing is mission-critical as they power all data-intensive applications
The complexity of the data sources and demands increase every day
A lot of time is invested in writing, monitoring jobs, and troubleshooting issues.
This makes data engineering one of the most critical foundations of the whole analytics cycle.
Good data pipelines are:¶
Reproducible: same code, same data, same environment -> same outcome
Easy to productise: need minimal modifications from R&D to production
Atomic: broken into smaller well-defined tasks
When working with data pipelines always remember these two statements:
As your data engineering and data quality demands increase so does the complexity of the processes. So more often than not you will eventually need a workflow manager to help you with the orchestration of such processes.
GNU Make + Unix pipes + Steroids
⭐ Creating your first ETL pipeline in Python¶
Setting your local database¶
Let’s us access your local MySQL from the command line, type the following on the command line:
MySQL -u root -p
followed by your MySQL password (this was done as part of your setup)
you should see the following message as well as a change in your prompt:
Welcome to the MySQL monitor. Commands end with; or \g.
Your MySQL connection id is 276
Server version: 8.0.15 Homebrew
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
To see the existing databases you can use the following command:
SHOW DATABASES
you can also see the users and the relevant hosts using the following command
SELECT user, host FROM mysql.user;
We will need to create a new database for the following sections. So let’s start by creating a new database called airflowdb
:
CREATE DATABASE airflowdb CHARACTER SET utf8 COLLATE utf8_unicode_ci;
as well as creating a corresponding user:
CREATE USER 'airflow'@'localhost' IDENTIFIED BY 'password';
make sure to substitute password
with an actual password.
For this tutorial let’s assume the password is python2019
.
Now we need to make sure that the airflow
user has access to the databases:
GRANT ALL PRIVILEGES ON *.* TO 'airflow'@'localhost';
FLUSH PRIVILEGES;
If you want to restrict the access of this user to the airflowdb
database, for example, you can do it via:
GRANT ALL PRIVILEGES ON airflowdb.* To 'airflow'@'localhost';
FLUSH PRIVILEGES;
so now the output of SELECT user, host FROM mysql.user;
should look like this:
mysql> select user, host FROM mysql.user;
+------------------+-----------+
| user | host |
+------------------+-----------+
| airflow | localhost |
| mysql.infoschema | localhost |
| mysql.session | localhost |
| mysql.sys | localhost |
| root | localhost |
+------------------+-----------+
5 rows in set (0.00 sec)
if you need to remove a user you can use the following command:
DROP USER '<username>'@'localhost' ;
🚦Checking connection to the database from Python¶
The following snippet will allow you to connect to the created database from Python:
Note that you need the database name, password, and user for this.
# Script to check the connection to the database we created earlier airflowdb
# importing the connector from mysqlclient
import mysql.connector as mysql
# connecting to the database using the connect() method
# it takes 3 parameters: user, host, and password
dbconnect = mysql.connect(host="localhost",
user="airflow",
password="python2019",
db="airflowdb")
# print the connection object
print(dbconnect)
# do not forget to close the connection
dbconnect.close()
dbconnect
is a connection object which can be used to execute queries, commit transactions and rollback transactions before closing the connection. We will use it later.
The dbconnect.close()
method is used to close the connection to database. To perform further transactions, we need to create a new connection.
Streaming Twitter data into the database¶
We are going to create a Python script that helps us to achieve the following:
Create a class to connect to the Twitter API
Connect our database and reads the data into the correct columns
We will be using the Tweepy library for this (docs here https://tweepy.readthedocs.io/en/latest/) .
Let’s start with an example to collect some Tweets from your public timeline (for details on the Tweet object visit the API docs)
🚦 The first step will be to create a config file (config.cfg
) with your Twitter API tokens.
[twitter]
consumer_key = xxxxxxxxxxxxxxxxxx
consumer_secret = xxxxxxxxxxxxxxxxxx
access_token = xxxxxxxxxxxxxxxxxx
access_token_secret = xxxxxxxxxxxxxxxxxx
Now to the coding bits:
# Import libraries needed
from configparser import ConfigParser
from pathlib import Path
import tweepy
# Path to the config file with the keys make sure not to commit this file
CONFIG_FILE = Path.cwd() / "config.cfg"
config = ConfigParser()
config.read(CONFIG_FILE)
# Authenticate to Twitter
auth = tweepy.OAuthHandler(
config.get("twitter", "consumer_key"), config.get("twitter", "consumer_secret")
)
auth.set_access_token(
config.get("twitter", "access_token"), config.get("twitter", "access_token_secret")
)
# Create Twitter API object
twitter = tweepy.API(auth)
# let's collect some of the tweets in your public timeline
public_tweets = twitter.home_timeline()
for tweet in public_tweets:
print(tweet.text)
🚦 Create a new table¶
Let us create a folder called etl-basic
and a stream_twitter.py
script in it.
We are going to create a SQL table to save the tweets to. This table will contain the following:
username
tweet content
time of creation
retweet count
unique tweet id
This corresponds to 5 columns and the primary key.
We already know how to connect to a database:
from mysql import connector as mysql
# Details for our MySql connection
DATABASE = {
"host": "localhost",
"user": "airflow",
"password": "python2019",
"db": "airflowdb",
}
# ----------------------------------------------
# Database related functions
# ----------------------------------------------
def connect_db(my_database):
"""Connect to a given my_database
Args:
my_database(dict): dictionary with the my_database details
Returns:
dbconnect: MySql my_database connection object
"""
try:
dbconnect = mysql.connect(
host=my_database.get("host"),
user=my_database.get("user"),
password=my_database.get("password"),
db=my_database.get("db"),
)
print("connected")
return dbconnect
except mysql.Error as e:
print(e)
Now we need to write a function to create the table
def create_table(my_database, new_table):
"""Create new table in a my_database
Args:
my_database (dict): details for the db
new_table (str): name of the table to create
"""
dbconnect = connect_db(my_database)
# create a cursor for the queries
cursor = dbconnect.cursor()
cursor.execute("USE airflowdb")
# here we delete the table, it can be kept or else
cursor.execute(f"DROP TABLE IF EXISTS {new_table}")
# these matches the Twitter data
query = (
f"CREATE TABLE `{new_table}` ("
" `id` INT(11) NOT NULL AUTO_INCREMENT,"
" `user` varchar(100) NOT NULL ,"
" `created_at` timestamp,"
" `tweet` varchar(255) NOT NULL,"
" `retweet_count` int(11) ,"
" `id_str` varchar(100),"
" PRIMARY KEY (`id`))"
)
cursor.execute(query)
dbconnect.close()
cursor.close()
return print(f"Created {new_table} table")
🚦 Collect Tweets¶
The Twitter Streaming API has rate limits and prohibits too many connection attempts happening too quickly. It also prevents too many connections being made to it using the same authorization keys. Thankfully, tweepy takes care of these details for us, and we can focus on our program.
The main thing that we have to be aware of is the queue of tweets that we’re processing. If we take too long to process tweets, they will start to get queued, and Twitter may disconnect us. This means that processing each tweet needs to be extremely fast.
Let’s us transform the connection script we created before:
# Import libraries needed
import json
import time
from configparser import ConfigParser
from pathlib import Path
import tweepy
from dateutil import parser
from mysql import connector as mysql
# Path to the config file with the keys make sure not to commit this file
CONFIG_FILE = Path.cwd() / "config.cfg"
def connectTwitter():
config = ConfigParser()
config.read(CONFIG_FILE)
# complete the part to Authenticate to Twitter
# Create Twitter API object
twitter = tweepy.API(auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True)
print(f"🦄 Connected as {twitter.me().screen_name}")
return twitter
The next step is to create a stream listener.
The StreamListener
class has a method called on_data. This method will automatically figure out what kind of data Twitter sent, and call an appropriate method to deal with the specific data type. It’s possible to deal with events like users sending direct messages, tweets being deleted, and more.
class customListener(tweepy.StreamListener):
"""We need to create an instance of the Stream Listener
http://docs.tweepy.org/en/v3.4.0/streaming_how_to.html
"""
def on_error(self, status_code):
if status_code == 420:
# returning False in on_data disconnects the stream
return False
def on_status(self, status):
print(status.text)
return True
def on_data(self, data):
"""
Automatic detection of the kind of data collected from Twitter
This method reads in tweet data as JSON and extracts the data we want.
"""
try:
# parse as json
raw_data = json.loads(data)
# extract the relevant data
if "text" in raw_data:
user = raw_data["user"]["screen_name"]
created_at = parser.parse(raw_data["created_at"])
tweet = raw_data["text"]
retweet_count = raw_data["retweet_count"]
id_str = raw_data["id_str"]
# insert data just collected into MySQL my_database
populate_table(user, created_at, tweet, retweet_count, id_str)
print(f"Tweet colleted at: {created_at}")
except Error as e:
print(e)
🚦 In pairs discuss how you would create the populate_table
function
def populate_table(
user, created_at, tweet, retweet_count, id_str, my_database=DATABASE
):
"""Populate a given table witht he Twitter collected data
Args:
user (str): username from the status
created_at (datetime): when the tweet was created
tweet (str): text
retweet_count (int): number of retweets
id_str (int): unique id for the tweet
"""
dbconnect = connect_db(DATABASE)
cursor = dbconnect.cursor()
cursor.execute("USE airflowdb")
# add content here
try:
# what is missing?
commit()
print("commited")
except mysql.Error as e:
print(e)
dbconnect.rollback()
cursor.close()
dbconnect.close()
return
🚦 For this to be called we need to wrap around a main function:
# complete the main function
if __name__ == "__main__":
create_table(DATABASE, "tweets")
# first we need to authenticate
twitter = connectTwitter()
# next: create stream listener
myStreamListener = customListener()
myStream = tweepy.Stream(auth=twitter.auth, listener=myStreamListener, timeout=30)
# stream tweets using the filter method
start_stream(myStream, track=["python", "pycon", "jupyter", "#pycon2019"], async=True)
📝 Solutions at: https://github.com/trallard/airflow-tutorial/solutions
Extending your data pipeline¶
🚀 So far we have collected some data through streaming (enough to collect some data). And created a database where this data is going to be deposited into.
The next step is to transform the data and prepare it for more downstream processes.
There are different mechanisms to share data between pipeline steps:
files
databases
queues
In each case, we need a way to get data from the current step to the next step.
🚦 The next step would be to add some ‘transformation’ steps to the data set.
Modify your stream_twitter.py
so that the table contains also: language, follower count and country.
Now let’s create a script called analyse_twitter.py
This script will do the following:
Load the table into a pandas dataframe
Clean the data: lowercase usernames, remove RT
Create a plot from the data
Save the plot and a csv with the clean data
import os
import os.path
import re
from datetime import datetime
from pathlib import Path
import matplotlib.pyplot as plt
import mysql.connector as mysql
import pandas as pd
# import the previously created functions
from stream_twitter import connect_db
# Details for our MySql connection
DATABASE = {
"host": "localhost",
"user": "airflow",
"password": "python2019",
"db": "airflowdb",
}
# ----------------------------------------------
# Database related functions
# ----------------------------------------------
def sql_to_csv(my_database, my_table):
dbconnect = connect_db(my_database)
cursor = dbconnect.cursor()
query = f"SELECT * FROM {table}"
all_tweets = pd.read_sql_query(query, dbconnect)
if os.path.exists("./data"):
all_tweets.to_csv("./data/raw_tweets.csv", index=False)
else:
os.mkdir("./data")
all_tweets.to_csv("./data/raw_tweets.csv", index=False)
def sql_to_df(my_database, my_table):
dbconnect = connect_db(my_database)
cursor = dbconnect.cursor()
query = f"SELECT * FROM {my_table}"
# store in data frame
df = pd.read_sql_query(query, dbconnect, index_col="id")
cursor.close()
dbconnect.close()
return df
# ----------------------------------------------
# Data processing
# ----------------------------------------------
def clean_data(df):
# Make all usernames lowercase
clean_df = df.copy()
clean_df["user"] = df["user"].str.lower()
# keep only non RT
clean_df = clean_df[~clean_df["tweet"].str.contains("RT")]
return clean_df
def create_plots(df):
x = df["language"].unique()
fig, ax = plt.subplots()
countries = df["language"].value_counts()
plt.bar(range(len(countries)), countries)
fig.suptitle("Language counts")
plt.xlabel("languages")
plt.ylabel("count")
ax.set_xticklabels(x)
if os.path.exists("./plots"):
fig.savefig("./plots/barchart_lang.png")
else:
os.mkdir("./plots")
fig.savefig("./plots/barchart_lang.png")
def save_df(df):
today = datetime.today().strftime("%Y-%m-%d")
if os.path.exists("./data"):
df.to_csv(f"./data/{today}-clean-df.csv", index=None)
else:
os.mkdir("./data")
df.to_csv(f"./data/{today}-clean-df.csv", index=None)
if __name__ == "__main__":
df = sql_to_df(DATABASE, "tweets_long")
print("Database loaded in df")
clean_df = clean_data(df)
create_plots(clean_df)
save_df(clean_df)
🚦In pairs discuss:
How would you run the two scripts together?
Try and create the pipeline:
stream_twitter.py
->analyse_twitter.py


Modifying ADIDNS Zones
The first involves using the RPC based management tools. These tools generally require a DNS administrator or above so I won’t bother describing their capabilities.


2 Poems
Solar intoxication: Paralyzed, Poolsidehallucination state of a lady lioness-ing
kinky hair billowing wind
blazing heat friction
tussled
behind a static face that
murmurs
under rumbled
breathes fire
burns on the flesh
become a flash forward
wired
receiver of stimulants
electrified in follicles,
fuel of dual fools
who stand blank for ground
like no earth could ever thunder
storm wind
conditions
for a mammal born with fins
to water splash on land mass,
never
believe in what you want
forget in what you need
play contradictions
with what you begotten
while you pipe dream
forty winks
floating (wars) past
landscapes pullulate
underground fates
above
solar intoxication
brain chemistry
mutation
begins
below
whiskers, wish, weep, worship
feline, faith, fortune, forever ---
metamorphosis moves backward the rhythm of logic, lost to the talktrack of ‘you’ and ‘i’;
finally, ‘i’ rowr like ’respect me’ means a head o’ hair tossed to the (memory of) lady lioness:
brush me & i will claw you out (of memory). icon of grass grazing, i seek to mime / mimic your
beauty; my failure is your fall. so i hunt your wild in words.
Nevereverland Notes on (de)Tethered Togetherness
1. Fluidity of friction is a (con)sensual (con)tradiction. For ‘we’ need to be one and other in order to organize across oceans. The one sees all the same sea, but must free messages to distant spirits floating beyond bridge of me-we-being. To do so requires fine signal reception. Therefore everything visible operates as symbol, like flesh and fabric of skin, foretelling futures for kin lines to come. [Theory of Scattered Islands]

2.  You! Lose! You!" You and I know not each other’s equal in narrative of evolution. [So they say.]

3. (Is) there (is) no fictional fulcrum? No median, only illusionary media? No heaven, nor hell; no afterlife, only allegory. No Atlantis, only Disneyland. No Delphi, only steel towers. No Shambala, only corporate liberal arts colleges. No Eden, only communist compounds. No nightmares, only Dreamtime. [Figment imagination]


RGen is a framework for Model Driven Software Development (MDSD)in Ruby. This means that it helps you build Metamodels, instantiate Models, modify and transform Models and finally generate arbitrary textual content from it.
RGen features include:
-
Supporting Ruby 1.8.6, 1.8.7 and 1.9.x
-
Metamodel definition language (internal Ruby DSL)
-
ECore Meta-metamodel with an ECore instance available for every Metamodel
-
Generator creating the Ruby metamodel definition from an ECore instance
-
Transformer creating Ruby metamodel classes/modules from an ECore instance
-
Instantiation of Metamodels, i.e. creation of Models (e.g. from XML)
-
Model builder, internal Ruby DSL
-
Model fragmentation over several several files and per-fragment caching
-
Model Transformation language (internal Ruby DSL)
-
Powerful template based generator language (internal Ruby DSL inside of ERB)
-
UML 1.3 metamodel and XMI 1.1 instantiator included
-
ECore XML support (XMI 2.0)
-
UML-to-ECore and ECore-to-UML transformation (UML class models)
-
Enterprise Architect support (UML1.3/XMI1.1)
Download
Get the latest release from Github: github.com/mthiede/rgen
Installation
Install RGen as a Ruby gem:
gem install rgen
Running the Tests
Change to the 'test' folder and run the test suite:
cd test ruby rgen_test.rb
Documentation
RDoc documentation is available at Github: mthiede.github.com/rgen/
Find the main documentation parts for:
Examples
There are several examples of using RGen within the framework itself.
Metamodel Definition:
lib/rgen/ecore/ecore.rb lib/metamodels/uml13_metamodel.rb
Instantiation:
lib/rgen/instantiator/xmi11_instantiator.rb lib/rgen/instantiator/ecore_xml_instantiator.rb
Transformations:
lib/rgen/ecore/ruby_to_ecore.rb lib/transformers/uml13_to_ecore.rb
Generators:
lib/mmgen/metamodel_generator.rb
License
RGen is released under the MIT license.


{% extends "clan/prem_trial.html" %}
{% block msg_already_used %}
Clan [{{clan.5}}] has already used the free premium trial period.
{% endblock %}
{% block msg_base_activate %}
You can activate trial period for 24 hours of the Premium plan for clan
{% endblock %}
{% block msg_need_clanadmin %}
Leader or vice-leader [{{clan.5}}] can activate the trial period for 24 hours of the Premium plan by visiting this page (requires authorization via Wargaming OpenID)
{% endblock %}
{% block msg_base_improvements %}
Premium plan include all abilities of the base plan.
In addition, the premium plan allows you:
{% include "de/text_prem.html" %}
{% endblock %}


Don't let it's quaint appearance fool you - TerraDorna combines beautiful Texas hill country with a modern and high-tech reception floor.
Accomodations are at Sleep Inn and Suites in Austin on Highway 290 East. Mention that you're reserving for the wedding when you make your reservation!


--- layout: home title: Icon Sets permalink: /icon-sets/ ---
This page contains a collection of icon sets that you might find useful when designing your own layouts.
{{ icons.content }}


Arduino in the Classroom
This past fall I took on an adventure I wasn’t sure either I or my kids would be ready for. I started a club for electronics and programming using an Arduino in middle school. If you’re not familiar an Arduino is a micro-controller with a programmable board and a variety of inputs and outputs. The challenge with an Arduino is that it doesn’t have a traditional operating system of any form, and relies completely upon the tinkerer to prototype and get everything set up appropriately. You have to know about voltages and I/O pins, and even a bit of programming to get one set up the right way. This is challenging for adults, much less middle school students.
As a club, we would only meet 1x each week for an hour after school during 10 sessions, which is not a lot to get familiar with the intricacies of the C++ programming language and electronics. We started by using Makey Makey’s which are a lite version of an arduino, you can still program them, but they are designed to be easy to use, plug and play. I would highly recommend them to get familiar with the fundamentals of electronics and microcontrollers. From there we used an online interface called Tinkercad, which has an electronics hub where you can prototype Arduino board layouts, and program them in an online environment. This hub made the club possible and allowed my kids to see their boards and work with them before putting them into action, and possible making a mistake that could burn out the board.
By the end of the club each group of students had made a “zombie-detection” system with a motion sensor, and alarm system that would light up if a tripwire was crossed. If you don’t have any knowledge about programming or microcontrollers I would encourage you to check out a makey makey and start there, and work up to an Arduino or more advanced board, and definitely check out Tinkercad as a resource, it is invaluable and has many tutorials and help videos to get started. What is also cool about them is they have a 3D design and modeling program online, where you can design a variety of items for 3D printing, or even minecraft. As always, if you have any questions about how this works, or how you could get this going please don’t hesitate to reach out and contact me using the form on this site. Happy Coding!