developer resources
Codebales holds an ever growing number of solutions to problems that we have experienced in our day to day code writing
Selected filter
142
results
Andrew Fletcher
•
Permission error
Traceback (most recent call last):
File "/var/www/html/open-ai/summarise-ai.py", line 144, in <module>
getfiles()
File "/var/www/html/open-ai/summarise-ai.py", line 26, in getfiles
summarise(filename)
File "/var/www/html/open-ai/summarise-ai.py", line 105, in summarise
savedata(filename, refine_outputs['output_text'])
File "/var/www/html/open-ai/summarise-ai.py", line 118, in savedata
with open(file_name, 'w') as json_file:
...
Andrew Fletcher
•
You can move a file from one directory to another in Python using the shutil...
Andrew Fletcher
•
To set an environment variable on Ubuntu, can be achieved via a few options....
Andrew Fletcher
•
Whilst installing Python 3.11.6 and running the command 'sudo make altinstall',...
Andrew Fletcher
•
Visual Studio Code (VS Code) allows you to manage extensions using the VS Code...
Andrew Fletcher
•
Ubuntu 20.04 comes with Python 3.8 installed. If you run the update script, you'll be informed that the latest version of Python is running. But here is the kicker, the actual latest version is currently 3.11.6... see https://www.python.org/downloads/source/
Use the following commands to download the Python 3.11.6 source code
Download the latest version
cd /usr/src
sudo wget https://www.python.org/ftp/python/3.11.6/Python-3.11.6.tgz
Extract archive
Once the download is...
Andrew Fletcher
•
Adding an SSL wildcard certificate to an Ubuntu server involves several steps....
Andrew Fletcher
•
When logging into Ubuntu server you will see a response similar to
Welcome to...
Andrew Fletcher
•
Forcing https and www or non-www is a process that I was a custom to through...
Andrew Fletcher
•
While the default version on Ubuntu 20.04 for Python is 3.8, I've added Python...
Andrew Fletcher
•
A summary of Node package commands
Short cut commands
npm install <package>
npm i <package>npm install --save <package>
npm i -S <package>npm install --save-dev <package>
npm i -D <package>npm install --global <package>
npm i -G <package>npm test
npm t
Update and outdated
Use outdated to discover dependencies that are out of date
npm outdatedUse update to perform safe dependency upgrades
npm updateUse install <packagename>@latest to...
Andrew Fletcher
•
Logging into the server, and there are packages to be updated. You know...
Andrew Fletcher
•
Update Ubuntu 20.04
To begin update the server using the command
sudo apt update...
Andrew Fletcher
•
Install the CKAN package
Begin by cleaning up your server environment....
Andrew Fletcher
•
If you're planning to create extensions, generating CKAN from source is the...