How to dynamically compose and access class attributes in Python?
How to access object attribute given string corresponding to name of that attribute
Randomly populating procedural shape (or Image Texture) in Cycles TL;DR  How to take a shape or Image Texture and multiply it with random Location, Rotation and Scale along object:    Background  I have created my first procedural shape on my own from this function: $(x^2 + y^2 - 1)^3 - x^2y^3 = 0$   (big yay for math idiot)   Here is the result:    And I want to do something useful with it.  Research  I've tried to find something similar over the web (this is trending right now) and I'm surprised that this question wasn't asked before or I'm looking with wrong terms. I've tried random pattern, duplicating texture, populating image, random tiles, custom tiles and such. There is a lot about tiling textures but each and every Q&amp;A I've stumbled upon are about non overlapping ones. For example:            Tryout:  The only way I can think of this is to duplicate shape as a group and manually change values in Mapping Nodes:    As you can see this is... Well. Bad.  I've tried messing with Modulo, mixing Noise between vectors, using custom node groups for LocRotScale (thanks Gandalf) but results was none, thus nothing even to show.  Question  I want to populate this shape (or any other) along the object with random Location, Rotation and Scale - with control over its number/density and maybe variation strength.  Edit: I'm not looking for alternative methods of creating this setup such as Particles, Image Textures generated in 3rd party software, OSL shaders (CPU only) and such. My intention is to use this in procedural texture generation in Cycles with GPU support.  Blend file  Nothing really needed for this question but here - have this heart from me :) How can I efficiently drive an LED? I understand that I can not connect an LED directly to a battery because it will draw too much current. Thus, there must be something else in the circuit to limit the current. What options are there? Are some methods more efficient than others? Showing range on hexagonal grid Here is the situation.  I have hexagonal board,and a unit on it,with speed or move value 4.Diffrent terrain has a diffrent cost.When i click on the unit,game should show me a move range.  My solution was to check each  hex in range of 4,with A* pathfinding,and if path cost was less than 4 then this hex was in range.Finally game nicely show me range of that unit.  My question is:   Is there other solution to search for range on hex grids or square grid,because even if i am really proud of what i did in my solution,i think,it is a little to exaggerated?:))  What make me ask this question?I noticed that when unit speed is 4 or 6 or even 8,time to computing range for my computer was really good,but when speed was 10 and more i noticed that i needed to wait few second to compute.Well in real games i rather dont see something like this and my A* pathfinding is rather well optimized,so im thinking that my solution is wrong.  Thanks for any replies. What is the difference between  and != Comma before "and" in compound sentences? Error in batch file to copy folder: 'Invalid number of parameters' I am making a batch file in Windows XP to copy my folders I need to another folder on my PC. I am getting an error.  I get the error "Invalid number of parameters".  xcopy /s/z D:\Documents and Settings\%username%\Desktop C:\SomeRandomFolder\ xcopy /s/z D:\Documents and Settings\%username%\Favorites C:\SomeRandomFolder\ xcopy /s/z D:\Documents and Settings\%username%\Start Menu C:\SomeRandomFolder\ xcopy /s/z D:\Documents and Settings\%username%\My Documents C:\SomeRandomFolder\ xcopy /s/z D:\Documents and Settings\%username%\PrintHood C:\SomeRandomFolder\ xcopy /s/z D:\Documents and Settings\%username%\NetHood C:\SomeRandomFolder\ xcopy /s/z D:\Documents and Settings\%username%\Templates C:\SomeRandomFolder\ xcopy /s/z D:\Documents and Settings\%username%\Searches C:\SomeRandomFolder\ xcopy /s/z D:\Documents and Settings\%username%\Local Settings\Application Data\Microsoft\Outlook C:\SomeRandomFolder\ pause   Then I changed the batch and get this error: "File not found - Desktop"   xcopy /s/z D:\...\%username%\Desktop C:\SomeRandomFolder\ pause   How do I fix these errors? Wireless connection fails every few minutes How to correctly setup Ubuntu 18.04 LTS installed from mini.iso to use NetworkManager? Is there any way to automatically unwrap UV map proportionally to object or "world" size?  For example:  I've made two cubes, one is two times bigger than other (scale is applied). Then I unwrapped texture with Smart UV project which will try to span all faces on whole texture space(0 to 1) so bricks on left cube will be bigger than bricks on right cube.   But what I want to achieve is this:     In broader context:  When I import model from Archicad (in form of OBJ) all objects have UV's in some scale (so all bricks have the same size on every imported object). And when I want to create custom object in scene I have to manually scale UV's to adjust bricks size for every new object (instead of scaling to one constant parameter). Why do we not use the definite article in "Where can I find the room 401?" Last week in college, a student [with a thick South Asian accent] asked me:     "Excuse me, where can I find the room 401?".   I realized that to my native English ears, the word "the" sounded non-native. This had me realize that we sometimes use no article.  I am learning French; in French, we seem to always use some kind of article before nouns. It surprised me, at that moment, to realize that English doesn't always do the same! (That, and using the definite article in "the room 401" seems to make sense if I think about when definite articles are used).  Is there a grammatical name or concept for this "no article" aspect of our language? Are there any websites that can explain this to me? How can I kill minerd malware on an AWS EC2 instance? (compromised server) I found malware on my ec2 instance which was continuously mining bitcoin and using my instance processing power. I successfully identified the process, but was unable to remove and kill it.  I ran this command  watch "ps aux | sort -nrk 3,3 | head -n 5"  It shows the top five process running on my instance, from which I found there is a process name 'bashd' which was consuming 30% of cpu.  The process is   bashd -a cryptonight -o stratum+tcp://get.bi-chi.com:3333 -u 47EAoaBc5TWDZKVaAYvQ7Y4ZfoJMFathAR882gabJ43wHEfxEp81vfJ3J3j6FQGJxJNQTAwvmJYS2Ei8dbkKcwfPFst8FhG -p x   I killed this process by using the kill -9 process_id command. After 5 seconds, the process started again. Recovering *permanently* deleted emails from Gmail person in distress here.  Dont ask me how, but I ended up deleting all my 12,000 inbox emails from Gmail into Trash and then erased my Trash as well. Gmail gave me a warning box and took 20 seconds to delete. This was not what I intended. I have searched high and low to check if there is any way of recovering my 10 years worth of emails and could not find any.  Any one here know of a way, ANY WAY, to recover my accidental permanent deletion of all my 10 years worth of email (deleted from Trash as well)? Details on the Origin of Sting Finding local maximum and minimum I want to see all my Questions and Answers in a particular SE site -  - profile page through Stack Exchange Android App. How can I see that? When I tried to see that I found only Top Posts(5) and Top Tags. Checking to see if a DateTime variable has had a value assigned How do I repeat a theorem number? Often in my papers I want to mention theorems in the introduction that are introduced in more detail and proved in a later section.  I'd like to include the statement of these theorems twice over, each time numbered as the theorem would naturally appear in its later section.  My current solution (using amsthm) is, e.g.  %(in the introduction) \newtheorem*{thm:associativity}{Theorem \ref{thm:associativity}} \begin{thm:associativity} Lorem ipsum ... \end{thm:associativity}  %(in a later section) \begin{thm} \label{thm:associativity} Lorem ipsum ... \end{thm}      Can anyone think of a cleaner solution? Why does my regular expression work in X but not in Y? I wrote a regular expression which works well in a certain program (grep, sed, awk, perl, python, ruby, ksh, bash, zsh, find, emacs, vi, vim, gedit, …). But when I use it in a different program (or on a different unix variant), it stops matching. Why? I have a file with values organized in columns, and separated by commas, as in the file below:   324,01,1,113333600000,1,, 016,01,1,134954200000,1,, 770,01,1,109069200000,1,, 853,01,1,111518800000,1,,   When I use the following awk command, the delimiter is being changed from commas to spaces   Code:  awk -F, '{$4=$4/1024}{print $0}'   The output becomes:   324 01 1 110677343.75 1   016 01 1 131791210.93 1   770 01 1 106512890.62 1   853 01 1 108905078.12 1    How can I change the value of the field without changing the delimiter? How to model the bottle threads? The picture show the threads I want to create on the highlighted object. Problem is I don't know how and tutorials really haven't helped much as most of them seem to be about creating a bolt. So I was hoping I could get some help on how to do this efficiently.While keeping the top flat like a water bottle. The picture shows the threads I'm after.