Skip to main content
2 votes
2 answers
101 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
118 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,000
2 votes
1 answer
84 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
170 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
  • 821
0 votes
0 answers
38 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
102 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,335
0 votes
0 answers
36 views

Given Spark jobs are running on Kubernetes cluster executor pod has 4 cores there is java process with the params (-Xms3072m, -Xmx3072m) running in executor pod there is ORC file in AWS S3 of ~5MB ...
Lesha Pipiev's user avatar
  • 3,363
1 vote
1 answer
505 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
89 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
62 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,223
0 votes
3 answers
136 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
0 votes
2 answers
61 views

Thanks very much in advance. I have a numpy array called X_test X_test.shape (11829, 16, 9) I am trying to shuffle the 2nd column of each element of the array with the code below. However, X_test_s ...
eng's user avatar
  • 3

15 30 50 per page
1
2 3 4 5
155