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 | maybe a year out but i probably won't still be here | 2019-04-19T09:22:23.422000 | Claudine | pythondev_help_Claudine_2019-04-19T09:22:23.422000 | 1,555,665,743.422 | 19,521 |
pythondev | help | maybe half a year out depending on what Q4 looks like | 2019-04-19T09:22:39.422400 | Claudine | pythondev_help_Claudine_2019-04-19T09:22:39.422400 | 1,555,665,759.4224 | 19,522 |
pythondev | help | Q4? | 2019-04-19T09:23:29.423100 | Nieves | pythondev_help_Nieves_2019-04-19T09:23:29.423100 | 1,555,665,809.4231 | 19,523 |
pythondev | help | Quarter 4 | 2019-04-19T09:23:35.423400 | Claudine | pythondev_help_Claudine_2019-04-19T09:23:35.423400 | 1,555,665,815.4234 | 19,524 |
pythondev | help | so QQQQ? | 2019-04-19T09:23:36.423600 | Nieves | pythondev_help_Nieves_2019-04-19T09:23:36.423600 | 1,555,665,816.4236 | 19,525 |
pythondev | help | xD | 2019-04-19T09:23:38.423800 | Nieves | pythondev_help_Nieves_2019-04-19T09:23:38.423800 | 1,555,665,818.4238 | 19,526 |
pythondev | help | Sounds too far in the future for actual planning and implementation | 2019-04-19T09:25:35.424400 | Hiroko | pythondev_help_Hiroko_2019-04-19T09:25:35.424400 | 1,555,665,935.4244 | 19,527 |
pythondev | help | Because requirements can and will change from now and then, if it ever comes along | 2019-04-19T09:26:00.425200 | Hiroko | pythondev_help_Hiroko_2019-04-19T09:26:00.425200 | 1,555,665,960.4252 | 19,528 |
pythondev | help | And also, 10+ code that doesn't work anymore is a pain to fix and cleanup | 2019-04-19T09:27:00.425500 | Nieves | pythondev_help_Nieves_2019-04-19T09:27:00.425500 | 1,555,666,020.4255 | 19,529 |
pythondev | help | That's a long documentation.. but I found it. thanks | 2019-04-19T09:57:45.427300 | Cordell | pythondev_help_Cordell_2019-04-19T09:57:45.427300 | 1,555,667,865.4273 | 19,530 |
pythondev | help | Just throwing it out there, but Selenium itself and the WebDriver protocol are very fast and lightweight. The bottleneck is the browser (and your connection to the site) which is why Selenium is a great choice for tests that inherently require a browser anyway. Not so great of a choice if you don't need the browser | 2019-04-19T10:01:17.429300 | Ashley | pythondev_help_Ashley_2019-04-19T10:01:17.429300 | 1,555,668,077.4293 | 19,531 |
pythondev | help | Ight <@Ashley> admit it... you fanboy Selenium... <//3 | 2019-04-19T10:09:56.430000 | Nieves | pythondev_help_Nieves_2019-04-19T10:09:56.430000 | 1,555,668,596.43 | 19,532 |
pythondev | help | Nah, I just understand how it works and where it should/can be used (and where it shouldn't) | 2019-04-19T10:15:32.431000 | Ashley | pythondev_help_Ashley_2019-04-19T10:15:32.431000 | 1,555,668,932.431 | 19,533 |
pythondev | help | I am also joking around | 2019-04-19T10:20:55.431200 | Nieves | pythondev_help_Nieves_2019-04-19T10:20:55.431200 | 1,555,669,255.4312 | 19,534 |
pythondev | help | I decided to go `requests` initially with a note that selenium could be useful in the future | 2019-04-19T10:29:17.432300 | Claudine | pythondev_help_Claudine_2019-04-19T10:29:17.432300 | 1,555,669,757.4323 | 19,535 |
pythondev | help | we're probably 40% through this project, in a perfect world we would have built tests concurrently, or done some TDD | 2019-04-19T10:30:33.433200 | Claudine | pythondev_help_Claudine_2019-04-19T10:30:33.433200 | 1,555,669,833.4332 | 19,536 |
pythondev | help | Or just not use Pyt-... (slinks away) | 2019-04-19T10:39:30.434000 | Nieves | pythondev_help_Nieves_2019-04-19T10:39:30.434000 | 1,555,670,370.434 | 19,537 |
pythondev | help | hi, try to find a python tool/script which can mask/filter PII csv file, so I can load that new csv file into CLOUD DB for testing. For example the table has 100 columns, 1 column is PII , and 1 column has float (sensitive value). | 2019-04-19T10:40:42.435100 | Avelina | pythondev_help_Avelina_2019-04-19T10:40:42.435100 | 1,555,670,442.4351 | 19,538 |
pythondev | help | Hey have a newbie question i have a function that iterates through a list and parses each element that works ```for line in values1:
print datetime.datetime.strptime(line, '%Y.%m.%d').date()``` but when I try and capture the output like so ```for line in values1:
g = datetime.datetime.strptime(line, '%Y.%m.%d').date()
print g``` i only get one element that comes out | 2019-04-19T10:51:56.437400 | Avis | pythondev_help_Avis_2019-04-19T10:51:56.437400 | 1,555,671,116.4374 | 19,539 |
pythondev | help | you need to fix your indentation - and also you should be using the moderns `print()` function | 2019-04-19T10:59:22.438000 | Clemmie | pythondev_help_Clemmie_2019-04-19T10:59:22.438000 | 1,555,671,562.438 | 19,540 |
pythondev | help | <@Clemmie> thanks ! | 2019-04-19T11:02:12.439100 | Avis | pythondev_help_Avis_2019-04-19T11:02:12.439100 | 1,555,671,732.4391 | 19,541 |
pythondev | help | i have a very specific question im hoping someone may know the solution to. i am curious if there is a way/module for python where i can select from a list of current odbc connections/drivers like this? | 2019-04-19T12:25:11.440200 | Nenita | pythondev_help_Nenita_2019-04-19T12:25:11.440200 | 1,555,676,711.4402 | 19,542 |
pythondev | help | with pandas, if I do: | 2019-04-19T12:42:53.440800 | Alvina | pythondev_help_Alvina_2019-04-19T12:42:53.440800 | 1,555,677,773.4408 | 19,543 |
pythondev | help | None | 2019-04-19T12:42:59.441000 | Alvina | pythondev_help_Alvina_2019-04-19T12:42:59.441000 | 1,555,677,779.441 | 19,544 |
pythondev | help | the line_number will remain consistent with the original csv file as long as I do not sort the data right? | 2019-04-19T12:43:13.441600 | Alvina | pythondev_help_Alvina_2019-04-19T12:43:13.441600 | 1,555,677,793.4416 | 19,545 |
pythondev | help | so if I get an error on line 2402, i should be able to find it easily with that column? | 2019-04-19T12:43:39.442300 | Alvina | pythondev_help_Alvina_2019-04-19T12:43:39.442300 | 1,555,677,819.4423 | 19,546 |
pythondev | help | or if I open the csv with sublime text | 2019-04-19T12:43:59.442600 | Alvina | pythondev_help_Alvina_2019-04-19T12:43:59.442600 | 1,555,677,839.4426 | 19,547 |
pythondev | help | i usually do for idx, data in somefile.iterrows() - not sure if that's what you're looking for. | 2019-04-19T12:55:11.444100 | Nenita | pythondev_help_Nenita_2019-04-19T12:55:11.444100 | 1,555,678,511.4441 | 19,548 |
pythondev | help | Hey I'm trying to wrap my head around this concept . I have a function and Im trying to pass two variables into another new function but Im defining the variables inside the original functions ```return(values1,past)
def checker(passed_list):
print(passed_list)
def main():
return_items = check_indices()
checker(return_items)
main()
``` | 2019-04-19T13:02:41.446400 | Avis | pythondev_help_Avis_2019-04-19T13:02:41.446400 | 1,555,678,961.4464 | 19,549 |
pythondev | help | None | 2019-04-19T13:03:19.446600 | Alvina | pythondev_help_Alvina_2019-04-19T13:03:19.446600 | 1,555,678,999.4466 | 19,550 |
pythondev | help | think this will do | 2019-04-19T13:03:28.447200 | Alvina | pythondev_help_Alvina_2019-04-19T13:03:28.447200 | 1,555,679,008.4472 | 19,551 |
pythondev | help | basically I just want to add some default, optional columns to the database table so it is easy to keep track of specific raw file sources | 2019-04-19T13:03:47.448000 | Alvina | pythondev_help_Alvina_2019-04-19T13:03:47.448000 | 1,555,679,027.448 | 19,552 |
pythondev | help | I'm trying to run a websocket server on a separate thread with Python 2.7:
```
def listen():
factory = WebSocketServerFactory(u"<ws://127.0.0.1:9009>")
factory.protocol = FeedWsServerProtocol
# asyncio is trollius here
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
coro = loop.create_server(factory, '0.0.0.0', 9009)
server = loop.run_until_complete(coro)
try:
loop.run_forever()
except KeyboardInterrupt:
pass
finally:
server.close()
loop.close()
def run():
t = Thread(target=listen, args=())
t.daemon = True
t.start()
t.join()
run()
```
and I'm getting `RuntimeError: There is no current event loop in thread 'Thread-1'`. What am I doing wrong? | 2019-04-19T13:17:25.450000 | Al | pythondev_help_Al_2019-04-19T13:17:25.450000 | 1,555,679,845.45 | 19,553 |
pythondev | help | <@Avis> It's not quite clear what you're asking. | 2019-04-19T13:21:05.450500 | Sasha | pythondev_help_Sasha_2019-04-19T13:21:05.450500 | 1,555,680,065.4505 | 19,554 |
pythondev | help | <@Sasha> I created a function in which I defined two variables and i would like to pass it to another function maybe I mixing my terminology | 2019-04-19T14:10:21.451600 | Avis | pythondev_help_Avis_2019-04-19T14:10:21.451600 | 1,555,683,021.4516 | 19,555 |
pythondev | help | That's totally fine and standard. If a variable exists where the function is being called from, you can pass it to the function. | 2019-04-19T14:12:58.452300 | Sasha | pythondev_help_Sasha_2019-04-19T14:12:58.452300 | 1,555,683,178.4523 | 19,556 |
pythondev | help | None | 2019-04-19T14:13:18.452500 | Alvina | pythondev_help_Alvina_2019-04-19T14:13:18.452500 | 1,555,683,198.4525 | 19,557 |
pythondev | help | can I make that more efficient for very large folders with thousands of files? | 2019-04-19T14:13:33.453200 | Alvina | pythondev_help_Alvina_2019-04-19T14:13:33.453200 | 1,555,683,213.4532 | 19,558 |
pythondev | help | this is my code so far ```def check_indices():
out = subprocess.Popen(['curl','-s','<http://localhost:9200/_cat/indices?h=index>'], stdout=subprocess.PIPE)
output = out.stdout.read()
output = output.split()
output = [s.replace('logstash-','') for s in output]
N = 365
date_N_days_ago = datetime.datetime.now() - datetime.timedelta(days=N)
past = date_N_days_ago.strftime("%Y-%m-%d")
values1 = [ x for x in output if "2" in x ]
for line in values1:
values1 = datetime.datetime.strptime(line, '%Y.%m.%d').date()
print(values1)
return(values1,past)
def checker(passed_list):
print(passed_list)
def main():
checker(check_indices())
main()``` | 2019-04-19T14:21:31.453300 | Avis | pythondev_help_Avis_2019-04-19T14:21:31.453300 | 1,555,683,691.4533 | 19,559 |
pythondev | help | the idea is that i pass my two variables to my second method def checker | 2019-04-19T14:22:13.453500 | Avis | pythondev_help_Avis_2019-04-19T14:22:13.453500 | 1,555,683,733.4535 | 19,560 |
pythondev | help | Not too sure what's the best way to accomplish. | 2019-04-19T14:23:38.453700 | Avis | pythondev_help_Avis_2019-04-19T14:23:38.453700 | 1,555,683,818.4537 | 19,561 |
pythondev | help | Are you running into any problems with this? It looks pretty normal. | 2019-04-19T14:25:00.453900 | Sasha | pythondev_help_Sasha_2019-04-19T14:25:00.453900 | 1,555,683,900.4539 | 19,562 |
pythondev | help | Though your `for` loop looks problematic, since you're reassigning `values1` while iterating over it. | 2019-04-19T14:25:59.454500 | Sasha | pythondev_help_Sasha_2019-04-19T14:25:59.454500 | 1,555,683,959.4545 | 19,563 |
pythondev | help | Not unless you have some other way to filter out files, or be informed of the existence of file modifications/additions. | 2019-04-19T14:26:11.454900 | Carmen | pythondev_help_Carmen_2019-04-19T14:26:11.454900 | 1,555,683,971.4549 | 19,564 |
pythondev | help | I guess is this the conventional way of creating a function and passing the variables to another function ? | 2019-04-19T14:28:31.455100 | Avis | pythondev_help_Avis_2019-04-19T14:28:31.455100 | 1,555,684,111.4551 | 19,565 |
pythondev | help | yea i noticed when i remove the print statement it gives me an error in the for loop | 2019-04-19T14:28:59.455300 | Avis | pythondev_help_Avis_2019-04-19T14:28:59.455300 | 1,555,684,139.4553 | 19,566 |
pythondev | help | It's slightly non-conventional in that you're wrapping up the return values and passing them as a unit. It works, but it can be hard to understand what's going on. Often people would do:
```def checker(values, past):
... stuff ...
def main():
values, past = check_indices()
checker(values, past)```
That just makes it more obvious to the reader what kind of data is being generated and passed in. | 2019-04-19T14:32:27.455600 | Sasha | pythondev_help_Sasha_2019-04-19T14:32:27.455600 | 1,555,684,347.4556 | 19,567 |
pythondev | help | can you suggest any good books or literature that would fill in the gaps. what's a little confusing is the fact that arguments we are giving the functions checker is the same as the parameter. | 2019-04-19T14:37:15.455900 | Avis | pythondev_help_Avis_2019-04-19T14:37:15.455900 | 1,555,684,635.4559 | 19,568 |
pythondev | help | You mean using the same name? Yeah, that needs a little twist of your mindset... `def checker(values, past)` is basically saying, "Whatever thing is passed to this function in the first parameter, I'm going to label it `values` inside my function code, no matter what it was called before. And the second thing is now labeled `past`, even if the outside variable was named `hot_dogs`." | 2019-04-19T14:41:33.456100 | Sasha | pythondev_help_Sasha_2019-04-19T14:41:33.456100 | 1,555,684,893.4561 | 19,569 |
pythondev | help | Variable names are intended to help humans reading the code, but to the compiler, their meaning has very strict restrictions, so you want to remember that they're fundamentally arbitrary. | 2019-04-19T14:42:30.456300 | Sasha | pythondev_help_Sasha_2019-04-19T14:42:30.456300 | 1,555,684,950.4563 | 19,570 |
pythondev | help | ahh:thinking_face: so what's more important is the arguments we are passing the function.rather than the parameter name ? | 2019-04-19T14:46:38.456500 | Avis | pythondev_help_Avis_2019-04-19T14:46:38.456500 | 1,555,685,198.4565 | 19,571 |
pythondev | help | its making sense :pray: ah man Thanks ! | 2019-04-19T14:49:58.456700 | Avis | pythondev_help_Avis_2019-04-19T14:49:58.456700 | 1,555,685,398.4567 | 19,572 |
pythondev | help | No problem. Actually, Python can pass arguments both by position and by name. The latter is mostly used if you have a large number of optional arguments. So you might see `foo(one, two, special=True)`, where `one` and `two` are just the generic first and second arguments, but `special` is a named argument. | 2019-04-19T14:57:28.456900 | Sasha | pythondev_help_Sasha_2019-04-19T14:57:28.456900 | 1,555,685,848.4569 | 19,573 |
pythondev | help | I'll keep that one in mind ....yeah there was some examples on the net some people using *args and * kwargs as parameters as well | 2019-04-19T15:19:50.457100 | Avis | pythondev_help_Avis_2019-04-19T15:19:50.457100 | 1,555,687,190.4571 | 19,574 |
pythondev | help | Yep, that's useful when you want to have a function take a variable number of arguments and be able to process them like a list or a dict. It doesn't come up a lot, but it can be handy in certain cases. | 2019-04-19T15:22:45.457500 | Sasha | pythondev_help_Sasha_2019-04-19T15:22:45.457500 | 1,555,687,365.4575 | 19,575 |
pythondev | help | Anyone have a clean way to diff two function blocks in two files? Python-specific if that makes it easier | 2019-04-19T16:17:12.458300 | Cathern | pythondev_help_Cathern_2019-04-19T16:17:12.458300 | 1,555,690,632.4583 | 19,576 |
pythondev | help | I don't want to diff two files, just the func blocks | 2019-04-19T16:17:25.458600 | Cathern | pythondev_help_Cathern_2019-04-19T16:17:25.458600 | 1,555,690,645.4586 | 19,577 |
pythondev | help | I would think grepping out the function block(s) then diffing those would be an option - but haven't figured it out | 2019-04-19T16:19:46.459200 | Cathern | pythondev_help_Cathern_2019-04-19T16:19:46.459200 | 1,555,690,786.4592 | 19,578 |
pythondev | help | Meh, I'll probably just do it in python by the look of things | 2019-04-19T16:21:52.459500 | Cathern | pythondev_help_Cathern_2019-04-19T16:21:52.459500 | 1,555,690,912.4595 | 19,579 |
pythondev | help | i dont understand why I put `self` as an argument in functions... | 2019-04-19T16:36:58.460100 | Priscilla | pythondev_help_Priscilla_2019-04-19T16:36:58.460100 | 1,555,691,818.4601 | 19,580 |
pythondev | help | This is a pretty good explanation <https://micropyramid.com/blog/understand-self-and-__init__-method-in-python-class/> | 2019-04-19T16:41:00.460700 | Clemmie | pythondev_help_Clemmie_2019-04-19T16:41:00.460700 | 1,555,692,060.4607 | 19,581 |
pythondev | help | I think <@Priscilla> meant that he gets into the habit of including `self` even in non-method functions. | 2019-04-19T16:41:44.461600 | Sasha | pythondev_help_Sasha_2019-04-19T16:41:44.461600 | 1,555,692,104.4616 | 19,582 |
pythondev | help | im only supposed to add it in method functions? | 2019-04-19T16:48:39.462000 | Priscilla | pythondev_help_Priscilla_2019-04-19T16:48:39.462000 | 1,555,692,519.462 | 19,583 |
pythondev | help | thanks <@Clemmie> that article looks interesting! | 2019-04-19T16:49:01.462500 | Priscilla | pythondev_help_Priscilla_2019-04-19T16:49:01.462500 | 1,555,692,541.4625 | 19,584 |
pythondev | help | cool real nice explanations thanks again | 2019-04-19T17:13:08.462700 | Avis | pythondev_help_Avis_2019-04-19T17:13:08.462700 | 1,555,693,988.4627 | 19,585 |
pythondev | help | I'm more of a network/sysadmin but I'm making the transition with DevOps so it one of my first projects thats little more intense not a one liner script | 2019-04-19T17:14:43.463000 | Avis | pythondev_help_Avis_2019-04-19T17:14:43.463000 | 1,555,694,083.463 | 19,586 |
pythondev | help | how come this function gives me an attribute error after returning the correct output?
I am calling it with `print(ser_menu().output)` | 2019-04-19T17:37:47.463300 | Priscilla | pythondev_help_Priscilla_2019-04-19T17:37:47.463300 | 1,555,695,467.4633 | 19,587 |
pythondev | help | everything online says this happens when a function returns `None` but that isnt the case since it returns a string right? | 2019-04-19T17:40:21.464500 | Priscilla | pythondev_help_Priscilla_2019-04-19T17:40:21.464500 | 1,555,695,621.4645 | 19,588 |
pythondev | help | The print statement is implying that the function returns an object with an "output" attribute. A regular return value is just unnamed, so you'd want to print just the value "ser_menu()". | 2019-04-19T17:47:08.467300 | Sasha | pythondev_help_Sasha_2019-04-19T17:47:08.467300 | 1,555,696,028.4673 | 19,589 |
pythondev | help | Or in other words, a return statement returns the value of a thing, irrespective of the variable name inside the function... "return output", "return foo", or "return 114" are all okay and the caller can't tell the difference. | 2019-04-19T17:51:39.470500 | Sasha | pythondev_help_Sasha_2019-04-19T17:51:39.470500 | 1,555,696,299.4705 | 19,590 |
pythondev | help | oh neat it worked, but how come it adds and extra `None` now when i run it?
`Service menu test -> PASS
None` | 2019-04-19T17:53:08.471200 | Priscilla | pythondev_help_Priscilla_2019-04-19T17:53:08.471200 | 1,555,696,388.4712 | 19,591 |
pythondev | help | The return value of a print statement is None. So you print correctly inside the function, but return an output value of None to be printed by the outer print statement. | 2019-04-19T17:54:38.473100 | Sasha | pythondev_help_Sasha_2019-04-19T17:54:38.473100 | 1,555,696,478.4731 | 19,592 |
pythondev | help | :confused: | 2019-04-19T17:55:53.473300 | Priscilla | pythondev_help_Priscilla_2019-04-19T17:55:53.473300 | 1,555,696,553.4733 | 19,593 |
pythondev | help | Do you want to return a string instead of printing it inside the function? | 2019-04-19T17:56:26.474200 | Sasha | pythondev_help_Sasha_2019-04-19T17:56:26.474200 | 1,555,696,586.4742 | 19,594 |
pythondev | help | oh! i need to just call it like `ser_menu()` instead of `print(ser_menu())` | 2019-04-19T17:57:17.474900 | Priscilla | pythondev_help_Priscilla_2019-04-19T17:57:17.474900 | 1,555,696,637.4749 | 19,595 |
pythondev | help | :parrot: | 2019-04-19T17:58:49.475100 | Priscilla | pythondev_help_Priscilla_2019-04-19T17:58:49.475100 | 1,555,696,729.4751 | 19,596 |
pythondev | help | worked... booya! | 2019-04-19T17:58:59.475400 | Priscilla | pythondev_help_Priscilla_2019-04-19T17:58:59.475400 | 1,555,696,739.4754 | 19,597 |
pythondev | help | Great transition to make! | 2019-04-19T18:33:35.475600 | Sasha | pythondev_help_Sasha_2019-04-19T18:33:35.475600 | 1,555,698,815.4756 | 19,598 |
pythondev | help | Ideally it would work on mobile devices. That way someone at the gym could use it mid-workout | 2019-04-19T21:50:26.476000 | Lee | pythondev_help_Lee_2019-04-19T21:50:26.476000 | 1,555,710,626.476 | 19,599 |
pythondev | help | I use an app like that already and thought it would be more convenient if voice recognition was a feature | 2019-04-19T21:51:54.476300 | Lee | pythondev_help_Lee_2019-04-19T21:51:54.476300 | 1,555,710,714.4763 | 19,600 |
pythondev | help | Hey how do I get `An uptime check on test-drivers dummy-instance is...` of ```Message {
data: b'"An uptime check on test-drivers dummy-instance is...'
attributes: {}
}``` | 2019-04-20T03:16:41.477400 | Conchita | pythondev_help_Conchita_2019-04-20T03:16:41.477400 | 1,555,730,201.4774 | 19,601 |
pythondev | help | I forgot to mention that its type is `<class 'google.cloud.pubsub_v1.subscriber.message.Message'>` | 2019-04-20T03:37:02.478400 | Conchita | pythondev_help_Conchita_2019-04-20T03:37:02.478400 | 1,555,731,422.4784 | 19,602 |
pythondev | help | Can't really figure out how to work with it | 2019-04-20T03:37:13.478700 | Conchita | pythondev_help_Conchita_2019-04-20T03:37:13.478700 | 1,555,731,433.4787 | 19,603 |
pythondev | help | Figured it out! `solution = message.data` | 2019-04-20T03:43:44.479400 | Conchita | pythondev_help_Conchita_2019-04-20T03:43:44.479400 | 1,555,731,824.4794 | 19,604 |
pythondev | help | incase you want to access an attribute, there really are only two ways I know of in python - the `.` (for objects), and the `[]` access (for dictionaries and arrays).
good that you figured it out! | 2019-04-20T05:14:14.480600 | Conrad | pythondev_help_Conrad_2019-04-20T05:14:14.480600 | 1,555,737,254.4806 | 19,605 |
pythondev | help | Hi Team, i need some help here. i wanted to remove <structures:HumanPatient> and <structures:NonVeterinarian> tag completely without changing any other part of xml
Thanks in advance. | 2019-04-20T07:51:40.481000 | Jerrie | pythondev_help_Jerrie_2019-04-20T07:51:40.481000 | 1,555,746,700.481 | 19,606 |
pythondev | help | Do you wish to get rid of the contents of the tag too? | 2019-04-20T07:56:43.482200 | Leida | pythondev_help_Leida_2019-04-20T07:56:43.482200 | 1,555,747,003.4822 | 19,607 |
pythondev | help | i would convert the xml to a string and then use `string.find()` to locate the beginning and the end and slice those parts out | 2019-04-20T07:59:22.483100 | Leida | pythondev_help_Leida_2019-04-20T07:59:22.483100 | 1,555,747,162.4831 | 19,608 |
pythondev | help | ```
beginning = string.find("<structures:NonVeterinarian>"
end = string.find("</structures:NonVeterinarian>
output = string[:beginning] + string[end+len("</structures:NonVeterinarian>:]``` | 2019-04-20T08:03:16.485800 | Leida | pythondev_help_Leida_2019-04-20T08:03:16.485800 | 1,555,747,396.4858 | 19,609 |
pythondev | help | this loops it through twice tho so its not super efficent, you can narrow down the find if you know how much there is stuff before it/after | 2019-04-20T08:04:41.486800 | Leida | pythondev_help_Leida_2019-04-20T08:04:41.486800 | 1,555,747,481.4868 | 19,610 |
pythondev | help | `string.find("string", begin, end)` | 2019-04-20T08:05:14.487500 | Leida | pythondev_help_Leida_2019-04-20T08:05:14.487500 | 1,555,747,514.4875 | 19,611 |
pythondev | help | here begin and end are indexes from which you start looking and stop looking | 2019-04-20T08:05:37.487900 | Leida | pythondev_help_Leida_2019-04-20T08:05:37.487900 | 1,555,747,537.4879 | 19,612 |
pythondev | help | i do'not want to get rid of the contents . i just wanted to remove the tags | 2019-04-20T08:06:19.488500 | Jerrie | pythondev_help_Jerrie_2019-04-20T08:06:19.488500 | 1,555,747,579.4885 | 19,613 |
pythondev | help | but both beginnig one and closing one? | 2019-04-20T08:07:07.489500 | Leida | pythondev_help_Leida_2019-04-20T08:07:07.489500 | 1,555,747,627.4895 | 19,614 |
pythondev | help | yes | 2019-04-20T08:07:16.489700 | Jerrie | pythondev_help_Jerrie_2019-04-20T08:07:16.489700 | 1,555,747,636.4897 | 19,615 |
pythondev | help | i am adding the desired result | 2019-04-20T08:07:25.490100 | Jerrie | pythondev_help_Jerrie_2019-04-20T08:07:25.490100 | 1,555,747,645.4901 | 19,616 |
pythondev | help | None | 2019-04-20T08:07:38.490400 | Jerrie | pythondev_help_Jerrie_2019-04-20T08:07:38.490400 | 1,555,747,658.4904 | 19,617 |
pythondev | help | This is the desired result of the xml. after removing both tag | 2019-04-20T08:07:52.491000 | Jerrie | pythondev_help_Jerrie_2019-04-20T08:07:52.491000 | 1,555,747,672.491 | 19,618 |
pythondev | help | ```
output = string[:beginning] + string[beginning+len("<structures:NonVeterinarian>"):end] + string[end+len("</structures:NonVeterinarian>":)``` | 2019-04-20T08:09:13.492300 | Leida | pythondev_help_Leida_2019-04-20T08:09:13.492300 | 1,555,747,753.4923 | 19,619 |
pythondev | help | i guess it would be nicer if you cut out all the pieces and then added them together | 2019-04-20T08:09:52.492900 | Leida | pythondev_help_Leida_2019-04-20T08:09:52.492900 | 1,555,747,792.4929 | 19,620 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.