| #!/usr/bin/env python3 | |
| """ | |
| SPDX-License-Identifier: MIT https://opensource.org/licenses/MIT | |
| Copyright © 2021 pukkandan.ytdlp@gmail.com | |
| * Input file is an info.json (with comments) that yt-dlp (https://github.com/yt-dlp/yt-dlp) wrote | |
| * Change FIELDS according to your needs |
| import linecache | |
| import re | |
| import sys | |
| from types import TracebackType | |
| from typing import Any, Optional | |
| PACKAGE_PATH_PATTERN = r'.*/lib/python.*/site-packages/.*' | |
| class TracebackLogger: |
Install Certbot using Python PIP (Package Installer for Python) without using SNAP, APT or SYSTEMD) (Debian/Ubuntu)
This guide will help you install LetsEncrypt / Certbot and a DNS plugin (certbot-dns-route53) using PIP under Debian/Ubuntu.
-
You should already be somewhat familiar with LetsEncrypt, Certbot and any plugin you might need.
-
This guide uses a DNS provider plugin (AWS Route53), but this is really about the install method - not plugins, or validation methods.
| # Copyright (c) 2018 Bao Nguyen <[email protected]> | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: | |
| # | |
| # The above copyright notice and this permission notice shall be included in all |
| // | |
| // Regular Expression for URL validation | |
| // | |
| // Author: Diego Perini | |
| // Created: 2010/12/05 | |
| // Updated: 2018/09/12 | |
| // License: MIT | |
| // | |
| // Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
| // |
| // haversin(θ) function | |
| func hsin(theta float64) float64 { | |
| return math.Pow(math.Sin(theta/2), 2) | |
| } | |
| // Distance function returns the distance (in meters) between two points of | |
| // a given longitude and latitude relatively accurately (using a spherical | |
| // approximation of the Earth) through the Haversin Distance Formula for | |
| // great arc distance on a sphere with accuracy for small distances | |
| // |
| package main | |
| import ( | |
| "fmt" | |
| "golang.org/x/net/route" | |
| ) | |
| var defaultRoute = [4]byte{0, 0, 0, 0} | |
| func main() { |
Setting up a remote interpreter on PyCharm is awfully unintuitive. I've pared it down to what I think is the minimal number of steps, and leaves the fewest number of deployment configurations and Python interpreters lying around. This is designed for my specific configuration (specifically PyTorch); adapt as needed.
- (Optional) Add virtual environment path to excluded files
- From Welcome Page, go to Configure > Settings > Build, Execution, Deployment > Deployment > Options
- Add virtualenv path. For example, if you always have the project's virtualenv in
.env, add ";.env" to the "Exclude items by name" field
| from __future__ import absolute_import | |
| try: | |
| import cStringIO as StringIO | |
| except ImportError: | |
| import StringIO | |
| # Standard Library | |
| import re | |
| import string |