Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 months ago.
Improve this question
The issue
when using the ls command on mac via python os.system(), the printed content is much too large.
AKA, the entire PDF file I am trying to print(visible here) cannot be seen, and only the bottom half of the bottom left section of 9 can be seen.
What I have tried
I have not tried much, since I could not find many resources on this topic online, but, I have attempted to print it with Preview to determine if it was a problem with the actual PDF, and the result was flawless, so, I copied the scale from Preview into the lp command, to result in the final command:
ls -o scaling=32 soduko.pdf
Any Help would be greatly appreciated!
Note: Whatever I try will be printed in real life, and costs money and ink, therefore, the best solution would be the one without any brute force or several tries.
Adding the -o fit-to-page argument has fixed my answer. Thank you for the help! The final command was:
lp -o fit-to-page soduko.pdf
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I'm making a POS system using Tkinter for my Computing Programming Project and for the program analysis we have to talk about the proposed solution and how we'll go about carrying out the program. For this, it's recommended to talk about system requirements needed to run the program but I'm not very experienced in talking about system requirements so I'm not sure what numbers to mention in terms of RAM, CPU, storage, etc.
Could you give me some basic numbers that you'd expect a computer to have in order to run a POS program similar to this one?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 4 years ago.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I am trying to run various codes I found in the internet with pysc2 Starcraft DeepMind AI agents. I often run into KeyError: 'SOME-VALUE-HERE' invoked by obs.observation["SOME-VALUE-HERE"].
For example this agent and this agent crash on KeyError: 'minimap' invoked by obs.observation['minimap'].
Other example is KeyError: 'screen' invoked by observation["screen"] when running Siraj Raval's enjoy_mineral_shards script.
It is very frustrating as I have not found anybody else running to this error and I really struggle with debugging in pysc2 environment. Any help?
The codes were run with pysc2 version 2.0.1. One needs to downgrade to version 1.2 (relevant for mentioned examples).
pip install pysc2==1.2
(many thanks to discordapp Starcraft 2 AI community).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 5 years ago.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I've a samba share on my NAS, which is accessible in R/W as guest.
From a python script on my raspberry, I would like to send some file.
I've made the following script:
from shutil import copyfile
copyfile('/home/pi/Test/README.md', r'\\192.168.0.30\Public\test')
I've no errors, but the file is not send to my NAS.
any idea what I'm doing wrong?
I ended by creating a network share:
import subprocess
remoteHost="192.168.0.30"
remoteShare="Public"
remoteSubFolder="test"
remoteUser='picam'
remotePassword='picam'
localMountPoint = '/mnt/remoteServer'
destinationFolder = localMountPoint+'/'+remoteSubFolder
if not os.path.exists(localMountPoint):
os.makedirs(localMountPoint)
command = "sudo mount -t cifs -o username="+remoteUser+",password="+remotePassword+" //"+remoteHost+"/"+remoteShare+" "+localMountPoint
logMsg("Executing mounting command: "+command)
subprocess.Popen(command, shell=True)
And now the copy work. Not really what I was hopping but at least it works.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
So my iPython notebook comes up in my browser (chrome) and when I open my specific notebook a new tab opens. However the work does not load up! The page also freezes. Is this an iPython issue or something wrong with the file? Was working yesterday. I've restared comp etc. but no luck
Update: just tried renaming notebook to open again with no luck
Update 2: One has now shown up - but can't do anything with it! Is iPython simply extremely extremely slow...
Is it possible that one of the cells got a lot of output data?
if so,
try editing the file manually (with notepad++ or something like this), and delete cell's output
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'd like to make a new toolbox for ArcGIS 10.
While I have found resources on making Python scripts and the like, I have not yet found any examples or documentation regarding making Toolboxes.
Could someone point me in the right direction? Examples of toolbox codes/setup are much appreciated.
Making a new (empty) toolbox is very easy.
Simply right click on a folder in the Catalog window and choose New | Toolbox.
This is described in the Online Help.
Once you have a toolbox you just right click on that to Add Script and follow the wizard. The help link above should lead you to documentation on all of that.
Pay particular attention to how you define parameters on the tool to correspond with your GetParameterAsText statements in the script.
If you get stuck the GIS Stack Exchange has many thousands of ArcPy Q&As.