I hereby claim:
- I am eezis on github.
- I am ernestezis (https://keybase.io/ernestezis) on keybase.
- I have a public key ASCKvfwAKTfOPX-0ro-E-kpjgG6zedSp2JUGk-4zSCRcuwo
To claim this, I am signing this object:
""" | |
""" | |
import warnings | |
from decimal import * | |
warnings.warn("This unit is being deprecated, ....") | |
def round_off(value, dec_places=9 ): | |
return Decimal(value).quantize(Decimal('0.00000000')) |
""" | |
Turn the .srt files into .txt files | |
1. unzip the lesson files into a directory | |
2. run this code in that directory. | |
the code will strip out the timestamps and carriage returns | |
and produce a text file that you can use for reference and class notes. | |
""" | |
import re | |
from os import listdir, getcwd | |
from os.path import isfile, join |
import { firestorePlugin } from 'vuefire' | |
import { firebase } from '@firebase/app' | |
import 'firebase/firestore' | |
import 'firebase/auth' | |
import firebaseConfig from '../../firebaseConfig' | |
let firebaseApp = firebase.initializeApp(firebaseConfig) | |
let firebaseAuth = firebaseApp.auth() | |
const db = firebaseApp.firestore() |
// this is a helpful video, code is transcribed from it | |
// https://www.youtube.com/watch?v=b7PUm7LmAOw | |
rules_version = "2"; | |
service cloud.firestore { | |
match /databases/{database}/documents { | |
// ** means to cascade down to all subcollections and anything nested | |
match /{document=**} { | |
// an exmaple of allowing everyone to read products collection | |
// but only logged in users can delete |
I hereby claim:
To claim this, I am signing this object:
# inside an active poetry shell . . . | |
$ which python | |
/home/eezis/.cache/pypoetry/virtualenvs/airflow-_F6chCj4-py3.8/bin/python |
""" | |
see my comment below the gist | |
""" | |
import re | |
import os | |
from requests_html import HTMLSession | |
BASE_ETHERSCAN_URL = "https://etherscan.io/address/" | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
from pprint import pprint | |
import ccxt | |
import pandas as pd | |
PHEMEX_API_KEY = os.getenv('PHEMEX_API_KEY') |
If you are updating and older Django project and getting an error in this form:
TypeError: attribute name must be string, not 'bytes'
It's likely that you have existing migrations in your code base that have legacy byte strings. I found them in two places. In the related_name as shown below
('article', models.ForeignKey(related_name=b'author', to='core.Article', on_delete=models.CASCADE, null=True)),
While upgrading EC2 servers behind an AWS Elastic Load Balancer (ELB) I noticed that the nginx error log was reporting that my health-check was getting molested. Here is the simple curl test showing the 200 result. The error message, then the solution follow.
$ curl -I localhost/ELB-health-check
HTTP/1.1 200 OK
Server: nginx
Date: Sun, 06 Nov 2022 16:59:46 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 105