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
wondering if there is a version of connexion that fixes this
2019-03-01T18:12:37.230100
Deangelo
pythondev_help_Deangelo_2019-03-01T18:12:37.230100
1,551,463,957.2301
11,621
pythondev
help
I have a file named toolbox.py, inside is a function called `port_traffic` the correct syntax to call that function should be `toolbox.port_traffic()` right? it keeps telling me `toolbox` is not a defined variable
2019-03-01T19:23:15.234200
Priscilla
pythondev_help_Priscilla_2019-03-01T19:23:15.234200
1,551,468,195.2342
11,622
pythondev
help
You probably need to make it a Python package with an init file
2019-03-01T19:29:53.235400
Lillia
pythondev_help_Lillia_2019-03-01T19:29:53.235400
1,551,468,593.2354
11,623
pythondev
help
ok so i just put the function into the same file. so I have the function `character(self, aString)` aString is the output it generates. I need to apply that output to a variable in a different function
2019-03-01T19:48:26.238000
Priscilla
pythondev_help_Priscilla_2019-03-01T19:48:26.238000
1,551,469,706.238
11,624
pythondev
help
If the two functions are sharing state like that, does it make sense for them to be methods of a common class?
2019-03-01T19:51:28.239300
Sasha
pythondev_help_Sasha_2019-03-01T19:51:28.239300
1,551,469,888.2393
11,625
pythondev
help
i dont know
2019-03-01T19:53:28.239500
Priscilla
pythondev_help_Priscilla_2019-03-01T19:53:28.239500
1,551,470,008.2395
11,626
pythondev
help
im guessing no...
2019-03-01T19:53:47.239800
Priscilla
pythondev_help_Priscilla_2019-03-01T19:53:47.239800
1,551,470,027.2398
11,627
pythondev
help
Heh, it was a genuine question, not a rhetorical one, since I don't know anything about your code.
2019-03-01T19:54:55.241000
Sasha
pythondev_help_Sasha_2019-03-01T19:54:55.241000
1,551,470,095.241
11,628
pythondev
help
Is ```character()``` a function or a method? :slightly_smiling_face:
2019-03-01T19:55:06.241300
Corey
pythondev_help_Corey_2019-03-01T19:55:06.241300
1,551,470,106.2413
11,629
pythondev
help
i dont think i understand classes like i thought i did..
2019-03-01T19:55:07.241500
Priscilla
pythondev_help_Priscilla_2019-03-01T19:55:07.241500
1,551,470,107.2415
11,630
pythondev
help
oh lol
2019-03-01T19:55:15.241700
Priscilla
pythondev_help_Priscilla_2019-03-01T19:55:15.241700
1,551,470,115.2417
11,631
pythondev
help
> I need to apply that output to a variable I don't think I fully understand this
2019-03-01T19:55:43.242100
Cori
pythondev_help_Cori_2019-03-01T19:55:43.242100
1,551,470,143.2421
11,632
pythondev
help
so you provide `character()` w/ `aString`.... does character() do anything to aString?
2019-03-01T19:56:25.243300
Cori
pythondev_help_Cori_2019-03-01T19:56:25.243300
1,551,470,185.2433
11,633
pythondev
help
does the output of character() need to be used by the other var or ?
2019-03-01T19:56:51.244100
Cori
pythondev_help_Cori_2019-03-01T19:56:51.244100
1,551,470,211.2441
11,634
pythondev
help
...
2019-03-01T19:56:53.244300
Cori
pythondev_help_Cori_2019-03-01T19:56:53.244300
1,551,470,213.2443
11,635
pythondev
help
my function `character` generates a random character, i need that generated character to be assigned to a variable within another function
2019-03-01T19:57:20.245200
Priscilla
pythondev_help_Priscilla_2019-03-01T19:57:20.245200
1,551,470,240.2452
11,636
pythondev
help
does the other var actually use `aString` (same value as was passed to character())?
2019-03-01T19:57:24.245400
Cori
pythondev_help_Cori_2019-03-01T19:57:24.245400
1,551,470,244.2454
11,637
pythondev
help
yes
2019-03-01T19:57:35.245700
Priscilla
pythondev_help_Priscilla_2019-03-01T19:57:35.245700
1,551,470,255.2457
11,638
pythondev
help
okay,... so character() is something like: ``` character() random_character = generateRandomChar() return random_character ``` ?
2019-03-01T19:58:48.247700
Cori
pythondev_help_Cori_2019-03-01T19:58:48.247700
1,551,470,328.2477
11,639
pythondev
help
None
2019-03-01T19:59:18.248000
Priscilla
pythondev_help_Priscilla_2019-03-01T19:59:18.248000
1,551,470,358.248
11,640
pythondev
help
okay... so instead of `print` (or after it if you need `aString` to output to screen, do `return`
2019-03-01T20:00:05.249000
Cori
pythondev_help_Cori_2019-03-01T20:00:05.249000
1,551,470,405.249
11,641
pythondev
help
ah! thats what it was a minute ago lol
2019-03-01T20:00:25.249600
Priscilla
pythondev_help_Priscilla_2019-03-01T20:00:25.249600
1,551,470,425.2496
11,642
pythondev
help
in second fucntion `var_name = character()`
2019-03-01T20:00:29.249800
Cori
pythondev_help_Cori_2019-03-01T20:00:29.249800
1,551,470,429.2498
11,643
pythondev
help
and remove `self` and `aString` from declaration
2019-03-01T20:01:26.250800
Cori
pythondev_help_Cori_2019-03-01T20:01:26.250800
1,551,470,486.2508
11,644
pythondev
help
so it gave me an error saying "method has no argument" when I removed `self` and `aString`
2019-03-01T20:03:10.251700
Priscilla
pythondev_help_Priscilla_2019-03-01T20:03:10.251700
1,551,470,590.2517
11,645
pythondev
help
are either of these functions nested?
2019-03-01T20:04:04.252400
Cori
pythondev_help_Cori_2019-03-01T20:04:04.252400
1,551,470,644.2524
11,646
pythondev
help
no
2019-03-01T20:05:50.252600
Priscilla
pythondev_help_Priscilla_2019-03-01T20:05:50.252600
1,551,470,750.2526
11,647
pythondev
help
hmmm... can a loop work within a function?
2019-03-01T20:09:02.252900
Priscilla
pythondev_help_Priscilla_2019-03-01T20:09:02.252900
1,551,470,942.2529
11,648
pythondev
help
which line is giving the `saying "method has no argument"` error?
2019-03-01T20:09:46.253200
Cori
pythondev_help_Cori_2019-03-01T20:09:46.253200
1,551,470,986.2532
11,649
pythondev
help
strange... it doesnt give me the error anymore
2019-03-01T20:11:25.253600
Priscilla
pythondev_help_Priscilla_2019-03-01T20:11:25.253600
1,551,471,085.2536
11,650
pythondev
help
let's see some code
2019-03-01T20:13:27.253900
Cori
pythondev_help_Cori_2019-03-01T20:13:27.253900
1,551,471,207.2539
11,651
pythondev
help
None
2019-03-01T20:14:09.254000
Priscilla
pythondev_help_Priscilla_2019-03-01T20:14:09.254000
1,551,471,249.254
11,652
pythondev
help
be harsh
2019-03-01T20:14:26.254400
Priscilla
pythondev_help_Priscilla_2019-03-01T20:14:26.254400
1,551,471,266.2544
11,653
pythondev
help
lol
2019-03-01T20:14:29.254600
Priscilla
pythondev_help_Priscilla_2019-03-01T20:14:29.254600
1,551,471,269.2546
11,654
pythondev
help
> be harsh I'm not good enough to be harsh w/ anyone. :joy: Give me a min to look through this
2019-03-01T20:15:07.255200
Cori
pythondev_help_Cori_2019-03-01T20:15:07.255200
1,551,471,307.2552
11,655
pythondev
help
take yo time, i appreciate your help, thank you!
2019-03-01T20:15:39.255700
Priscilla
pythondev_help_Priscilla_2019-03-01T20:15:39.255700
1,551,471,339.2557
11,656
pythondev
help
ya know what? ignore lines 52 - 66 :grimacing:
2019-03-01T20:17:20.256300
Priscilla
pythondev_help_Priscilla_2019-03-01T20:17:20.256300
1,551,471,440.2563
11,657
pythondev
help
hey, and you have all of the packages that you're importing installed, right?
2019-03-01T20:18:25.256700
Cori
pythondev_help_Cori_2019-03-01T20:18:25.256700
1,551,471,505.2567
11,658
pythondev
help
also, you're using a venv?
2019-03-01T20:18:35.257000
Cori
pythondev_help_Cori_2019-03-01T20:18:35.257000
1,551,471,515.257
11,659
pythondev
help
not using a venv
2019-03-01T20:18:59.257200
Priscilla
pythondev_help_Priscilla_2019-03-01T20:18:59.257200
1,551,471,539.2572
11,660
pythondev
help
all packages are installed
2019-03-01T20:19:04.257400
Priscilla
pythondev_help_Priscilla_2019-03-01T20:19:04.257400
1,551,471,544.2574
11,661
pythondev
help
ok
2019-03-01T20:19:22.257600
Cori
pythondev_help_Cori_2019-03-01T20:19:22.257600
1,551,471,562.2576
11,662
pythondev
help
So I don't see a class definition anywhere. Functions with `self` are normally methods that are part of a class, with `self` referring to the class object.
2019-03-01T20:22:35.258600
Sasha
pythondev_help_Sasha_2019-03-01T20:22:35.258600
1,551,471,755.2586
11,663
pythondev
help
i did put them in a class earlier but i dont think i did it right, like should all of the functions be within a class?
2019-03-01T20:23:31.259500
Priscilla
pythondev_help_Priscilla_2019-03-01T20:23:31.259500
1,551,471,811.2595
11,664
pythondev
help
no
2019-03-01T20:24:42.259800
Cori
pythondev_help_Cori_2019-03-01T20:24:42.259800
1,551,471,882.2598
11,665
pythondev
help
Sorry <@Sasha> hadn't seen your latest reply. Please.
2019-03-01T20:25:41.260500
Cori
pythondev_help_Cori_2019-03-01T20:25:41.260500
1,551,471,941.2605
11,666
pythondev
help
If the functions are more or less separate, or just call each other, they don't need to be in a class. If, on the other hand, you start having some persistent shared state, like a serial port that remains open between calls, then it might make sense for the class to own that state.
2019-03-01T20:27:17.262000
Sasha
pythondev_help_Sasha_2019-03-01T20:27:17.262000
1,551,472,037.262
11,667
pythondev
help
i see
2019-03-01T20:27:37.262500
Priscilla
pythondev_help_Priscilla_2019-03-01T20:27:37.262500
1,551,472,057.2625
11,668
pythondev
help
line 71 calls character() function but how are you calling the rest?
2019-03-01T20:27:39.262700
Cori
pythondev_help_Cori_2019-03-01T20:27:39.262700
1,551,472,059.2627
11,669
pythondev
help
i think..
2019-03-01T20:27:40.262800
Priscilla
pythondev_help_Priscilla_2019-03-01T20:27:40.262800
1,551,472,060.2628
11,670
pythondev
help
what do you mean the rest? i dont think there is anything else being called
2019-03-01T20:31:23.263400
Priscilla
pythondev_help_Priscilla_2019-03-01T20:31:23.263400
1,551,472,283.2634
11,671
pythondev
help
wait a minute, i should be calling the `port_traffic` function at lines 80 and 84...
2019-03-01T20:32:25.264500
Priscilla
pythondev_help_Priscilla_2019-03-01T20:32:25.264500
1,551,472,345.2645
11,672
pythondev
help
i think
2019-03-01T20:32:28.264700
Priscilla
pythondev_help_Priscilla_2019-03-01T20:32:28.264700
1,551,472,348.2647
11,673
pythondev
help
my god, i have written myself into madness lol, my own code is confusing me so much
2019-03-01T20:33:37.265400
Priscilla
pythondev_help_Priscilla_2019-03-01T20:33:37.265400
1,551,472,417.2654
11,674
pythondev
help
no im wrong i shouldt be calling that function at line 80 and 84
2019-03-01T20:34:49.266000
Priscilla
pythondev_help_Priscilla_2019-03-01T20:34:49.266000
1,551,472,489.266
11,675
pythondev
help
right. so absolutely nothing in this script calls anything in this script, except for line 71.
2019-03-01T20:35:50.266800
Cori
pythondev_help_Cori_2019-03-01T20:35:50.266800
1,551,472,550.2668
11,676
pythondev
help
i believe you are correct
2019-03-01T20:36:02.267300
Priscilla
pythondev_help_Priscilla_2019-03-01T20:36:02.267300
1,551,472,562.2673
11,677
pythondev
help
What is executing this script? How are you executing this script?
2019-03-01T20:36:06.267400
Cori
pythondev_help_Cori_2019-03-01T20:36:06.267400
1,551,472,566.2674
11,678
pythondev
help
back to what atvaccaro suggested earlier, does it need to be a package?
2019-03-01T20:36:24.268000
Cori
pythondev_help_Cori_2019-03-01T20:36:24.268000
1,551,472,584.268
11,679
pythondev
help
or is this supposed to do something on its own?
2019-03-01T20:36:34.268300
Cori
pythondev_help_Cori_2019-03-01T20:36:34.268300
1,551,472,594.2683
11,680
pythondev
help
it is its own program to test some equipment. send a letter, then receive that same letter back, to verify the device is sending and receiving properly.
2019-03-01T20:39:01.270500
Priscilla
pythondev_help_Priscilla_2019-03-01T20:39:01.270500
1,551,472,741.2705
11,681
pythondev
help
does that answer your question?
2019-03-01T20:39:17.270900
Priscilla
pythondev_help_Priscilla_2019-03-01T20:39:17.270900
1,551,472,757.2709
11,682
pythondev
help
oh and its all done through serial ports
2019-03-01T20:39:31.271400
Priscilla
pythondev_help_Priscilla_2019-03-01T20:39:31.271400
1,551,472,771.2714
11,683
pythondev
help
so to run it, you `python scriptName.py`?
2019-03-01T20:39:34.271500
Cori
pythondev_help_Cori_2019-03-01T20:39:34.271500
1,551,472,774.2715
11,684
pythondev
help
right now, yes
2019-03-01T20:39:43.271700
Priscilla
pythondev_help_Priscilla_2019-03-01T20:39:43.271700
1,551,472,783.2717
11,685
pythondev
help
okay.
2019-03-01T20:39:46.271900
Cori
pythondev_help_Cori_2019-03-01T20:39:46.271900
1,551,472,786.2719
11,686
pythondev
help
so atm, you have a bunch of functions ready to do something. You need to call those functions somehow.
2019-03-01T20:40:38.272800
Cori
pythondev_help_Cori_2019-03-01T20:40:38.272800
1,551,472,838.2728
11,687
pythondev
help
Here...
2019-03-01T20:40:41.273000
Cori
pythondev_help_Cori_2019-03-01T20:40:41.273000
1,551,472,841.273
11,688
pythondev
help
Read this: <https://thepythonguru.com/what-is-if-__name__-__main__/>
2019-03-01T20:41:14.273200
Cori
pythondev_help_Cori_2019-03-01T20:41:14.273200
1,551,472,874.2732
11,689
pythondev
help
oh crap, i need to get to bed, its late xD
2019-03-01T20:42:05.273800
Priscilla
pythondev_help_Priscilla_2019-03-01T20:42:05.273800
1,551,472,925.2738
11,690
pythondev
help
i am going to read that article thank you so much for your help
2019-03-01T20:42:24.274500
Priscilla
pythondev_help_Priscilla_2019-03-01T20:42:24.274500
1,551,472,944.2745
11,691
pythondev
help
bookmark that article. it's short but it gives a few examples of how to call the functions in your situation
2019-03-01T20:42:43.274900
Cori
pythondev_help_Cori_2019-03-01T20:42:43.274900
1,551,472,963.2749
11,692
pythondev
help
<@Sasha> :taco:
2019-03-01T20:43:42.275800
Cori
pythondev_help_Cori_2019-03-01T20:43:42.275800
1,551,473,022.2758
11,693
pythondev
help
fantastic, i will try to implement it tomorrow after work! :smile:
2019-03-01T20:43:56.276200
Priscilla
pythondev_help_Priscilla_2019-03-01T20:43:56.276200
1,551,473,036.2762
11,694
pythondev
help
good luck
2019-03-01T20:44:14.276600
Cori
pythondev_help_Cori_2019-03-01T20:44:14.276600
1,551,473,054.2766
11,695
pythondev
help
Hi everyone (JavaScript / Babel related question here). I’m trying to run React Native in a non RN enironment. I want to contribute to a testing library for RN, but when I run the tests to test my code get the error that `&lt;View /&gt;` can’t be imported, so I assume it’s a babel problem :mortar_board:. Could anyone who is proficient with Babel and React Native _please_ have a look at *this question on StackOverflow*: <https://stackoverflow.com/questions/54846162/loading-react-native-unhandledpromiserejectionwarning-error-cannot-find-modul>? There is also a *juicy bounty* on it :grapes::cherries::watermelon:Thank you for any help
2019-03-02T03:04:43.277900
Elvira
pythondev_help_Elvira_2019-03-02T03:04:43.277900
1,551,495,883.2779
11,696
pythondev
help
``` x = (1/time)(-1*(((stock*sigma*(e**(-1*divident*time)))/2*sqrt(time))*(1/(sqrt(2*pi)))*(e**((-1*d1*d1)/2)))-(risk_free_rate*strike*(e**(-1*risk_free_rate*time))*norm.cdf(d2))+(divident*stock*(e**(-1*divident*time))*norm.cdf(d1)))``` This gives me error ``` TypeError: 'float' object is not callable```
2019-03-02T03:23:19.278800
Chad
pythondev_help_Chad_2019-03-02T03:23:19.278800
1,551,496,999.2788
11,697
pythondev
help
``` x = (1/time)(...) ```
2019-03-02T03:28:22.279300
Jettie
pythondev_help_Jettie_2019-03-02T03:28:22.279300
1,551,497,302.2793
11,698
pythondev
help
you are trying to do a "call" on a floating point number
2019-03-02T03:28:42.279800
Jettie
pythondev_help_Jettie_2019-03-02T03:28:42.279800
1,551,497,322.2798
11,699
pythondev
help
<@Jettie> Thank You :blush: I missed it.
2019-03-02T03:35:47.280400
Chad
pythondev_help_Chad_2019-03-02T03:35:47.280400
1,551,497,747.2804
11,700
pythondev
help
Does anyone know of a way of getting `pipenv` to autoload a `.env` file when its changed instead of having to exit `pipenv shell` and re-enable it?
2019-03-02T07:05:00.281600
Vanita
pythondev_help_Vanita_2019-03-02T07:05:00.281600
1,551,510,300.2816
11,701
pythondev
help
Hello everyone. I have a list ``` In [50]: example = ['first', 'second', 'third'] ``` How to create 3 empty lists authomatically? ``` In [53]: first = [] In [54]: second = [] In [55]: third = [] ``` Thank you very much.
2019-03-02T07:08:40.281800
Jung
pythondev_help_Jung_2019-03-02T07:08:40.281800
1,551,510,520.2818
11,702
pythondev
help
what?
2019-03-02T07:10:37.282100
Jettie
pythondev_help_Jettie_2019-03-02T07:10:37.282100
1,551,510,637.2821
11,703
pythondev
help
didn't you just create 3 empty lists?
2019-03-02T07:11:12.283000
Jettie
pythondev_help_Jettie_2019-03-02T07:11:12.283000
1,551,510,672.283
11,704
pythondev
help
could you just use `for i in example: i = []`?
2019-03-02T07:11:58.283700
Vanita
pythondev_help_Vanita_2019-03-02T07:11:58.283700
1,551,510,718.2837
11,705
pythondev
help
(note, not tested :smile: )
2019-03-02T07:12:17.283900
Vanita
pythondev_help_Vanita_2019-03-02T07:12:17.283900
1,551,510,737.2839
11,706
pythondev
help
that doesn't do anything useful
2019-03-02T07:13:02.284100
Jettie
pythondev_help_Jettie_2019-03-02T07:13:02.284100
1,551,510,782.2841
11,707
pythondev
help
yeah just realised that
2019-03-02T07:13:08.284300
Vanita
pythondev_help_Vanita_2019-03-02T07:13:08.284300
1,551,510,788.2843
11,708
pythondev
help
I have one list with names. And I want to create many empty lists automatically. For example: ``` example = ['first', 'second', 'third'] for name in example: # to do something what create empty `name` list ```
2019-03-02T07:13:21.284500
Jung
pythondev_help_Jung_2019-03-02T07:13:21.284500
1,551,510,801.2845
11,709
pythondev
help
I guess you could use defaultdict
2019-03-02T07:13:40.284800
Jettie
pythondev_help_Jettie_2019-03-02T07:13:40.284800
1,551,510,820.2848
11,710
pythondev
help
``` example = defaultdict(list) print(example['abc']) print(type(example['bleepbloop'])) ```
2019-03-02T07:14:24.285400
Jettie
pythondev_help_Jettie_2019-03-02T07:14:24.285400
1,551,510,864.2854
11,711
pythondev
help
``` example=['first', 'second', 'third'] for i in example: vars()[i] = [] ```
2019-03-02T07:16:25.286000
Vanita
pythondev_help_Vanita_2019-03-02T07:16:25.286000
1,551,510,985.286
11,712
pythondev
help
that should work for you
2019-03-02T07:16:58.286300
Vanita
pythondev_help_Vanita_2019-03-02T07:16:58.286300
1,551,511,018.2863
11,713
pythondev
help
<@Vanita> :taco: thanks
2019-03-02T07:18:03.286700
Jung
pythondev_help_Jung_2019-03-02T07:18:03.286700
1,551,511,083.2867
11,714
pythondev
help
all good
2019-03-02T07:18:18.286800
Vanita
pythondev_help_Vanita_2019-03-02T07:18:18.286800
1,551,511,098.2868
11,715
pythondev
help
that's awful :(
2019-03-02T07:24:37.287200
Jettie
pythondev_help_Jettie_2019-03-02T07:24:37.287200
1,551,511,477.2872
11,716
pythondev
help
Why? What do you think about that? Tell me more <@Jettie>
2019-03-02T07:31:29.287800
Jung
pythondev_help_Jung_2019-03-02T07:31:29.287800
1,551,511,889.2878
11,717
pythondev
help
this won't ever pass code review
2019-03-02T07:32:51.288000
Jettie
pythondev_help_Jettie_2019-03-02T07:32:51.288000
1,551,511,971.288
11,718
pythondev
help
it's pretty hacky, and something you should never do
2019-03-02T07:33:31.288800
Jettie
pythondev_help_Jettie_2019-03-02T07:33:31.288800
1,551,512,011.2888
11,719
pythondev
help
i.e., don't play around with locals() and globals()
2019-03-02T07:33:44.289100
Jettie
pythondev_help_Jettie_2019-03-02T07:33:44.289100
1,551,512,024.2891
11,720