Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Counting Duplicates in large Data Set
Post: Counting Duplicates in large Data Set
My students and I were discussing the difference between possible and probability when it comes to lottery numbers. Is the sequence 1 2 3 4 5 6 just as likely to happen as 76 31 7 54 29 18 ?
My quest... |
|
jmair |
Data Science |
3 |
1,137 |
Dec-06-2022, 01:52 PM |
|
|
Thread: How to run script from batch file?
Post: RE: How to run script from batch file?
I think I got it. In case it helps anyone else.
@echo on call C:\ProgramData\Anaconda3\Scripts\activate.bat
C:\ProgramData\Anaconda3\python.exe "C:\Users\Administrator\Desktop\HelloWorld.py" |
|
jmair |
General Coding Help |
1 |
4,275 |
Oct-12-2020, 04:29 PM |
|
|
Thread: How to run script from batch file?
Post: How to run script from batch file?
I have Anaconda on a Windows Server. I would like to run a script at ever start up from Task Scheduler. I've only ever been running my code from Spyder directly. How can I call the script to run and n... |
|
jmair |
General Coding Help |
1 |
4,275 |
Oct-12-2020, 04:05 PM |
|
|
Thread: Reading JSON - error
Post: RE: Reading JSON - error
thanks
this does show all the titles.
data['data'][i]['title']
i+=1
So to show the first question of each title it would be ['paragraphs']['qas'][0]['question'] right?
(May-22-2019, 06:18 PM)mic... |
|
jmair |
General Coding Help |
2 |
2,242 |
May-22-2019, 07:25 PM |
|
|
Thread: Reading JSON - error
Post: Reading JSON - error
I'm trying to iterate through all of the questions and answers. What am I doing incorrectly?
This works and prints out entire JSON from the top of the hierarchy
import json
with open('D:/trivia_j... |
|
jmair |
General Coding Help |
2 |
2,242 |
May-22-2019, 06:09 PM |
|
|
Thread: Send Key press for a game?
Post: RE: Send Key press for a game?
The game is EverQuest.
pynput for example. Again, the code works fine everywhere except on top of this game. Even when it's called to the forefront. The pynput mouse movement and clicks work great, no... |
|
jmair |
General Coding Help |
3 |
9,276 |
Mar-20-2019, 02:29 PM |
|
|
Thread: Send Key press for a game?
Post: Send Key press for a game?
I'm just trying to send simple key commands to a video game. I've tried a few different pypi options and pywin32 to send keystrokes. pynput send mouseclicks but not keystrokes. Though all of these wil... |
|
jmair |
General Coding Help |
3 |
9,276 |
Mar-18-2019, 10:22 PM |
|
|
Thread: SQlite3 quickly increment INT value?
Post: SQlite3 quickly increment INT value?
Is there a slick +=1 for INT values in an SQLite3 table?
For example, a table named 'users'
name, gamesplayed
a suedo code example of what I'm looking for would be.
c.execute(FROM users WHERE name=? ... |
|
jmair |
General Coding Help |
1 |
2,451 |
Mar-04-2019, 06:30 PM |
|
|
Thread: Pynput - no capital letters
Post: RE: Pynput - no capital letters
Made a Win7 VM machine with the same result (I was really hoping it would be a win10 issue), same result. Also tried installing PyCharm as that's what a few of the videos show (youtu.be/WkE0QJu3ug8?t=... |
|
jmair |
General Coding Help |
2 |
4,558 |
Feb-12-2019, 09:53 PM |
|
|
Thread: Pynput - no capital letters
Post: RE: Pynput - no capital letters
The key controller works, allowing me to send "Hello World", but I am unable to identify a 'H' only 'h'. I tried running under admin with the same result. |
|
jmair |
General Coding Help |
2 |
4,558 |
Feb-11-2019, 05:05 PM |
|
|
Thread: int format for 001 - 999
Post: RE: int format for 001 - 999
That's exactly what I needed! Thank you! |
|
jmair |
General Coding Help |
4 |
17,980 |
Feb-10-2019, 05:04 PM |
|
|
Thread: Pynput - no capital letters
Post: Pynput - no capital letters
Is there a known issues with Windows 10 to where it doesn't recognize characters modified by shift or Caps Lock?
It does record the key event of the shift press.
Anyone know if I'm missing something ... |
|
jmair |
General Coding Help |
2 |
4,558 |
Feb-10-2019, 08:58 AM |
|
|
Thread: int format for 001 - 999
Post: int format for 001 - 999
Is there a build it method to do the following?
num = 001
num += 1
print(str(num))result: 002
currently I get an 'Invalid token' error with 001 as a variable
I'm just looking for a way to count 0... |
|
jmair |
General Coding Help |
4 |
17,980 |
Feb-06-2019, 09:25 PM |
|
|
Thread: Reading json from webpage
Post: RE: Reading json from webpage
Perfect, now I see how to call it. I appreciate the hint.
artist_name = data['channelMetadataResponse']['metaData']['currentEvent']['artists']['name'] |
|
jmair |
General Coding Help |
4 |
4,059 |
Jan-10-2019, 09:14 PM |
|
|
Thread: Reading json from webpage
Post: RE: Reading json from webpage
The error is
TypeError: unhashable type: 'slice'
So you're spot on =) |
|
jmair |
General Coding Help |
4 |
4,059 |
Jan-10-2019, 08:52 PM |
|
|
Thread: Reading json from webpage
Post: Reading json from webpage
For starters I'm just trying to learn how to pull some json data off a siriusxm page. (( Here's a link, but the time stamped page doesn't last very long. siriusxm page
My code looks like it grabs all... |
|
jmair |
General Coding Help |
4 |
4,059 |
Jan-10-2019, 06:15 PM |
|
|
Thread: Find closest string pattern
Post: RE: Find closest string pattern
(Dec-12-2018, 08:54 PM)Gribouillis Wrote: Using the normalized compression distance, option 1 is better in the first example and option 2 is better in the second example
from zlib import compress
d... |
|
jmair |
General Coding Help |
9 |
5,056 |
Dec-12-2018, 09:17 PM |
|
|
Thread: Find closest string pattern
Post: RE: Find closest string pattern
(Dec-12-2018, 07:52 PM)nilamo Wrote: Every element of option_two is only one element away from my_list. option_one's "one" is two elements away. So why isn't option_two the closer match?
thank you... |
|
jmair |
General Coding Help |
9 |
5,056 |
Dec-12-2018, 08:14 PM |
|
|
Thread: Find closest string pattern
Post: RE: Find closest string pattern
(Dec-12-2018, 07:09 PM)micseydel Wrote: "closest matching list" seems undefined here. Is this homework, where you have thorough instructions, or is the requirement coming from somewhere else?nah, no... |
|
jmair |
General Coding Help |
9 |
5,056 |
Dec-12-2018, 08:05 PM |
|
|
Thread: Find closest string pattern
Post: RE: Find closest string pattern
(Dec-12-2018, 07:37 PM)nilamo Wrote: How do you know option_one is closer? You can't put that into code before you can put it into words.
Though the string values don't line up exactly with my_list... |
|
jmair |
General Coding Help |
9 |
5,056 |
Dec-12-2018, 07:49 PM |