Skip to content

Instantly share code, notes, and snippets.

View Techmind's full-sized avatar

Bogunov Ilya Techmind

View GitHub Profile
@Techmind
Techmind / parse.php
Last active April 1, 2020 11:58
run with php -d memory_limit=4048M parse.php
<?php
//ini_set('memory_limit','4GB');
$pages = 30;
$size = 10000;
$total_games = 0;
$factions = [1 => [], 2 => [], 3 => [], 4 => [], 5 => [], 6 => []];
$players_by_game = [];
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/">
<channel rdf:about="http://www.xul.fr/xml/news.rdf">
<title>Title of the feed</title>
<link>http://www.xul.fr</link>
<description> Topic of the feed. </description>
<items>
<rdf:Seq>
<rdf:li rdf:resource="http://www.xul.fr/feed/RSS-1.0.html"/>
<rdf:li rdf:resource="http://www.xul.fr/en-xml-rss.html"/>
</rdf:Seq>
@Techmind
Techmind / test
Created September 17, 2018 09:00
test
test
#0 0x00007f52306f0d90 in std::pair<std::__detail::_Node_iterator<std::pair<tensorflow::StringPiece const, std::function<bool (tensorflow::Variant*)> >, false, true>, bool> std::_Hashtable<tensorflow::StringPiece, std::pair<tensorflow::StringPiece const, std::function<bool (tensorflow::Variant*)> >, std::allocator<std::pair<tensorflow::StringPiece const, std::function<bool (tensorflow::Variant*)> > >, std::__detail::_Select1st, std::equal_to<tensorflow::StringPiece>, tensorflow::hash<tensorflow::StringPiece>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::_M_emplace<std::pair<tensorflow::StringPiece, std::function<bool (tensorflow::Variant*)> > >(std::integral_constant<bool, true>, std::pair<tensorflow::StringPiece, std::function<bool (tensorflow::Variant*)> >&&) () from /usr/local/lib/python3.5/dist-packages/tensorflow/python/../libtensorflow_framework.so
#1 0x00007f52306f46a5 in tensorflow::
Array
(
[query] => Array
(
[filtered] => Array
(
[query] => Array
(
[match] => Array
(
array(1) {
["query"]=>
array(1) {
["filtered"]=>
array(2) {
["query"]=>
array(1) {
["match"]=>
array(1) {
["search_text"]=>
@Techmind
Techmind / gist:4588d35c3d25b9e22a71
Created December 10, 2015 08:05
valgring php-fpm.log with opcache, php-src 60fffd296abce5fc071f3c173c25a2696cf683c6, php-ext-handlersocketi - 9ff510f7010e1961dcd070a6339c0fe1c3bd359f
==8014== Memcheck, a memory error detector
==8014== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==8014== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==8014== Command: /home/vagrant/php7/usr/sbin/php-fpm --nodaemonize --fpm-config /etc/php7/fpm/php-fpm.conf
==8014== Parent PID: 17209
==8014==
==8015== Invalid write of size 4
==8015== at 0x603F5F1: hs_index_object_init (handlersocketi_index.c:751)
==8015== by 0x603F9B3: handlersocketi_create_index (handlersocketi_index.c:794)
==8015== by 0x603B70B: zim_HandlerSocketi_open_index (handlersocketi_class.c:549)
FORMAT: 1A
# A
text1
## B [/questions]
### C [GET]
select * from reporting_hourly limit 5;
+----+-------+-------------+------------+----------+------------+-------------+---------+---------------------+-----+---------+---------------------+-------------+----------+--------+---------------------+----------+-------------+--------+-------+-------------+
| id | count | campaign_id | event_type | movie_id | paysite_id | tubesite_id | browser | time | asn | zone_id | count_thirdparty_id | views_count | external | repeat | visit_view_time | price | language_id | geo_id | os_id | platform_id |
+----+-------+-------------+------------+----------+------------+-------------+---------+---------------------+-----+---------+---------------------+-------------+----------+--------+---------------------+----------+-------------+--------+-------+-------------+
| 1 | 1 | 0 | 3 | 0 | 0 | 2 | Firefox | 2015-04-21 09:00:00 | 0 | 3 | 1 | 0 | 0 | 0 | 0000-00-00 00:
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAEYklEQVR4Xu3UAQkAAAwCwdm/9HI83BLIOdw5AgQIRAQWySkmAQIEzmB5AgIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQ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