216 questions
0
votes
1
answer
158
views
Screenshot on Android using KTXPY or QPYTHON
I am using ktxpy (prefered) or qpython.
I want to read data from screen, using tesseract or other.
For this I would like to take a screenshot using any library that I can install through pip for ktxpy....
0
votes
2
answers
266
views
How to pass the binary file from python to kdb?
In demand for the code encryption, I need to encrypt my codes into a binary file( reference: https://code.kx.com/q/wp/permissions/#protecting-proprietary-code ), i.e., by running the "_ test.q&...
1
vote
1
answer
135
views
Qpython: Any way to switch keyboards to a Numeric Keyboard?
Sometimes when using various apps on my Samsung Note Android phone the normal keyboard gets replaced by a numeric keyboard when strictly numeric input is required. I assume that this is built in to ...
0
votes
1
answer
1k
views
How to install qpython in Windows 10?
I am unable to pip install qpython.
I have added it to both the environmental path and to the user path.
But it still fails:
I want to get the package to be installed so I would be able to continue ...
0
votes
1
answer
125
views
Is there a way to do wj with aggration on columns from the left table?
I have below code. weight is from the right table, and the aggregation works. weightLeft is from the left table, and the aggregation doesn't work. Is it possible to make weightLeft works?
t:([]sym:3#`...
0
votes
1
answer
77
views
wj failed for columns' sum product
I have below code and I want to do sumproduct. When I do sum(weight) at wj, it works. But if I do sum(weight*price) at wj, it failed. How can I do the sumproduct? Thanks!!
t:([]sym:3#`ibm;time:10:01:...
0
votes
1
answer
283
views
Trying to install Calendar.py
How can I get the library for calendar.py? I'm new to this.
I tried installing it and got the following error...
pip3 install calendar.py
Collecting calendar.py
Could not find a version that ...
0
votes
0
answers
214
views
Python - qpython scrip to get a CPU ID or Hardware ID
I am beginner in Python coding, I try to create a little python script to get/read a CPU ID or Hardware ID, Android ID or if there are others Unique ID to get/read easy from android devices even ...
-1
votes
1
answer
386
views
Join columns to a table in parallel
Currently I use a function to run an aj join for a single column from a large table on to a smaller table which has its time column shifted t milliseconds ahead, joining on a sym column as well as ...
-1
votes
2
answers
543
views
Force killing of q session after query is done
I am trying to force killing (not closing) a q session once my query is done to save resources on my machine.
It is currently working using:
conn.sendAsync("exit 0")
Problem is, if I run a ...
-2
votes
1
answer
209
views
Use the bin binary on a per-ticker basis
For two tables each with datetime and ticker symbol columns, how can we achieve the functionality of the binary function bin within each ticker group. That is, instead of returning the latest index ...
0
votes
2
answers
91
views
I'm trying to print unicode characters from QPython
Trying to print unicode characters like ┌┌┝├ from QPython 3.6 (under Android on a Chromebook with Chrome OS 100) but print(u"┌┌┝├") prints nothing, and using \u doesn't work since \ is the ...
0
votes
2
answers
686
views
kdb calculate percent change between rows
i calculate percent change in 24 hour by this way that you can see below.
is there any way to get calculated percent directly from kdb by query?
df should return the percent as final value.
df = q....
1
vote
1
answer
715
views
kdb select only one row for each minute
i have some records on kdb, as you see we have 10 row for time: "8:33" and 19 row for time "8:34" and some other row for time "8:35".
now, how can i select only one row ...
1
vote
1
answer
871
views
kdb get last 1 hour records
i need to select and get rows which are related to previous 1 and 24 hours. to handle 24 hour i used this code. what about 1 hour how can i get that?
yesterday = datetime.now() - timedelta(1)
...
2
votes
2
answers
2k
views
How to fetch the table or view metadata from KDB and save to a data-structure?
I have been trying to fetch the metadata from a KDB+ Database using python, basically, I installed a library called qpython and using this library we connect and query the KDB+ Database.
I want to ...
1
vote
1
answer
393
views
Can't retrieve symbols from KDB using QPython
I am trying to pull a KDB table into a python dataframe. The table is created successfully, all float columns are visable but symbol columns are blank.
I am using:
with qconnection.QConnection(host = '...
1
vote
0
answers
261
views
How to turn on the phone flashlight with Qpython?
I coded a Python program to make time laps with the Androidhelper library, only I have one last problem: turn on the light of the phone when it is dark
I have searched the documentation of ...
1
vote
0
answers
225
views
Pip install is too slow
Hello I am trying to install a few modules in Qpython but is really slow, I also tried using the alternative with Qpypi and its just really slow, my download rate is between 5KBs and 10KBs...
I am ...
1
vote
0
answers
78
views
qpython -(contact list command)
I wrote this command in editor qpython3 in my Android Handy.(Mi A3)
Why I get (name not define) this error?
MY CODE:
a = contactsGetIds()
print(a)
Error:
/data/user/0/org.qpython.qpy3/files/bin/...
0
votes
1
answer
466
views
Get battery temperature using androidhelper
I am wondering how to get battery temperature using
batteryGetTemperature()
Why do get error
And how to solve it
droid.batteryStartMonitoring()
print("Battery Percentage: " + str(...
0
votes
1
answer
72
views
Qpython OL: type org.json.JSONArray cannot be converted to JSONObject in makeIntent()
I am trying to make an intent using androidhelper in Qpython OL with the code below:
action = "org.escpos.intent.action.PRINT"
packagename = "com.loopedlabs.escposprintservice" # ...
2
votes
1
answer
911
views
Timeout in what units
Is the timeout in qpython.qconnection.QConnection in any specific units, or it is just non-dimentional number?
From my experience, number 3000.0 corresponds roughly to 20 seconds.
Ref:
Timeout in ...
0
votes
1
answer
2k
views
Query in q-lang using qPython and Pandas in Python 3.8
I am totally new to q-language, but I need to use it in order to access a kdb server to get the data from.
I am using Python 3.8, under Windows10, with qPython installed.
I have trouble getting the ...
1
vote
0
answers
165
views
warning and error messages upon clicking QPYPI CLIENT
I am new to coding with qpython. I am facing warning and error messages upon clicking QPYPI CLIENT. What could be the issue
ntry: type 0x6ffffffe arg 0x12458
WARNING: linker: libpython2.7.so.1.0: ...
0
votes
1
answer
1k
views
How can I commit a dataframe to kdb as a new table?
I'm aware of this question was already answered here, however as a new q-bie I am still quite confused with how to create and insert a new table using q.
My problem: I have a dataframe and I am using ...
0
votes
0
answers
33
views
How can we intergrate kanji to be an available in the qpython 3 in the console side as it is in the interpreter side?
I'm trying to figure out how I can type in kanji from the console side of qpython3. Maybe it's the phone i'm using. They say that the program acts differently depending on the phone/version/etc. Is ...
0
votes
1
answer
571
views
Installing pandas for QPython app on android
I am using the QPython app on my android device to run scripts. I have a script that requires the pandas package but can't seem to download it onto my phone. The app has a section for downloading ...
-2
votes
2
answers
194
views
How do I select the specific data in a data frame based on thee contents of other columns?
I'm new to pandas and I'm currently trying to use it on a data set I have on my tablet using qPython (temporary situation, laptop's being fixed). I have a csv file with a set of data organised by ...
1
vote
1
answer
693
views
How to insert a row into KDB using qPython
I'm trying to use a script to connect to a KDB and insert rows into a table in the KDB using qpython (https://github.com/exxeleron/qPython). My table has the following column types:
"symbol","symbol","...
1
vote
1
answer
1k
views
Return KDB query to a pandas dataframe
I would like to extract data from a KDB database and place into a dataframe. My query runs fine in qpad, no issues; just need to write it into my Pandas dataframe. My code:
from qpython import ...
0
votes
1
answer
301
views
Trying to convert kdb to csv using python, everything converts correctly except one column
I have converted a kdb query into a dataframe and then uploaded that dataframe to a csv file. This caused an encoding error which I easily fixed by decoding to utf-8. However, there is one column ...
2
votes
2
answers
2k
views
Saving a kdb table to a dataframe then saving the dataframe to a csv. null and string values outputting to csv incorrectly?
I am saving a kdb table to a dataframe then saving the dataframe to a csv. This works, however, the csv file and if i print(dataframe); null values are showing as " b" ", and all other string values ...
0
votes
1
answer
847
views
Call/Send SMS with SIM card 1 and 2 with qpython3
I have managed to make a call and send an SMS with sl4a for python but it is using the default selected SIM in android system settings.
Is there a way to force SIM 1 or 2 from inside the python code?
...
1
vote
1
answer
6k
views
QPython requests SSL error- no available ciphers
Ive been trying to use requests.get for sometime now but I keep getting this error on Qpython
HTTPSConnectionPool(host='google.com', port=443):
Max retries exceeded with url:
/ (Caused by SSLError(
...
1
vote
1
answer
601
views
How to start sl4a server on android from terminal and connect to it with python?
I'm installed qpython app to my phone. From the app I can run scripts with androidhelper but if I run qpython from terminal and try to create an Android object it has been refused.
$ pwd
/data/user/0/...
0
votes
2
answers
2k
views
Qpython3.6 - Using androidhelper module, getting unexpected results
Here is my current code:
>>>import androidhelper as andr
>>>d = andr.Android()
>>>dir(d) #returns all possible methods for the module
>>>d.batteryGetLevel() #...
0
votes
2
answers
1k
views
How does one transfer python code written in a windows laptop to a samsung android phone?
I created numerous python scripts on my pc laptop, and I want to run those scripts on my android phone. How can I do that? How can I move python scripts from my windows pc laptop, and use those python ...
0
votes
2
answers
1k
views
How can I access phone number in android with q python?
I try to access all phone number that calling me in Q python.
I wrote this code:
import androidhelper
w=1
while (w == 1):
droid = androidhelper.Android()
droid.startTrackingPhoneState()
...
2
votes
1
answer
274
views
Can I use the android module in python on windows
Is there any way at all to use the android module on windows? I have been trying to make a speech recognition program on windows (which has been a tough thing since it has to work offline) and I ...
1
vote
0
answers
119
views
How to create modules for android qpython
As a newbie to qpython (and python) I am trying to develop a library of useful functions for myself. I gather that I should be able to save a file of those functions somewhere (with a .py extention) ...
1
vote
1
answer
1k
views
PermissionError when closing xlsxwriter Workbook in QPython despite having permissions
I do have permission to write to a specific directory, and the file gets created too. But the line w.close() causes the error.
Since I'm using this module to create the file, it isn't open in any ...
0
votes
1
answer
253
views
Cannot connect to Mariadb from Qpython terminal using Mysql Connector
Please could someone help this newbie. I've installed the following on my Android phone:
QPython v2.4.2
Mysql Connector v1.0.8 (via QPYPI)
MariaDBServer v10.3.8
I can connect to the server using a ...
0
votes
1
answer
896
views
Python code work with qpython but apk crash on mobile
Hy, I tried this code found in many links with some minor differences between them
main.py
#-*-coding:utf8;-*-
#qpy:2
#!/usr/bin/python
# -*- coding: utf-8 -*-
import androidhelper
droid = ...
1
vote
1
answer
774
views
KDB+ query in QPython: Filter based on DataFrame list
I am using qpython to query into a KDB+ database and then performing operations on the output. old_df is output from an earlier qpython sync query which has '[source_id]' as a string column. Now am ...
1
vote
1
answer
375
views
qPython QProjection Issues instead of queried data
I tried writing a Q Code which will allow me to pass parameters however I am getting a results as Qprojection. I tried using
qpython.sync() is returning a QProjection instead of the queried data
...
1
vote
1
answer
3k
views
QPython Pandas Interaction
I have a question pertaining to Pandas Data Frame which I want to enrich with Timings from Tick Source(kdb Table).
Pandas DataFrame
Date sym Level
2018-07-01 USDJPY 110
2018-08-01 ...
0
votes
1
answer
2k
views
Qpython3 and androidhelper, droid.dialogSetSingleChoiceItems
I am trying to figure out androidhelper, which I find very useful to work with python 3 and Android. I am trying to return a selection from a list using dialogSetChoiceItems. I have it set up, and I ...
1
vote
1
answer
2k
views
Schedule a QPython script to run daily (on android device)
I would like to know what is the best way I could schedule a script to run daily on my android device, using the QPython app.
What are your suggestions?
Thank you in advance.
2
votes
2
answers
477
views
Qpython - Kivy apps fail "No module named kivy"
I'm using Qpython v2.2.4-8 with python 2.7.12, and am trying to get a kivy app to run. I installed the pip libraries lxml-u4-qpython and kivy-u4-qpython via the app's terminal, and created a new ...