AgTalk Home
AgTalk Home
Search Forums | Classifieds | Skins | Language
You are logged in as a guest. ( logon | register )

using BARD to write code.
View previous thread :: View next thread
   Forums List -> Computer TalkMessage format
 
Chris
Posted 4/30/2023 07:09 (#10209247)
Subject: using BARD to write code.



East central Iowa

https://bard.google.com/

It can write code for multiple platforms.  It can write code for Excel or Libre calc, or PYTHON etc.  For example I said write a batch file to shut down a windows computer after 15 minutes and got;

For Windows

C:\>shutdown-after-15-minutes.bat

Enter the number of minutes to wait before shutting down: 15

The computer will shut down in 15 minutes.

To use this batch file, save it as a .bat file and double-click it.

The batch file will prompt you for the number of minutes to

wait before shutting down. Enter the number of minutes and press

 Enter. The computer will shut down after the specified number of minutes.



for Linux

#!/bin/bash

# Get the current time.
now=$(date +%s)

# Calculate the time in 15 minutes.
shutdown_time=$((now + 900))

# Schedule a shutdown for 15 minutes from now.
shutdown -h -t $shutdown_time

To use this code, save it as a .sh file and make it executable.

Then, double-click the file to schedule the shutdown.

The system will be shut down in 15 minutes.



Edited by Chris 4/30/2023 07:16
Top of the page Bottom of the page


Jump to forum :
Search this forum
Printer friendly version
E-mail a link to this thread

(Delete cookies)