##local-pc
ssh-keygen -t ed25519 -C "user@example.com" -f demo
ssh -i demo ubuntu@IPX
##server
sudo su
iptables -F
This file contains hidden or 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 urllib.request | |
| import urllib.parse | |
| import json | |
| import html | |
| class EssRequestFailureError(Exception): | |
| pass | |
| class EssParseFailureError(Exception): |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <script type="module" src="https://cdn.jsdelivr.net/npm/@pyscript/core/dist/core.js"></script> | |
| </head> | |
| <body> | |
| <button mpy-click="handle_click">Inspect Modules</button> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| ''' | |
| Most efficient algorithm in python | |
| Get prime numbers upto a given number. | |
| By Tomrock D'souza | |
| ''' | |
| from numba import jit | |
| from time import time | |
| @jit(nopython=True) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| # Hennge Senior Software Engineer (Python Challenge) | |
| ####################################################################### | |
| # Mission Description | |
| # | |
| # We want to calculate a sum of squares of some integers, excepting negatives | |
| # * The first line of the input will be an integer N (1 <= N <= 100) | |
| # * Each of the following N test cases consists of one line containing an integer X (0 < X <= 100), | |
| # followed by X integers (Yn, -100 <= Yn <= 100) space-separated on the next line | |
| # * For each test case, calculate the sum of squares of the integers excepting negatives, | |
| # and print the calculated sum to the output. No blank line between test cases |
This file contains hidden or 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 sqlalchemy | |
| import sqlite3 | |
| def get_engine_conn(dbx): | |
| return sqlalchemy.create_engine(f'sqlite:///{dbx}') | |
| def get_conn(dbx): | |
| return sqlite3.connect(dbx) | |
This file contains hidden or 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 sqlite3 | |
| import re | |
| if __name__ == '__main__': | |
| database_name=input('Enter Database Name: ') | |
| database_name=re.sub(r'\W+', '', database_name) | |
| conn = sqlite3.connect('./'+database_name+'.db') | |
| conn.close() | |
This file contains hidden or 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
| # python.exe .\fill.py --rows=9 --cols=9 --x=8 --y=5 | |
| import fire | |
| def create_image(rows, cols): | |
| def is_prime(num): | |
| for x in reversed(range(2, num)): | |
| if num % x == 0 and num > 1: | |
| return 1 | |
| return 0 |
NewerOlder