Skip to main content
0 votes
1 answer
50 views

// Enable all bucketing optimizations spark.conf.set("spark.sql.requireAllClusterKeysForDistribution", "false") spark.conf.set("spark.sql.sources.bucketing.enabled&...
user2417458's user avatar
-2 votes
1 answer
190 views

I am writing a shuffling program to shuffle the words in an array, not the letters. For this purpose, I have created the code below: void shuffle(char *str) { srand(time(NULL)); int i = 0; ...
Mehmet emi Sevim's user avatar
2 votes
2 answers
105 views

The following seems to work: import pandas as pd import sklearn df = sklearn.datasets.load_iris() df = pd.DataFrame(df.data, columns=df.feature_names) df.shuffle() However this shuffle function seems ...
robertspierre's user avatar
0 votes
0 answers
130 views

I'm writing some AVX2 code that is very permutation-heavy. The main permutation instructions used are unpacks, VPSHUFB, some uses of VPERM2I128 and a few of VPBLENDW. After puzzling over the ...
swineone's user avatar
  • 3,010
2 votes
1 answer
86 views

I have the following Dataframe, which contains, among others, UserID and rank_group as attribute: UserID Col2 Col3 rank_group 0 1 2 3 1 1 1 5 6 1 ... 20 1 8 ...
Carlo Allocca's user avatar
0 votes
3 answers
171 views

I have an array with values and probabilities (or in PHP, keys and values): Value Probability John 3 Peter 2 Paul 1 I want to shuffle this array but have the order be influenced by the ...
Ben's user avatar
  • 819
0 votes
0 answers
44 views

As you can see in the example I have 6 elements "other-news" (colored Fuchsia) on the right side of the grid stacked in 3x2 format. I want to be able to bring them to the left side and keep ...
Bart Zakkenwasser's user avatar
3 votes
2 answers
104 views

I want to shuffle an array of Objects in a card game simulation. I scrolled through many posts on here and almost all of them mention transforming the array into a list, then shuffling it using an ...
Only_Maxi's user avatar
1 vote
1 answer
80 views

I have the following markup: <div class=""> <div class="tiled-gallery__gallery"> <div class="tiled-gallery__row columns-1"> <div class=&...
lharby's user avatar
  • 3,337
1 vote
1 answer
547 views

This question is inspired by the discussion in this link: When is shfl.sync.idx fast?, where it was debated whether __shfl_sync() and other warp-level shuffle instructions operate directly on the ...
xwt1's user avatar
  • 25
2 votes
1 answer
92 views

Let's assume there is a group of 3 persons, for which I have a time series of when they start and finish an activity. An example dataframe would be: library(tidyverse) GrXX <- tibble(Individual = ...
KrisAnathema's user avatar
0 votes
1 answer
69 views

Let's say I have a 3D numpy matrix M with shape (c, b, a). I want to shuffle a specific cell (x, y) in M along the z-axis --- that is, I want to shuffle the array [M[z][y][x] for z in range(c)] and ...
StarDust's user avatar
  • 143
-4 votes
1 answer
68 views

Trying to do a random.shuffle which works well if the list is declared. In example 2, I'm trying to do this from a file that has 1000 entries with the first two lines shown. Is the txt file formatted ...
sinyce's user avatar
  • 23
0 votes
1 answer
79 views

Using the default arguments, what is the time complexity of sample? I.e. how does the running time of sample(1:N) grow with N? Documentation for sample is here but does not specify time complexity.
Mohan's user avatar
  • 9,243
0 votes
3 answers
139 views

I'm attempting a silly little "random" number generator to try to get to grips with how lists and pulling values from them works in python. I have a variable defined as x, and I ask the code ...
Joseph Lawson's user avatar

15 30 50 per page
1
2 3 4 5
155