This file contains 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 { Component, OnInit } from "@angular/core"; | |
import Map from "ol/Map"; | |
import Tile from "ol/layer/Tile"; | |
import OSM from "ol/source/OSM"; | |
import View from "ol/View"; | |
import { fromLonLat, toLonLat } from "ol/proj.js"; | |
import { Tile as TileLayer, Vector as VectorLayer } from "ol/layer.js"; | |
import { MatDialog, MatDialogConfig } from "@angular/material/dialog"; | |
import { FiltroDialogComponent } from "../filtro-dialog/filtro-dialog.component"; | |
import Polyline, { encodeDeltas } from "ol/format/Polyline.js"; |
This file contains 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 selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
import os | |
options = Options() | |
options.add_argument("--window-size=600x400") | |
driver = os.getcwd() + "/geckodriver" | |
driver = webdriver.Firefox(executable_path=driver) | |
This file contains 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
// imagina que isso aqui é uma classe | |
const localStorageWrapper = { | |
set: (key, value) => localStorage.setItem(key, JSON.stringify(value)), | |
get: (key) => { | |
const value = localStorage.getItem(key) | |
return value ? JSON.parse(value) : value | |
} | |
} |
This file contains 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 os | |
import platform | |
import time | |
import csv | |
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
def check_user(user): |
This file contains 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
// service | |
import axios from "axios"; | |
export const api = axios.create({ | |
baseURL: `http://localhost:8080/api` | |
}); | |
// | |
import { api } from "../service/"; |
This file contains 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
// coloca isso no App.vue em methods | |
createChapter(bookId, data) { | |
this.$http | |
.post(`/books/${bookId}/chapters`, { data }) | |
.then(() => this.capitulos.push(data)) | |
.catch(e => console.log("Erro ao criar capitulo", e)); | |
}, | |
editChapter(bookId, chapterId, data) { | |
api | |
.put(`/books/${bookId}/chapters/${chapterId}`, { data }) |
This file contains 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
fetch("https://www.tibia.com/account/ajax_email.php", | |
{"credentials":"include", | |
"headers":{"accept":"*/*","accept-language":"pt-BR,pt;q=0.9,en-US;q=0.8,en;q=0.7","content-type":"application/x-www-form-urlencoded","sec-fetch-mode":"cors","sec-fetch-site":"same-origin","x-requested-with":"XMLHttpRequest"},"referrer":"https://www.tibia.com/account/?subtopic=createaccount","referrerPolicy":"no-referrer-when-downgrade","body":"a_EMail=wesley.sud7%40gmail.com","method":"POST","mode":"cors"}).then( e => e.json()).then(e => console.log(e)) | |
data.AjaxObjects[0].Data | |
"style=background-image:url(https://static.tibia.com/images/global/general/ok.gif);" |
This file contains 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
// just copy theses lines to your settings.json file in vscode | |
{ | |
"python.sortImports.args": [ | |
"--lines=120" | |
], | |
"python.linting.pylintEnabled": false, | |
"python.linting.enabled": true, | |
"python.linting.flake8Enabled": true, | |
"python.linting.flake8Args": [ | |
"--max-line-length=120", |
This file contains 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
repos: | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v2.3.0 | |
hooks: | |
- id: check-yaml | |
- id: end-of-file-fixer | |
language_version: python3 | |
- id: trailing-whitespace | |
- id: debug-statements | |
language_version: python3 |
This file contains 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
REST_FRAMEWORK = { | |
"PAGE_SIZE": 50, | |
"COERCE_DECIMAL_TO_STRING": False, | |
"DEFAULT_PAGINATION_CLASS": "common.paginators.CustomPagination", | |
"DEFAULT_FILTER_BACKENDS": [ | |
"django_filters.rest_framework.DjangoFilterBackend", | |
"rest_framework.filters.OrderingFilter", | |
], | |
"DEFAULT_AUTHENTICATION_CLASSES": [ | |
"rest_framework_simplejwt.authentication.JWTAuthentication", |