Skip to content

Instantly share code, notes, and snippets.

View anton-petrov's full-sized avatar
:octocat:
🥷

Anton Petrov anton-petrov

:octocat:
🥷
View GitHub Profile
pip install jupyter_http_over_ws
jupyter serverextension enable --py jupyter_http_over_ws
jupyter notebook --NotebookApp.allow_origin='https://colab.research.google.com' --port=8888 --NotebookApp.port_retries=0
@anton-petrov
anton-petrov / pandas_to_sql.py
Created May 14, 2020 16:03
Пример сохранения (передачи) Pandas.DataFrame в MySQL
from sqlalchemy import create_engine
import mysql.connector
import pandas as pd
# CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country
customers = {
"CustomerID" : [1, 2, 3, 4, 5],
"CustomerName" : ["Alfreds Futterkiste", "Ana Trujillo Emparedados y helados", "Antonio Moreno Taquería", "Around the Horn", "Ilya Tikhonov"],
"ContactName" : ["Maria Anders", "Ana Trujillo", "Antonio Moreno", "Thomas Hardy", "Anton Petrov"],
"Address" : ["Obere Str. 57", "Avda. de la Constitución 2222", "Mataderos 2312", "120 Hanover Sq.", "Dolgoprudnyi"],
@anton-petrov
anton-petrov / settings.json
Last active November 12, 2020 10:49
Windows Terminal
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"alwaysShowTabs": true,
"initialCols": 120,
"initialRows": 30,
"requestedTheme": "dark",
"keybindings": [
{
import requests
from bs4 import BeautifulSoup
import time
from time import gmtime, strftime
import emoji
import smtplib
from email.mime.text import MIMEText
from email.header import Header
print('Exchange Rates v1.0')
import requests
from bs4 import BeautifulSoup
import json
from time import strftime, localtime
import os.path
import emoji
INFECTED = 'ЗАРАЖЁННЫЕ'
DEATHS = 'УМЕРЛО'
RECOVERED = 'ИЗЛЕЧИЛОСЬ'
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"globals": {
"alwaysShowTabs": true,
"defaultProfile": "{79285a8e-036c-446f-8a9c-78994e34cf85}",
"initialCols": 120,
"initialRows": 30,
"requestedTheme": "dark",
"keybindings": [
{
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"globals": {
"alwaysShowTabs": true,
"defaultProfile": "{79285a8e-036c-446f-8a9c-78994e34cf85}",
"initialCols": 120,
"initialRows": 30,
"requestedTheme": "dark",
"keybindings": [
{
https://greenroomrobotics.com/2019/10/29/egpu-tutorial-step-by-step-process-ubuntu-18-04-intel-nuc-egpu/
$ vim /sys/bus/thunderbolt/devices/0-0/0-1/authorized
brew install bash
sudo bash -c "echo /usr/local/bin/bash >> /private/etc/shells"
chsh -s /usr/local/bin/bash
echo $BASH && echo $BASH_VERSION