Hi Habr! This publication is about a small integration of external service in Habr and Geektimes, which you would never know about. There will not be a line about the blockchain, not about machine learning, or even about the analysis of the source code DOOM III. But there will be some cats.
In this small Friday note I would like to tell you about one cool service that helps us in our daily work. Namely -
text.ru is a service that allows you to check texts for uniqueness, look for errors in them, etc. It works simply: open the site, paste text from the clipboard and press the “Check for uniqueness” button. After some time, get a visual result: what pieces of text and where are they borrowed from:
')
→
Enlarge image |
View live check result
In case of doubt, there is a letter-by-letter comparison of each fragment of mutual understanding with the original:
→
Enlarge image
As you already understood, this service turned out to be very convenient for moderating the publications that users send to us in the Sandbox - after all, you need to check each one, and they send up to several dozens every day!
Once upon a time, we simply copied random lines of publications and searched for them in Yandex or Google - if there were exact matches of several pieces, then the material was rejected as copy-paste. Later we stumbled upon text.ru and began to check the texts through it - it’s still more convenient and reliable when the entire publication is checked, not by a man, but by a robot.
At this stage, the first hitch appeared: even if registering with the service, it was still a “free account”, all materials from which stood in the “queue for review” of the texts sent to the service - sometimes it could take several minutes, because there were quite a lot of users. It is easy to guess that only checking the uniqueness of a dozen “sand” publications in such a case could easily take an hour, but they still need to correct the formatting in accordance with our
guidelines , correct mistakes, punctuation, etc.
The solution was to buy a Pro-account, which, among other things, allows you to check texts without a queue - this is already a considerable saving of time. The second plus of the Pro-account is the ability to check texts at a time more than 15,000 characters. The third plus of the Pro-account is the ability to access the
API of the service , which we successfully used: in each sand publication a button appeared “The result of the check on text.ru”:
The mechanics turned out to be the following: the user sent the publication to the sandbox, it was automatically checked for uniqueness in the service and a link to the page with the result of the check was inserted into the publication header so that the moderator could click on it and see the finished result without any queues (a unique link is formed for each material available only to the account owner). It turned out a good time-saving moderation with its increased quality.
But here we were waiting for another pitfall. Even having a Pro-account on the service, he had a daily limit on the number of characters to be checked - 50,000. What is 50 KB of text? Someone this will be enough for a week, but on Habré it is sometimes one publication, or even half. If the daily limit was exhausted, then the publication did not appear cherished blue "plate" with the results of the test. To expand this restriction on the service, it is proposed to buy so-called “character packages” - a package of 50,000,000 characters costs 15,000 rubles, for example. In this case, the daily limit of 50,000 characters daily renewable on the Pro-account is spent first, and only then the purchased characters are consumed. Fair. But still, the very idea of ​​“either pay or suffer with limits” with the Pro account already purchased was not very pleasing.
Here it is important to make a small digression: this integration of the service was solely my initiative and make it an impatient during the New Year holidays. Despite the possibility of paying for services by bank transfer, I didn’t want to wait for any trouble with bills and requisites, so I paid for the Pro account for a year from my own funds. Then I didn’t understand further arithmetic of working with the service, but very soon I realized that Habre exhausts all possible limits quite quickly, especially if “in two bows” with Geektimes.
Where are the cats ?!
Under the law of meanness, the daily limits of characters ended at the most inopportune moment. And once I asked the support service to charge a few characters to check the operation of the system:
User # 12345 (02/09/2017 16:40:44)
Do I understand correctly that once we have a PRO account, then every day we are charged 50,000 characters for verification through the API? And when we use them up, the articles stop being checked and return the error “Lack of symbols on the balance sheet”?
107248: https://text.ru/text_check/result/589c6e64432fa 107250: https://text.ru/text_check/result/589c6e6893129 107252: https://text.ru/text_check/result/589c6e6b56a26 107256: https://text.ru/text_check/result/589c6e6c7d7e2 107260: Array ( [error_code] => 142 [error_desc] => ) 107302: Array ( [error_code] => 142 [error_desc] => )
Administration (02/09/2017 17:01:46)
Yes, you can spend this package on api-check. As soon as the characters end, you will receive a message that you wrote earlier: "Lack of characters on the balance sheet."
User # 12345 (02/09/2017 17:11:28)
Got it. And can you then clarify how much Moscow time these characters are “charged” again? So that we can initiate a re-check of those texts that have not invested in the limit in the previous day?
Administration (02/09/2017 17:19:01)
Every day at exactly midnight.
User # 12345 (02/09/2017 17:24:32)
Can you give us a few characters now as a friend, and we will give you a cat?

Surprisingly, it worked - the support service accrued a nice bonus in the form of 600k symbols, which was enough for further work.
Administration (02/09/2017 17:36:03)
We gave you a free package of characters :)
User # 12345 (02/09/2017 17:46:58)
Moore! You make a useful service and we like to use it. Thank you very much!
Administration (02/09/2017 5:55:42 PM)
Thank you for this review of the service and cute cat! Have a nice day!
Soon the story repeated:
User # 12345 (03/03/2017 17:04:53)
Eh, if you only knew how you would like even a “free package of characters” from you ...
Seals still have, if that! :)
Administration (03/03/2017 17:22:32)
Let's exchange - we give you a package, you give us a kitten :)
No sooner said than done:
User # 12345 (03/03/2017 18:32:13)
Then here are the seals! Spring! :)
Administration (03/03/2017 18:40:41)
We gave you a package of 600,000 characters :)
Never was and suddenly again:
User # 12345 (03/20/2017 15:56:11)
Oh, so what, then again, the characters ran out. Can we continue our good fluffy tradition? ) Here, for example, you probably have not heard (and in the dictionary there is not) about such a breed of cats like Burma? And that the emphasis in this word can be immediately on both vowels:

Kitty did his job again.
User # 12345 (04/04/2017 11:19:57 AM)
Houston, we have problems, as you can hear, reception. Houston, we ran out of characters, I repeat, the characters run out. Send as much as possible, otherwise they are quickly spent here. End of communication! :)
Administration (04/04/2017 11:38:48)
Hello. We have credited a new symbol package to your profile :)
User # 12345 (04/04/2017 11:56:43)
Thank you very much! 5 minutes - normal flight! :)
A couple of weeks:
User # 12345 (04/23/2017 11:57:42 PM)
Let your tomorrow day begin with a box of kittens. Kittens have grown a little bit and they want characters too :)
Administration (04/24/2017 08:59:32)
Hello. We gave you 600,000 characters =)
... years went by ...
User # 12345 (Jun 06, 2017 4:25:41 PM)
Hello! Can you please tell me how to get more characters from you? ) Maybe as a gift for Habr's 11th birthday ? So the holiday cat came on this occasion!

And again, the service staff reciprocated.
Not that TM has no opportunity to pay for the service, but in this case there is already some kind of excitement with inventing texts and searching for pictures, it is already difficult to stop
:)
User # 12345 (07/04/2017 16:56:37)
Hello, we are again. We fall asleep and wake up in fear that the characters are about to end (or rather have already ended, switched to the daily limit from the pro-account), save our souls :)
Administration (07/04/2017 16:59:05)
Hello. We gave you 600,000 characters =)
User # 12345 (07/04/2017 17:00:33)
Mrrrm, thanks!

User # 12345 (07/09/2017 03:53:39)
Just an unscheduled night seal, though marine:
Administration (07/09/2017 08:10:01)
Meow)
And recent:
User # 12345 (08/03/2017 14:28:45)
Hello! Eh, everyone has left for the holidays, there is no one to feed the cat! :)
Administration (08/03/2017 14:34:30)
Hello. We fed the cat and gave you a package of 600,000 thousand characters :)
User # 12345 (08/03/2017 14:40:58)
Ate, now you can sleep. Thank! :)

Actually, for half a year now the sandbox on our services only works at the expense of cats
:)
The end
Sometimes in the sandbox send publications about the basics of JS / CSS, problem solving, collections of life hacks for the command line or stories about how someone started programming in three years. Sometimes we skip such publications, knowing that they are being putted in, and in the comments they will surely appear “how did you get an invite for it?”. In this case, I would like to remind one thing: “The sandbox” is not a forge of gold publications, it is a kind of small entrance exam that a new user must pass in order to become a full member of the community. At that time, it is the community that acts as the examiner and decides the fate. Therefore, there is a small suggestion: let's treat the publications from the sandbox a little more loyally.
⬝ ⬝
Once I also worked in Habr's support and I know how this work is sometimes tiring. And how the periodic jokes of users lifted the mood - it's just like a small island of positive in the ocean of routine and monotony. And now I am pleased to think that the seals cause a support employee at the end of the wire to at least smile. Or maybe there are even a few employees sitting and sometimes at dinner asking each other: “Well, how are there, these, with Habr, new cats were not sent?”
:)
Thanks to the text.ru service for this special loyalty, which is very convenient and which the gloomy and soulless services of many other services cannot boast.
PS
- Always speak with customer support politely, even if you are “boiling”;
- If to solve the problem one of the parties agrees to the seals, the other party should choose only the best seals;
- If the seals did not work, try to send a dog;
- Do not send cats and dogs to our support and in the building department, everyone has an allergy
:)
This publication was asked to be released without emoticons - breaking as I can
Pps
→
Cat Recognition Service
→
How many cats on Habré?
→
Random Cat Generator
Have a good weekend!