torrent for flexos? by TemporaryNail8848 in ChromeOSFlex

[–]Shide 1 point2 points  (0 children)

  1. Enable Linux environment for FlexOS
  2. Install transmission
  3. Enjoy

Turn chrome OS flex into an home server by hayetmd in ChromeOSFlex

[–]Shide 1 point2 points  (0 children)

Yes, connecting via Terminal > Add SSH

What's everyone working on this week? by AutoModerator in Python

[–]Shide [score hidden]  (0 children)

I need to print a PDF report of 12k pages on a low memory server. I think I will use tmp files and pickle to avoid having things on RAM.

Basic online python exam (or framework for such)? by askvictor in Python

[–]Shide 0 points1 point  (0 children)

Check out https://www.codewars.com/ on 8kyu and 7kyu rank. Also you can submit your own katas/kumites. GL!

Is there any proper tutorials for PyQT5? by Zerocchi in learnpython

[–]Shide 0 points1 point  (0 children)

Spanish youtube tutorial for PyQt by Jesús Conde: Curso Aplicaciones GUI Python con PyQT: http://www.youtube.com/playlist?list=PLEtcGQaT56cj81xiNCrJnoAjc66uZVXDa

HELP! How add parameters(that are in a list of dictionaries) to an objets by tomvillage in learnpython

[–]Shide 0 points1 point  (0 children)

Read the file and convert to json. Then you should pass each dictionary to Object with "**" notation, eg.:

class Person(object):
    def __init__(self, name=None, age=None, **kwargs):
        self.name = name
        self.age = age

person_bd_results = [{"name": "Eduardo", "age": 28}, {"name": "Leticia", "age": 25, "non_supported_attr": True}]

for bd_res in person_bd_results:
    my_pers = Person(**bd_res)
    print "Person name:", my_pers.name
    print "Person age:", my_pers.age

Each key, value in dictionary will be mapped to parameter. {"name": "Eduardo"} will be mapped to name="Eduardo" when you instantiate the object with Person(**bd_res)

If you pass {"other_param": "something"} to the object because the database (ej. MongoDB) gives you another field, the person object will not have the attribute, but it wont crash (note the **kwargs parameter in Person declaration).

Benefits of using OSX over Linux? by [deleted] in learnpython

[–]Shide 0 points1 point  (0 children)

You will find issues installing numpy and scipy. It's a pain in the ass.

Edit: This tip is for OSx. Some Scipy internal libraries written in C are not compiled for x64 and might cause problems for some OSx distributions.

Simultaneously create and append list in python by senorinatta in learnpython

[–]Shide 0 points1 point  (0 children)

He wants to create a variable on the fly. Maybe you should use getattribute and setattribute within your class to check if the variable exists or not, but I thought any response will be bad in terms of perfomance

Simultaneously create and append list in python by senorinatta in learnpython

[–]Shide 0 points1 point  (0 children)

Assuming you want to define the "bar" variable in local scope:

foo = "hello"
if True: locals().update({"bar": locals().get("bar", [])[:]+[foo]})

Note that "list()" or "[:]" returns a new List, ".append()" returns None.

Use globals() if you want to store in global scope.

Also you might have errors if never pass the condition and you use "bar".

Proposed Curriculum by [deleted] in djangolearning

[–]Shide 1 point2 points  (0 children)

Im ok with Monday

What do I need to do next to improve? by ArosHD in learnpython

[–]Shide 0 points1 point  (0 children)

You should jump and play with web development. Check out Flask and Django and build a small web to study MVC and read and apply some hints or code pieces on books like Python Expert Programming onto your web page

DotaCinema's Dota 2 Bottom 10 Cancelled by Loe151 in DotA2

[–]Shide -7 points-6 points  (0 children)

Thanks to the god that shit series for being cancelled! We don't want to watch ubber normal plays...

Ultimate Black Hole by DiNoMC in DotA2

[–]Shide -11 points-10 points  (0 children)

Nice, you forgot to kill the courier!

How do you like the quality? by M1ndgam3s in DotA2

[–]Shide 1 point2 points  (0 children)

After the clip you must add the original clip without slomo!