作って頂いたものをメモ(「パクる」とも言う)
江端智一のホームページ
作って頂いたものをメモ(「パクる」とも言う)
(1)"gintoyo_postgres_1 docker-entrypoint.sh Up 0.0.0.0:8910->5432/tcp" というDockerコンンポーネントが動作中であるとする。
(2)docker exec -it gintoyo_postgres_1 psql -U postgres -d ca_sim という方法で、"ca_sim"というDBに直接アクセスできるものとする。
(3)docker exec -it gintoyo_postgres_1 bash → psql -d ca_sim -p 8910 -U postgres という方法でも"ca_sim"というDBにアクセスできるものとする
ca_sim というDBと全く同じものを、ca_sim9という名前で作る
(Step.1) Dockerで直接DBには入らないで、シェルでログインする
C:\Users\ebata\20210203\gintoyo>docker exec -it gintoyo_postgres_1 bash
ca_sim=# select user_id, position_before, position_after from request_log_view;
user_id | position_before | position_after
---------+----------------------------------------------------+----------------------------------------------------
307 | 0101000020E61000003ACC9717607961407CB779E3A4D44140 | 0101000020E61000003EAE0D1563796140B56D1805C1D34140
491 | 0101000020E61000009E5DBEF56179614063EFC517EDD34140 | 0101000020E6100000F7AE415F7A7961406684B70721D44140
57 | 0101000020E61000001A8A3BDE6479614020D1048A58D44140 | 0101000020E610000079909E2287796140FD8348861CD34140
320 | 0101000020E6100000266F80996F79614041F50F2219D44140 | 0101000020E6100000740CC85E6F796140F58079C894D34140
208 | 0101000020E6100000D07B630880796140E84B6F7F2ED44140 | 0101000020E6100000199293895B7961405F5E807D74D44140
60 | 0101000020E6100000751E15FF7779614023A298BC01D44140 | 0101000020E6100000EF75525F96796140EFCA2E185CD34140
見易く、st_astextを使うと、
ca_sim=# select user_id, st_astext(position_before), st_astext(position_after) from request_log_view;
user_id | st_astext | st_astext
---------+-----------------------------+-----------------------------
307 | POINT(139.79298 35.661282) | POINT(139.793345 35.654328)
491 | POINT(139.793208 35.655673) | POINT(139.796188 35.657258)
57 | POINT(139.793563 35.658952) | POINT(139.797746 35.649308)
320 | POINT(139.794873 35.657017) | POINT(139.794845 35.652978)
208 | POINT(139.796879 35.657669) | POINT(139.792424 35.659805)
60 | POINT(139.795898 35.656303) | POINT(139.799606 35.651248)
となる。さて、上記の点が、ある円に属するかどうかを、判定したいんだが ・・・ まだ見つかっていない。
# 絶対にあるはずだ ―― と信じて、今日は寝よう。
起きた。活動開始。
https://myonyomu.hatenablog.com/
に、
gisdb=# CREATE INDEX ON t1 USING gist (p1); CREATE INDEX gisdb=# SELECT id, ST_AsText(p1) FROM t1 WHERE p1 && Box2D(ST_GeomFromText('LINESTRING(139.5 36.5, 139.6 36.6)', 4326)); id ----- 11 323 503 663 669 683 804 (7 rows)
を見つけた。
矩形(四角形)に関しては、これでなんとかなりそう。
では、試してみよう。
の、user_idを取り出せるか?
ca_sim=# select user_id, ST_AsText(position_before) from request_log_view WHERE position_before && Box2D(ST_GeomFromText('LINESTRING(139.791326 36.663475, 139.795424 35.661496)', 4326));user_id | st_astext---------+-----------------------------149 | POINT(139.792855 35.662321)112 | POINT(139.79406 35.662354)159 | POINT(139.793198 35.662567)12 | POINT(139.792911 35.662442)355 | POINT(139.792903 35.662375)131 | POINT(139.793011 35.662165)490 | POINT(139.793132 35.662414)350 | POINT(139.792722 35.662398)301 | POINT(139.792798 35.662261)(9 rows)ca_sim=#
では、
まず、赤の部分と青の部分を指定して・・・
ca_sim=# select user_id, ST_AsText(position_before),ST_AsText(position_after) from request_log_view WHERE (position_before && Box2D(ST_GeomFromText('LINESTRING(139.791326 36.663475, 139.795424 35.661496)', 4326))) && (position_after && Box2D(ST_GeomFromText('LINESTRING(139.780310 35.643812,139.783851 35.641214)', 4326)));
ERROR: operator does not exist: boolean && boolean
LINE 1: ...791326 36.663475, 139.795424 35.661496)', 4326))) && (positi...
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
え、なんで、こうなるの? これで普通いけるよね ..... (ググりながら2~3時間経過)
まさか、&& と AND が違うなんてことないよね ―― と思って、試しにやってみたら、
ca_sim=# select user_id, ST_AsText(position_before),ST_AsText(position_after) from request_log_view WHERE (position_before && Box2D(ST_GeomFromText('LINESTRING(139.791326 36.663475, 139.795424 35.661496)', 4326))) AND (position_after && Box2D(ST_GeomFromText('LINESTRING(139.780310 35.643812,139.783851 35.641214)', 4326)));
user_id | st_astext | st_astext
---------+-----------------------------+-----------------------------
149 | POINT(139.792855 35.662321) | POINT(139.782598 35.642426)
(1 row)
―― 通った。
まだ、円形ではないけど、とりあえず当初の目的(に近いとろまで)に達成。
ーーーーー
では、この#149さんの動きを見てみよう。
ca_sim=# select * from user_position_view where id = 149;
date_index | tm | id | x | y | position
------------+---------------------+-----+-----------+-----------+----------------------------------------------------
1 | 2021-01-01 07:57:45 | 149 | 139.79286 | 35.66232 | 0101000020E61000000BEF72115F7961401D3A3DEFC6D44140
1 | 2021-01-01 07:58:00 | 149 | 139.79286 | 35.66232 | 0101000020E61000000BEF72115F7961401D3A3DEFC6D44140
1 | 2021-01-01 07:58:15 | 149 | 139.79286 | 35.66232 | 0101000020E61000000BEF72115F7961401D3A3DEFC6D44140
1 | 2021-01-01 07:58:30 | 149 | 139.79286 | 35.66232 | 0101000020E61000000BEF72115F7961401D3A3DEFC6D44140
1 | 2021-01-01 07:58:45 | 149 | 139.79286 | 35.66232 | 0101000020E61000000BEF72115F7961401D3A3DEFC6D44140
1 | 2021-01-01 07:59:00 | 149 | 139.79286 | 35.66232 | 0101000020E61000000BEF72115F7961401D3A3DEFC6D44140
1 | 2021-01-01 07:59:15 | 149 | 139.79286 | 35.66232 | 0101000020E61000000BEF72115F7961401D3A3DEFC6D44140
1 | 2021-01-01 07:59:30 | 149 | 139.79286 | 35.66232 | 0101000020E61000000BEF72115F7961401D3A3DEFC6D44140
1 | 2021-01-01 07:59:45 | 149 | 139.79286 | 35.66232 | 0101000020E61000000BEF72115F7961401D3A3DEFC6D44140
1 | 2021-01-01 08:00:00 | 149 | 139.79286 | 35.66232 | 0101000020E61000000BEF72115F7961401D3A3DEFC6D44140
1 | 2021-01-01 08:00:15 | 149 | 139.79286 | 35.66232 | 0101000020E61000000BEF72115F7961401D3A3DEFC6D44140
1 | 2021-01-01 08:00:30 | 149 | 139.79286 | 35.66232 | 0101000020E61000000BEF72115F7961401D3A3DEFC6D44140
1 | 2021-01-01 08:00:45 | 149 | 139.79286 | 35.66232 | 0101000020E61000000BEF72115F7961401D3A3DEFC6D44140
1 | 2021-01-01 08:01:00 | 149 | 139.79286 | 35.66232 | 0101000020E61000000BEF72115F7961401D3A3DEFC6D44140
1 | 2021-01-01 08:01:15 | 149 | 139.79286 | 35.66232 | 0101000020E61000000BEF72115F7961401D3A3DEFC6D44140
1 | 2021-01-01 08:01:30 | 149 | 139.79286 | 35.66232 | 0101000020E61000000BEF72115F7961401D3A3DEFC6D44140
1 | 2021-01-01 08:01:45 | 149 | 139.79286 | 35.66232 | 0101000020E61000000BEF72115F7961401D3A3DEFC6D44140
1 | 2021-01-01 08:02:00 | 149 | 139.79286 | 35.66232 | 0101000020E61000000BEF72115F7961401D3A3DEFC6D44140
1 | 2021-01-01 08:02:15 | 149 | 139.79286 | 35.66232 | 0101000020E61000000BEF72115F7961401D3A3DEFC6D44140
1 | 2021-01-01 08:02:30 | 149 | 139.79286 | 35.66232 | 0101000020E61000000BEF72115F7961401D3A3DEFC6D44140
1 | 2021-01-01 08:02:45 | 149 | 139.79298 | 35.66228 | 0101000020E61000000A48FB1F607961408FE1B19FC5D44140
1 | 2021-01-01 08:03:00 | 149 | 139.7931 | 35.66223 | 0101000020E61000008D0C721761796140AE2EA704C4D44140
1 | 2021-01-01 08:03:15 | 149 | 139.79318 | 35.662155 | 0101000020E6100000BC7669C36179614032755776C1D44140
1 | 2021-01-01 08:03:30 | 149 | 139.79326 | 35.66208 | 0101000020E6100000EBE0606F6279614086376BF0BED44140
1 | 2021-01-01 08:03:45 | 149 | 139.7932 | 35.661995 | 0101000020E6100000514D49D661796140F9122A38BCD44140
1 | 2021-01-01 08:04:00 | 149 | 139.7931 | 35.66191 | 0101000020E6100000A54E4013617961409B728577B9D44140
1 | 2021-01-01 08:04:15 | 149 | 139.79301 | 35.661827 | 0101000020E6100000EC2E5052607961400E4E44BFB6D44140
1 | 2021-01-01 08:04:30 | 149 | 139.79291 | 35.66179 | 0101000020E6100000E7FEEA715F79614020ED7F80B5D44140
1 | 2021-01-01 08:04:45 | 149 | 139.79279 | 35.661766 | 0101000020E610000005323B8B5E79614098512CB7B4D44140
1 | 2021-01-01 08:05:00 | 149 | 139.79268 | 35.661743 | 0101000020E61000002F8672A25D796140DF313CF6B3D44140
1 | 2021-01-01 08:05:15 | 149 | 139.79257 | 35.661716 | 0101000020E61000004EB9C2BB5C7961405796E82CB3D44140
1 | 2021-01-01 08:05:30 | 149 | 139.79247 | 35.661694 | 0101000020E6100000780DFAD25B7961409F76F86BB2D44140
1 | 2021-01-01 08:05:45 | 149 | 139.79234 | 35.66167 | 0101000020E610000096404AEC5A796140E75608ABB1D44140
1 | 2021-01-01 08:08:15 | 149 | 139.79189 | 35.660706 | 0101000020E610000009C3802557796140809E060C92D44140
1 | 2021-01-01 08:08:30 | 149 | 139.79202 | 35.659588 | 0101000020E6100000CD76853E58796140217365506DD44140
1 | 2021-01-01 08:08:45 | 149 | 139.79245 | 35.65855 | 0101000020E6100000B3B27DC85B796140F163CC5D4BD44140
1 | 2021-01-01 08:09:00 | 149 | 139.79272 | 35.657696 | 0101000020E6100000DC114E0B5E79614011DF89592FD44140
1 | 2021-01-01 08:09:15 | 149 | 139.79266 | 35.656853 | 0101000020E6100000417E36725D796140C6A354C213D44140
1 | 2021-01-01 08:09:30 | 149 | 139.79323 | 35.655987 | 0101000020E61000006902452C62796140C3482F6AF7D34140
1 | 2021-01-01 08:09:45 | 149 | 139.7939 | 35.65513 | 0101000020E610000060E811A36779614001DD9733DBD34140
1 | 2021-01-01 08:10:00 | 149 | 139.79408 | 35.65424 | 0101000020E6100000F48AA71E6979614075E61E12BED34140
1 | 2021-01-01 08:10:15 | 149 | 139.79427 | 35.65335 | 0101000020E6100000882D3D9A6A796140E9EFA5F0A0D34140
1 | 2021-01-01 08:10:30 | 149 | 139.79384 | 35.652473 | 0101000020E61000005A2BDA1C6779614022C7D63384D34140
1 | 2021-01-01 08:10:45 | 149 | 139.79301 | 35.651573 | 0101000020E61000008D261763607961404276DEC666D34140
1 | 2021-01-01 08:11:00 | 149 | 139.79219 | 35.650677 | 0101000020E6100000B4006DAB5979614093A9825149D34140
1 | 2021-01-01 08:11:15 | 149 | 139.79135 | 35.64979 | 0101000020E610000011363CBD52796140191EFB592CD34140
1 | 2021-01-01 08:11:30 | 149 | 139.7904 | 35.649372 | 0101000020E6100000DAAED0074B796140B56FEEAF1ED34140
1 | 2021-01-01 08:12:00 | 149 | 139.78836 | 35.648926 | 0101000020E61000003C50A73C3A796140454772F90FD34140
1 | 2021-01-01 08:12:15 | 149 | 139.78905 | 35.648067 | 0101000020E6100000E5982CEE3F796140F44E05DCF3D24140
1 | 2021-01-01 08:12:30 | 149 | 139.788 | 35.647343 | 0101000020E610000007EA944737796140E3A9471ADCD24140
1 | 2021-01-01 08:12:45 | 149 | 139.78703 | 35.64754 | 0101000020E6100000D63906642F796140096D3997E2D24140
1 | 2021-01-01 08:13:15 | 149 | 139.7873 | 35.646866 | 0101000020E6100000BDA9488531796140A9F6E978CCD24140
1 | 2021-01-01 08:13:30 | 149 | 139.78622 | 35.64615 | 0101000020E61000005645B8C928796140BB270F0BB5D24140
1 | 2021-01-01 08:13:45 | 149 | 139.78516 | 35.645443 | 0101000020E61000004FE960FD1F79614080BBECD79DD24140
1 | 2021-01-01 08:14:00 | 149 | 139.7842 | 35.645493 | 0101000020E6100000B20FB22C1879614031EA5A7B9FD24140
1 | 2021-01-01 08:14:15 | 149 | 139.78342 | 35.64642 | 0101000020E610000050A73CBA11796140DAC534D3BDD24140
1 | 2021-01-01 08:14:30 | 149 | 139.78328 | 35.64658 | 0101000020E6100000C898BB9610796140849B8C2AC3D24140
1 | 2021-01-01 08:14:45 | 149 | 139.78336 | 35.64649 | 0101000020E610000027874F3A11796140A41CCC26C0D24140
1 | 2021-01-01 08:15:00 | 149 | 139.78343 | 35.646397 | 0101000020E61000007A54FCDF11796140F321A81ABDD24140
1 | 2021-01-01 08:15:15 | 149 | 139.78351 | 35.646305 | 0101000020E6100000CD21A9851279614012A3E716BAD24140
1 | 2021-01-01 08:15:30 | 149 | 139.78358 | 35.64621 | 0101000020E610000020EF552B1379614061A8C30AB7D24140
1 | 2021-01-01 08:15:45 | 149 | 139.78366 | 35.64612 | 0101000020E61000007FDDE9CE1379614080290307B4D24140
1 | 2021-01-01 08:16:00 | 149 | 139.78375 | 35.646027 | 0101000020E6100000D2AA967414796140CF2EDFFAB0D24140
1 | 2021-01-01 08:16:15 | 149 | 139.78383 | 35.64593 | 0101000020E61000002578431A157961401E34BBEEADD24140
1 | 2021-01-01 08:16:30 | 149 | 139.7839 | 35.64584 | 0101000020E61000008466D7BD157961403DB5FAEAAAD24140
1 | 2021-01-01 08:16:45 | 149 | 139.78398 | 35.64575 | 0101000020E6100000D7338463167961408CBAD6DEA7D24140
1 | 2021-01-01 08:17:00 | 149 | 139.78406 | 35.645657 | 0101000020E61000002A01310917796140AC3B16DBA4D24140
1 | 2021-01-01 08:17:15 | 149 | 139.78413 | 35.64556 | 0101000020E610000089EFC4AC17796140FB40F2CEA1D24140
1 | 2021-01-01 08:17:30 | 149 | 139.78423 | 35.64547 | 0101000020E6100000DCBC7152187961401AC231CB9ED24140
1 | 2021-01-01 08:17:45 | 149 | 139.7843 | 35.64538 | 0101000020E61000002F8A1EF81879614069C70DBF9BD24140
1 | 2021-01-01 08:18:00 | 149 | 139.78438 | 35.645287 | 0101000020E61000008257CB9D1979614088484DBB98D24140
1 | 2021-01-01 08:18:15 | 149 | 139.78445 | 35.64519 | 0101000020E6100000E1455F411A796140D74D29AF95D24140
1 | 2021-01-01 08:18:30 | 149 | 139.78453 | 35.6451 | 0101000020E610000034130CE71A796140F6CE68AB92D24140
1 | 2021-01-01 08:18:45 | 149 | 139.78462 | 35.64501 | 0101000020E610000033F9669B1B796140573F36C98FD24140
1 | 2021-01-01 08:19:00 | 149 | 139.78471 | 35.644928 | 0101000020E6100000035B25581C79614059A7CAF78CD24140
1 | 2021-01-01 08:19:15 | 149 | 139.78479 | 35.644833 | 0101000020E61000006249B9FB1C796140A8ACA6EB89D24140
1 | 2021-01-01 08:19:30 | 149 | 139.78487 | 35.64474 | 0101000020E6100000C1374D9F1D796140F7B182DF86D24140
1 | 2021-01-01 08:19:45 | 149 | 139.78494 | 35.64465 | 0101000020E61000002026E1421E79614045B75ED383D24140
1 | 2021-01-01 08:20:00 | 149 | 139.78502 | 35.644554 | 0101000020E61000007F1475E61E79614094BC3AC780D24140
1 | 2021-01-01 08:20:15 | 149 | 139.7851 | 35.644463 | 0101000020E6100000EA23F0871F796140E3C116BB7DD24140
1 | 2021-01-01 08:20:30 | 149 | 139.78517 | 35.644367 | 0101000020E61000004912842B2079614032C7F2AE7AD24140
1 | 2021-01-01 08:20:45 | 149 | 139.78525 | 35.644276 | 0101000020E6100000A80018CF2079614081CCCEA277D24140
1 | 2021-01-01 08:21:00 | 149 | 139.78534 | 35.644184 | 0101000020E610000007EFAB7221796140D0D1AA9674D24140
1 | 2021-01-01 08:21:15 | 149 | 139.78542 | 35.64409 | 0101000020E610000066DD3F16227961401FD7868A71D24140
1 | 2021-01-01 08:21:30 | 149 | 139.78549 | 35.643997 | 0101000020E6100000C5CBD3B9227961406EDC627E6ED24140
1 | 2021-01-01 08:21:45 | 149 | 139.78557 | 35.643906 | 0101000020E610000023BA675D23796140BDE13E726BD24140
1 | 2021-01-01 08:22:00 | 149 | 139.78564 | 35.64381 | 0101000020E61000009AEAC9FC23796140DC627E6E68D24140
1 | 2021-01-01 08:22:15 | 149 | 139.78552 | 35.64375 | 0101000020E610000000E484092379614037E2C96E66D24140
1 | 2021-01-01 08:22:30 | 149 | 139.78542 | 35.643684 | 0101000020E61000003659A31E227961405072874D64D24140
1 | 2021-01-01 08:22:45 | 149 | 139.78531 | 35.64362 | 0101000020E61000006CCEC133217961409886E12362D24140
1 | 2021-01-01 08:23:00 | 149 | 139.78519 | 35.643555 | 0101000020E6100000A243E04820796140B1169F0260D24140
1 | 2021-01-01 08:23:15 | 149 | 139.78508 | 35.64349 | 0101000020E6100000D8B8FE5D1F796140CAA65CE15DD24140
1 | 2021-01-01 08:23:30 | 149 | 139.78497 | 35.643425 | 0101000020E61000000E2E1D731E796140E3361AC05BD24140
1 | 2021-01-01 08:23:45 | 149 | 139.78485 | 35.64336 | 0101000020E610000044A33B881D7961402B4B749659D24140
1 | 2021-01-01 08:24:00 | 149 | 139.78474 | 35.643295 | 0101000020E61000007A185A9D1C79614044DB317557D24140
1 | 2021-01-01 08:24:15 | 149 | 139.78464 | 35.64323 | 0101000020E6100000B08D78B21B7961405D6BEF5355D24140
1 | 2021-01-01 08:24:30 | 149 | 139.78453 | 35.643158 | 0101000020E61000009F3C2CD41A796140C498F4F752D24140
1 | 2021-01-01 08:24:45 | 149 | 139.78442 | 35.64308 | 0101000020E61000005E6743FE19796140E9D66B7A50D24140
1 | 2021-01-01 08:25:00 | 149 | 139.78432 | 35.643013 | 0101000020E61000007079AC1919796140616F62484ED24140
1 | 2021-01-01 08:25:15 | 149 | 139.78418 | 35.64297 | 0101000020E610000059DE550F1879614062A3ACDF4CD24140
1 | 2021-01-01 08:25:30 | 149 | 139.78406 | 35.642925 | 0101000020E61000004E64E60217796140925B936E4BD24140
1 | 2021-01-01 08:25:45 | 149 | 139.78394 | 35.642883 | 0101000020E610000036C98FF815796140C2137AFD49D24140
1 | 2021-01-01 08:26:00 | 149 | 139.7838 | 35.64284 | 0101000020E61000001F2E39EE14796140C347C49448D24140
1 | 2021-01-01 08:26:15 | 149 | 139.78368 | 35.642796 | 0101000020E61000000893E2E313796140F3FFAA2347D24140
1 | 2021-01-01 08:26:30 | 149 | 139.78355 | 35.642754 | 0101000020E6100000FC1873D712796140F433F5BA45D24140
1 | 2021-01-01 08:26:45 | 149 | 139.78342 | 35.642708 | 0101000020E6100000E57D1CCD1179614025ECDB4944D24140
1 | 2021-01-01 08:27:00 | 149 | 139.7833 | 35.642666 | 0101000020E6100000CEE2C5C21079614055A4C2D842D24140
1 | 2021-01-01 08:27:15 | 149 | 139.78317 | 35.642624 | 0101000020E6100000B6476FB80F79614056D80C7041D24140
1 | 2021-01-01 08:27:30 | 149 | 139.78304 | 35.64258 | 0101000020E6100000ABCDFFAB0E7961408690F3FE3FD24140
1 | 2021-01-01 08:27:45 | 149 | 139.78291 | 35.642532 | 0101000020E61000009432A9A10D796140B648DA8D3ED24140
1 | 2021-01-01 08:28:00 | 149 | 139.78279 | 35.64249 | 0101000020E61000007D9752970C796140B77C24253DD24140
1 | 2021-01-01 08:28:15 | 149 | 139.78265 | 35.64245 | 0101000020E610000065FCFB8C0B796140E7340BB43BD24140
(112 rows)
ふむ、移動時間は、約30分というところか。
ゆりかもめを使うとこんな感じ
バスだと、こんな感じ
#149の人をトラッキングしてみました。
QGIS3 → postGISから「新しいpostGIS接続を作成する」
(その前に、docker psで、DBのポート番号を抑えておくこと 0ba7ddf90bf2 pamtrak06/postgis-pgrouting-osm:latest "docker-entrypoint.s…" 4 hours ago Up 4 hours 0.0.0.0:8911->5432/tcp toyosu_postgres_1)
で、接続に成功したら、メニューの「データベース」から「DBマネージャ」を選択して、以下の順番に入力をしていく。
すると、こんな感じのものが出てくる。
waysを合わせてみるとこんな感じ
さらに、ways_vertices_pgrを重ねると、こんな感じ
#149さんの連続ルートはこれで見える。
select moving_route_log from request_log_view where user_id = 149;
■スマホを見て、走っているのバスに”飛び乗っている”(サービス稼動中の乗車の例)
①待ち時間が0の乗客を抽出する。(到着時刻-出発時刻-所要時間≒0)
到着時刻 request_log_view.time_after
出発時刻 request_log_view.time_before
所要時間 request_log_view.distance_on_foot [meter] と、 request_log_view.distance_by_bus [meter]、バスの速さ 30 km/h、人の速さ 3 km/h から計算する。
②ユーザのidから、移動履歴を取得する。
まず軽く実験 (time_after - time_before < '10 mins'を取り出す)
ca_sim=# select time_after, time_before from request_log_view where time_after - time_before < '10 mins';
time_after | time_before
------------+-------------
10:37:15 | 10:28:00
11:49:30 | 11:41:15
20:36:30 | 20:26:45
22:19:15 | 22:09:45
00:00:00 | 23:48:45
00:00:00 | 23:47:30
00:00:00 | 11:25:45
00:00:00 | 23:48:00
00:00:00 | 23:24:15
00:00:00 | 23:59:15
00:00:00 | 23:39:15
00:00:00 | 23:10:30
時刻と時間を表示させてみる 後半の2つは秒数になっている
ca_sim=# select time_after, time_before, distance_on_foot/0.8333, distance_by_bus/8.333 from request_log_view ;
time_after | time_before | ?column? | ?column?
------------+-------------+--------------------+--------------------
03:37:45 | 03:26:15 | 511.5950243478489 | 84.87666166802921
03:43:30 | 03:22:00 | 494.1959763351471 | 252.84164686899976
03:46:45 | 03:32:00 | 593.0148094595659 | 0
03:52:15 | 03:42:00 | 614.8145339876095 | 0
03:58:45 | 00:27:15 | 1931.1687506562762 | 402.76739975849034
さて、HH:MM:SSを"秒"の表記にする方法は、こうするらしい
ca_sim=# select time_after, time_before, time_after - time_before, (extract(epoch from (time_after - time_before)::time))::numeric from request_log_view;
time_after | time_before | ?column? | date_part
------------+-------------+-----------+-----------
00:28:00 | 00:16:15 | 00:11:45 | 705
00:32:00 | 00:12:15 | 00:19:45 | 1185
00:40:15 | 00:18:45 | 00:21:30 | 1290
00:41:45 | 00:11:45 | 00:30:00 | 1800
00:43:30 | 00:20:45 | 00:22:45 | 1365
では、本命 (到着時間 ー 出発時間 ー 歩行時間 ー 乗車時間 < 60(秒)以内)の乗客をピックアップしろ。
ca_sim=# select user_id,time_after, time_before, time_after - time_before, distance_on_foot, distance_by_bus from request_log_view where extract(epoch from (time_after - time_before)::time)::numeric - distance_on_foot/0.8333 - distance_by_bus/8.333 < 60;
user_id | time_after | time_before | ?column? | distance_on_foot | distance_by_bus
---------+------------+-------------+-----------+------------------+-----------------
234 | 00:28:00 | 00:16:15 | 00:11:45 | 563.23376 | 0
275 | 01:23:30 | 01:12:00 | 00:11:30 | 536.52704 | 0
324 | 03:23:15 | 03:07:45 | 00:15:30 | 731.304 | 0
118 | 03:52:15 | 03:42:00 | 00:10:15 | 512.32495 | 0
57 | 04:16:00 | 03:48:00 | 00:28:00 | 1388.9436 | 0
157 | 07:59:45 | 07:47:15 | 00:12:30 | 618.9883 | 0
458 | 07:59:45 | 07:41:45 | 00:18:00 | 898.75244 | 0
397 | 08:37:00 | 08:09:15 | 00:27:45 | 1363.375 | 0
410 | 08:52:00 | 08:27:30 | 00:24:30 | 1221.9526 | 0
395 | 09:52:15 | 09:41:45 | 00:10:30 | 516.0718 | 0
92 | 09:57:00 | 09:36:30 | 00:20:30 | 1023.69165 | 0
310 | 10:02:15 | 09:50:15 | 00:12:00 | 564.49817 | 0
90 | 10:02:45 | 09:50:45 | 00:12:00 | 596.32117 | 0
155 | 10:28:00 | 10:14:15 | 00:13:45 | 671.9812 | 0
178 | 11:49:30 | 11:41:15 | 00:08:15 | 372.38193 | 0
315 | 12:09:15 | 11:56:15 | 00:13:00 | 643.7695 | 0
481 | 12:11:00 | 11:55:45 | 00:15:15 | 685.71277 | 348.4668
399 | 12:11:45 | 11:49:00 | 00:22:45 | 1123.1423 | 0
127 | 15:00:15 | 14:41:30 | 00:18:45 | 913.04913 | 0
404 | 12:13:30 | 11:41:15 | 00:32:15 | 1562.6414 | 0
198 | 12:15:30 | 11:55:30 | 00:20:00 | 959.8891 | 0
32 | 12:48:15 | 12:27:30 | 00:20:45 | 1014.6684 | 0
116 | 13:06:15 | 12:48:00 | 00:18:15 | 911.0616 | 0
130 | 13:25:00 | 13:05:30 | 00:19:30 | 971.8267 | 0
411 | 15:42:00 | 15:26:00 | 00:16:00 | 788.83246 | 0
229 | 14:07:15 | 13:50:30 | 00:16:45 | 835.96875 | 0
61 | 14:15:45 | 14:01:15 | 00:14:30 | 684.7999 | 0
79 | 14:32:15 | 14:21:45 | 00:10:30 | 494.44864 | 0
317 | 22:20:00 | 22:05:00 | 00:15:00 | 730.14026 | 0
133 | 17:00:30 | 16:31:15 | 00:29:15 | 1454.8848 | 0
97 | 17:18:00 | 17:03:30 | 00:14:30 | 682.81305 | 0
193 | 18:29:30 | 18:05:30 | 00:24:00 | 1199.9945 | 0
80 | 18:55:00 | 18:44:15 | 00:10:45 | 497.08746 | 0
271 | 19:48:45 | 19:36:00 | 00:12:45 | 622.33954 | 0
298 | 19:50:15 | 19:36:00 | 00:14:15 | 694.23785 | 0
13 | 19:55:30 | 19:36:00 | 00:19:30 | 961.26294 | 0
496 | 22:19:15 | 22:09:45 | 00:09:30 | 447.28525 | 0
305 | 21:10:30 | 20:44:45 | 00:25:45 | 1262.3821 | 0
283 | 21:14:00 | 21:00:00 | 00:14:00 | 652.0706 | 0
67 | 21:29:00 | 21:05:45 | 00:23:15 | 1158.776 | 0
124 | 22:43:15 | 22:17:00 | 00:26:15 | 1281.6383 | 0
309 | 23:05:00 | 22:46:15 | 00:18:45 | 921.8486 | 0
338 | 00:00:00 | 23:59:15 | -23:59:15 | 0 | 0
(43 rows)
よし。ラストだ
■歩いて5分のコンビニからの帰宅にも使われている(近距離利用の例)
①出発座標と到着座標の距離が近い、かつ、バスに乗っている ユーザIDを取得する。
出発、到着: request_log_view.position_before、request_log_view.position_after
バスに乗っている: request_log_view.distance_by_bus > 0
②ユーザのidから、移動履歴を取得する。
5分以内は1人もいなかったけど、10分以内に1人だけいた
ca_sim=# select user_id,time_after, time_before, time_after - time_before, distance_on_foot, distance_by_bus from request_log_view where (extract(epoch from (time_after - time_before)::time)::numeric < 600) AND distance_
by_bus/8.333 > 0;
user_id | time_after | time_before | ?column? | distance_on_foot | distance_by_bus
---------+------------+-------------+----------+------------------+-----------------
14 | 10:37:15 | 10:28:00 | 00:09:15 | 92.753555 | 982.5703
(1 row)
結局、知り合いの方から教えて貰ったの方法で実現できたみたい (35.65457592, 139.79652749 を中心に300メートル)
ca_sim=# select user_id, ST_AsText(position_before) from request_log_view where st_dwithin(position_before, st_geomfromtext('POINT(139.79652749 35.65457592)', 4326), 0.03233394 / 3600 * 300);
user_id | st_astext
---------+-----------------------------
368 | POINT(139.797258 35.65431)
298 | POINT(139.795197 35.656211)
396 | POINT(139.795056 35.656002)
212 | POINT(139.794265 35.655042)
では、これでファイナル。
ca_sim=# select user_id, ST_AsText(position_before), ST_AsText(position_after) from request_log_view where st_dwithin(position_before, st_geomfromtext('POINT(1
39.79652749 35.65457592)', 4326), 0.03233394 / 3600 * 300) AND st_dwithin(position_after, st_geomfromtext('POINT(139.78482207 35.64501561)', 4326), 0.03233394 / 3600 * 300);
user_id | st_astext | st_astext
---------+-----------------------------+-----------------------------
388 | POINT(139.796825 35.653691) | POINT(139.783568 35.645798)
159 | POINT(139.794932 35.65632) | POINT(139.783022 35.645729)
316 | POINT(139.796816 35.656201) | POINT(139.787289 35.644699)
454 | POINT(139.795517 35.655392) | POINT(139.784164 35.646674)
428 | POINT(139.795264 35.655453) | POINT(139.785816 35.64436)
318 | POINT(139.79846 35.653964) | POINT(139.782998 35.643485)
349 | POINT(139.798028 35.654032) | POINT(139.785334 35.643373)
115 | POINT(139.795711 35.6562) | POINT(139.786663 35.645087)
72 | POINT(139.797807 35.656475) | POINT(139.785665 35.643757)
(9 rows)
忘れない内に、メモを色々残しておこう。
ca_sim=# SELECT home FROM user_param where st_dwithin("home", st_geomfromtext('POINT(139.79652749 35.65457592)', 4326), 0.03233394 / 3600 * 300);
home
----------------------------------------------------
0101000020E6100000B058C3456E796140FB1F60ADDAD34140
0101000020E610000040A6B5696C796140E19524CFF5D34140
0101000020E610000021904B1C79796140A2258FA7E5D34140
0101000020E610000081CCCEA277796140390B7BDAE1D34140
以上
"dummy.py"というファイルを投稿画面に添付しようとしたらこんな画面が出てきました。
で、昔なんかやったことがあるな、と思い出しながら、「WP Add Mime Types」というプラグインをインストールしたのを思い出しました。
以下のように設定したら、これで上手くいくようです。
以上
官能の人工知能 ~深層学習を最も分かりやすく説明するパラダイムOver the AI ―― AIの向こう側に(22)
で使ったソースコード(cpp)が見つからなかったので、添付しておきます。
I could not find the source code (cpp) used in the following, so I am attaching it.
ついでに、破壊実験の方も
Code for destructive experiments
口に出せない介護問題の真実 ~「働き方改革」の問題点とは何なのか
The Truth About Unspoken Nursing Care Issues - What is the Problem with "Workplace Reform"?
pandoc -s sample.md -o sample.html
pandoc -s sample.md -o sample.docx
pandoc -s sample.html -o sample.md
pandoc -s sample.docx -o sample.md
この問題、
Step 4/7 : WORKDIR /go/hitachi_ride_hailing_go
---> Using cache
---> 62e20b49fae8
Step 5/7 : COPY . .
ERROR: Service 'app' failed to build: Error processing tar file(exit status 1):write /go/xxxxx_ride_hailing_go/static/fonts/Noto Sans Regular/12800-13055.pbf : no space left on device
は、
ディスクスペースを開けるのに"docker system prune"は便利だが、濫用しないこと。docker-compose buildが再び上手く動くという保障はないぞ
で潰した。
しかし、
go: finding github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f
go: finding github.com/tidwall/match v1.0.1
go: error loading module requirements
ERROR: Service 'app' failed to build: The command '/bin/sh -c apk add --no-cache git g++ curl ? && go mod download ? && GOOS=linux GOARCH=amd64 go build cmd/server/main.go ? && curl -L https://github.com/golang-migrate/migrate/releases/download/v4.13.0/migrate.linux-amd64.tar.gz | tar xvz ? && mv migrate.linux-amd64 /usr/local/bin/migrate' returned a non-zero code: 1
が、どうしても取れない。(全部のコマンドをバラバラにして実行する、までした)
何時間も格闘しているうちに、同じディレクトリにある、go.modの記載内容ではないか、と疑い始めたが、
module codes.xxxxx.co.jp/xxxxx/xxxxxx_ride_hailing_gogo 1.12require (github.com/dgrijalva/jwt-go v3.2.0+incompatiblegithub.com/go-chi/chi v4.0.2+incompatiblegithub.com/go-chi/jwtauth v4.0.2+incompatiblegithub.com/gomodule/redigo v2.0.0+incompatiblegithub.com/gorilla/websocket v1.4.0github.com/jmoiron/sqlx v1.2.0github.com/kawasin73/htask v0.4.1github.com/lib/pq v1.1.1github.com/rs/xid v1.2.1github.com/tidwall/boxtree v0.0.0-20180928224827-327de8d774d7 // indirectgithub.com/tidwall/geojson v1.1.3github.com/tidwall/gjson v1.2.1github.com/tidwall/match v1.0.1 // indirectgithub.com/tidwall/pretty v0.0.0-20190325153808-1166b9ac2b65 // indirectgithub.com/tidwall/sjson v1.0.4 // indirectgithub.com/twpayne/go-geom v1.0.4github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirectgithub.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirectgithub.com/xeipuuv/gojsonschema v1.1.0github.com/xeonx/geodesic v0.0.0-20150531212225-499ffb552e21github.com/xeonx/geographic v0.0.0-20150531172044-7bc7968bc5f9golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5fgopkg.in/guregu/null.v3 v3.4.0)
の中のどれが原因か(それも1つとは限らない)をどうやって見つければいいのか、分からない。
で、さっき、なんだか分からない内に、以下の操作をしてしまったのだけど
ubuntu@ip-57:~/codes/hailing_go/docker/app$ go mod init m
go: creating new go.mod: module m
を見ているうちに、同じディレクトリにm.modというファイルができていることに気がついた。
その中身はこんな風になっていた。
go 1.13require (github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirectgithub.com/go-chi/jwtauth v4.0.4+incompatible // indirect)
go: finding github.com/twpayne/go-polyline v1.0.0go: finding golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2go: finding golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8ago: finding golang.org/x/text v0.3.0go: finding gopkg.in/DATA-DOG/go-sqlmock.v1 v1.3.0% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed100 652 100 652 0 0 2069 0 --:--:-- --:--:-- --:--:-- ?20630 16.1M 0 0 0 0 0 0 --:--:-- ?0:00:01 --:--:-- ? ? 0./migrate.linux-amd64100 16.1M 100 16.1M 0 0 3974k 0 0:00:04 0:00:04 --:--:-- 5426kRemoving intermediate container 35c328df0ab6---> e8cf5804a190Successfully built e8cf5804a190Successfully tagged xxxxxx_ride_hailing_go_app:latest
別のAWSでも試してみました。
現在、64%です。
"docker system prune"を実行
実行後は39%になっていました。
で、その後、悲劇が発生した・・・ docker-compose buildが正常終了しなくなる、という悲劇が。
助けて頂いた資料:
今、困っていること
Goが動かん。下記(1)~(4)をやっても、
package main
import "fmt"
func main(){
fmt.Printf("Hello world\n")
}
以下のエラーが出てきて取れない。(なんだこれ?)
$ go run hello.go
go: github.com/go-chi/jwtauth@v4.0.2+incompatible: reading github.com/go-chi/jwtauth/go.mod at revision v4.0.2: unknown revision v4.0.2
ubuntu@ip-57:~/codes/hailing_go/docker/app$ go run hello.gogo: github.com/go-chi/jwtauth@v4.0.2+incompatible: reading github.com/go-chi/jwtauth/go.mod at revision v4.0.2: unknown revision v4.0.2
ubuntu@ip-57:~/codes/hailing_go/docker/app$ go mod vendorgo: github.com/go-chi/jwtauth@v4.0.2+incompatible: reading github.com/go-chi/jwtauth/go.mod at revision v4.0.2: unknown revision v4.0.2
ubuntu@ip-57:~/codes/hailing_go/docker/app$ go mod downloadgo: github.com/go-chi/jwtauth@v4.0.2+incompatible: reading github.com/go-chi/jwtauth/go.mod at revision v4.0.2: unknown revision v4.0.2
ubuntu@ip-57:~/codes/hailing_go/docker/app$ go mod initgo: cannot determine module path for source directory /home/ubuntu/codes/hailing_go/docker/app (outside GOPATH, module path must be specified)Example usage:'go mod init example.com/m' to initialize a v0 or v1 module'go mod init example.com/m/v2' to initialize a v2 moduleRun 'go help mod init' for more information.
ubuntu@ip-57:~/codes/hailing_go/docker/app$ go run hello.gogo: github.com/go-chi/jwtauth@v4.0.2+incompatible: reading github.com/go-chi/jwtauth/go.mod at revision v4.0.2: unknown revision v4.0.2
ubuntu@ip-57:~/codes/hailing_go/docker/app$ go mod github.com/go-chi/jwtauth/go.modgo mod github.com/go-chi/jwtauth/go.mod: unknown command
ubuntu@ip-57:~/codes/hailing_go/docker/app$ go mod verifygo: github.com/go-chi/jwtauth@v4.0.2+incompatible: reading github.com/go-chi/jwtauth/go.mod at revision v4.0.2: unknown revision v4.0.2
ubuntu@ip-57:~/codes/hailing_go/docker/app$ go mod whygo: github.com/go-chi/jwtauth@v4.0.2+incompatible: reading github.com/go-chi/jwtauth/go.mod at revision v4.0.2: unknown revision v4.0.2
ubuntu@ip-57:~/codes/hailing_go/docker/app$ go mod init mgo: creating new go.mod: module m
ubuntu@ip-57:~/codes/hailing_go/docker/app$ go run hello.gogo: finding github.com/go-chi/jwtauth v4.0.4+incompatiblego: downloading github.com/go-chi/jwtauth v4.0.4+incompatiblego: extracting github.com/go-chi/jwtauth v4.0.4+incompatiblego: finding github.com/dgrijalva/jwt-go v3.2.0+incompatiblego: downloading github.com/dgrijalva/jwt-go v3.2.0+incompatiblego: extracting github.com/dgrijalva/jwt-go v3.2.0+incompatibleHello world
(とりあえず、ここまで)
試行錯誤で分った事項
(1)/etc/apt/apt.conf を作る
Acquire::http::Proxy "http://12.34.56.789:8080";
Acquire::https::Proxy "http://12.34.56.789:8080"; // (×https://)
Acquire::ftp::Proxy "ftp://12.34.56.789:8080";
(2)/etc/systemd/system/docker.service.d/http-proxy.confを作る
/etc/systemd/system/docker.service.d/http-proxy.conf を力づくで作った(最初はなかった(みたい))。
修正前:
[Service]
Environment="HTTP_PROXY=http://12.34.56.789:8080/" "HTTPS_PROXY=https://12.34.56.789:8080" "NO_PROXY=localhost,127.0.0.1,.12.34.56.789"
修正後:
[Service]
Environment="HTTP_PROXY=http://12.34.56.789:8080/" "HTTPS_PROXY=http://12.34.56.789:8080" "NO_PROXY=localhost,127.0.0.1,.12.34.56.789"(なんのことはない、HTTPS_PROXY の "https:"→"http:" としただけ。ただし、これは、個々の環境に依存する問題だと思う)
(3)関係のありそうな"Dockerfile"に片っ端から、以下を書き込む(関係ありそうなファイルは2つ。hitachi_ride_hailing_go/docker/postgis-pgrouting/Dockerfile
hitachi_ride_hailing_go/docker/app/Dockerfile)
ENV http_proxy http://12.34.56.789:8080
ENV https_proxy http://12.34.56.789:8080(一番最初の”RUN”の前に書き込んでおくとよい)
(4)シェルに以下を書き込んでおく(設定方法は後で調べる)
export http="http://12.34.56.789:8080"
export https="http://12.34.56.789:8080"
なぜ、動き出したのか分からないので、historyを残しておく
1 ;s
2 pwd
3 ls
4 ;
5 :
6 pwd
7 ls
8 whoami
9 pwd
10 ls
11 pwd
12 ls
13 ping kobore.net
14 ls
15 pwd
16 ls
17 pwd
18 ls
19 sudo apt-get update
20 sudo apt-get install
21 sudo apt-get upgrade
22 ls
23 ls
24 ls -al
25 pwd
26 ls
27 wd
28 ls
29 pwd
30 ls
31 exit
32 ls
33 pwd
34 ls
35 sudo apt-get install
36 sudo apt-get update
37 ls
38 pwd
39 ls
40 pwd
41 ls
42 sudo apt-get install emacs
43 sudo apt-get install vim
44 emacs
45 sudo apt-get install emacs-nox
46 emacs-nox
47 sudo apt install emacs-nox
48 ping kobore.net
49 ping amazon.com
50 ls
51 pwd
52 ls
53 gcc
54 pwd
55 ls
56 cd /usr
57 cd local
58 cd bimn
59 cd bin
60 ls
61 pwd
62 cd /bin
63 ls
64 printenv http_proxy
65 printenv http_proxy https_proxy
66 export https_proxy=$http_proxy
67 sudo apt-get update
68 printenv http_proxy
69 printenv http_proxy https_proxy
70 history
71 export http_proxy="12.34.56.789:8080"
72 export https_proxy=$http_proxy
73 printenv http_proxy https_proxy
74 sudo apt-get update
75 ping kobore.net
76 ping hitachi.com
77 ping amazon.com
78 export http_proxy="http://12.34.56.789:8080"
79 export https_proxy=$http_proxy
80 printenv http_proxy https_proxy
81 sudo apt-get update
82 export http_proxy="http://12.34.56.789:8080"
83 export https_proxy=$http_proxy
84 printenv http_proxy https_proxy
85 sudo apt-get update
86 sudo apt-get install
87 sudo apt-get upgrade
88 sudo apt-get update
89 export http_proxy="http://12.34.56.789:8080"
90 EXPORT HTTP_PROXY=http://12.34.56.789:8080
91 EXPORT HTTP_PROXY="http://12.34.56.789:8080"
92 export HTTP_PROXY="http://12.34.56.789:8080"
93 export HTTP_PROXY=http://12.34.56.789:8080
94 printenv http_proxy https_proxy
95 sudo apt-get update
96 sudo apt-get install emacs
97 emacs
98 sudo apt install emacs-nox
99 export
100 history
101 printenv http_proxy https_proxy
102 emacs
103 sudo apt install emacs-nox
104 apt install emacs
105 clear
106 apt install emacs
107 ping amazon.com
108 sudo apt-get install
109 sudo apt-get update
110 cat apt.conf
111 vim
112 vim /etc/apt/apt.conf
113 sudo vim
114 sudo vim /etc/apt/apt.conf
115 more /etc/apt/apt.conf
116 cd
117 sudo apt-get update
118 sudo apt-get upgrade
119 sudo apt-get install emacs
120 pwd
121 ls
122 emac
123 emacs
124 sudo emacs /etc/apt/apt.conf
125 ls
126 pwd
127 ls
128 pwd
129 ls
130 pwd
131 ls
132 pwd
133 ls
134 pwd
135 ls
136 pwd
137 ls
138 sudo apt-get install
139 exit
140 ,s
141 ls
142 sudo apt-get remove docker docker-engine docker.io containerd runc
143 sudo apt-get update
144 sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
145 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
146 sudo apt-gey gpg
147 sudo apt-key gpg
148 sudo apt-key add gpg
149 sudo apt-key fingerprint 0EBFCD88
150 gpg
151 sudo apt-key fingerprint 0EBFCD88
152 sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
153 sudo apt-get update
154 sudo apt-get install docker-ce docker-ce-cli containerd.io
155 sudo apt-get install docker-ce
156 sudo apt-get install containerd.io
157 apt update
158 ls
159 sudo apt-get install
160 sudo apt-get update
161 sudo apt-get upgrade
162 sudo apt-get install
163 sudo apt-get remove docker docker-engine docker.io containerd runs
164 sudo apt-get remove docker docker-engine docker.io containerd runc
165 sudo apt-get update
166 sudo apt-get install docker-ce docker-ce-cli containerd.io
167 sudo apt-get install docker-ce
168 sudo apt-get remove docker
169 sudo apt-get remove docker-engine
170 sudo apt-get remove docker.io
171 sudo apt-get remove docker-engine
172 sudo apt-get remove docker
173 sudo apt autoremove docker
174 sudo apt autoremove docker-engine
175 sudo apt autoremove docke-ce
176 sudo apt autoremove docker-ce
177 sudo apt autoremove docker-cli
178 sudo apt autoremove docker-ce
179 sudo apt autoremove docker-ce-cli
180 sudo apt autoremove containerd.op
181 sudo apt autoremove containerd.io
182 docker
183 sudo reboot
184 curl -L kobore.net
185 ping kobore.bet
186 ping kobore.met
187 ping kobore.net
188 vf /udt
189 cd /ysr
190 cd /usr
191 cd share/
192 cd
193 cd /etc
194 s
195 ls
196 cd
197 cd curl --help
198 curl --help
199 curl --help | grep proxy
200 curl -X PUT http://kobore.net
201 curl -k http://kobore.net
202 curl -I http://kobore.net
203 sudo apt-get install curl
204 sudo apt-get remove curl
205 curl
206 sudo apt-get install curl
207 curl
208 curl -L http://kobore.net
209 more
210 cd /etc/
211 ls
212 curl -L http://localhost
213 curl -L https://amazon.com
214 sudo apt-get install emacs
215 nslookup kobore.net
216 nslookup www.google.com
217 curl --version
218 curl localhost
219 curl -sS 'https://kobore.net'
220 curl http://kobore.net
221 more /etc/apt/apt.conf
222 export http="http://12.34.56.789.4:8080"
223 export https="http://12.34.56.789.4:8080"
224 curl http://kobore.net
225 printenv
226 sudo apt-get remove docker docker-engine docker.io containerd runc
227 ls
228 cd
229 pwd
230 ls
231 ks
232 ls
233 wd
234 ls
235 lsb_release -cs
236 curl kobore.net
237 sudo apt-key fingerprint 0EBFCD88
238 sudo emacs /etc/apt/sources.list
239 sudo apt-get update
240 cat /etc/apt/sources.list
241 cd
242 apt-cache madison docker-ce
243 sudo apt-get install docker-ce=5:19.03.13~3-0~ubuntu-focal docker-ce-cli=5:19.03.13~3-0~ubuntu-focal containerd.ioCopy
244 sudo apt-get install docker-ce=5:19.03.13~3-0~ubuntu-focal docker-ce-cli=5:19.03.13~3-0~ubuntu-focal containerd.io
245 sudo apt-get install docker-ce=5:19.03.13~3-0~ubuntu-focal docker-ce-cli=5:19.03.13~3-0~ubuntu-focal containerd.ioCopy
246 Markup
247 sudo apt-get install docker-ce=5:19.03.13~3-0~ubuntu-focal docker-ce-cli=5:19.03.13~3-0~ubuntu-focal containerd.io
248 sudo apt-get install docker-ce docker-ce-cli containerd.io
249 sudo apt-get install docker-ce
250 E: Package 'docker-ce' has no installation candidate
251 sjdl
252 sudo apt install docker-ce
253 Package docker-ce is not available, but is referred to by another package.
254 history
255 cat /etc/apt/sources.list
256 sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
257 E: The repository 'https://download.docker.com/linux/ubuntu focal Release' does not have a Release file.
258 ls
259 sudo emcs /etc/apt/sources.list
260 sudo emacs /etc/apt/sources.list
261 sudo apt install docker-ce
262 sudo apt remove docker-ce
263 sudo apt
264 cat /etc/apt/sources.list
265 sudo emacs /etc/apt/sources.list.d/docker.list
266 history
267 sudo apt-get remove docker docker-engine docker.io containerd runc
268 sudo apt-get install docker docker-engine docker.io containerd runc
269 sudo apt-get install docker docker.io containerd runc
270 sudo apt-get remove docker docker.io containerd runc
271 history
272 sudo emacs /etc/apt/sources.list.d/docker.list
273 sudo apt-get remove docker docker.io containerd runc
274 sudo apt autoremove docker docker.io containerd runc
275 sudo apt install docker docker.io containerd runc
276 sudo apt install docker-engine
277 docker
278 dokcer ps
279 docker ps
280 sudo gpasswd -a $(whoami) docker
281 sudo gpasswd -a USER_NAME docker
282 sudo gpasswd -a $(whoami) docker
283 whoami
284 more /etc/group
285 history
286 whoami
287 sudo gpasswd -a $(whoami) docker
288 cat /etc/group | grep docker
289 sudo emacs /etc/group
290 sudo gpasswd -a $(whoami) docker
291 docker ps
292 Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/
293 sudo emacs /etc/group
294 sudo groupadd docker
295 whoami
296 cat /etc/grou | grep docker
297 more /etc/group
298 sudo emacs /etc/group
299 cat /etc/grou | grep docker
300 cat /etc/group | grep docker
301 history
302 sudo gpasswd -a $(whoami) docker
303 sudo /bin/systemctl restart docker.service
304 docker info
305 docker ps
306 exit
307 docker ps
308 docker info
309 history
/etc/default/docker
export http_proxy=http://xxx.xxx.xxx.xxx:8080/
export https_proxy=http://xxx.xxx.xxx.xxx:8080/