hidden

Tech blog of j-labs' engineers. Experiences, knowledge, solutions.

Python Good Practices Part 2 - Writing Pythonic code

While reading top-shelf Python books, you probably might have bumped into the sentence "be pythonic". But what exactly does it mean and how to use it in real life examples? This article presents some practical cases where pythonic approach should be used and shows you some code snippets, where this approach was implemented.

Szymon Piwowar

|

17 Apr 2019

  Python 

Read more
3

Python Good Practices Part 2 - Writing Pythonic code

17 Apr 2019 | Szymon Piwowar

  Python 

While reading top-shelf Python books, you probably might have bumped into the sentence "be pythonic". But what exactly does it mean and how to use it in real life examples? This article presents some practical cases where pythonic approach should be used and shows you some code snippets, where this approach was implemented.

Read more
4

Machine learning - how to

11 Apr 2019 | Michał Drożdż

Machine learning is widely and successfully used nowadays. We think that computers know, but actually, they do not know - they compute. All they do is just operating on numbers. We teach them how to know by telling them what to compute.

Read more
5

gRPC over HTTP/2 or: How I learned to stop depending on REST and love gRPC

03 Apr 2019 | Jakub Pietrzyk

In today buzzword-oriented world, you don’t spend all of your precious time following all of the latest technologies. When creating APIs, you rarely think twice - obviously REST is your best friend. But have you ever heard about companies like Google or Dropbox? I bet you did. They’ve considered this problem in a different way. So did we, in our last project for a Berlin startup. We decided to use gRPC instead of REST and I would like to tell you why.

Read more
6

Python Good Practices: Part 1 - Python constructs

27 mar 2019 | Szymon Piwowar

  Python 

Python has many powerful and useful constructs. Depending on their design, they help us to write code safer, more readable, often faster and with lower memory usage. This article covers Iterables and Iterators, Generators, Context Managers, Comprehensions and Decorators and explains their usage and usability.

Read more
7

Visualizing Influx metrics with Grafana

20 mar 2019 | Maciej Szafraniec

  Databases 

Grafana is a data visualization and monitoring tool allowing you to show metrics stored for example in InfluxDB as charts. It gives you possibility to create dashboards to link charts or histograms into connected groups. Thanks to built-in InfluxDB support it automatically handles provided aggregation functions. Query editor supports also tag or field completion.

Read more
8

Mocking objects with Python

06 mar 2019 | Marcin Halastra

Mocking is just pretending to be and simulating specific behavior, we can replace our code’s parts with fake objects and verify how system behaves. At some point our system’s code starts to be complicated and have so many dependencies what makes it impossible to test without mocks. To cover all corner cases or to freely control our test scenario flow we have to simulate part of functionality – we have to force it to behave in exact way we want. For this purpose python uses unitest.mock library which is a standard library starting from Python 3.3 (for older versions installation is required).

Read more
9

Introduction to performance tests using JMeter

27 Feb 2019 | Dominik Stolarski

JMeter is an open-source JAVA-based load testing tool for measuring and analyzing performance of services and applications. It simulates user behavior by sending requests to server. It can be used for testing variety of protocols and services like HTTP, HTTPS, SOAP / REST Webservices, FTP, JDBC, LDAP, SMTP, POP3, IMAP and many others.

Read more
10

Using InfluxDB to store performance metrics

13 Feb 2019 | Maciej Szafraniec

  Databases 

InfluxDB it is a database oriented on time series. It was designed to accept large number of queries and write requests. It is perfect for storing timestamped data – data we would like to query by timestamp rather than index. It supports SQL-like language to easily pull data off as well as JSON requests through HTTP API. Influx uses tags and fields - tags to easily index series of data (you can query by it after where clause) and fields for keeping values (select field_1, field_2 from … )

Read more
11

Pytest - why it's more popular than unittest?

06 Feb 2019 | Karol Wybraniec

In my professional career I used to write tests with both frameworks: unittest and pytest. Both are great tools with certain pros and cons, but pytest is significantly more popular these days. In this short blogpost I am going to share with you a couple of pytest’s features, that in my opinion, provide the answer for the heading question.

Read more
Page 1 of 7