It would be great if @omz could add pandas, Sicily/sklearn and nltk ... not having them is pretty much the reason I have gone back to ssh’ing to a remote server and also using Juno.sh
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Posts made by khilnani
-
RE: Analyser and R for IOS
-
RE: git / github workflow in stash
@JonB said:
yes, removing files is probably not handled well... how does git handle rm without git rm?
from what ive seen, it treats them as if git rm was called and auto stages the removes
i actually recommend against git pull in most cases, it will happily onliterate any local changes. i tend to use git fetch followed by git merge, which at least tries to do sane things (though is not exactly like the real git merge). iirc git reset can be helpful when files get deleted without git rm.
git fetch
ORgit fetch origin
OR evenfit fetch git@gihub...
gives an error -stash: <type 'exceptions.Exception'>: url must match a remote name, or must start with http:// or https://
i tried git reset after manually deleting a file. didnt seem to help. Still get
stash: <type 'exceptions.OSError'>: [Errno 2] No such file or directory: '/private/var/mobile/Containers/Shared/AppGroup/A90BB332.......ACD7F/Pythonista3/Documents/pythonista-scripts/test'
I am in the process of removing gittle dependencies, and will then be able to use the most recent dulwich. Some improvements have already been made to dulwich.porcelain, and this would let us make pull requests to dulwich...
cool !!!!
Thanks so much for helping out!!!
-
RE: git / github workflow in stash
@JonB ssh keys worked after setting up in pythonista and github. Thanks!
Am still working through a few scenarios:
1 - moving files. Noticed there is no git mv command.
2 - adding directories with sub directories. Seems like need to add complete relative path of the files in each directory (* works) while in the main dir with .git
3 - files deleted without git rm. eg. deleting from pythonista GUI. git status, git pull etc. all fail with a IO exception
4 - Files deleted remotely - after a git pull, any file deleted remotely is auto staged to be added instead of being removed locally -
RE: git / github workflow in stash
@JonB said:
also, i should add that ssh might be better for private repos in general. you iust have to set up the keys and then it just works.
Hmmm.. For some reason i didnt try ssh when i use that everywhere else. I guess, i assumed it wouldnt work since Pythonista is an 'app'.
I did try your other suggestion and that didnt work. Seems like on ssh keys work with git@ urls and not https at all.
Might send a PR to https://github.com/jsbain/stash_git_tutorial/blob/master/stash_git_tutorial.md ... Noticed it mentions ssh in an upcoming update :)
Thanks for helping!!! @JonB
-
RE: git / github workflow in stash
@ccc said:
Have you tried Working Copy? https://workingcopyapp.com
I already have that but wanted to find something inside pythonista since i have projects with many files to open in app back and forth :(
Good suggestion tho.
-
RE: git / github workflow in stash
I get the same issue with github.com private repos. I cloned a private repo, pull changes, edited a file locally, comit and tried to push. The push fails with 401.
Its able to clone and pull from a private repo, but cant push.
Is anyone able to use stash git with private repos? Wondering if its only a few of us having issues.
-
Data analysis workflow
Its clear Pandas, Scipy and other data modules are not available in Pythonista. But, Numpy, Matplotlib and other python only modules are available. So are feedparser and beautiful soup for web scaping. I've parts of nltk to work as well.
I use the Anaconda stack with pandas, numpy, scipy, keras, tensorflow, nltk etc etc. on desktop with Jupyter as my playground. But, havent tried much in Pythonista since am not sure if i will miss the modules not available in Pythonista too much, or perhaps thats just me.
Curious how many people do data analysis in pythonista, which modules they use, their workflow and examples of what kind of analysis they do. Thanks in advance!
-
RE: WHY only Dropbox?
ICloud (since it's assume.ed to be supported y default ), but personally I use Google drive and Amazon s3 (need to see if my pythonista s3backup script works in editorial)
-
RE: Celery import error
i could patch it but its a dependency of celery, so might become a bit wieldy soon.
i was wondering if anyone (or @omz ) knew why it might be failing and its something missing on iOS thats availablenon desktop
-
Celery import error
I was able to pip install celery, but whem i try to import i get an error on import from the kombu package it depends on
from kombu.five import monotonic File "/private/var/mobile/Containers/Shared/AppGroup/6A6950F6-86D6-46AB-96BD-0E55FFAEC184/Pythonista3/Documents/site-packages/kombu/five.py", line 56, in <module> absolute_to_nanoseconds = CoreServices.AbsoluteToNanoseconds File "/var/containers/Bundle/Application/ACE4580A-901E-4AC9-8BA1-EEBF5F98373A/Pythonista3.app/Frameworks/PythonistaKit.framework/pylib/ctypes/__init__.py", line 378, in __getattr__ func = self.__getitem__(name) File "/var/containers/Bundle/Application/ACE4580A-901E-4AC9-8BA1-EEBF5F98373A/Pythonista3.app/Frameworks/PythonistaKit.framework/pylib/ctypes/__init__.py", line 383, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: dlsym(RTLD_DEFAULT, AbsoluteToNanoseconds): symbol not found
the code at thr line with the issue is
if SYSTEM == 'Darwin' and ctypes is not None: from ctypes.util import find_library libSystem = ctypes.CDLL(find_library('libSystem.dylib')) CoreServices = ctypes.CDLL(find_library('CoreServices'), use_errno=True) mach_absolute_time = libSystem.mach_absolute_time mach_absolute_time.restype = ctypes.c_uint64 absolute_to_nanoseconds = CoreServices.AbsoluteToNanoseconds ##error## absolute_to_nanoseconds.restype = ctypes.c_uint64 absolute_to_nanoseconds.argtypes = [ctypes.c_uint64]
I'm just trying to see if celery works at all when using sqlite, example
from celery import Celery app = Celery('hello', broker='sqla+sqlite:///celerydb.sqlite')
Thanks!!!!!!
-
RE: Python console in the Today widget
Good point. I had Battery, Launcher, Dataman, and Darksky Next hour. Removed them all and only kept Pythonista, seems better still disappears after a second or two (vs half a second before)
-
RE: Python console in the Today widget
@dgelessus i'm not using pythonista_startup. i restarted the phone and tried it before launching any apps- entered my passcode for the home screen and pulled down. I see the same - the keyboard slides down and then disappears leaving a unable to load message.
i'm using 9.3.1 on an iPhone 6 Plus. let me know if there is anything i can help with if you'd more info. the script works within from within Pythonista.
-
RE: Python console in the Today widget
@dgelessus Thanks for clarifying. i just got Pythonista 3 and tried it out.
Unfortunately for me, it seems to show up for a brief second and disappear. After a few times of auto-reloading it says unable to load.
Seems to sound like the limits on memory @omz mentioned in the release notes. i have a decent number of libraries in my site-packages that might be causing the issue, I assume the entire site-packages is loaded in the today widget.
-
RE: Python console in the Today widget
is this Pythonista 3 only? im not on the beta yet and got a Non-ASCII character error when running within Pythonista.
-
RE: print: replace previous line
@lukaskollmer Slightly off topic, but did you finish your S3 Backup script? I needed one too and couldn't find one so wrote one - https://github.com/khilnani/s3sync.py
-
RE: appex save file vs homescreen/in editor save file
Using cwd helped -
DOCS_DIR = os.getcwd().split('Documents')[0] + 'Documents'
-
RE: Wish list for next release
running and display output of a script on the today screen itself .. like a multiline row cell per script (eg. custom metrics or feed)
I've experimented a little with that a while ago, but today widgets just don't get enough RAM to be all that useful for scripting.
@omz That would have been nice to have, but am glad you already thought of that.
iphone 6/5s line numbers
Line numbers are already available as an option on iPhone 6 (not on 5s, I find the screen too small for line numbers, I might change my mind though).
Just found - https://forum.omz-software.com/topic/1430/show-lines-number - nice! i assume its coming officially in the beta
speech.is_talking
There is
speech.is_speaking()
– I just noticed that this is undocumented.@omz Cool
As for the modules, these are all popular requests. SciPy is unfortunately very hard to port, so I can't promise anything there. Pandas is more likely to happen (again, no promises!).
@omz Thanks for responding, Pandas would be great!!