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
| # Python | |
| __pycache__ | |
| *.pyc | |
| *.pyo | |
| *.pyd | |
| .Python | |
| .pytest_cache | |
| # Others | |
| env |
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
| #!/bin/bash | |
| PYTHONPATH=$PYTHONPATH:/home/src jupyter notebook \ | |
| --ip=0.0.0.0 \ | |
| --port=8085 \ | |
| --allow-root |
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: '3' | |
| services: | |
| jupyter_service: | |
| build: . | |
| entrypoint: "scripts/docker-entrypoint.sh" | |
| user: root | |
| ports: | |
| - 8085:8085 | |
| env_file: |
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 jupyter/pyspark-notebook | |
| WORKDIR /home/src | |
| ADD requirements.txt . | |
| RUN pip install -r requirements.txt |
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
| pandas==1.4.1 | |
| psycopg2-binary==2.9.3 | |
| plotly==5.6.0 | |
| sqlfluff==0.11.1 |
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
| LEAD | LAG(expression [,offset [,default_value]]) | |
| OVER ( | |
| [PARTITION BY partition_expression, ... ] | |
| ORDER BY sort_expression [ASC | DESC], ... | |
| ) |
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
| SELECT | |
| week, | |
| array_agg(term) as top_terms, | |
| LAG(array_agg(term), 1) OVER (ORDER BY week) as previous_week_top_terms, | |
| LEAD(array_agg(term), 1) OVER (ORDER BY week) as next_week_top_terms | |
| FROM `bigquery-public-data.google_trends.international_top_terms` | |
| WHERE | |
| region_code = 'BR-AM' | |
| AND extract(year from week) = 2022 | |
| AND rank = 1 |
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
| SELECT | |
| week, | |
| array_agg(term) as top_terms | |
| FROM `bigquery-public-data.google_trends.international_top_terms` | |
| WHERE | |
| region_code = 'BR-AM' | |
| AND extract(year from week) = 2022 | |
| AND rank = 1 | |
| GROUP BY week | |
| ORDER BY week |
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
| create table teste3 ( | |
| id integer unique, | |
| category_name varchar(100) not null, | |
| breadcrumb integer array[3] null, | |
| parent_id integer null, | |
| primary key (id), | |
| constraint fk_parent_id foreign key (parent_id) references teste3(id) | |
| ) | |
| insert into teste3(id, category_name, breadcrumb, parent_id) values(1, 'Automoveis e veiculos', null, null); |
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 promiseland.process_deadline import analyze_sorting_record | |
| from promiseland.switch_names import PromiselandSwitches as PromSw | |
| sw_macro_processes = PromSw.ENABLE_PROCESS_DEADLINE_BY_MACRO_PROCESS.get_enabled_values() | |
| sr = SortingRecord.objects.get(id=831095197) | |
| sr.__dict__ | |
| mp_xd_routing_code_list = (PromSw.ENABLE_PROCESS_DEADLINE_MACRO_PROCESS_XD_BY_ROUTING_CODE.get_enabled_values()) |
NewerOlder