I saw a video that claimed the following mathematical summation…
  
    
      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 pymupdf # pip install PyMuPDF | |
| url = ('https://pycon-assets.s3.amazonaws.com/2024/media/' | |
| 'documents/DLCC-Floorplan-Marked_up_PyCon_US_2024.pdf') | |
| # url = 'file:DLCC-Floorplan-Marked_up_PyCon_US_2024.pdf' | |
| with urllib.request.urlopen(url) as response: | |
| pdfStream = response.read() | 
      
      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
    
  
  
    
  | def time_format(seconds: int) -> str: | |
| """ | |
| From: https://stackoverflow.com/a/68321739/543738 | |
| """ | |
| if seconds is not None: | |
| seconds = int(seconds) | |
| d = seconds // (3600 * 24) | |
| h = seconds // 3600 % 24 | |
| m = seconds % 3600 // 60 | 
  
    
      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
    
  
  
    
  | <?php | |
| require_once 'vendor/autoload.php'; | |
| use IMSGlobal\Caliper\actions\Action; | |
| use IMSGlobal\Caliper\Client; | |
| use IMSGlobal\Caliper\context\Context; | |
| use IMSGlobal\Caliper\entities\agent\Person; | |
| use IMSGlobal\Caliper\entities\agent\SoftwareApplication; | |
| use IMSGlobal\Caliper\entities\media\MediaLocation; | |
| use IMSGlobal\Caliper\entities\media\VideoObject; | 
  
    
      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
    
  
  
    
  | # https://stackoverflow.com/questions/39928401/recover-db-password-stored-in-my-dbeaver-connection | |
| import sys | |
| import base64 | |
| print(sys.argv[1]) | |
| PASSWORD_ENCRYPTION_KEY = b"sdf@!#$verf^wv%6Fwe%$$#FFGwfsdefwfe135s$^H)dg" | 
  
    
      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
    
  
  
    
  | # https://stackoverflow.com/questions/39928401/recover-db-password-stored-in-my-dbeaver-connection | |
| # requires pycryptodome lib (pip install pycryptodome) | |
| import sys | |
| import base64 | |
| import os | |
| import json | |
| from Crypto.Cipher import AES | 
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
      
      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
    
  
  
    
  | import json | |
| import os | |
| import openai | |
| class ChatApp: | |
| def __init__(self, model='gpt-3.5-turbo', load_file=''): | |
| # Setting the API key to use the OpenAI API | |
| # openai.api_key = os.getenv('OPENAI_API_KEY') | 
NewerOlder