Esc, :set paste
Paste
Esc, :wq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 3 | |
| SELECT COUNT(*) | |
| FROM yellowtripdata | |
| WHERE tpep_pickup_datetime::date = '2021-01-15'; | |
| 4 | |
| SELECT MAX(tip_amount), tpep_pickup_datetime::date | |
| FROM public.yellowtripdata | |
| WHERE EXTRACT(MONTH FROM tpep_pickup_datetime) = 1 | |
| GROUP BY tpep_pickup_datetime::date |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from functools import partial | |
| def test(a, b, c): | |
| print(a) | |
| print(b) | |
| print(c) | |
| foo = partial(test, b=6, c=7) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import traceback | |
| class TracePrints(object): | |
| def __init__(self): | |
| self.stdout = sys.stdout | |
| def write(self, s): | |
| self.stdout.write("Writing %r\n" % s) | |
| traceback.print_stack(file=self.stdout) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu:18.04 | |
| RUN apt-get update -y | |
| RUN apt-get install wget -y | |
| RUN wget https://github.com/fullstorydev/grpcurl/releases/download/v1.1.0/grpcurl_1.1.0_linux_x86_64.tar.gz | |
| RUN tar -xvzf grpcurl_1.1.0_linux_x86_64.tar.gz | |
| RUN chmod +x grpcurl | |
| RUN mv grpcurl /usr/local/bin/grpcurl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '2' | |
| services: | |
| zookeeper: | |
| image: confluentinc/cp-zookeeper:5.3.1 | |
| environment: | |
| ZOOKEEPER_CLIENT_PORT: 2181 | |
| ZOOKEEPER_TICK_TIME: 2000 | |
| ZOOKEEPER_SYNC_LIMIT: 2 | |
| ports: | |
| - 2181:2181 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ALTER TABLE TableName UPDATE ColumnName = ValueOne WHERE AnotherColumn = ValueTwo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests, json | |
| subs_key = API_KEY | |
| uri_base = 'https://api.cognitive.microsoft.com/inkrecognizer/v1.0-preview/recognize' | |
| headers = {'Content-type': 'application/json', | |
| "Ocp-Apim-Subscription-Key": subs_key} | |
| body = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl https://pyenv.run | bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Количество данных по выборке разделить на количество данных всего |
NewerOlder