Monday, December 4, 2023

Ama3on Linux2

 https://medium.com/shehuawwal/download-and-run-amazon-linux-2-ami-locally-on-your-virtualbox-or-vmware-b554a98dcb1c


https://suriyal.com/install-amazon-linux-2-on-virtualbox/


https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-lamp-amazon-linux-2.html


https://letsencrypt.org/




++




How to start Office for Windows applications in Office Safe Mode

Use one of these methods to start an Office application in Office Safe Mode on a Windows PC:

This method works for most Office versions on a Windows PC:

  1. Find the shortcut icon for your Office application.

  2. Press and hold the CTRL key and double-click the application shortcut.

  3. Click Yes when a window appears asking if you want to start the application in Safe Mode.

Note:  To stop Office Safe Mode, exit and restart your Office application. It will start in normal mode unless there's a problem opening the application.

This method works for most Office versions on a Windows PC:

  1. Right-click the Start button (lower-left corner) in Windows, and click Run.

    Alternatively, you can press the Windows logo key and the R key on your keyboard.

  2. In the Run box, type one of these commands:

    • For Excel: Type excel /safe, and click OK.

    • For Outlook: Type outlook /safe, and click OK.

    • For Word: Type winword /safe, and click OK.

    • For PowerPoint: Type powerpnt /safe, and click OK.

    • For Publisher: Type mspub /safe, and click OK.

    • For Visio: Type visio /safe, and click OK.

  1. program fpopenai_6;
  2. {
  3.   Demo on how to use openai in Freepascal
  4.   Find out more at https://openai.com where you can also obtain a key.
  5.   Put the key in a file called openai.key surrounded by single quotes.
  6.        
  7.   Enjoy, Thaddy de Koning, 26 december 2022
  8. }  
  9. {$mode objfpc}{$ifdef mswindows}{$apptype console}{$endif}{$H+}
  10. uses classes,sysutils,fphttpclient,opensslsockets,fpJson,jsonparser;
  11. const
  12.   model ='{"model": "text-davinci-003",  "prompt": "%s","temperature": 0.7,"max_tokens": 3000,"top_p": 1,  "frequency_penalty": 0,  "presence_penalty": 0}';
  13. var
  14.   d:TJsonData;
  15.   s:string;
  16. begin
  17.   writeln('What is your request?');
  18.   readln(s);
  19.   writeln;
  20.   with TfpHttpClient.Create(nil) do
  21.   Try
  22.     AllowRedirect:= true;
  23.     RequestHeaders.Add('Content-Type: application/json');
  24.     // put your key with single quotes in a textfile called openai.key
  25.     RequestHeaders.Add('Authorization: Bearer '+{$I openai.key});
  26.     RequestBody:=TStringStream.Create(format(model,[s]));    
  27.     writeln('Please wait for the response, this can take some time:');
  28.     try
  29.       try
  30.         d:=GetJson(Post('https://api.openai.com/v1/completions'));
  31.         writeln(d.findpath('choices[0].text').AsString);
  32.       except
  33.         writeln('The engine was not able to answer your request ',ResponseStatusCode);
  34.       end;
  35.     finally
  36.       d.free;
  37.     end;    
  38.   finally
  39.     RequestBody.Free;
  40.     Free;
  41.   end;
  42. end.

No comments:

Post a Comment

Коментар: