« first day (3197 days earlier)      last day (1742 days later) » 
00:00 - 16:0016:00 - 00:00

12:14 AM
cbg
 
12:56 AM
Hi
 
 
1 hour later…
2:12 AM
recbg
 
cbg
working late tonight. 10:15 PM here
 
@ReblochonMasque Did the orienting object?
 
has anyone experienced import failures even through pycharm import suggestion tool (not sure exactly what its called)?
im going nuts trying to work out what the issue is...
 
@edaniley Be nice here
 
sry
obv not cursing at anyone. apls
 
2:21 AM
You can delete it btw
 
ok 1 sec
do you know what I'm talking about thouhg?
 
oky better
 
just seems crazy to me that following PyCharm autofill suggestions for sibling package imports still results in an error
 
2:42 AM
eh? @smci
 
Hey @ReblochonMasque
 
cabbage @U10-Forward
pycharm imports are a bit nevrotic...
relative imports work best I found
 
2:57 AM
what is the best way to see if there is a range of keys in a dict? for example my dict will have keys from 1-20 and if i want to see if they're all populated or not. I know to use the 'in' keyword, it's the range part I'm having trouble finding
 
set(range(1, 20)).issubset(your_dict) or all(key in your_dict for key in range(1, 20))
 
i just used a for loop to get it working
XD
your way is much cleaner and probably much more efficient
 
3:50 AM
how did that for loop look ?
 
 
1 hour later…
4:53 AM
Has anyone her work with python requests? Is there a way to specify the network interface through which the request should go?
something like curl --interface <interface> <get_request> using curl
 
5:39 AM
recbg
 
5:58 AM
I know how to get a captcha while answering, provide an answer without explanation
Ouch, am i a bot?
 
@AndrasDeak I would like too apologize for posting my question too many times. I am really sorry and my apologies for late reply ive been sick past few days. Just regarding to doing job, ive not been asking you to tell me to write code. See im a 3rd yr intern student and my reporting manager doesn't give any assistance.
Furthermore i do try before asking anything, but im very weak at programming. Thats why i ask questions here. Again i apologize for asking too many times. Sorry for causing inconvenience
 
6:46 AM
cbg
 
cbg
 
cbg
 
What is cbg means ?
 
lol
 
7:22 AM
@AlperAyna and sopython.com/salad
 
Hi
Can somebody help me?
Pygame window is not opening, when I run my code by double clicking on it. But when I run it via Python Shell, everything works perfectly.
 
That doesn't sound like a pygame problem. That sounds like your default program for opening .py files isn't set correctly
do right click -> properties -> open with and check if it's set to python
 
It's set to python. When I double click on the file, a little black window pops up with label 'py.exe', than immedietly close. And nothing else happening.
 
And when you launch it from the shell, you're also using py.exe?
 
7:40 AM
Yes
The black window writes: 'No moudule name pygame'
 
when you launch it from the shell, what directory are you doing it from? From the folder where pygame is installed?
 
No, I launch it from desktop
 
welp, then I have no idea
 
essentially, the bottom line is clear. there's a difference between the two ways of launching the app for some reason. i still suspect whether the .py file is set to the correct python executable on double click or not.
what operating system is this btw?
 
py.exe is windows
 
7:47 AM
:o
forgive my ignorance, is .exe a windows only thing?
 
@BálintCséfalvay please print the sys.path at the start of your script and compare whether there are differences depending on how you start it
 
oh, apparently so! nifty
 
@ParitoshSingh on linux and macOS, it's just python
 
interesting, makes sense in retrospect
 
8:02 AM
This is the error message I get, when I'm trying to import pygame
 
well yes, you said so
the question is what is difference about the py.exe you start here and the one you use when it works
 
Try Miyagi's suggestion. add some lines of code before import pygame to see where your sys.path points
 
do you have two installations of python? this one says it is from anaconda, do you have one from python.org as well?
 
@MisterMiyagi Maybe you're right. I installed anaconda, but I had python installed befor
I uninstalled the version from anaconda. Now its working fine.
Thanks a lot :)
 
@BálintCséfalvay Your profile picture broken, can you fix it? I bugs me a lot :)
It bugs me :D
 
8:13 AM
Good morning 🌅
 
I changed it.
It was my picture from google+ :)
 
8:35 AM
@ParitoshSingh file extensions are an illusion on unix
 
re-cbg all, bugrit
 
cbg
 
9:29 AM
Is there a builtin way with matplotlib to plot 3D axis as lines crossing at the origin & centered? I looked here, but there are no examples.
 
you can't even do that in 2d without manual hacks
actually, matplotlib.org/examples/pylab_examples/… doesn't look that bad, I didn't know that
then I guess I don't know if you can do this for 3d
 
Noted, thanks @AndrasDeak
 
 
2 hours later…
11:31 AM
hello, I have the following json: {"my-value": 1, "my-second-value": 2}. How could I define a class to store these fields? I would like to resend later in the same format, but "-" is a reserved word. Thank you :)
When I say "resend" is using Flask
 
my first reaction is, perhaps just use a mapping?
json field to class attribute or vice versa? then whatever method is responsible for generating the json uses that mapping
 
yes
 
"-" is a reserved word? you mean when you create an instance attribute using them?
 
You don't need to. Just deserialize to a dictionary and access by key. Why would you need to create a class?
 
For example, in Java, you can duse "annotations" like this:

@Value(name="my-value")
public String getMyValue()
{
return this.myValue ;
}

In Java, "-" is also a reserved word, but using annotations you can solve the issue
 
11:36 AM
python is not java
 
It is perhaps the Java influence that makes you want to create the class in the first place. What exactly does your Flask app need to do with that JSON data?
 
more accurately, "using someone else's code you can solve the issue"
 
@roganjosh it is better to have class definitions because I have many relationships among the classes and it is better for developers to access into attributes
 
Does java have convenient dicts?
@pakkk why is a non-working var.my-value better than var['my-value'], especially since you can (conveniently) program the latter dynamically?
 
@pakkk Are you using an ORM?
 
11:39 AM
@Aran-Fey I am doing a framework which other developers use it. I want to develop something easy for them which hide JSON conversion and also Flask communication
@AndrasDeak Nope
 
Hiding JSON conversion by creating a class in which all keys are attributes of that class is not easier at all
 
wait, so the json is entirely under your control? Any reason why you'd want the hyphen to stay? Or not expose the json directly?
 
@pakkk is it a python framework?
 
@ParitoshSingh yes, it is entirely under my control. Developers could need to send JSON fields with hypthen (for example, "Content-type"). My idea is to be in the middle, convert the JSON to the class, and viceversa
Content-type must be send as "Content-type" in the JSON, but I need to store it as field in a class...maybe...like "contentType"
 
well, you'll just need to write some code that replaces those hyphens with underscores or something
 
11:44 AM
I revised the following comment:
16
A: How can I make an alias to a non-function member attribute in a Python class?

Ned BatchelderYou can provide a __setattr__ and __getattr__ that reference an aliases map: class Dummy(object): aliases = { 'xValue': 'x', 'another': 'x', } def __init__(self): self.x = 17 def __setattr__(self, name, value): name = self.aliases.get(name, n...

make sense?
 
I think the concern is whether you really need to do that to begin with. What you linked is a solution to the Y in a potential XY problem.
 
:(
 
I can't really judge because I don't know web stuff, but you seem to be trying to make your life harder than it has to be :)
 
There are some really good comments explaining why allowing mindless aliasing is like a "niceness or luxury is an evil trap that will eventually cause more confusion than good. "
and they're all on that page you linked!
 
My framework cannot reject JSON with hyphens :( so I need to find out how to achieve it
 
11:48 AM
Completely thrown together but to give a general idea:
 
you can do it with a mapping
 
class Something:

    def __init__(self, data):
        self.data = data

    def set_content_type(self, new_type):
        self.data['content-type'] = new_type
In that case, you still have a class with defined methods, but the data is always in a form that is readily serialized back to JSON when you want to send it back out of Flask
 
I'd do something like that
 
@Aran-Fey thank you, but imagine that developers send a "_", this implementation has a bug with that
 
yeah, turns out you can't have everything
 
11:52 AM
@roganjosh thank you, in this implementation I think I could do the conversion JSON -> Object manually, right? I could not use **json.loads(json_data)
 
your class expects a fixed "number" of arguments?
im now trying to wrap my mind around how you're trying to use the names of things
if you receive a json as input, what happens next? why are the names an issue again?
 
^ Not helped by the fact that the "bug" pointed out implies that there's no fixed format of the incoming data
@pakkk In Flask you will likely have a request object, so you just use request.json and pass that to your class to now have a dictionary. When you want to send it back out, it would be jsonify(Something.data)
 
@ParitoshSingh nope, depending on developer, may change the number of arguments
 
This is all assuming a flat dictionary. I mean, we haven't yet considered that JSON doesn't just have to be that and could be heavily nested with lists and dictionaries
 
11:57 AM
I have a dataframe column with a list of words in each row....as you can see in the picture... I want to make a wordcloud picture...so i need all the words in all the tweets in a single string
 
@EduardoGutierrez I tried copy-pasting but there's some issue. It didn't turn into python code.
perhaps the characters are too blurry
 
For example if i have one tweet [hola,manolo,adios] and another [adios, pedro] -> the string i need: hola manolo adios adios pedro
 
please do not post images of code/inputs. that helps no one.
 
textFromList=""
def generatext(review):
for word in review:
print(word)
textFromList = " ".join(word)


ds = pd.Series(df['Tweet_stopped'].values)



ds =ds.apply(generatext)

print ("There are {} words in the combination of all review.".format(len(textFromList)))
 
11:59 AM
@EduardoGutierrez You can edit for 2 minutes. Remove excess empty lines, code-format with ctrl+k.
 
@pakkk so depending on the developer, you could be faced with any set of symbols?
 
@MisterMiyagi nope, the only limitation is about the W3C for JSON keys
 
Sorry i didnt know..some times i prefer to watch...
 
i still don't really get what you're trying to do with the class here. if possible, assuming no one is sending a hyphen inside a json for your class, can you create an MCVE showing what you're trying to do?
 
text = " ".join(review for review in df['tweetText'])
i need something like that but it only gets the first row....with all the series df['Tweet_stopped] ...thanks
 
12:07 PM
@pakkk so how do you want to deal with spaces, quotes, escapes and all that stuff?
there are tons of valid JSON key characters that are not valid Python identifier characters
 
and 💩
oh, that's probably not valid
 
according to json.org, yes it is
'Any codepoint except " or \ or control characters'
 
nice
 
I guess in principle one could use a custom encoding scheme
treat attributes as byte strings and embed utf-8...
 
the obvious solution is to use swift instead
 
12:14 PM
@MisterMiyagi I am not sure. When I develop the Java implementation I used annotations like that chat.stackoverflow.com/transcript/message/46798212#46798212
but I don't know in Python :(
 
@pakkk I've seen that, but it doesn't really make any sense as a requirement
 
:(
 
do you expect people to type foo.my-value, foo.my__value or foo.my_x2dvalue?
 
@EduardoGutierrez see below
import pandas as pd

df = pd.DataFrame({'a': [['hola','manolo','adios'], ['adios', 'pedro']],
                   'b': [[1, 2, 3], [4, 5, 6]]})

lst = df['a'].values.tolist()
out = ' '.join([item for sublist in lst for item in sublist])
 
Cabbage
 
12:18 PM
In future, please also provide the code that constructs an example dataframe in addition to the code you're using to manipulate it. Based on what I can see in the screenshot, my example should be representative, at least in terms of 'a'
cbg
 
in the JSON: foo.my-value or foo.my-x2dvalue
in Python: foo.my__value or foo.my_x2dvalue
 
and you want these created automatically from arbitrary JSON?
what advantage do you see in typing foo.my_x2dvalue over foo["my-value"]?
 
@pakk I agree with the others who are saying that converting JSON to a class structure is not a great idea. Apart from the problem of illegal chars in identifiers, the class structure can get really messy if you have deeply nested JSON.
 
I have a hard time conceptualising what the flask app actually does with the input. I can't see what useful things you might do with JSON that can have any valid key other than simple things like "multiply all values in this dict by 2" or something similarly indiscriminate
If the idea is that there will be at least some expected keys, and then an arbitrary number of other keys, then the whole business of a class is needless complexity - just keep everything else as dictionary keys
 
I'm only skimming the discussion right now, but want to chime in as well: Just use dicts
 
12:23 PM
@pakkk Generally, dynamically creating variable or attribute names is a bad idea. See Ned Batchelder's Keep data out of your variable names.
 
oh, and also for people who write python and are used to Java: stop writing classes
 
but if I have a huge depth, dictionary could be unreadable, right?
In the JSON, I said
 
class won't be more readable, will it?
 
Well if the dictionary is unreadable, how do you propose unpacking its contents?
 
it just doesn't add anything useful
 
@roganjosh doesnt work... i
lst = df['Tweet_stopped'].values.tolist()
out = ' '.join([item for sublist in lst for item in sublist])
print ("There are {} words in the combination of all review.".format(len(out)))
 
I'm so confused about this whole thing. I think I've said all I can on the subject
@EduardoGutierrez What exactly does "doesn't work" mean here?
 
Outut gives: There are 170580592 words in the combination of all review.
 
so your recommendation is to avoid classes and give developer the dictionary
right?
 
@EduardoGutierrez Because you're calling len() on a string, so it's counting the characters
 
12:28 PM
If im talking about 25000 tweets is about 7000 words for each tweet... and tweets are cleaned
 
Surely len(out) is the number of characters in the output, not the number of words...?
 
That would be the default case for me when dealing with json. I'd want a good reason to do anything different
 
@EduardoGutierrez You need:
 
It's not that I'm avoiding classes, I'm not considering them unless I need to. Slightly different perspective
 
lst = df['a'].values.tolist()
words = [item for sublist in lst for item in sublist]
out = ' '.join(words)
print ("There are {} words in the combination of all review.".format(len(words)))
 
12:30 PM
@pakkk the way you describe the use cases, you don't have classes. You have dictionaries that you want accessed with attribute syntax instead of key syntax.
 
I'd like to define the framework for dummies. Give classes and nothing more. My framework will do the communication by Flask but developers do not care about that. They will only send/receive objects (classes), I will do everything for them
 
@pakkk If you have a complicated nested JSON which you load into a Python structure of dicts & lists, then you can easily traverse that data with recursive functions or generators. Traversing a complex dynamically created class structure would be a little harder: you'd essentially be doing the same thing with your classes __dict__, adding an extra layer that would make the code harder to read, and probably slower.
 
@pakkk now I am even more confused. Do you have classes that you want represented as JSON, or do you have JSON that you want represented as classes?
 
@MisterMiyagi both
I am in the middle of the communication
 
@roganjosh : sorry but doesn work....19 milions of words in 25000 tweets....
 
12:35 PM
I need to convert JSON to Object (when a request is coming), and I need to convert Object to JSON (with the response of the request)
 
@pakkk you know what's better for dummies? no classes. :P
 
@pakkk the question is which of these is authoritative. Does the request/JSON define what data you have, or the objects you define?
 
text = " ".join(review for review in df['tweetText'])

print ("There are {} words in the combination of all review.".format(len(text)))
gives There are 4077075 words in the combination of all review.
 
@EduardoGutierrez right, so the onus is on you to provide a representative DF example for me, because I can't do anything more from what you've provided
 
12:37 PM
This is as you can watch in a column with all the words are in a string...now i have added columns to clean the words, i have deleted stopwords and tokenizer the string for further analysis
 
@pakkk FWIW, you may find my code here useful. It shows how to write recursive generators to traverse nested dicts & lists, presumably from JSON. Also see the code linked at the end of that answer.
 
@EduardoGutierrez Please see How to make good reproducible pandas examples. I'm not able to help until you provide one
 
@PM2Ring thank you ;)
 
Devil's advocate: if a developer needs to construct json that adheres to a complicated but well-defined structure, then it might make sense to provide classes corresponding to each layer of data so that you can validate the structure of the data as the developer creates it.
 
@pakkk No worries.
 
12:42 PM
Is there any good way to use Numpy arrays as a dictionary instead of using the default dictionary?
 
If the data represents a classroom of students that each belong to a family and each family owns zero or more vehicles, then maybe you benefit from writing Classroom, Student, Family, and Vehicle classes. Then there's no chance that the developer will send you data where little Bobby is the child of a Toyota Camry.
 
@Kevin sounds like a validator, disguised as a class
 
dang you, Bobby tables.
 
Not panda but Numpy*****
 
@AlperAyna What is your motivation?
 
12:44 PM
@roganjosh Try to make it faster, I guess it will be faster if I can do it
 
rererecabbage
 
Then no, definitely not
 
It is not?
 
@Arne Certainly validation is the main goal of this hypothetical design. But perhaps there are other benefits that you wouldn't get out of a non-class-based validator.
 
anyone knows what happened to the New Mexico Tech tkinter online resource? infohost.nmt.edu/tcc/help/pubs/tkinter - the site is down for a few weeks niow.
 
12:45 PM
@Kevin as in JSON schemas?
 
@Kevin Fair point. But it sounds like pakkk's code is a general translator, designed to convert arbitrary JSON to a class, and also perform the reverse conversion. But I guess the caller of his code may call it with a class that specifies the structure they expect. OTOH, you could just as easily specify that structure using JSON itself. ;)
 
@AlperAyna dicts have O(1) lookups.
 
Like... Custom pretty printing, or support for multiple serialization formats. I dunno.
 
@AlperAyna That's not the purpose of numpy. Numpy deals with vectorization on lists, which are traditionally slow. Dictionary lookups are pretty-well optimised in CPython already
 
@PM2Ring Yeah, I don't think pakkk's desire for a general translator fits my use case. If you're not writing each class manually, then you don't have a lot of control over validation.
 
12:47 PM
My bad than thank you! Btw I am using python 2 if this would change anything
 
"Just turn the data into an object-looking thing, no matter what its shape is" has zero validation.
 
It wouldn't, other than me now saying "You really should consider moving to Python 3 because Python 2 is at the end of its supported life pretty soon" :)
 
I know but I am working with an OLD automotive company, these old farts wont change in anyway near future (sorry for slang)
 
You can assist in that kind of change if you're willing to do the thankless work. :P But eh, it doesn't always pan out
 
@ReblochonMasque No. But I do remember having problems accessing it a few weeks ago. I did eventually find something, but I'm not sure where, maybe the Wayback Machine...
 
12:50 PM
There are thousand of scripts in thousand of lines in each, it is impossible :)
 
However a good start is making the existing code easier to transition over to python 3 by writing code that is compatible. use lots of future imports and stuff at the bare minimum perhaps.
nice! "legacy" code. :P sounds fun
 
@AlperAyna fair enough, I can't do much about your environment unfortunately. But just to check; your question implies a general thought of "numpy is faster"; you're not using numpy arrays as drop-in replacements for lists, are you? Like appending to arrays etc.?
 
Yes, the wayback mc has it - Martineau posted a link a while ago as I remember @PM2Ring
 
@AlperAyna Oh. Is this code only used internally, or does it do stuff on the internet?
 
@roganjosh I am not, I just try to make faster anything that I update. Try to improve every code I touch whenever I can. Never used numpy before, trying to use & test it if i can use.
 
12:53 PM
in that case, just a heads up. the realm of numpy is one where "iteration" is a bad idea. It's a different style of programming
 
when done wrong, you'd just think that numpy is always slower.
 
@PM2Ring All of them internal code, worse thing is most of the author of these codes are not programmers originally so codes are terrible. Because of defensive issues and company issues, these are not available for all, never.
 
Oh dear... The New Mexico Tech site is the only one that could explain the Entry widget's text validation codes in a way that I could understand. I hope the page gets restored.
 
please don't try to improve performance with means you do not understand
it is generally better to keep the code as high-level as performance permits
that would, for example, fix most Py2/Py3 issues I have come across :/
 
12:55 PM
FWIW, in Python 3, dict uses RAM more efficiently, and I think it's also a bit faster.
 
So it's important to write code that is suited for numpy before doing any speed comparisons. And that means it's important to understand what exactly code "suited for numpy" would look like*
 
And by "explain in a way that I could understand" I mean "attempted to explain at all". The Tkinter handbook, for instance, doesn't even mention that they exist
Possibly I could reverse-engineer their meaning from the Tcl docs but translating Tcl to Tkinter has historically had a 25% success rate for me
 
@AlperAyna Ok. At least you don't have to worry about security issues when Python 2 updates finish in a few months.
 
@ParitoshSingh I try to recheck everything I do if I do it wrong or not. I am aware of this, thanks for warning though.
 
that's good
 
12:58 PM
anyway "dict" sounds like pandas, not numpy
 
@MisterMiyagi I have done this mistake before :P Now I just try to improve slightly, do not rush on everything, mostly terrible codes though :)
@MisterMiyagi I dont think there would be any conversation into py3 any future, still I try to keep up the code in PY3 as much as possible
 
@Kevin & @ReblochonMasque It looks like the NMT Python & Tkinter stuff is on Github: github.com/NMTCC Hopefully, they're just reorganizing their site...
 
At least I found this chat, you people are kind and helpful!
 
My previous message may be a little premature. I can't see Python or Tkinter stuff on that Github page. Sorry.
 
Did anyone use snakeviz? It seems useful for making a graph for running times of functions partially stackoverflow.com/a/56591404/1944314
 
1:07 PM
Mildly annoyed that it's even possible in the first place for documentation to vanish because a third party site went down. Every other module gets to live in docs.python.org but tkinter is left out in the cold to fend for itself
 
Are you sure these are the repos for the NMT tkinter docs @PM2Ring?
 
4 mins ago, by PM 2Ring
My previous message may be a little premature. I can't see Python or Tkinter stuff on that Github page. Sorry.
 
ah, ok, I also could not find anything @PM2Ring
 
@EduardoGutierrez ... that's half a GB of data
 
1:11 PM
@roganjosh as said before it worked in a column of text before cleaning... this was iterating all the column...text = " ".join(review for review in df['tweetText'])

print ("There are {} words in the combination of all review.".format(len(text)))
gives There are 4077075 words in the combination of all review.
 
I've been browsing nmt.edu/itc Maybe the Tkinter stuff is hiding somewhere...
 
But in the column df[Tweet_stopped] which is the cleaner, i can get it to work....
@roganjosh if i pastebin is a mess
 
The data doesn't necessarily need to be on pastebin. But it does need to be smaller than half a GB. Try to create a representative sample that's smaller than 1 kb.
There are very few problems that require a million rows to demonstrate. Typically the same problem happens with a hundred rows too.
 
Jun 21 at 10:47, by PM 2Ring
@RaphX Seriously, you should not be testing your code on the full 12GB data file! You should create a small file of a few kilobytes (at most) that contains sample data that can be used to test every feature of your code.
 
1:17 PM
I have to go out for an hour or so so I won't be able to do anything on my phone now even if you do post an MCVE, but there's multiple people that might be able to help. In any case, please re-consider the link I posted and the comments above
 
@roganjosh i hope i can delete the columns with all the steps....and leave only df['Tweet_stopped]
 
I will have a look when I get back if nobody else has answered in the meantime
 
@DeveshKumarSingh it just looped through keys to see if they were there. it was an if nested inside the for. if one wasn't present it returned 0, if all were there it started manipulating.
 
@roganjosh no worry i also have to go to have launch now... the code is easy for df[tweetText] which only have raw text... it gets complicated when using a list of words....thanks for your effort
sure it has to be easy... but im stuck....thanks for your help
@Kevin i have uploaded a 500 kb sample...of 500 tweets.....should be enough i think...
 
I sent an e-mail to NMT @PM2Ring
 
1:21 PM
@ReblochonMasque Thanks!
 
If i do in django someobject.objets.filter(id__in=arr) is it ordered default by primary key ? :)
 
@EduardoGutierrez I guess that's small enough. How do I get the csv data into a dataframe? I tried df = pandas.DataFrame.from_csv("twitter_cleanedsample.csv") but then your code crashes with KeyError: 'a'
 
@Dodge thanks :)
 
Yup, take a look at that because I just skimmed, but I think your default ordering can be specified when you build a model or when you query the DB
 
1:32 PM
Never mind, I think from_csv works fine, I just pasted in the wrong code after that.
I do still want to see the code you're using to make the csv into a dataframe, just in case it works differently than from_csv, but I can poke around a little until then
 
stackoverflow.com/q/57094936 same user asking same question 1 hour later, wrong tags messed up my hammer
 
ha, maybe they were on to you and deliberately circumvented your hammer!
 
This room is like having a full collection of hammers hanging on the wall #TeamSport
 
@EduardoGutierrez, try pastebin.com/Bw6z8hmT. Short explanation: it's hard to count the number of words in your data because your data does not technically contain a list of words in any of its columns. Some columns look like a list of words, but they're still individual strings.
Possibly there is an option in pandas to automatically convert list-looking columns into actual lists. On the other hand, maybe there isn't, because I don't think I've ever seen a dataframe that contains nonscalar data.
 
1:52 PM
To my knowledge, there isn't
 
This may be a hint that dataframes are not the right tool for the job. I wonder if Python's built in csv module can handle list-looking columns?
 
you can have a trailing catch-all column at least
 
cbg to all
 
cbg
 
2:15 PM
morning cbg all
 
3:08 PM
channel is quiet today
 
3:19 PM
Cbg! I have an issue, when I map to column in my df I lose all the values that are not contained in the dictionary of the mapping. Not sure how to go about this
 
Guys do you think that "disk" and "drive" can be used interchangeably?
(in terms of computer parts)
 
in general, no. not all drives are disks.
 
cf. floppy DVD drive
wow, I got an upvote spree for a change
 
@reydonsancho df_surtidos['FORMATO_DESCRIPCION'].replace(valores_formatos, inplace=True)
 
Thanks @roganjosh! If map does not find a match does it delete the line in the new dataframe?
 
3:28 PM
Oops, df_surtidos['MARCA_DESCRIPCION'] but same approach
 
yes! heh
 
@reydonsancho You can test that yourself :)
 
It doesnt :)
 
@AndrasDeak generally i agree with you. however, i believe we are coming to a time when dvd drives are going to be obsolete. same with blurays.
my gaming pc doesn't have a dvd drive in it at all anymore
 
SSD's are not disks either
 
3:37 PM
^ this is true
 
yup
 
stackoverflow.com/questions/57098036/syntaxerror-for-termcolor typo/no MCVE (OP managed to create a new syntax error in copying over code that has a syntax error)
 
just for reference, if someone tells me about "disk" I assume it to mean "HDD". Not "SSD" nor "Tape". For the later one would mean separate things with "Tape" or "Tape drive".
 
Actual disks are becoming so much out of the norm that when I want to talk about them in the office, I have to call them "spinny disks"
 
that seems like an XY problem, calling disks spinny disks
 
3:41 PM
when i hear disk, i just think hard disk storage, but i dont exclude SSD there.
 
same, even though I'm aware of the abbreviations and the underlying physics (except "hard disk" is HDD for me)
 
@biggi_ DVD/bluray are possible replacements for magnetic Tape for archiving
 
@MisterMiyagi yeah, no
or are tapes that volatile as well?
 
vendors are dying out :/
 
I thought the point of tapes was long-term stability
 
3:43 PM
its not for a lack of users
 
then again so are HDDs as long as you don't kick them
 
hibernating HDDs actually do quite well for archival
 
@MisterMiyagi I'd trust raid over physical blurays
 
raid is very very different from shipping a literal truckload of tapes into a warehouse
 
i realize that
 
3:44 PM
I thought we were talking about "bank or google wants to back up ten years of everything safely"
 
that'd be a TON of blurays
 
Like a literal truckload?
 
it's also a ton of tapes. There's a reason we have tape libraries.
 
yeah, especially since tapes are much larger, and probably even less dense
but I haven't really seen a modern tape up close
 
Trivia bit - the "tar" command was originally for Tape ARchive
 
3:47 PM
I think I knew that once...
 
i have a buddy that works at google
may have to ask him....i'm curious now
 
Tapes are actually super stable and a great long-term storage medium
 
not if someone mutters the words "insect protein"...
 
About the only problem with tapes is their really low seek times. That, and the potential for bursting into flames
 
@biggi_ google is kind of a crazy extreme, I wouldn't be surprised if they had to have weird solutions
 
3:49 PM
I know, but I'm gernally curious now haha
I'd be worried with moisture and what not I think more with a DVD/Bluray over a tape.
 
The only long term storage I trust is cave paintings
Laser engraving microscopic etchings on a huge ruby is a "maybe"
 
Interesting fact: bubble sort is ideal for a tape drive stackoverflow.com/a/3274203/344286 (or, when you can't hold a significant subset in memory, anyway)
 
So he said he believes they still use tape storage * correction: tape drives for super sensitive info, server hard disk backup for normal.
 
@WayneWerner that reminds me of the "consider the rocking of the machine during seeking" stories...
@PM2Ring had a few of those I think
 
3:56 PM
@Kevin @roganjosh Im back again....Kevin id take a look to your answer but is strange because it should be a list of strings....here is a explanation how im cleaning the tweets....note in pass 0 i caculate in a easy way the number of words....
 
Man... I can't find it, maybe it's just M-Disc now, but I swear there was a service that you would just upload all of your media and they'd send you some kind of stone-based optical disc for long-term storage
 
Sorry forgot the file: pastebin.com/Cz5jE4H2
 
Jul 25 '16 at 14:07, by PM 2Ring
But allegedly one guy decided to have a bit of fun with this and wrote code to time disk accesses in such a way as to maximize the rocking and to move the drive unit in a particular direction. He left his code running overnight, and when the operators arrived in the morning they couldn't get into the computer room because the drive was jammed up against the door.
 
Yes, those! :D Thanks.
 
o.O
@PM2Ring I guess that's a certain variant of the noisy neighbor problem...
 
3:59 PM
I never saw it happen myself, but the disk drive on the IBM 360 mainframe I learned on certainly shook a fair bit under normal use.
 
00:00 - 16:0016:00 - 00:00

« first day (3197 days earlier)      last day (1742 days later) »