Version: 1.9.8
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
/* | |
* This work is free. You can redistribute it and/or modify it under the | |
* terms of the Do What The Fuck You Want To Public License, Version 2, | |
* as published by Sam Hocevar. See the COPYING file for more details. | |
*/ | |
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { |
The dplyr
package in R makes data wrangling significantly easier.
The beauty of dplyr
is that, by design, the options available are limited.
Specifically, a set of key verbs form the core of the package.
Using these verbs you can solve a wide range of data problems effectively in a shorter timeframe.
Whilse transitioning to Python I have greatly missed the ease with which I can think through and solve problems using dplyr in R.
The purpose of this document is to demonstrate how to execute the key dplyr verbs when manipulating data using Python (with the pandas
package).
dplyr is organised around six key verbs:
class MyStreamListener(tweepy.StreamListener): | |
def __init__(self, api=None): | |
super(MyStreamListener, self).__init__() | |
self.num_tweets = 0 | |
self.file = open("tweets.txt", "w") | |
def on_status(self, status): | |
tweet = status._json | |
self.file.write( json.dumps(tweet) + '\n' ) | |
self.num_tweets += 1 |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
// A simple quickref for Eigen. Add anything that's missing. | |
// Main author: Keir Mierle | |
#include <Eigen/Dense> | |
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d. | |
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols. | |
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd. | |
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major. | |
Matrix3f P, Q, R; // 3x3 float matrix. |
Calling C++ functions from python |
Use Cases | API Reference | About & Credits | PyCon Video | Free Starbucks * | v1.24
This tool was previously known as TagUI for Python. More details on the name change, which is backward compatible so existing scripts written with
import tagui as t
andt.function()
will continue to work.
To install this Python package for RPA (robotic process automation) -
Results=pd.DataFrame([]) | |
sns.set(font_scale=1.2) | |
for i in matrix: | |
results1=pd.read_csv('Results'+str(i)+'.csv') | |
Positive_Fees=(i[0]+100)*0.00075+100*0.00075 | |
Negative_Fees=(i[1]+100)*0.00075+100*0.00075 | |
No_Outcome_Fees=200*0.00075 | |
results1['Return']=(i[0]-Positive_Fees)*results1['Success rate']*results1['Quantity']+(i[1]-Positive_Fees)*(results1['Quantity']-results1['Success rate']*results1['Quantity'])+((i[0]+i[1])/7-No_Outcome_Fees)*results1['Quantity']*results1['no_outcome'] | |
results1['Combination']=str(i[0])+', '+str(i[1]) | |
results1.drop(results1.columns[0],inplace=True,axis=1) |