This file contains 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
''' | |
Sample Input | |
63.70.164.200 | |
168.12.13.1 | |
Sample Output | |
Lincoln (Highlands), Nebraska (United States) | |
Atlanta (150), Georgia (United States) | |
''' | |
##install: pip install ipapi |
This file contains 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
/* | |
You are given three tables: Students, Friends and Packages. Students contains two columns: ID and Name. | |
Friends contains two columns: ID and Friend_ID (ID of the ONLY best friend). Packages contains two | |
columns: ID and Salary (offered salary in $ thousands per month) | |
Write a query to output the names of those students whose best friends got offered a higher salary than | |
them. Names must be ordered by the salary amount offered to the best friends. It is guaranteed that no two | |
students got same salary offer | |
Oracle Solution | |
*/ |
This file contains 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 logging | |
logging.basicConfig(filename='mock_log1.log', level=logging.DEBUG, | |
format='%(asctime)s [%(levelname)s] %(message)s') | |
class Server: | |
def __init__(self, consumer_id, product_id, error_info, msg_id, error_id): | |
self.consumer_id = consumer_id | |
self.product_id = product_id |