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 | and introduce a non-intuitive UI | 2017-09-03T09:38:54.000044 | Meg | pythondev_help_Meg_2017-09-03T09:38:54.000044 | 1,504,431,534.000044 | 91,903 |
pythondev | help | so, from a UI experience, think about this | 2017-09-03T09:39:03.000031 | Meg | pythondev_help_Meg_2017-09-03T09:39:03.000031 | 1,504,431,543.000031 | 91,904 |
pythondev | help | how much extra complexity will implementing your workflow introduce into the UI, and how to handle the edge cases? | 2017-09-03T09:39:50.000033 | Meg | pythondev_help_Meg_2017-09-03T09:39:50.000033 | 1,504,431,590.000033 | 91,905 |
pythondev | help | compared to how many users this is actually targeted for? | 2017-09-03T09:40:43.000049 | Meg | pythondev_help_Meg_2017-09-03T09:40:43.000049 | 1,504,431,643.000049 | 91,906 |
pythondev | help | I cannot fully understand you, but wouldn't it be logical when the file changes, interpreter for that specific file changes too? | 2017-09-03T09:41:23.000028 | Monty | pythondev_help_Monty_2017-09-03T09:41:23.000028 | 1,504,431,683.000028 | 91,907 |
pythondev | help | In other words, when you change the file, Run configuration for that file changes too | 2017-09-03T09:42:36.000087 | Monty | pythondev_help_Monty_2017-09-03T09:42:36.000087 | 1,504,431,756.000087 | 91,908 |
pythondev | help | no | 2017-09-03T09:42:37.000001 | Meg | pythondev_help_Meg_2017-09-03T09:42:37.000001 | 1,504,431,757.000001 | 91,909 |
pythondev | help | because pycharm is intended to be project based run configuration | 2017-09-03T09:43:00.000004 | Meg | pythondev_help_Meg_2017-09-03T09:43:00.000004 | 1,504,431,780.000004 | 91,910 |
pythondev | help | not file based | 2017-09-03T09:43:03.000013 | Meg | pythondev_help_Meg_2017-09-03T09:43:03.000013 | 1,504,431,783.000013 | 91,911 |
pythondev | help | ok, I will get that later maybe, when I run into such problems :slightly_smiling_face: Do you have a time to help me with some code. I am building a simple calculator, about 25 lines of code | 2017-09-03T09:45:56.000022 | Monty | pythondev_help_Monty_2017-09-03T09:45:56.000022 | 1,504,431,956.000022 | 91,912 |
pythondev | help | ask here. I suspect I’m not the only one around here now :slightly_smiling_face: | 2017-09-03T09:46:20.000078 | Meg | pythondev_help_Meg_2017-09-03T09:46:20.000078 | 1,504,431,980.000078 | 91,913 |
pythondev | help | I have made it, but I want to make it more efficient.... | 2017-09-03T09:46:35.000030 | Monty | pythondev_help_Monty_2017-09-03T09:46:35.000030 | 1,504,431,995.00003 | 91,914 |
pythondev | help | ok, the question is...how do I print dictionary value, if some variable is the same as dictionary key? | 2017-09-03T09:48:33.000066 | Monty | pythondev_help_Monty_2017-09-03T09:48:33.000066 | 1,504,432,113.000066 | 91,915 |
pythondev | help | when that variable is found in dictionary, and it matches the dictionary key, I want the program to print the dictionary value that is associated with that key that matches that variable | 2017-09-03T09:49:50.000038 | Monty | pythondev_help_Monty_2017-09-03T09:49:50.000038 | 1,504,432,190.000038 | 91,916 |
pythondev | help | you mean something like a dict `{'a'=0, 'b'=1, 'c'=3}` and a variable `lookup_key = 'a'`? | 2017-09-03T09:51:53.000058 | Meg | pythondev_help_Meg_2017-09-03T09:51:53.000058 | 1,504,432,313.000058 | 91,917 |
pythondev | help | give me a few minutes to translate the code in english | 2017-09-03T09:53:03.000069 | Monty | pythondev_help_Monty_2017-09-03T09:53:03.000069 | 1,504,432,383.000069 | 91,918 |
pythondev | help | no problem. What’s your native language? | 2017-09-03T09:54:28.000010 | Meg | pythondev_help_Meg_2017-09-03T09:54:28.000010 | 1,504,432,468.00001 | 91,919 |
pythondev | help | Serbian | 2017-09-03T09:57:38.000037 | Monty | pythondev_help_Monty_2017-09-03T09:57:38.000037 | 1,504,432,658.000037 | 91,920 |
pythondev | help | ```while True:
print(
"Welcome to our shitttttty calculator. First, choose two numbers, the choose the operation.")
first_number = float(input("Enter the first number: "))
second_number = float(input("Enter the second number: "))
dictionary1 = {"addition": first_number + second_number, "substraction": first_number - second_number,
"multiplication": first_number * second_number, "division": first_number / second_number }
user_input= str(input("Choose your operation: "))
if user_input in dictionary1:
print(dictionary1.items())
break``` | 2017-09-03T10:03:04.000020 | Monty | pythondev_help_Monty_2017-09-03T10:03:04.000020 | 1,504,432,984.00002 | 91,921 |
pythondev | help | so, its `user_input` you’re looking for? | 2017-09-03T10:08:57.000053 | Meg | pythondev_help_Meg_2017-09-03T10:08:57.000053 | 1,504,433,337.000053 | 91,922 |
pythondev | help | yes | 2017-09-03T10:10:37.000011 | Monty | pythondev_help_Monty_2017-09-03T10:10:37.000011 | 1,504,433,437.000011 | 91,923 |
pythondev | help | I want to... | 2017-09-03T10:10:41.000079 | Monty | pythondev_help_Monty_2017-09-03T10:10:41.000079 | 1,504,433,441.000079 | 91,924 |
pythondev | help | when user_input matches a key in dictionary1 (when their values are matched) , then to print the value of that matched key | 2017-09-03T10:12:36.000030 | Monty | pythondev_help_Monty_2017-09-03T10:12:36.000030 | 1,504,433,556.00003 | 91,925 |
pythondev | help | I don't know how to target that | 2017-09-03T10:12:50.000054 | Monty | pythondev_help_Monty_2017-09-03T10:12:50.000054 | 1,504,433,570.000054 | 91,926 |
pythondev | help | so, `dict` has a few methods on it that you would find useful here. first, `items()` returns a tuple of `key, value`. Also, `key()` returns a list of the keys, and `values()` does the same for values | 2017-09-03T10:13:03.000048 | Meg | pythondev_help_Meg_2017-09-03T10:13:03.000048 | 1,504,433,583.000048 | 91,927 |
pythondev | help | so, here, you would want to leverage `keys()` for your `if user_input` conditional | 2017-09-03T10:13:38.000003 | Meg | pythondev_help_Meg_2017-09-03T10:13:38.000003 | 1,504,433,618.000003 | 91,928 |
pythondev | help | for example, with your dict above, `addition in dictionary1.keys()` returns `True` | 2017-09-03T10:14:06.000084 | Meg | pythondev_help_Meg_2017-09-03T10:14:06.000084 | 1,504,433,646.000084 | 91,929 |
pythondev | help | yes, I googled that a little, and I know that it returns the whole list of values and keys, but I want that one specific value from dictionary, not all of them... | 2017-09-03T10:14:09.000032 | Monty | pythondev_help_Monty_2017-09-03T10:14:09.000032 | 1,504,433,649.000032 | 91,930 |
pythondev | help | alright | 2017-09-03T10:14:35.000066 | Meg | pythondev_help_Meg_2017-09-03T10:14:35.000066 | 1,504,433,675.000066 | 91,931 |
pythondev | help | so, if you have `if user_input in dictionary1.keys()`: | 2017-09-03T10:14:51.000006 | Meg | pythondev_help_Meg_2017-09-03T10:14:51.000006 | 1,504,433,691.000006 | 91,932 |
pythondev | help | and `addition` is user_input | 2017-09-03T10:14:57.000027 | Meg | pythondev_help_Meg_2017-09-03T10:14:57.000027 | 1,504,433,697.000027 | 91,933 |
pythondev | help | so, you know `addition` is a key in the dict | 2017-09-03T10:16:46.000032 | Meg | pythondev_help_Meg_2017-09-03T10:16:46.000032 | 1,504,433,806.000032 | 91,934 |
pythondev | help | how do you access keys with a dict? | 2017-09-03T10:16:54.000005 | Meg | pythondev_help_Meg_2017-09-03T10:16:54.000005 | 1,504,433,814.000005 | 91,935 |
pythondev | help | `dictionary1[user_input]` | 2017-09-03T10:17:10.000021 | Meg | pythondev_help_Meg_2017-09-03T10:17:10.000021 | 1,504,433,830.000021 | 91,936 |
pythondev | help | hey all, if anyone has any experience with selenium I've got a quick question I just posted in learning_python | 2017-09-03T10:17:38.000076 | Nita | pythondev_help_Nita_2017-09-03T10:17:38.000076 | 1,504,433,858.000076 | 91,937 |
pythondev | help | thanks...I did not know that I can target values outside of dictionary... | 2017-09-03T10:19:16.000029 | Monty | pythondev_help_Monty_2017-09-03T10:19:16.000029 | 1,504,433,956.000029 | 91,938 |
pythondev | help | oh, yes. | 2017-09-03T10:19:38.000084 | Meg | pythondev_help_Meg_2017-09-03T10:19:38.000084 | 1,504,433,978.000084 | 91,939 |
pythondev | help | but remember, in order to get a value from a dict, you either have to know the key beforehand | 2017-09-03T10:20:00.000074 | Meg | pythondev_help_Meg_2017-09-03T10:20:00.000074 | 1,504,434,000.000074 | 91,940 |
pythondev | help | eg, `dictionary`[‘addition’]` | 2017-09-03T10:20:12.000032 | Meg | pythondev_help_Meg_2017-09-03T10:20:12.000032 | 1,504,434,012.000032 | 91,941 |
pythondev | help | or loop through it and doing some comparison | 2017-09-03T10:20:22.000016 | Meg | pythondev_help_Meg_2017-09-03T10:20:22.000016 | 1,504,434,022.000016 | 91,942 |
pythondev | help | aha...makes sense... | 2017-09-03T10:20:45.000040 | Monty | pythondev_help_Monty_2017-09-03T10:20:45.000040 | 1,504,434,045.00004 | 91,943 |
pythondev | help | if you want to simplify things, you can use list comprehensions
`[value for key, value in dictionary1.items() if key == user_input]` | 2017-09-03T10:23:25.000012 | Meg | pythondev_help_Meg_2017-09-03T10:23:25.000012 | 1,504,434,205.000012 | 91,944 |
pythondev | help | which returns a list of matches | 2017-09-03T10:23:33.000075 | Meg | pythondev_help_Meg_2017-09-03T10:23:33.000075 | 1,504,434,213.000075 | 91,945 |
pythondev | help | I came from more then a year discrete math course, and I thought the transition would be much more easier. The most difficult thing in programming so far has been the understanding how the language actually works, quirks, what am I allowed and not allowed to do... | 2017-09-03T10:24:28.000049 | Monty | pythondev_help_Monty_2017-09-03T10:24:28.000049 | 1,504,434,268.000049 | 91,946 |
pythondev | help | yup | 2017-09-03T10:25:51.000034 | Meg | pythondev_help_Meg_2017-09-03T10:25:51.000034 | 1,504,434,351.000034 | 91,947 |
pythondev | help | there are two major difficulties, I feel | 2017-09-03T10:26:07.000001 | Meg | pythondev_help_Meg_2017-09-03T10:26:07.000001 | 1,504,434,367.000001 | 91,948 |
pythondev | help | one: describe what you want to do in discrete steps | 2017-09-03T10:26:16.000078 | Meg | pythondev_help_Meg_2017-09-03T10:26:16.000078 | 1,504,434,376.000078 | 91,949 |
pythondev | help | two, use the language syntax and tools to replicate the project steps | 2017-09-03T10:26:54.000040 | Meg | pythondev_help_Meg_2017-09-03T10:26:54.000040 | 1,504,434,414.00004 | 91,950 |
pythondev | help | first language, you typically struggle with both at the same time, because you need to get the syntax and how to use it to do what you want | 2017-09-03T10:27:23.000091 | Meg | pythondev_help_Meg_2017-09-03T10:27:23.000091 | 1,504,434,443.000091 | 91,951 |
pythondev | help | but after that, its easier to pick up another one | 2017-09-03T10:27:35.000037 | Meg | pythondev_help_Meg_2017-09-03T10:27:35.000037 | 1,504,434,455.000037 | 91,952 |
pythondev | help | yes, exactly, number two is a bigger problem now :slightly_smiling_face: | 2017-09-03T10:27:42.000062 | Monty | pythondev_help_Monty_2017-09-03T10:27:42.000062 | 1,504,434,462.000062 | 91,953 |
pythondev | help | like for me, I originally started in java | 2017-09-03T10:27:43.000033 | Meg | pythondev_help_Meg_2017-09-03T10:27:43.000033 | 1,504,434,463.000033 | 91,954 |
pythondev | help | and there were lots of times where I felt I was paying the university for nothing more than to feel like an idiot | 2017-09-03T10:28:15.000046 | Meg | pythondev_help_Meg_2017-09-03T10:28:15.000046 | 1,504,434,495.000046 | 91,955 |
pythondev | help | I was considering to start in Java, there are more jobs, more mature language, static typing, etc. But as soon as I saw hello world in Java and Python, I made my decision :smile: | 2017-09-03T10:30:27.000011 | Monty | pythondev_help_Monty_2017-09-03T10:30:27.000011 | 1,504,434,627.000011 | 91,956 |
pythondev | help | java and python have alot of good things | 2017-09-03T10:31:55.000035 | Meg | pythondev_help_Meg_2017-09-03T10:31:55.000035 | 1,504,434,715.000035 | 91,957 |
pythondev | help | I’m equally comfortable wokrking in both | 2017-09-03T10:32:06.000014 | Meg | pythondev_help_Meg_2017-09-03T10:32:06.000014 | 1,504,434,726.000014 | 91,958 |
pythondev | help | but then, I’m a full stack dev in both languages | 2017-09-03T10:32:20.000040 | Meg | pythondev_help_Meg_2017-09-03T10:32:20.000040 | 1,504,434,740.00004 | 91,959 |
pythondev | help | everything from server configuration all the way to css styling for a web application | 2017-09-03T10:32:52.000077 | Meg | pythondev_help_Meg_2017-09-03T10:32:52.000077 | 1,504,434,772.000077 | 91,960 |
pythondev | help | java seems okay to me, but java developers often overcomplicate things | 2017-09-03T10:38:57.000016 | Collette | pythondev_help_Collette_2017-09-03T10:38:57.000016 | 1,504,435,137.000016 | 91,961 |
pythondev | help | Do you have Skype, email, facebook, or some other tools of communication where I can ask you something when I get really stuck? :slightly_smiling_face: | 2017-09-03T10:39:41.000001 | Monty | pythondev_help_Monty_2017-09-03T10:39:41.000001 | 1,504,435,181.000001 | 91,962 |
pythondev | help | like when they have a single class (a custom service sdk) with a bunch of methods to test, they're likely to
a) create the sdk interface (even if it's obvious there won't be an other implementation)
b) create the abstract base class implementing the interface (even there won't be more than one subclass, ever)
c) repeat a and b for the testing suite (!) | 2017-09-03T10:41:59.000038 | Collette | pythondev_help_Collette_2017-09-03T10:41:59.000038 | 1,504,435,319.000038 | 91,963 |
pythondev | help | yep | 2017-09-03T10:42:17.000085 | Meg | pythondev_help_Meg_2017-09-03T10:42:17.000085 | 1,504,435,337.000085 | 91,964 |
pythondev | help | all that is implemented ad nauseaum in the spring framework | 2017-09-03T10:42:30.000054 | Meg | pythondev_help_Meg_2017-09-03T10:42:30.000054 | 1,504,435,350.000054 | 91,965 |
pythondev | help | architecture astronauts :slightly_smiling_face: | 2017-09-03T10:42:39.000042 | Meg | pythondev_help_Meg_2017-09-03T10:42:39.000042 | 1,504,435,359.000042 | 91,966 |
pythondev | help | just ask here, to be honest | 2017-09-03T10:43:04.000032 | Meg | pythondev_help_Meg_2017-09-03T10:43:04.000032 | 1,504,435,384.000032 | 91,967 |
pythondev | help | Oh, if only in the spring framework. Much likely in an in-house, custom framework which won't have many nice integrations and features spring provides | 2017-09-03T10:43:34.000038 | Collette | pythondev_help_Collette_2017-09-03T10:43:34.000038 | 1,504,435,414.000038 | 91,968 |
pythondev | help | because I’m not really a mentor, nor do I have the time to be. Also, being part of the community here means you get to ask questions and then as you get better, contribute back | 2017-09-03T10:43:51.000091 | Meg | pythondev_help_Meg_2017-09-03T10:43:51.000091 | 1,504,435,431.000091 | 91,969 |
pythondev | help | sure, I understand | 2017-09-03T10:44:41.000065 | Monty | pythondev_help_Monty_2017-09-03T10:44:41.000065 | 1,504,435,481.000065 | 91,970 |
pythondev | help | I’ve only worked on two large java projects. one was in spring, other was in google web toolkit with a custom in-house library | 2017-09-03T10:44:55.000083 | Meg | pythondev_help_Meg_2017-09-03T10:44:55.000083 | 1,504,435,495.000083 | 91,971 |
pythondev | help | and honestly, the in-house library was about 100KLOC of some of the best code I’ve ever read. Sure, there were some warts in it that I was glad I didn’t have to implement, but overall the code quality was extremely high. Most of the problems came with integrating with GWT.. so glad I don’t have to do that anymore | 2017-09-03T10:46:12.000029 | Meg | pythondev_help_Meg_2017-09-03T10:46:12.000029 | 1,504,435,572.000029 | 91,972 |
pythondev | help | You're lucky then | 2017-09-03T10:46:44.000040 | Collette | pythondev_help_Collette_2017-09-03T10:46:44.000040 | 1,504,435,604.00004 | 91,973 |
pythondev | help | I guess what I’m trying to say is in a community like this, you get more resources from multiple people than just relying on one person :slightly_smiling_face: | 2017-09-03T10:47:03.000005 | Meg | pythondev_help_Meg_2017-09-03T10:47:03.000005 | 1,504,435,623.000005 | 91,974 |
pythondev | help | I'm definitely fan of a very specific, well-written, tested in-house library that does the thing | 2017-09-03T10:47:17.000027 | Collette | pythondev_help_Collette_2017-09-03T10:47:17.000027 | 1,504,435,637.000027 | 91,975 |
pythondev | help | To be fair, originally a lot of that was pretty much required for proper unit test mocking | 2017-09-03T10:47:19.000069 | Beula | pythondev_help_Beula_2017-09-03T10:47:19.000069 | 1,504,435,639.000069 | 91,976 |
pythondev | help | In Java/spring | 2017-09-03T10:47:30.000035 | Beula | pythondev_help_Beula_2017-09-03T10:47:30.000035 | 1,504,435,650.000035 | 91,977 |
pythondev | help | None of that applies to our current developers, unfortunately | 2017-09-03T10:47:32.000008 | Collette | pythondev_help_Collette_2017-09-03T10:47:32.000008 | 1,504,435,652.000008 | 91,978 |
pythondev | help | no, I was not really looking for a mentor, I was looking for someone to answer some questions when I get stuck, 5-10 minutes max, but as you said, I can get that help on the <#C07EFMZ1N|help> channel...maybe I was thinking that you are the only living person on that channel :smile: | 2017-09-03T10:54:53.000012 | Monty | pythondev_help_Monty_2017-09-03T10:54:53.000012 | 1,504,436,093.000012 | 91,979 |
pythondev | help | ah, no worries :slightly_smiling_face: thanks for understanding! | 2017-09-03T10:57:08.000040 | Meg | pythondev_help_Meg_2017-09-03T10:57:08.000040 | 1,504,436,228.00004 | 91,980 |
pythondev | help | np | 2017-09-03T11:02:39.000015 | Monty | pythondev_help_Monty_2017-09-03T11:02:39.000015 | 1,504,436,559.000015 | 91,981 |
pythondev | help | Does anyone know how i can split this string into multiple parts ```'media/Clearance.png?sometexthere'``` ideally i'd like just the Clearance.png | 2017-09-03T12:33:34.000013 | Krysta | pythondev_help_Krysta_2017-09-03T12:33:34.000013 | 1,504,442,014.000013 | 91,982 |
pythondev | help | so if i was splitting it it'd be 'media/', 'Clearance.png' and '?sometexthere' | 2017-09-03T12:34:15.000015 | Krysta | pythondev_help_Krysta_2017-09-03T12:34:15.000015 | 1,504,442,055.000015 | 91,983 |
pythondev | help | I have ```f = imgString.split('medias/')[1]
g = f.split('?')[0]
print(g)``` but i'd prefer it on one line | 2017-09-03T12:47:15.000070 | Krysta | pythondev_help_Krysta_2017-09-03T12:47:15.000070 | 1,504,442,835.00007 | 91,984 |
pythondev | help | If it's always a similar format you could regex it and get the groups, but that's less obvious and I'd favor a few lines to a single line if it isn't as clean | 2017-09-03T12:49:47.000017 | Beula | pythondev_help_Beula_2017-09-03T12:49:47.000017 | 1,504,442,987.000017 | 91,985 |
pythondev | help | Yeah the image name will change, but media/ and ? stay the same, i'll probs stick to what i have, it works so :smile: | 2017-09-03T12:50:43.000027 | Krysta | pythondev_help_Krysta_2017-09-03T12:50:43.000027 | 1,504,443,043.000027 | 91,986 |
pythondev | help | do you have the full path available? | 2017-09-03T13:02:15.000078 | Meg | pythondev_help_Meg_2017-09-03T13:02:15.000078 | 1,504,443,735.000078 | 91,987 |
pythondev | help | if so, you can use the `urlparse` library | 2017-09-03T13:02:24.000022 | Meg | pythondev_help_Meg_2017-09-03T13:02:24.000022 | 1,504,443,744.000022 | 91,988 |
pythondev | help | ```
# python3
from urllib.parse import urlparse
# python 2
from urlparse import urlparse
parsed = urlparse('media/Clearance.png?sometexthere')
``` | 2017-09-03T13:05:12.000013 | Meg | pythondev_help_Meg_2017-09-03T13:05:12.000013 | 1,504,443,912.000013 | 91,989 |
pythondev | help | outputs this
```
In [27]: parsed
Out[27]: ParseResult(scheme='', netloc='', path='media/Clearance.png', params='', query='sometexthere', fragment='')
In [29]: parsed.path.split('/')[1]
Out[29]: 'Clearance.png'
``` | 2017-09-03T13:06:09.000004 | Meg | pythondev_help_Meg_2017-09-03T13:06:09.000004 | 1,504,443,969.000004 | 91,990 |
pythondev | help | Yeah i'm scraping with bs4 and the image name ie (Clearance) changes so I can't reference it | 2017-09-03T13:19:17.000010 | Krysta | pythondev_help_Krysta_2017-09-03T13:19:17.000010 | 1,504,444,757.00001 | 91,991 |
pythondev | help | Thanks tho <@Meg> | 2017-09-03T13:19:30.000063 | Krysta | pythondev_help_Krysta_2017-09-03T13:19:30.000063 | 1,504,444,770.000063 | 91,992 |
pythondev | help | I'm trying to understand how I can implement the google speech api for my purposes. There's a good example by them `<https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/speech/cloud-client/transcribe_streaming_mic.py#L170>` That deals with streaming from a mic. I've gotten this `transcribe_streaming_mic.py` to work. But I'm a little confused with if I should be using async vs sync.... and how to modify this for my use case. I want to only collect up to five seconds of data at a time with the ability to short circuit the `listen_print_loop` if a certain condition is met. I'm think I can put a timer around the `with MicrophoneStream` and I can have the listen_print_loop(responses) throw an exception when it meets a certain condition (timeout= 5 seconds, or correct response). Catch this response in the main and do something based upon it.
I'm going through their api reference docs to see if there's something I can use: `<https://googlecloudplatform.github.io/google-cloud-python/latest/speech/gapic/api.html>` | 2017-09-03T14:13:47.000094 | Glinda | pythondev_help_Glinda_2017-09-03T14:13:47.000094 | 1,504,448,027.000094 | 91,993 |
pythondev | help | Is there a particular channel here that deals with coding issues? | 2017-09-03T16:50:17.000071 | Carlene | pythondev_help_Carlene_2017-09-03T16:50:17.000071 | 1,504,457,417.000071 | 91,994 |
pythondev | help | or do most folks paste into the <#C07EFMZ1N|help> Channel | 2017-09-03T16:50:32.000013 | Carlene | pythondev_help_Carlene_2017-09-03T16:50:32.000013 | 1,504,457,432.000013 | 91,995 |
pythondev | help | yeah <#C07EFMZ1N|help> is a good place :slightly_smiling_face: | 2017-09-03T16:51:13.000034 | Ciera | pythondev_help_Ciera_2017-09-03T16:51:13.000034 | 1,504,457,473.000034 | 91,996 |
pythondev | help | <@Ciera> nice thanks! | 2017-09-03T16:53:11.000020 | Carlene | pythondev_help_Carlene_2017-09-03T16:53:11.000020 | 1,504,457,591.00002 | 91,997 |
pythondev | help | here it is: | 2017-09-03T16:53:14.000073 | Carlene | pythondev_help_Carlene_2017-09-03T16:53:14.000073 | 1,504,457,594.000073 | 91,998 |
pythondev | help | ```
# import webbrowser
# import jsonfrom urllib.request import urlopen
print("Let's find an old website.")
site = input("Type a website URL: ")
era = input("Type a year, month, and day, like 20150613: ")
url = "<http://archive.org/wayback/available?url=%s&timestamp=%s>" % (site, era)
response = urlopen(url)
content = response.read()
text = contents.decode("utf-8")
data = json.loads(text)
try:
old_site = data["archived_snapshots"]["closest"]["url"]
print("Found this copy: ", old_site)
print("It should appear in your browser now.")
webbrowser.open(old_site)
except:
print("Sorry, no luck finding" , site)
``` | 2017-09-03T16:53:28.000010 | Carlene | pythondev_help_Carlene_2017-09-03T16:53:28.000010 | 1,504,457,608.00001 | 91,999 |
pythondev | help | I'm getting the error of:
```
Traceback (most recent call last):
File "archive.py", line 8, in <module>
response = urlopen(url)
NameError: name 'urlopen' is not defined
``` | 2017-09-03T16:53:50.000007 | Carlene | pythondev_help_Carlene_2017-09-03T16:53:50.000007 | 1,504,457,630.000007 | 92,000 |
pythondev | help | I want to say I am missing something | 2017-09-03T16:54:41.000029 | Carlene | pythondev_help_Carlene_2017-09-03T16:54:41.000029 | 1,504,457,681.000029 | 92,001 |
pythondev | help | btw this is from the books "Introducing Python" | 2017-09-03T16:54:58.000076 | Carlene | pythondev_help_Carlene_2017-09-03T16:54:58.000076 | 1,504,457,698.000076 | 92,002 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.