Skip to content

Instantly share code, notes, and snippets.

View Felix-Fenix's full-sized avatar
🤒
Out sick

Felix-Fenix

🤒
Out sick
View GitHub Profile
@Felix-Fenix
Felix-Fenix / config-nginx-gunicorn+django
Created June 12, 2024 09:03 — forked from Khalmatov/config-nginx-gunicorn+django
Настройка NGINX + Gunicorn + Django
Подготовка:
Установка всех пакетов:
sudo apt update
sudo apt install python3-pip python3-dev libpq-dev postgresql postgresql-contrib nginx curl
Создание виртуальной среды:
sudo pip3 install virtualenv
mkdir ~/myprojectdir
cd ~/myprojectdir
@Felix-Fenix
Felix-Fenix / coinbase.py
Created March 5, 2021 15:23 — forked from chris-gong/coinbase.py
Code for sending requests to the coinbase api and receiving price data as a json response.
import requests
import json
import time
while True :
response = requests.get("https://api.coinbase.com/v2/prices/BTC-USD/spot")
data = response.json()
currency = data["data"]["base"]
price = data["data"]["amount"]
print(f"Currency : {currency} Price: {price}")
import time,datetime
# # 1 //
# class Date:
# def __init__(self,date):
# self.date = date
# @classmethod
# def int_date(cls,date):
# num = []