workspace
stringclasses
1 value
channel
stringclasses
1 value
sentences
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
sentence_id
stringlengths
44
53
timestamp
float64
1.5B
1.56B
__index_level_0__
int64
0
106k
pythondev
help
A more accurate approach, depending on what exactly the fraction means, might be to work out if it's a leap year, to multiply that fractional part by 365 or 366 accordingly, add that number of days to a datetime object for Jan 1st of that year, then extract the month
2019-04-13T11:40:58.261900
Raven
pythondev_help_Raven_2019-04-13T11:40:58.261900
1,555,155,658.2619
18,621
pythondev
help
<@Bruna> ``` &gt;&gt;&gt; data = [('A1', u'Country'), ('B1', u'Invoice required for Ancillary Supply Import License?'), ('C1', u'Notification of shipment to be provided to (AS)')] &gt;&gt;&gt; values = [d[1] for d in data] &gt;&gt;&gt; &gt;&gt;&gt; print(values) [u'Country', u'Invoice required for Ancillary Supply Import License?', u'Notification of shipment to be provided to (AS)'] ``` `[d[1] for d in data]` This is called a list-comprehension. Look it up. `d` in `data` refers to a tuple like `('A1', u'Country')`. Within `d`, `d[0]` would be `A1` and `d[1]` would be `Country`. The whole logic enclosed in `[..]` is building a new list with results (hence "comprehension").
2019-04-13T13:03:34.262500
Stan
pythondev_help_Stan_2019-04-13T13:03:34.262500
1,555,160,614.2625
18,622
pythondev
help
hi :slightly_smiling_face: anyone here have any experience working with <http://Android.mk|Android.mk> files? :slightly_smiling_face:
2019-04-13T14:00:20.263200
Erika
pythondev_help_Erika_2019-04-13T14:00:20.263200
1,555,164,020.2632
18,623
pythondev
help
Hey Folks, was just running by some material, stumbled across deep and shallow copy. tough i understand what this does, cannot visualize a use case for it. any help is much appreciated.
2019-04-13T15:09:19.264800
Nena
pythondev_help_Nena_2019-04-13T15:09:19.264800
1,555,168,159.2648
18,624
pythondev
help
Abusing terminology a little bit, a shallow copy is effectively just a new pointer to an existing object. You'd want one of these when you want to modify something in-place (or you just want read-only access to it, no modifications needed). You want a deep copy of something when you need to modify the new copy, but retain the old copy as it was at the time of the copy (or do something else to modify it that won't affect the new copy).
2019-04-13T15:27:47.268000
Carmen
pythondev_help_Carmen_2019-04-13T15:27:47.268000
1,555,169,267.268
18,625
pythondev
help
Shallow copies are great for when you've got a gigantic object in memory, and you don't want to make copies of it for no good reason.
2019-04-13T15:28:37.268700
Carmen
pythondev_help_Carmen_2019-04-13T15:28:37.268700
1,555,169,317.2687
18,626
pythondev
help
Deep copies are good for when you want to keep concurrent, independent copies of an object that can be modified at-will without affecting each other.
2019-04-13T15:29:03.269400
Carmen
pythondev_help_Carmen_2019-04-13T15:29:03.269400
1,555,169,343.2694
18,627
pythondev
help
anyone know of a good way to generate a list of dates/times based on a cron type of description. For example, is there a way for me to get the date times for something like “Every Sunday at 5pm”, or “Every Day at 2pm” or “The 10th Day of the month at 9am”
2019-04-13T15:56:23.269700
Lashell
pythondev_help_Lashell_2019-04-13T15:56:23.269700
1,555,170,983.2697
18,628
pythondev
help
<https://unix.stackexchange.com/questions/175828/get-chronological-list-of-dates-times-for-scheduled-tasks-in-cron>
2019-04-13T16:11:22.269900
Carmen
pythondev_help_Carmen_2019-04-13T16:11:22.269900
1,555,171,882.2699
18,629
pythondev
help
does anyone know if there is a way to build python from source but also have that build include third-party modules like Numpy? I'm trying to do this. <https://docs.python.org/3.6/using/windows.html#embedded-distribution>
2019-04-13T16:48:08.270900
Monica
pythondev_help_Monica_2019-04-13T16:48:08.270900
1,555,174,088.2709
18,630
pythondev
help
The raw build won't include those modules. You have to add them yourself afterwards.
2019-04-13T17:05:59.272200
Carmen
pythondev_help_Carmen_2019-04-13T17:05:59.272200
1,555,175,159.2722
18,631
pythondev
help
`Third-party packages should be installed by the application installer alongside the embedded distribution.`
2019-04-13T17:06:11.272500
Carmen
pythondev_help_Carmen_2019-04-13T17:06:11.272500
1,555,175,171.2725
18,632
pythondev
help
Basically, that boils down to "drop the module files in the standard library directory", either during final install or between your build step and your installer finalization step.
2019-04-13T17:07:31.273800
Carmen
pythondev_help_Carmen_2019-04-13T17:07:31.273800
1,555,175,251.2738
18,633
pythondev
help
RIght, I get that part, I'm just trying to get a sense for how to do it. It's my first time
2019-04-13T17:09:19.274300
Monica
pythondev_help_Monica_2019-04-13T17:09:19.274300
1,555,175,359.2743
18,634
pythondev
help
Googling "create custom build of python", etc. but also, with that, I was wondering if this is also possible to do on a Mac? I noticed that Python has embedded distributions that are downloadable as a zip, and contain an exe, but I'm surprised they don't just have it ready to go for a Mac as well, unless I'm missing something?
2019-04-13T17:12:09.276300
Monica
pythondev_help_Monica_2019-04-13T17:12:09.276300
1,555,175,529.2763
18,635
pythondev
help
That's because Mac is Linux-based, so AFAIK typically they have a system Python included already.
2019-04-13T17:26:45.277700
Carmen
pythondev_help_Carmen_2019-04-13T17:26:45.277700
1,555,176,405.2777
18,636
pythondev
help
For values of linux-based anyway.
2019-04-13T17:27:03.277900
Carmen
pythondev_help_Carmen_2019-04-13T17:27:03.277900
1,555,176,423.2779
18,637
pythondev
help
None
2019-04-13T17:27:47.278400
Hai
pythondev_help_Hai_2019-04-13T17:27:47.278400
1,555,176,467.2784
18,638
pythondev
help
Are you planning to do it by the installer on final install, or do you want to modify the zip file during your build process?
2019-04-13T17:27:48.278700
Carmen
pythondev_help_Carmen_2019-04-13T17:27:48.278700
1,555,176,468.2787
18,639
pythondev
help
well I am looking to have this work as part of Python 3.6, not python 2.7 because EOL
2019-04-13T17:30:11.279800
Monica
pythondev_help_Monica_2019-04-13T17:30:11.279800
1,555,176,611.2798
18,640
pythondev
help
<@Hai> have you looked in the groovy docs?
2019-04-13T17:30:49.280600
Hiroko
pythondev_help_Hiroko_2019-04-13T17:30:49.280600
1,555,176,649.2806
18,641
pythondev
help
&gt; That's because Mac is Linux-based, so AFAIK typically they have a system Python included already. So that means that I should be able to use something like `pip` just by using a mac right?
2019-04-13T17:31:06.281200
Monica
pythondev_help_Monica_2019-04-13T17:31:06.281200
1,555,176,666.2812
18,642
pythondev
help
also, not sure you’ll get any response here because its a fairly niche JVM language, and this is a python community
2019-04-13T17:31:08.281400
Hiroko
pythondev_help_Hiroko_2019-04-13T17:31:08.281400
1,555,176,668.2814
18,643
pythondev
help
<@Monica> might help if you describe exactly what you’re trying to do
2019-04-13T17:31:53.281800
Hiroko
pythondev_help_Hiroko_2019-04-13T17:31:53.281800
1,555,176,713.2818
18,644
pythondev
help
right now, I have little idea of what you’re trying to do, or how its supposed to work?
2019-04-13T17:32:17.282800
Hiroko
pythondev_help_Hiroko_2019-04-13T17:32:17.282800
1,555,176,737.2828
18,645
pythondev
help
<@Hiroko> i tried jsonsluper and few different methods but am still getting like this "{a b }"
2019-04-13T17:33:00.284100
Hai
pythondev_help_Hai_2019-04-13T17:33:00.284100
1,555,176,780.2841
18,646
pythondev
help
that’s probably because the string is not valid json at all
2019-04-13T17:33:17.284600
Hiroko
pythondev_help_Hiroko_2019-04-13T17:33:17.284600
1,555,176,797.2846
18,647
pythondev
help
¯\_(ツ)_/¯
2019-04-13T17:33:20.284700
Hiroko
pythondev_help_Hiroko_2019-04-13T17:33:20.284700
1,555,176,800.2847
18,648
pythondev
help
am getting values from a valid json and then again am trying to convert that values to a valid json
2019-04-13T17:34:00.285800
Hai
pythondev_help_Hai_2019-04-13T17:34:00.285800
1,555,176,840.2858
18,649
pythondev
help
yes
2019-04-13T17:34:02.286000
Hai
pythondev_help_Hai_2019-04-13T17:34:02.286000
1,555,176,842.286
18,650
pythondev
help
<@Hiroko> yeah. I am building an electron desktop app and part of it relies on Python, so I want to have a way to package python 3.6 with Numpy + other things installed when the app itself is installed
2019-04-13T17:34:23.286500
Monica
pythondev_help_Monica_2019-04-13T17:34:23.286500
1,555,176,863.2865
18,651
pythondev
help
js + electron + python + numpy?
2019-04-13T17:34:56.287100
Hiroko
pythondev_help_Hiroko_2019-04-13T17:34:56.287100
1,555,176,896.2871
18,652
pythondev
help
that sounds like an unholy mess to get going
2019-04-13T17:35:08.287800
Hiroko
pythondev_help_Hiroko_2019-04-13T17:35:08.287800
1,555,176,908.2878
18,653
pythondev
help
it works on a machine where all these things exist as they should already, but I don't want the user to have to go look for things and open their terminal to install, so I'm trying to bundle it all together for them
2019-04-13T17:35:28.288600
Monica
pythondev_help_Monica_2019-04-13T17:35:28.288600
1,555,176,928.2886
18,654
pythondev
help
&gt; that sounds like an unholy mess to get going It's hell. I'm thinking about switching back to Java just to save myself
2019-04-13T17:35:51.289500
Monica
pythondev_help_Monica_2019-04-13T17:35:51.289500
1,555,176,951.2895
18,655
pythondev
help
haven't done Java in over 4 years
2019-04-13T17:36:03.290000
Monica
pythondev_help_Monica_2019-04-13T17:36:03.290000
1,555,176,963.29
18,656
pythondev
help
<@Monica> If you download the embedded python zipfile from <http://Python.org|Python.org>, you can unzip it to see what's inside. In there will be another zipfile called `python36.zip`. That's your libraries folder. You'll need to copy the relevant files from your 3rd party modules into that zipfile.
2019-04-13T17:36:35.290900
Carmen
pythondev_help_Carmen_2019-04-13T17:36:35.290900
1,555,176,995.2909
18,657
pythondev
help
if its a desktop app, why not use one of the python gui frameworks?
2019-04-13T17:36:36.291000
Hiroko
pythondev_help_Hiroko_2019-04-13T17:36:36.291000
1,555,176,996.291
18,658
pythondev
help
I like node :disappointed:
2019-04-13T17:37:00.292000
Monica
pythondev_help_Monica_2019-04-13T17:37:00.292000
1,555,177,020.292
18,659
pythondev
help
sounds like you’ll have similar issues if you go to java/swing/etc
2019-04-13T17:37:09.292500
Hiroko
pythondev_help_Hiroko_2019-04-13T17:37:09.292500
1,555,177,029.2925
18,660
pythondev
help
Python has a module to manipulate zipfiles, so you should be able to write a script to do it automatically.
2019-04-13T17:37:20.293100
Carmen
pythondev_help_Carmen_2019-04-13T17:37:20.293100
1,555,177,040.2931
18,661
pythondev
help
use the right tool for the job :wink:
2019-04-13T17:37:26.293300
Hiroko
pythondev_help_Hiroko_2019-04-13T17:37:26.293300
1,555,177,046.2933
18,662
pythondev
help
node is ok. electron is a steaming pile of a mess
2019-04-13T17:38:22.294900
Hiroko
pythondev_help_Hiroko_2019-04-13T17:38:22.294900
1,555,177,102.2949
18,663
pythondev
help
<@Carmen> yeah, I'm looking at that. It contains a lot of `.pyc` files. Not entirely sure how this relates to the modules
2019-04-13T17:38:23.295000
Monica
pythondev_help_Monica_2019-04-13T17:38:23.295000
1,555,177,103.295
18,664
pythondev
help
`.pyc` files are just python scripts that have been compiled.
2019-04-13T17:38:42.295600
Carmen
pythondev_help_Carmen_2019-04-13T17:38:42.295600
1,555,177,122.2956
18,665
pythondev
help
pyc == compiled python bytecode
2019-04-13T17:38:48.296000
Hiroko
pythondev_help_Hiroko_2019-04-13T17:38:48.296000
1,555,177,128.296
18,666
pythondev
help
right
2019-04-13T17:38:50.296200
Monica
pythondev_help_Monica_2019-04-13T17:38:50.296200
1,555,177,130.2962
18,667
pythondev
help
They're bytecode, and they're what the Python interpreter actually executes.
2019-04-13T17:38:53.296300
Carmen
pythondev_help_Carmen_2019-04-13T17:38:53.296300
1,555,177,133.2963
18,668
pythondev
help
so I need to compile a module to bytecode and put it in the `python36` folder is all, correct?
2019-04-13T17:40:11.297900
Monica
pythondev_help_Monica_2019-04-13T17:40:11.297900
1,555,177,211.2979
18,669
pythondev
help
<@Hiroko> do you know if the python GUI frameworks allow for good cross-platform development?
2019-04-13T17:40:58.298500
Monica
pythondev_help_Monica_2019-04-13T17:40:58.298500
1,555,177,258.2985
18,670
pythondev
help
take a look at Calibre
2019-04-13T17:41:12.298800
Hiroko
pythondev_help_Hiroko_2019-04-13T17:41:12.298800
1,555,177,272.2988
18,671
pythondev
help
its a pretty good desktop application for managing ebooks on a computer
2019-04-13T17:41:31.299300
Hiroko
pythondev_help_Hiroko_2019-04-13T17:41:31.299300
1,555,177,291.2993
18,672
pythondev
help
that’s all written in python
2019-04-13T17:41:42.299500
Hiroko
pythondev_help_Hiroko_2019-04-13T17:41:42.299500
1,555,177,302.2995
18,673
pythondev
help
<https://calibre-ebook.com/>
2019-04-13T17:41:54.299700
Hiroko
pythondev_help_Hiroko_2019-04-13T17:41:54.299700
1,555,177,314.2997
18,674
pythondev
help
I used that when I wrote my novels!
2019-04-13T17:43:13.300100
Monica
pythondev_help_Monica_2019-04-13T17:43:13.300100
1,555,177,393.3001
18,675
pythondev
help
didn't know that!
2019-04-13T17:43:17.300300
Monica
pythondev_help_Monica_2019-04-13T17:43:17.300300
1,555,177,397.3003
18,676
pythondev
help
Realistically, I'd assume the modules should mostly already be pre-compiled. If not, yeah, you'll want to compile them down to bytecode.
2019-04-13T17:44:33.302000
Carmen
pythondev_help_Carmen_2019-04-13T17:44:33.302000
1,555,177,473.302
18,677
pythondev
help
the reason I was using electron is because I already get it. And it's easy to upgrade the UX of the app. I don't have that kind of faith in the many python GUI frameworkds
2019-04-13T17:44:35.302200
Monica
pythondev_help_Monica_2019-04-13T17:44:35.302200
1,555,177,475.3022
18,678
pythondev
help
You probably have a specific module folder structure that you'll need to preserve as well.
2019-04-13T17:44:45.302500
Carmen
pythondev_help_Carmen_2019-04-13T17:44:45.302500
1,555,177,485.3025
18,679
pythondev
help
&gt; You probably have a specific module folder structure that you'll need to preserve as well. right, and that's why I am asking all these questiosn
2019-04-13T17:45:08.302800
Monica
pythondev_help_Monica_2019-04-13T17:45:08.302800
1,555,177,508.3028
18,680
pythondev
help
You'll want to review the Python documentation for module development, then. That'll give you the background you need for preserving module structure.
2019-04-13T17:45:46.303400
Carmen
pythondev_help_Carmen_2019-04-13T17:45:46.303400
1,555,177,546.3034
18,681
pythondev
help
Ok thanks!
2019-04-13T17:48:53.303700
Monica
pythondev_help_Monica_2019-04-13T17:48:53.303700
1,555,177,733.3037
18,682
pythondev
help
Would you guys happen to know which python GUI framework allows for the better-looking and more user-friendly building?
2019-04-13T17:55:23.304800
Monica
pythondev_help_Monica_2019-04-13T17:55:23.304800
1,555,178,123.3048
18,683
pythondev
help
This is hex right? `[b'\x1bd001\x02\x1bh00\x02\x1bh51\x02\n']`
2019-04-13T18:01:43.305300
Priscilla
pythondev_help_Priscilla_2019-04-13T18:01:43.305300
1,555,178,503.3053
18,684
pythondev
help
It's a mix of hex escape characters plus some regular ASCII ones.
2019-04-13T18:06:30.305700
Sasha
pythondev_help_Sasha_2019-04-13T18:06:30.305700
1,555,178,790.3057
18,685
pythondev
help
`x1bd001` is the hex `\n` and `\` are escape and `b'` are the ASCII right?
2019-04-13T18:08:24.306800
Priscilla
pythondev_help_Priscilla_2019-04-13T18:08:24.306800
1,555,178,904.3068
18,686
pythondev
help
No, the `\xNN` pattern has only two hex digits in it. So it's parsed as `\x1b "d001" \x02 \x1b "h00"`, etc.
2019-04-13T18:09:32.307900
Sasha
pythondev_help_Sasha_2019-04-13T18:09:32.307900
1,555,178,972.3079
18,687
pythondev
help
oh
2019-04-13T18:10:05.308100
Priscilla
pythondev_help_Priscilla_2019-04-13T18:10:05.308100
1,555,179,005.3081
18,688
pythondev
help
any idea what &lt;STX&gt; could stand for? other similar things in brackets are line feeds, carriage returns, and escape. &lt;STX&gt; ring any bells?
2019-04-13T18:11:13.309200
Priscilla
pythondev_help_Priscilla_2019-04-13T18:11:13.309200
1,555,179,073.3092
18,689
pythondev
help
<https://web.itu.edu.tr/sgunduz/courses/mikroisl/ascii.html>
2019-04-13T18:12:56.309400
Carmen
pythondev_help_Carmen_2019-04-13T18:12:56.309400
1,555,179,176.3094
18,690
pythondev
help
Start of Text
2019-04-13T18:12:58.309600
Carmen
pythondev_help_Carmen_2019-04-13T18:12:58.309600
1,555,179,178.3096
18,691
pythondev
help
thats a great resource, thank you very much joe
2019-04-13T18:15:27.310500
Priscilla
pythondev_help_Priscilla_2019-04-13T18:15:27.310500
1,555,179,327.3105
18,692
pythondev
help
so just to be clear: for Numpy, I would need to download the module's source from Github, then convert the files back to `.pyc` files (however you do that), store them in my `python36` folder, and that should work right?
2019-04-13T18:16:04.311500
Monica
pythondev_help_Monica_2019-04-13T18:16:04.311500
1,555,179,364.3115
18,693
pythondev
help
It's such a shame that the file/group/record/unit separator characters never caught on instead of comma-separated format.
2019-04-13T18:16:47.312200
Sasha
pythondev_help_Sasha_2019-04-13T18:16:47.312200
1,555,179,407.3122
18,694
pythondev
help
i cant seem to decode `[b'\x1bd001\x02\x1bh00\x02\x1bh51\x02\n']` is it because its hex/ascii/binarry?
2019-04-13T18:34:48.312900
Priscilla
pythondev_help_Priscilla_2019-04-13T18:34:48.312900
1,555,180,488.3129
18,695
pythondev
help
Where is that coming from?
2019-04-13T18:56:31.313300
Hiroko
pythondev_help_Hiroko_2019-04-13T18:56:31.313300
1,555,181,791.3133
18,696
pythondev
help
a device I am writing to and reading from via RS232 , bitbus, and usb
2019-04-13T19:03:04.313900
Priscilla
pythondev_help_Priscilla_2019-04-13T19:03:04.313900
1,555,182,184.3139
18,697
pythondev
help
slack notifications suck
2019-04-13T19:03:20.314200
Priscilla
pythondev_help_Priscilla_2019-04-13T19:03:20.314200
1,555,182,200.3142
18,698
pythondev
help
no wait, windows 10 notifications suck
2019-04-13T19:03:30.314500
Priscilla
pythondev_help_Priscilla_2019-04-13T19:03:30.314500
1,555,182,210.3145
18,699
pythondev
help
If there is a pre-compiled copy of the library available for download on your target architecture (which there normally is, for Windows boxes), you should be able to download that. It should have any needed `.pyc` files, as well as the compiled binary files it uses for efficiency.
2019-04-13T19:14:40.314700
Carmen
pythondev_help_Carmen_2019-04-13T19:14:40.314700
1,555,182,880.3147
18,700
pythondev
help
ok
2019-04-13T19:29:33.315000
Monica
pythondev_help_Monica_2019-04-13T19:29:33.315000
1,555,183,773.315
18,701
pythondev
help
let me try this
2019-04-13T19:29:36.315200
Monica
pythondev_help_Monica_2019-04-13T19:29:36.315200
1,555,183,776.3152
18,702
pythondev
help
what book(s), be it 100 pages, 300 pages, or 1000 pages will teach me what I need to know to do this?
2019-04-13T19:30:00.315800
Monica
pythondev_help_Monica_2019-04-13T19:30:00.315800
1,555,183,800.3158
18,703
pythondev
help
it's more helpful for me to figure out how someone would know this, as opposed to what the answer is
2019-04-13T19:31:25.316300
Monica
pythondev_help_Monica_2019-04-13T19:31:25.316300
1,555,183,885.3163
18,704
pythondev
help
Per <http://python.org|python.org> docs, at this link: <https://docs.python.org/3.6/using/windows.html#embedded-distribution> &gt; Third-party packages should be installed by the application installer alongside the embedded distribution. Using pip to manage dependencies as for a regular Python installation is not supported with this distribution, okay, so that is effectively saying, 3rd-party packages should be installed without using `pip`. Then, regarding Embedding Python, which is what I am doing, it says: &gt; packages can be installed to any location as there is an opportunity to specify search paths before initializing the interpreter. Otherwise, there is no fundamental differences between using the embedded distribution and a regular installation.
2019-04-13T19:44:00.318100
Monica
pythondev_help_Monica_2019-04-13T19:44:00.318100
1,555,184,640.3181
18,705
pythondev
help
oh and it also says ... &gt; extracting the embedded distribution to a subdirectory of the application installation is sufficient to provide a loadable Python interpreter.
2019-04-13T19:46:00.318400
Monica
pythondev_help_Monica_2019-04-13T19:46:00.318400
1,555,184,760.3184
18,706
pythondev
help
Alright. So I need to install a Third-party package alongside the embedded distribution, but without using `pip`. Cool. I'll look around for how to do that
2019-04-13T19:48:07.319500
Monica
pythondev_help_Monica_2019-04-13T19:48:07.319500
1,555,184,887.3195
18,707
pythondev
help
I'm going to try this
2019-04-13T19:52:40.320100
Monica
pythondev_help_Monica_2019-04-13T19:52:40.320100
1,555,185,160.3201
18,708
pythondev
help
<https://pyinstaller.readthedocs.io/en/stable/operating-mode.html>
2019-04-13T19:52:41.320300
Monica
pythondev_help_Monica_2019-04-13T19:52:41.320300
1,555,185,161.3203
18,709
pythondev
help
is it okay to use try/except like this you think?
2019-04-13T20:16:20.321800
Priscilla
pythondev_help_Priscilla_2019-04-13T20:16:20.321800
1,555,186,580.3218
18,710
pythondev
help
You should catch particular exception type(s) that you're anticipating, since a generic `except` will trap syntax errors, CTRL-C user interrupts, etc.
2019-04-13T20:20:25.323200
Sasha
pythondev_help_Sasha_2019-04-13T20:20:25.323200
1,555,186,825.3232
18,711
pythondev
help
alrighty
2019-04-13T20:58:12.323400
Priscilla
pythondev_help_Priscilla_2019-04-13T20:58:12.323400
1,555,189,092.3234
18,712
pythondev
help
Does 'ImageDataGenerator' from Keras ceate the directories or does the coder have to do it ? It seems to me that the directories would be auto created right along with populating them with the image data. <https://github.com/paulgureghian/CNN_in_Python/blob/master/keras_cnn.py>
2019-04-13T21:32:29.325600
Clayton
pythondev_help_Clayton_2019-04-13T21:32:29.325600
1,555,191,149.3256
18,713
pythondev
help
So, I’ve been thinking about contributing to open source, and more specifically the Python project, do you guys have any pointers or tips for getting started?
2019-04-14T00:24:39.326900
Hanna
pythondev_help_Hanna_2019-04-14T00:24:39.326900
1,555,201,479.3269
18,714
pythondev
help
Anyone know how to create a program that can identify if a number is a prime number or not?
2019-04-14T00:50:58.328200
Leonia
pythondev_help_Leonia_2019-04-14T00:50:58.328200
1,555,203,058.3282
18,715
pythondev
help
Simple, you could just do a mod to see if it is even or odd
2019-04-14T00:51:52.328600
Hanna
pythondev_help_Hanna_2019-04-14T00:51:52.328600
1,555,203,112.3286
18,716
pythondev
help
Most prime numbers are odd except for two
2019-04-14T00:52:00.328900
Hanna
pythondev_help_Hanna_2019-04-14T00:52:00.328900
1,555,203,120.3289
18,717
pythondev
help
unless of course my mind is failing me right now
2019-04-14T00:52:08.329300
Hanna
pythondev_help_Hanna_2019-04-14T00:52:08.329300
1,555,203,128.3293
18,718
pythondev
help
The easiest way to implement (not most efficient, google around for "primality sieve") is to check all the mods up to sqrt(n): ``` def is_prime(n): for i in range(n ** 0.5): if (n % i) == 0: return False return True ```
2019-04-14T01:45:44.331000
Shelby
pythondev_help_Shelby_2019-04-14T01:45:44.331000
1,555,206,344.331
18,719
pythondev
help
You'll want to start from 2 there instead of 0.
2019-04-14T02:11:32.331300
Sasha
pythondev_help_Sasha_2019-04-14T02:11:32.331300
1,555,207,892.3313
18,720