Code

Code Examples

##@ General ( ##=comments)

# Script Name : script 12345

# Author : Craig 

# Created : 15th February 20??

# Last Modified : 29th May 20??

# Version : 1.2

# Modifications

# Description

""" ( 3 quote marks in a row = Start of a comment paragraph 3 """ at finish shows end of paragraph)

+import (include another app)

+ (begin each line with the plus sign +)

+ import

+ flag = 0

+hostname = input("Enter your host ::")

+ s.connect((hostname , 1023))

+ nickname = unput("Enter your Name ::")

+ def

+ while

+ try

+ if

+ print("Your words here::", nickname)


"""  # I have copied and Pasted the following code in the hopes to using in my script.

diction.py

def takeCommand():

    r = sr.Recognizer()

    with sr.Microphone() as source:

        print("Listening...")

"""

Days_from_date.py

user_input1 = tk.StringVar()

def process_date(user_input):

user_input = re.sub(r"/", " ", user_input)  # substitute / with space

user_input = re.sub(r"-", " ", user_input)  # substitute - with space

return user_input

"""

New_Script.py

input = open(input_file, "r")

today = datetime.date.today()

old_date = " Created :"

new_date = " Created : " + today.strftime("%d %B %Y")

for line in input:

line = line.replace(old_text, new_text)

"""

Get Date

from datetime import datetime as date,timedelta 

date = input("Enter date(YYYY-MM-DD): ") 

#Format the date and time

time = datetime.now().strftime("%H:%M")

today = date.today()

date = today.strftime("%b-%d-%Y")

"""

Create Translation

from translate import Translator

# Translator function

def translate():

translator = Translator(from_lang=lan1.get(), to_lang=lan2.get())

translation = translator.translate(var.get())

var1.set(translation)

"""

Personal_translator.py

# make a simple function that will translate any language to english

def text_translator(Text):

translator = Translator()

translated = translator.translate(Text, dest="en")

return translated.text

"""

Create a Filename

filename = input()

image = cv2.imread(filename)  # Enter name of the image

filename = askopenfilename()

print(filename)


testlines.py

def write_to_file(filename, txt):

    with open(filename, "w") as file_object:

        s = file_object.write(txt)


sendemail.py

        msg = MIMEBase(main_type, sub_type)

        msg.set_payload(fp.read())

        fp.close()

    filename = os.path.basename(attachmentFile)

    msg.add_header("Content-Disposition", "attachment", filename=filename)

    message.attach(msg)


# Check if the new filename already exists in the directory

            if os.path.exists(new_path):

""""

#Python packages need to have: pywifi

import pywifi


Learn Python = https://github.com/geekcomputers/Python to find Python Examples

R1ngoB u/R1ngoB - wrote Magic-di in python = https://github.com/woltapp/magic-di

Following RingoB's Magic-di in hopes of using Celery Task-cookbook one task at a time

woltapp/magic-di (Magic-di uses Celery Software) implimented by u/R1ingoB

Integration with Celery Software ( https://docs.celeryq.dev/en/stable/tutorials/task-cookbook.html )

Read https://github.com/geekcomputers/Python and see if these are useful ...

Github File Extension-List = https://github.com/dyne/file-extension-list/tree/master