Сообщения

Сообщения за ноябрь, 2017

Table partitioning models in Django with PostgreSQL

Hello. This topic is about how relatively quickly and painlessly configure partitioning (protezirovanie) table for months, if you use Django+PostgreSQL. Much of the above is suitable for other frameworks and ORM. About what partitioning is and why it is needed, you can read, for example, here , here and here . So, there is a project on Django and the table is one of the models must be very large. If the reading from this table occurs frequently, and always known the time period in which the recording was made, the partitioning can speed up the database. Every time to write queries to include a partition is not very desirable, so let's try to automate it. Well, if the outcome is something I can use and not much familiar with SQL. I've read the docs, so you don't have to. First I will tell you how quickly try my groundwork, and then about what's under the hood. Act as follows: the Catch the syncdb to add commands partitioning. the Plug-in SQL t

Automated e-ticketing for music events

Изображение
once last spring my friend and colleague Alexander llxff we are going to organize a concert in Kazan one of the famous metal group. Well Pat your nerves and disillusioned with the organizational business, with grief in half he still had. Had a lot of problems, and the tedious negotiations with those who are in any way associated with the concerts. At every step we had to collect the contacts of the right people and find at least some information about the clubs, the lessees of equipment, locations of ticket sales. And so was born the desire to simplify the whole thing. Since the most difficult problem was the distribution of tickets to the concert, we decided to start with her. We have created a Orap – a platform for organizers of music events, which enable easy and fast to sell tickets. The system allows you to create event descriptions and put them into a poster. When you check in as the organizer, you can sell e-tickets. To validate tickets at the ent

Load the data in postgresql

Read the article the crackdown on the performance of inserts in Oracle using transactions in Java. As at the moment I am working with postgresql, I decided to check how much will give this tuning in conjunction with galanga. Used stack: golang-1.1.2 + postgresql-9.3.1. To run the program will need golanowski driver for postgresql. I use the driver github.com/lib/pq that installed with the command go get-u github.com/lib/pq. testing framework. Home desktop with archlinux-x86_64 and kernel-3.11.5, 4GB RAM (at the time of the test was freely about 1.2 GB), with a regular old spindle HDD. Postgres more or less configured (up to 768МБ shared_buffers and max_connections to 1000, + some tuning), but no hardcore. For purity of experiment did not make any goroutine — all in 1 thread. Text /* sql_insertion_test01.go * Synthetic test for simple insert operations into postgresql database * Call: ./sql_insertion_test01 * Pls do not use the name "insert_test", because t

Google will change the appearance of search results for Europe, "will handicap" competitive services

Изображение
For about three years officials of the European Union analyze the job search of Google and its impact on competitive services (Yelp, UrbanSpoon, TripAdvisor). If you remember, companies that own thematic search services (tickets, restaurants and cafés, and others) filed a joint lawsuit against Google, complaining about the inability to compete with the search giant. Corporation, after a series of trials and work with EU officials, went to meet him, and soon will be presented the new version of search results, so to speak, European. first, Google will give users to know when the link is to the "native" tools, and when — on third-party services/resources. In addition, when displaying one of its links that Google has pledged three links to services of competitors. For example, when showing in search results links on Google+ Local, you'll see links and resources on Yelp, UrbanSpoon, TripAdvisor, and other relevant services and websites. The agreement with

Deal with the construction of a multi-regional sites

the Problem of creating sites with different versions of languages and countries is not new, almost all major web sites already bumped into her. Each company chooses its decision, we briefly discuss the main options and see how to solve this problem in the best way. Options for building URLS Of course, in life there are more groups, for example, some sites keep regional settings in cookies, other transmit parameter ?lang=EN, but this unpopular decision and the main ones are: 1. Version of the site on another domain: the example.com, example.ru the Most dramatic way. This option can be convenient for companies that have local offices in different countries and work relatively independently from the main office, for example, to another engine of the site. 2. Version of the site on the subdomain: the ru.example.com, ua.example.com Very similar to the previous option, but easier to administer. These two options are easily implemented on physically different ho

Monitoring PostgreSQL + php-fpm + nginx + disk using Zabbix

Изображение
a Lot of information in the network according to Zabbix, and a lot of bespoke templates, I want to introduce to the audience his modification. Zabbix is a very convenient and flexible monitoring tool. Want a hundred monitor, I want a thousand stations, and do not want to — watch a single server, take the cream in all sections. I would not mind to give to github, if anyone collects similar. It so happened that we decided to put on the hosting database wrapper php-fpm+nginx. As the database is postgres. Thoughts to collect data on the machine was before the purchase of hosting is needed, this is useful! Magic kick up the backside to the implementation of the system gave the brakes a hard drive on our VDS stations at the beginning of the script every minute, put the time and measured by the speed in the file, and then build graphs in Excel to compare to as it was/became, take quantitative statistics. And this is just one option! And suddenly the fault is not VDS, and our a

The tale of how I promoted the site or SEO is not as scary as he is painted

Изображение
First subject area Initially the idea was to write a very detailed manual, but then decided to stay on the policies. / > the Keys/requests This is a phrase that is typed in the search to achieve the result (answer to the question of purchase, information...) Chastotoy the LF – low-frequency (the value is calculated logarithmically relative to the large number of queries in RF query from the category), for simplicity let it be anything below 300 requests (though in each group on a miscellaneous). the mid – mid-range (value is calculated logarithmically relative to the large number of queries in RF query from the category), for simplicity let it be anything above 300 and below 2000 requests (though in each group on a miscellaneous). the RF – the maximum number of searches from a simple query, for example "Lamp". Competition the NC – low competitive keywords with a chance to move in top (little exact occurrences of the search phrase, little master

Voice search "in Russian"

Изображение
Hello. Technology is evolving very quickly, and very pleased that not only abroad. The company "Yandex" has presented its development, namely bibloteca multi-platform, which gives developers access to its own technology of speech recognition — SpeechKit. More detailed information on... This library only works on Android and iOS platforms. Until she is able to "understand" only Russian language, but to develop there somewhere! As for recognition, it is: — 84% for common queries made by Internet users; — 94% for geographical queries. In their work, the Yandex SpeechKit is based on acoustic and language models, for which the technology giant took to record and to lay out 300 hours of male, female and children's speech. Language models have formed the basis of the search queries and specially prepared texts. The recognition rate of the voice search query is about 1 second. One of the terms of service is: Yandex SpeechKit'ω is free

User based on several parameters

Изображение
All the major social networks offer to install the site button to rate content users. These buttons allow us to Express their opinion in one click. This is a great invention, but he has the disadvantage that the opinion of the user is reduced to only one parameter. If Your opinion is more complicated than just "like/dislike", you will need to write the review, which is not always desirable to do. / > Project Web Metric ( wmetric.com ) offers an intermediate solution: the user can set the assessment in several ways. First, the parameter set was fixed, but, thanks to your, dear readers, the participation we have extended the functionality and this I would like to tell you more. First of all I want to thank everyone who participated in the discussion of first article , helped us to see the gaps and suggested necessary improvements. We have seen that a fixed set of parameters, many are not satisfied. Therefore, we have added the ability to make a voting from mul

A competition for beginners on Small Basic

Изображение
Russian community SmallBasic.ru with the support of Microsoft announces a competition on programming in Small Basic. the the purpose of the contest is popularization of programming among students and novice programmers. the contest The theme of the competition is free. the Main points of the contest The competition is held in four stages. Each stage lasts one week. Each participant may submit one program each week. Only one participant can be presented in four programs. For each step, you will create a separate branch for community forum SmallBasic.ru where you can post your program. the Terms of programs Submitted programs must run on the current version of the language – 0.8. In the programs not allowed to use any external components, only a clean Small Basic. The program must be published on the server smallbasic.com (the tool "Publish"), and posted on the forum import code. the contest period The beginning of the contest: 1 APR

VK Offline E-mail client and address book on the basis of the data of your profile Vkontakte

Изображение
six Months ago, we told you about our VK Offline app for Google Chrome that embodied the concept of the E-mail client and address book on the basis of the data of your profile Vkontakte. Since then much water has flowed, and the app has grown to chetvero version that adapts to almost all our ideas. Now VK Offline is a one of the best Russian apps in the Chrome Web Store that combines the ease and simplicity of the dialogues Vkontakte with a convenient and familiar functions of any E-mail client and address book. We have come a long way when developing an application and would like to share with you information about the key opportunities that exist in the app now, and the main techniques that we use for developing and testing the application. the Important message and basket deleted Since the release we are even more imbued with the idea of submission of correspondence and contacts by E-mail and address book . So we decided to take the most interesting and useful from o