81 results found for ""

  • Evanescence | Bring me to Life | Drum Sheet Music

    Easy Drum Covers for Beginners | Evanescence bring me to life drum sheet music If you've just started to play drums and you’re looking for easy drum cover for beginners keep reading these blog, here I will list my favorite simple covers for newbies in drumming. Evanescence Bring me to Life Drum Cover Follow me on Youtube The song starts with a simple 4/4 groove spanning 2 bars with eighth notes on the hi-hat and snare hit on 2 and 4 and ghost notes on snare on “a” of 2 and “e” of 3. It ends with an open hi-hat at the “and” of 4 in the second bar. Here is how the groove looks like. This brings us to the first verse of the song. The groove here looks like this: You can play the eight notes mentioned either on a ride cymbal or a crash cymbal. In the actual song it has been played on a ride cymbal. This same grouping has been played twice in the verse. Which brings to us to the next part: This is again a two-bar groove with eighth notes being played on an open hi-hat and snare drum on 2 and 4 of each bar. The difficult part here is to get the bass drum right. I would recommend practicing it slowly first at a very slow tempo first and then gradually try to reach tempo of the song. There are two bars of this after which we get back to the groove played in the first verse of the song i.e. The next part uses a combination of two grooves. First one is a one bar groove which looks like this: The second one is a two-bar groove, the first bar looks like this: And the second bar looks like this: This same groove gets repeated in the next measure with a small difference in the second bar of the second group. The next measure uses yet another groove which looks like following: The next part of the song uses variations of the groove played after first verse and it looks like this: Next part uses the same groove as the first verse, here is how it looks like: The song ends with the following groove: I have posted a video of myself playing this song on my YouTube channel. Do subscribe to the channel as well as this blog for more drum tutorials.

  • Apache Spark Tutorial Scala: A Beginners Guide to Apache Spark Programming

    Learn Apache Spark: Tutorial for Beginners - This Apache Spark tutorial documentation will introduce you to Apache Spark programming in Scala. You will learn about Scala programming, dataframe, RDD, Spark SQL, Spark Streaming with examples and finally prepare yourself for Spark interview questions and answers. What is Apache Spark? Apache Spark is an analytics engine for big data processing. It runs 100 times faster than Hadoop and gives you full freedom to process large scale data in real-time, run analytics and apply machine learning algorithms. Navigation menu ​ 1. Apache Spark and Scala Installation 1.1 Spark installation on Windows​ 1.2 Spark installation on Mac 2. Getting Familiar with Scala IDE 2.1 Hello World with Scala IDE​ 3. Spark data structure basics 3.1 Spark RDD Transformations and Actions example 4. Spark Shell 4.1 Starting Spark shell with SparkContext example​ 5. Reading data files in Spark 5.1 SparkContext Parallelize and read textFile method 5.2 Loading JSON file using Spark Scala 5.3 Loading TEXT file using Spark Scala 5.4 How to convert RDD to dataframe? 6. Writing data files in Spark ​6.1 How to write single CSV file in Spark 7. Spark streaming 7.1 Word count example Scala 7.2 Analyzing Twitter texts 8. Sample Big Data Architecture with Apache Spark 9. What's Artificial Intelligence, Machine Learning, Deep Learning, Predictive Analytics, Data Science? 10. Spark Interview Questions and Answers Next: Apache Spark Installation (Windows | Mac)

  • SQL Server 2014 Standard Download & Installation

    In this post you will learn how to download and install SQL Server 2014 from an ISO image. I will also download AdventureWorks sample database and load into our SQL server 2014. Downloading ISO image 1. You can download the SQL Server from this link. But in case link changes, you can Google - "download SQL server enterprise evaluation" and it will show you the results as below. 2. Open the link highlighted above and you will find all the latest SQL Servers available. I am installing SQL Server 2014 for this post. As its old version, it is very stable. 3. Click on the little plus sign and select iso image to download. 4. Fill out these details and hit continue. 5. Select your platform based on your system properties whether it's 32 bit or 64 bit (Go to your control panel and look for system properties). Download will take approximately 10 minutes based on your network. Its ~3 GB ISO file. Make sure you have enough space on your computer to perform this installation. Run ISO image 1. Once download is complete, double click on the ISO file and it will automatically mount on your drive as shown below. If it doesn't mount automatically you can use winrar to unzip the ISO file. 2. Open the drive to run the setup. SQL Server 2014 Installation 1. Setup will take some time (approx. a minute) to open. You will get this screen. 2. Go to Installation tab as shown above and click on New SQL Server stand alone installation. 3. Click next, you can select check for updates or leave it as default. 4. This step will take some time (approx. 5 mins) where it will install setup files. 5. Finally, you will get this screen. Click Next. 6. I have SQL Server Express edition running on my machine so we are seeing this option. We will just continue with new installation default option. 7. Keep this edition as Evaluation and hit Next. 8. Check box to accept license terms and hit Next. 9. Select SQL Server Feature Installation and hit Next. 10. Select all the features and hit Next as shown below. 11. Enter the name of instance, I have named it as "SQL2014" and hit Next. 12. Leave it as default and hit Next as shown below. 13. Just leave the default as windows authentication for simplicity and add current user. Windows will automatically add current user when you click the Add current user button. Hit Next. Leave data directories and file stream as default for simplicity. Usually in production environment we choose different drives for logs and data (like in case server crashes). 14. Leave analysis services mode as default and add current user. Hit Next. 15. Leave the default options as shown below. 16. Click add current user and hit Next. 17. Give Controller Name, I have named it "Dataneb" and hit Next. 18. Hit Install button. 19. Installation will take some time (took 1 hour for me). So sit back and relax. Completion After 1 hour installation completed for me. This might take same or less time for you depending upon your system configuration. Now, you can open SQL Server configuration manager and see if SQL Server 2014 is running or not. I have SQL Server Express edition also running on this machine, ignore that. AdventureWorks Database I am loading AdventureWorks database for example purpose here. 1. In order to load AdventureWorks, open SSMS (SQL Server Management Studio) and connect to SQL2014 which we just installed. 2. Now download sample AdventureWorks 2014 database from Microsoft site. You can go to this link, and you can choose anyone. I am downloading AdventureWorks 2014. 3. Once download completes, move the AdventureWorks2014.bak file to MSSQL server 2014 backup location. It will be C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\Backup 4. Now open SSMS => right click on Databases => Restore Database => select Device => click on three Dots => Add 5. Add the AdventureWorks2014 backup file and hit OK. 6. Once backup is loaded, you will be able to see AdventureWorks2014 loaded under your database panel, if not right click and refresh. That's all! If you have any question please mention in comments section below. Next: How to create SSIS package in Visual Studio 2017

  • Create SSIS package in Visual Studio 2017

    In this tutorial, you will learn how to create SSIS (SQL Server Integration Services) package in visual studio 2017 step by step. For this you need to install SQL Server Data Tools (SSDT) on your machine. SSDT (Business Intelligence template) is basically used to create SSIS/SSRS/SSAS solutions. For Visual Studio 2018+ Visual Studio 2018 or higher is included with SSDT BI template so you don't need to install SSDT separately. You just need to check box "Data Storage and Processing" in workload section while installing Visual Studio 2018 or later. Visual Studio 2017 Installation Download older version of Visual Studio from this link. You need to create Microsoft account (if you don't have one) and have free Visual Studio subscription. Below is the product description which you need to download. Download latest "Community" version (15.9 and not 15.0) in order to install SSDT BI as highlighted below. VS installation might take 20 to 45 mins depending upon your system configuration. If you already have VS 2017 (version 15.0) then you have to upgrade VS 2017 to latest version. You can go to Visual Studio Installed version and check for available updates. SSDT BI Installation You can download SSDT (version 15.9.1) from this link. This link might change with new versions coming in future, in that case you can simply Google "SSDT release 15.9" and visit Microsoft VS 2017 SSDT installation page. Check all the services (SSAS/SSIS/SSRS) as shown below and select Visual Studio Community 2017 from the drop down list. Click Install. Download and installation process will take around 30 minutes depending upon your system configuration. Restart your computer once installation is done. Installation Check Once installation is done, open Visual Studio 2017 and go to menu option File --> New Project. Look up for Business Intelligence, if you can find Integration Services, Analysis Services and Reporting Services on left side of panel, then installation is fine. Create SSIS package In order to create SSIS basic package, you need to Create a project for the package. Add a control flow and data flow to the package. Add components to the data flow. What is SSIS? SSIS is an ETL tool for data warehousing that comes with Microsoft SQL Server. There is no extra cost for SSIS services. It lets you setup automated data load or extract processes to and/or from your SQL Server. SSIS stands for SQL Server Integration Services and ETL stands for Extract-Transform-Load. It is comparable to other ETL tools like Informatica and IBM Datastage etc. What does it do? SSIS provides you platform referred as SSDT to develop ETL solution which could be the combination of one or more packages. Solutions are saved with sln extension and packages are basically XML files saved with dtsx extension. Packages are deployed in SQL Server msdb database called as SSISDB and managed in Integration Services Catalog in SSMS (SQL Server Management Studio). Creating Package 1. Go to File => New => Project, name your project. Click OK. It will open SSIS designer. On left hand panel you will see SSIS toolbox with all the tasks and at the center you will see various tabs to switch between control flow, data flow, parameters, event handler and package explorer. On right panel you will see solution explorer where you can find connection manager. Now, in order to create a SSIS package you need at-least one control flow and a data flow task. Data flow task is simply a task which is used to Extract, Load and Transform the data and control flow is like the logical unit which controls the execution of tasks, like the flow in which tasks will execute. 2. Drag and drop drop data flow task from SSIS toolbox to central panel (control flow tab) like below, 3. You can double click on Data Flow Task to rename it. I am keeping it as default "Data Flow Task". Now right click on Data Flow Task => Edit, or you can simply select the "Data Flow Task" and click on "Data Flow" tab, it will open screen where you can edit your "Data Flow Task". 4. Now drag and drop OLE DB Source, OLE DB Destination and Data Conversion task from SSIS toolbox to designer space as shown below, 5. Select OLE DB Source and drag and drop the blue/green arrow to connect Data Conversion task. And similarly drag and drop/green blue arrow (not the red one) from Data conversion task to OLE DB Destination. Like this, 6. Now, you need to create OLE DB connection for source and target. For this go to Solution explorer panel on right hand side => Connection manager => New connection manager. Select OLE DB and click ADD. If you have already created OLE DB data connection earlier on your machine it will show up here, otherwise you can click on NEW and create new one. Just enter your database name and test connection. I assume you have AdventureWorks database running on your machine if not please refer this post. I have already installed SQL Server 2014 and SQL Express so you can see 2 instances of SQL Server service running on my machine. Now, for example I have chosen AdventureWorks2014 database. 7. Now go back to Data Flow screen and right click on OLE DB Source task => Edit. Choose a sample table from drop down list, [Production].[Product]. Now go to Columns tab, remove selected columns and select these five columns - Name, ListPrice, Size, Weight and SellStartDate and click OK. It's just for example purpose. 8. Now go to Data Flow and right click on Data Conversion task => Edit. Select SellStartDate column and change its data type from [DT_DBTIMESTAMP] to [DT_DBDATE], keep alias name same and click OK. Just a minor datatype conversion to showcase this example. 9. Now, right click on OLE DB destination editor => Edit => New SSIS by default creates the "create table" statement for you with input columns. CREATE TABLE [OLE DB Destination] ( [Name] nvarchar(50), [ListPrice] money, [Size] nvarchar(5), [Weight] numeric(8,2), [OLE DB Source.SellStartDate] datetime, [Data Conversion.SellStartDate] date ) Edit the table name and remove [OLE DB Source.SellStartDate] and hit OK, CREATE TABLE [OLE DB Destination_Products] ( [Name] nvarchar(50), [ListPrice] money, [Size] nvarchar(5), [Weight] numeric(8,2), [Data Conversion.SellStartDate] date ) Mappings should look like this, just click OK. 10. Now right click on the blue/green arrow between Data conversion task and OLE DB Destination task and enable data viewer. This is not a mandatory step but just to see data preview after data conversion. 11. Now hit START button on top of your screen. This will start the package. You can see SellStartDate has only date after conversion (no time field), all the tasks are green ticked that means they ran successfully and number of rows 1,008 processed. You can stop the flow or restart again from buttons highlighted on top of the screen. That's it. This package creation example was showcased by Microsoft itself. I haven't modified anything to keep example simple and informative. I hope you enjoyed the post. If you have any question please mention in the comments section below. Thank you. Next: SQL Server 2014 Download and Installation

  • How to clear Google cloud professional data engineer certification exam?

    In this blog you will learn - How to get Google cloud certification? How much it cost to get Google certified? Best Google certification courses available online right now. How to train yourself with Google cloud certification practice exams before actual examination. Before we begin I would like to mention one fact, you can crack this exam even if you don’t have "any work experience or prior knowledge" of GCP (Google Cloud Platform). I am writing this blog to showcase how you can clear Google cloud professional data engineer certification without any prior knowledge of GCP. I would start by dividing this whole preparation into 3 basic sections: Online video lectures (absolutely free if completed within a time frame) Glance through some Google documentation Finally, few practice tests Step 1. Online Video Lectures Coursera: First begin with Coursera course which is also suggested by google and it's really knowledgeable. You can use 7 day free trial of coursera to complete this specialization. But since this is very big course, you will have to devote good amount of time everyday for these 7 days. This course comes with Qwiklabs where you can do lab assessments without creating any GCP account. Also this course comes with quizzes so as to get good understanding of GCP components with hands-on experience as well. Udemy: Next comes Udemy, it's a combined course for both data engineers and architects. This course will help you to understand real world implementation of GCP components. You can skip machine learning part from this course if you want. These two courses are not very exam oriented but will give you good understanding of every GCP component with some basic hands on. Now jumping to exam oriented video lectures, Cloud Academy and Linux Academy comes to our rescue. Both of these sites comes with a 7 days free trial option. Cloud Academy will give you good knowledge of most of the topics covered in the exam. You can learn machine learning from this course. Try to understand well each and every point covered in this course. This course also comes with quizzes for main topics. Understand well the explanations given for the quizzes. However this Cloud Academy course doesn’t cover topics such as data preparation and this is where linux academy comes into the picture. Linux Academy course has covered all the topics of the exam in most exam oriented way. You will get good understanding of machine learning and other remaining topics. This course also has topic wise tests and a full 2 hour test (50 questions) to give you a feel of real test. However I would recommend you to give this test at the last stage of preparation and also attempt this test at least thrice and score 100%. For revision I would suggest you to go through Linux academy’s Data Dossier. This is the best part of complete course which you will require at the last moment. Step 2: Google Documentation There are few topics such as big-query, pub-sub, data-studio for which you will have to go through google docs. For data flow you need to go through apache beam documentation. Understand following points of each of the components very well: Access Control Best practices Limitations For ML, understand well the different use cases where pre-trained ML apis are used. This will help you understand whether to use pre-build apis or to make a custom model. Step 3: Practice Test For practice tests you can go through the following: Google DE practice test Whizlabs Test Linux academy practice test Make sure you give all the tests at least thrice and understand well, each question and their answers. For each of the question you should understand why a particular answer is correct and why the remaining ones are incorrect. At the end I would suggest that google has made this exam very logical where in you need to know the in and out of every topic very well to clear the exam. So understand everything well and don’t try to memorize or mug up everything. Best of luck!!

  • Calling 911 for Pepperoni Pizza Delivery, But Why?

    Phone Conversation of 911 Operator (reference Reddit user Crux1836); Officer : “911, where is your emergency?” Caller : “123 Main St.” Officer : “Ok, what’s going on there?” Caller : “I’d like to order a pizza for delivery.” Officer : “Ma’am, you’ve reached 911” Caller : “Yeah, I know. Can I have a large with half pepperoni, half mushroom and peppers?” Officer : “Ummm… I’m sorry, you know you’ve called 911 right?” Caller : “Yeah, do you know how long it will be?” Officer : “Ok, Ma’am, is everything ok over there? do you have an emergency?” Caller : “Yes, I do.” Officer : “… And you can’t talk about it because there’s someone in the room with you?” Caller : “Yes, that’s correct. Do you know how long it will be?” Officer : “I have an officer about a mile from your location. Are there any weapons in your house?” Caller : “Nope.” Officer : “Can you stay on the phone with me?” Caller : “Nope. See you soon, thanks” (Officer) As we dispatch the call, I check the history at the address, and see there are multiple previous domestic violence calls. The officer arrives and finds a couple, female was kind of banged up, and boyfriend was drunk. Officer arrests him after she explains that the boyfriend had been beating her for a while. I thought she was pretty clever to use that trick. Definitely one of the most memorable calls. Another case which happed in UK ; The call went something like this: Operator : Police Emergency Caller : Hello, I’d like to order a curry please. Operator : You’re through to the police Caller : Could you deliver it to ‘123 Street’ Operator : Madam, this is the police, not a delivery service Caller : Could you deliver it as soon as possible? Operator : (starting to realize something is fishy) “Madam, are you in a situation where you cannot talk freely? Caller : Yes. Operator : Are you in danger? Caller : Yes. Operator : Okay, I’m arranging help for you immediately. Caller : Could you make it two Naan Breads? My husband is really hungry. Operator : I’ll send two officers. This transcript is purely based on memory from a police officer’s memoir. On the police response, a very angry man was arrested for domestic violence. There was obviously the risk that the operator could have hung up on a ‘time-wasting’ caller, but once they realized something was wrong, they changed scripts immediately. Can you actually call Emergency Services and “order a pizza” as a tactic for help? The answer is "No", there is no such 911 pizza call "code". Police and 911 operators say there’s no such secret code, and that your best option if you’re afraid of someone in the room overhearing your call is to text 911 with your location and the type of emergency. However, a meme has been circulating on social media reads: “If you need to call 911 but are scared to because of someone in the room, dial and ask for a pepperoni pizza… Share this to save a life” Here is what LAPD tweets, Remember, if you can't call - you can TEXT ! Tags: #Funny #Lesson

  • Best Office Prank Ever, Don't Miss the End

    Have you ever seen chocolate thief in your office? This is the epic message chain when someone started to stealing chocolates from office refrigerator. #Funny #Office #Prank

  • A Day in the Life of a Computer Programmer

    As a computer programmer, my daily life is actually kind of weird. I did my undergrad in computer science and worked with Microsoft for 4 years. I'm self taught and have spent a far greater amount of hours learning how to code. I work on US based client projects. Due to different time zone, my hours are not fully standard. Usually I try to work 7–9 hours a day, however sometimes it can be as much as 10–12 hours. Here is my routine that I follow roughly everyday, 4:50 am : Alarm beeps, Snooze 1 .. 5:05 am : Snooze 2 .. 5:20 am : Snooze 3 .. 5:35 am : Snooze n, Rolling in bed .. 6:00 am : Semi awake 6:10 am : Check Facebook, Instagram, Whatsapp, Robinhood, 9gag 6:15 am : Wake-up, Workout (pushups, gym, meditation, yoga, I am lying) 6:30 am : Shower, Dress up 7:30 am : Leave for work, Mustang, Daily traffic, Pandora (free subscription) 8:15 am : Arrive at work, Parking, Swipe access card at the entrance 8:20 am : Checking email, Service Now 8:30 am : Offshore-onshore call, Status updates, Discuss target for the day 9:00 am : Breakfast (uncertain) 9:20 am : Code, debug, code, code, debug 10:00 am : Error, error, error, error 11:00 am : Coffee, "Smoking kills" 11:30 am : Code, code, debug, code 12:00 pm - 2:00 pm : Global variable "Lunch" 2:00 pm : Code, debug, code, debug 3:00 pm : Code, code, code, code 3:30 pm : Check on the entire team 4:30 pm : Wrap up, Leave for home, Drive, Traffic, Pandora 5:15 pm : Arrive home, Change dress, Chillax 5:45 pm : Jog for 4-5 miles, Shower 6:30 pm : Facebook, Youtube, News, Blogs 8:00 pm - 9:00 pm : Dinner, Eat 24, Cooking (rare element) 9:30 pm : Offshore-onshore call (sometimes free), Otherwise Netflix 10:00 pm : Netflix, Youtube, Chit-chat with girlfriend 10:30 pm - 11:00 pm : Shut down, Sleep 4:50 am : Alarm beeps, Snooze 1, 2, 3, n .. Thanks for reading, hit like and share if you enjoyed the post!

  • Funny Short Math Jokes and Puns, Math is Fun!

    A mathematical joke is a form of humor which relies on aspects of mathematics or a stereotype of mathematicians to derive humor. The humor may come from a pun, or from a double meaning of a mathematical term, or from a lay person's misunderstanding of a mathematical concept. Instead of good-bye we say Calc-U-later Why should you not mix alcohol and calculus? Because you should never drink and derive. Write the expression for the volume of a thick crust pizza with height "a" and radius "z". The formula for volume is π·(radius)**2·(height). In this case, pi·z·z·a. How do you make seven even? Just remove the “s.” Q: What is a proof? A: One-half percent of alcohol. Q: What is gray and huge and has integer coefficients? A: An elephantine equation. Q: Why do truncated Maclaurin series fit the original function so well? A: Because they are “Taylor” made. Q: What is gray and huge and has integer coefficients? A: An elephantine equation. Q: What’s a polar bear? A: A rectangular bear after a coordinate transform. Q: What do you get if you cross a mosquito with a mountain climber? A: You can’t cross a vector with a scalar. Theorem. 3=4. Proof. Suppose a + b = c This can also be written as: 4a − 3a + 4b − 3b = 4c − 3c After reorganizing: 4a + 4b − 4c = 3a + 3b − 3c Take the constants out of the brackets: 4(a + b − c) = 3(a + b − c) Remove the same term left and right: 4=3 A mathematician and an engineer are on a desert island. They find two palm trees with one coconut each. The engineer shinnies up one tree, gets the coconut, and eats it. The mathematician shinnies up the other tree, gets the coconut, climbs the other tree and puts it there. “Now we’ve reduced it to a problem we know how to solve.” There are a mathematician and a physicist and a burning building with people inside. There are a fire hydrant and a hose on the sidewalk. The physicist has to put the fire out…so, he attaches the hose to the hydrant, puts the fire out, and saves the house and the family. Then they put the people back in the house, set it on fire, and ask the mathematician to solve the problem. So, he takes the hose off the hydrant and lays it on the sidewalk. “Now I’ve reduced it to a previously solved problem” and walks away. Three men are in a hot-air balloon. Soon, they find themselves lost in a canyon somewhere. One of the three men says, “I’ve got an idea. We can call for help in this canyon and the echo will carry our voices far.” So he leans over the basket and yells out, “Helloooooo! Where are we?” (They hear the echo several times.) Fifteen minutes later, they hear this echoing voice: “Hellooooo! You’re lost!!” One of the men says, “That must have been a mathematician.” Puzzled, one of the other men asks, “Why do you say that?” The reply: “For three reasons: (1) He took a long time to answer, (2) he was absolutely correct, and (3) his answer was absolutely useless.” Infinitely many mathematicians walk into a bar. The first says, "I'll have a beer." The second says, "I'll have half a beer." The third says, "I'll have a quarter of a beer." Before anyone else can speak, the barman fills up exactly two glasses of beer and serves them. "Come on, now,” he says to the group, “You guys have got to learn your limits.” Scientists caught a physicist and a mathematician and locked them in separate rooms so both could not interact with each other. They started studying their behavior. The two were assigned a task to remove a hammered nail from inside the wall. The only tools they had were a hammer and a nail-drawer. After some muscular effort, both solved the tasks similarly by using the nail-drawer. Then there was a second task, to remove the nail that was barely touching the wall with its sharp end. The physicist simply took the nail with his hand. The mathematician hammered the nail inside the wall with full force and proudly announced: the problem has been reduced to the previous one! A mathematician organizes a raffle in which the prize is an infinite amount of money paid over an infinite amount of time. Of course, with the promise of such a prize, his tickets sell like hot cake. When the winning ticket is drawn, and the jubilant winner comes to claim his prize, the mathematician explains the mode of payment: "1 dollar now, 1/2 dollar next week, 1/3 dollar the week after that..." Sherlock Holmes and Watson travel on a balloon. They were hidden in clouds, so they didn’t know which country they flew above. Finally they saw a guy below between clouds, so they asked. “Hey, you know where we are?” “Yes” “Where?” “In a balloon”. And the guy was hidden by clouds again. Watson:”Goddamn, what a stupid idiot!” Holmes:”No my friend, he’s a mathematician”. Watson:”How can you know that, Holmes?” Holmes:”Elementary, my dear Watson. He responded with an absolutely correct and absolutely useless answer”. My girlfriend is the square root of -100. She’s a perfect 10, but purely imaginary. How do mathematicians scold their children? "If I've told you n times, I've told you n+1 times..." What’s the best way to woo a math teacher? Use acute angle. What do you call a number that can't keep still? A roamin' numeral. Take a positive integer N. No wait, N is too big; take a positive integer k. A farmer counted 196 cows in 
the field. But when he rounded them up, he had 200. Why should you never argue with decimals? Because decimals always have a point. When someone once asked Professor Eilenberg if he could eat Chinese food with three chopsticks, he answered, "Of course," according to Professor Morgan. How are you going to do it? I'll take the three chopsticks, I'll put one of them aside on the table, and I'll use the other two. A statistics professor is going through security at the airport when they discover a bomb in his carry-on. The TSA officer is livid. "I don't understand why you'd want to kill so many innocent people!" The professor laughs and explains that he never wanted to blow up the plane; in fact, he was trying to save them all. "So then why did you bring a bomb?!" The professor explains that the probability of a bomb being on an airplane is 1/1000, which is quite high if you think about it, and statistically relevant enough to prevent him from being able to fly stress-free. "So what does that have to do with you packing a bomb?" the TSA officer wants to know, so the professor explains. "You see, if there's 1/1000 probability of a bomb being on my plane, the chance that there are two bombs is 1/1000000. So if I bring a bomb, the chance there is another bomb is only 1/1000000, so we are all much safer." The great probabilist Mark Kac (1914-1984) once gave a lecture at Caltech, with Feynman in the audience. When Kac finished, Feynman stood up and loudly proclaimed, "If all mathematics disappeared, it would set physics back precisely one week." To that outrageous comment, Kac shot back with that yes, he knew of that week; it was "Precisely the week in which God created the world." An experimental physicist meets a mathematician in a bar and they start talking. The physicict asks, "What kind of math do you do?" to which the mathematician replies, "Knot theory." The physicist says, "Me neither!" A poet, a priest, and a mathematician are discussing whether it's better to have a wife or a mistress. The poet argues that it's better to have a mistress because love should be free and spontaneous. The priest argues that it's better to have a wife because love should be sanctified by God. The mathematician says, "I think it's better to have both. That way, when each of them thinks you're with the other, you can do some mathematics." Three mathematicians walk into a bar. Bartender asks:”Will all of you guys have beer?” The first mathematician: “I don’t know”. The second mathematician: “I don’t know”. The third one: ”Yes”. A mathematician is attending a conference in another country and is sleeping at a hotel. Suddenly, there is a fire alarm and he rushes out in panic. He also notices some smoke coming from one end of the corridor. As he is running, he spots a fire extinguisher. “Ah!”, he exclaims, “A solution exists!” and comes back to his room and sleeps peacefully. Two statisticians go to hunt a bear. After roaming the woods for a while, they spot a lone grizzly. The first statistician takes aim and shoots, but it hits three feet in front of the bear. The second one shoots next, and it hits three feet behind the bear. They both agree that they have shot the bear and go to retrieve it.. Parallel lines have so much in common. It’s a shame they’ll never meet. I just saw my math teacher with a piece of graph paper. I think he must be plotting something. Are monsters good at math? No, unless you Count Dracula. My girlfriend is the square root of -100. She's a perfect 10, but purely imaginary. Q: Why is a math book depressed? A: Because it has so many problems. How do you stay warm in an empty room? Go into the corner where it is always 90 degrees. There are three kinds of people in the world: those who can count and those who can't. Q: Why did I divide sin by tan? A: Just cos. Q: Where's the only place you can buy 64 watermelons and nobody wonders why? A: In an elementary school math class. 60 out of 50 people have trouble with fractions. But why did 7 eat 9? Because you’re supposed to eat 3 squared meals a day. Q: Why is the obtuse triangle depressed? A: Because it is never right. Q: Why did the 30-60-90 degree triangle marry the 45-45-90 degree triangle? A: Because they were right for each other. Q: Why didn't the Romans find algebra very challenging? A: Because they always knew X was 10. Two statisticians went out hunting and they found a deer. The first one overshoots by 5 meters. The second one undershoots by 5 meters. They both hug each other and shout out “We Got It!” An astronomer, a physicist and a mathematician are on a train traveling from England to Scotland. It is the first time for each of them. Some time after the train crosses the border, the three of them notice a sheep in a field. “Amazing!” says the astronomer. “All the sheep in Scotland are black!”. “No, no” responds the physicist. “Some sheep in Scotland are black!” The mathematician closes his eyes pityingly, and intones: “In Scotland, there is at least one field, containing at least one sheep, at least one side of which is black.” An engineer, a physicist and a mathematician go to a hotel. The boiler malfunctions in the middle of the night and the radiators in each room set the curtains on fire. The engineer sees the fire, sees there is a bucket in the bathroom, fills the bucket with water and throws it over the fire. The physicist sees the fire, sees the bucket, fills the bucket to the top of his mentally calculated error margin and throws it over the fire. The mathematician sees the fire, sees the bucket, see the solution and goes back to sleep. #MathJokes #FunnyMath #MathPuns #ShortMathJoke

  • How can I get the source code of the Python Packages?

    You can find source code on Github. Under cpython you will be able to find all the modules and python objects (written in C). You can also find which file (using __file__ attribute) on your system is used for respective module. For example math and random module, >>> import math >>> import random >>> math.__doc__ 'This module is always available. It provides access to the\nmathematical functions defined by the C standard.' >>> math.__file__ '/Users/Rajput/anaconda/lib/python2.7/lib-dynload/math.so' >>> random.__file__ '/Users/Rajput/anaconda/lib/python2.7/random.pyc' Now, you can get source code for objects written in python (not C) with inspect get source code. You can also refer Python docs for “inspect” library. >>> import inspect >>> inspect.getsourcelines(random) (['"""Random variable generators.\n', '\n', ' integers\n', ' --------\n', ' uniform within range\n', '\n', ' sequences\n', ' ---------\n', ' pick random element\n', ' pick random sample\n', : so on..