How to create a list or tuple of empty lists in Python?

result = [list(someListOfElements) for _ in xrange(x)] This will make x distinct lists, each with a copy of someListOfElements list (each item in that list is by reference, but the list its in is a copy). If it makes more sense, consider using copy.deepcopy(someListOfElements) Generators and list comprehensions and things are considered quite pythonic.

Why don’t purely functional languages use reference counting?

Relative to other managed languages like Java and C#, purely functional languages allocate like crazy. They also allocate objects of different sizes. The fastest known allocation strategy is to allocate from contiguous free space (sometimes called a “nursery”) and to reserve a hardware register to point to the next available free space. Allocation from the … Read more

How to deal with executor memory and driver memory in Spark?

The memory you need to assign to the driver depends on the job. If the job is based purely on transformations and terminates on some distributed output action like rdd.saveAsTextFile, rdd.saveToCassandra, … then the memory needs of the driver will be very low. Few 100’s of MB will do. The driver is also responsible of … Read more

How to give more memory to IntelliJ Idea 9-11

On Mac, $IDEA_HOME/Contents/Info.plist ~: grep –context=5 Xmx /Applications/Maia-IU-94.426.app/Contents/Info.plist <string>true</string> <key>apple.awt.fullscreencapturealldisplays</key> <string>false</string> </dict> <key>VMOptions</key> <string>-Xms128m -Xmx912m -Dfile.encoding=UTF-8 -XX:MaxPermSize=250m -ea -agentlib:yjpagent=disablej2ee,disablecounts,disablealloc,sessionname=IntelliJIdea90 -Xbootclasspath/a:../lib/boot.jar</string> <key>WorkingDirectory</key> <string>$APP_PACKAGE/bin</string> </dict> </dict> </plist> On Windows/Linux, %IDEA_HOME%\bin\idea.vmoptions

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)