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
/** | |
* Retrieves all the rows in the active spreadsheet that contain data and logs the | |
* values for each row. | |
* For more information on using the Spreadsheet API, see | |
* https://developers.google.com/apps-script/service_spreadsheet | |
*/ | |
function readRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); |
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 React from 'react'; | |
import ReactDOM from 'react-dom'; | |
class MyButton extends React.Component { | |
render() { | |
return <button | |
onClick={() => { this.props.handleClick(this.props.label); }}>{this.props.label}</button> | |
} | |
} |
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 requests | |
import json | |
headers = {'Authorization': 'Bearer '} | |
playlistID = '76BJ3Y6aE7TR0hW5QCop5n' | |
userInfo = 'https://api.spotify.com/v1/playlists/{}'.format(playlistID) | |
endpoint_100 = 'https://api.spotify.com/v1/playlists/{}/tracks?offset=0&limit=100'.format(playlistID) | |
endpoint_200 = 'https://api.spotify.com/v1/playlists/{}/tracks?offset=100&limit=100'.format(playlistID) | |
endpoint_300 = 'https://api.spotify.com/v1/playlists/{}/tracks?offset=200&limit=100'.format(playlistID) |
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.common.keys import Keys | |
from selenium.webdriver import ActionChains | |
profile = webdriver.FirefoxProfile() | |
profile.set_preference("general.useragent.override", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.53 Safari/525.19") | |
profile.set_preference('permissions.default.image', 2) | |
profile.set_preference('dom.ipc.plugins.enable.libflashplayer.so', 'false') | |
driver = webdriver.Firefox(profile) |
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 pynput.keyboard import Key, Controller | |
keyboard = Controller() | |
keyboard.type('hello') | |
keyboard.press(Key.enter) | |
keyboard.release(Key.enter) |
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 requests | |
import json | |
import pprint | |
pp = pprint.PrettyPrinter(indent=4) | |
endpoint = 'https://api.spotify.com/v1/playlists/37i9dQZF1DZ06evO2zakRW/tracks?offset=0&limit=100' | |
headers = {'Authorization': 'Bearer '} | |
data = requests.get(endpoint, headers=headers) |
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 requests | |
import json | |
import pprint | |
pp = pprint.PrettyPrinter(indent=4) | |
headers = {'Authorization': 'Bearer '} | |
playlistID = '76BJ3Y6aE7TR0hW5QCop5n' | |
userInfo = 'https://api.spotify.com/v1/playlists/{}'.format(playlistID) |
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 apiclient.discovery import build | |
from apiclient.errors import HttpError | |
from oauth2client.tools import argparser | |
import pprint | |
pp = pprint.PrettyPrinter(indent=4) | |
DEVELOPER_KEY = "" | |
YOUTUBE_API_SERVICE_NAME = "youtube" | |
YOUTUBE_API_VERSION = "v3" |
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
CREATE TABLE `noDup` LIKE `Dup` ; | |
INSERT `noDup` SELECT DISTINCT * FROM `Dup` ; | |
DROP TABLE `Dup` ; | |
ALTER TABLE `noDup` RENAME `Dup` ; |
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
const express = require('express'); | |
const app = express(); | |
const port = 3333; | |
app.listen(port, () => { | |
console.log('O servidor está rodando na porta', port); | |
}) |
OlderNewer