Skip to main content

Questions tagged [shift]

Questions related to the usage of the right and/or left shift key on the keyboard. For questions regarding bitwise shift operations use [bit-shift]

1 vote
1 answer
46 views

Getting the nearest value of a column with time shift in python

I have a dataframe with a datetime (with milisseconds) as index and a price column. I want to create a new column with the nearest price from the row 20s earlier. For example: Data Hora 2024-02-01 10:...
João Weckerle's user avatar
1 vote
3 answers
54 views

Python Pandas: update last dates values of parameters with simple dynamics grouped by id

Here's a dataframe, with some parameters for each id by some regular quarterly dates. It's originally shuffled randomly, but, at first, let say, it is sorted by fab_date and id. import pandas as pd np....
Howdyouride's user avatar
2 votes
2 answers
48 views

Pandas window-like function to rid off time-stamp overlapping

I have a dataframe that contains promo campaign duration and I need to rid off time-stamp overlapping. import pandas as pd import numpy as np from pandas import Timestamp t1 = np.array([['Store A', ...
Andrew Nikitin's user avatar
0 votes
0 answers
19 views

Catching Android Keyevent for Shift as keycode or metaState from USB Barcode Scanner in HID mode

I have a Android 11 Zebra device with a Barcode Scanner in HID mode. The keyevents are send to the app and I see the pressed keys. Unfortunately I have a problem when uppercase letters are used. Then ...
Shannah's user avatar
  • 59
1 vote
1 answer
65 views

python pandas Problem repeating the previous value

is my code import pandas as pd columns1 = ['Student ID', 'Course ID', 'Marks'] data1 = [(1, 10, 100), (2, 400, 200), (3, 30, 300), (3, 30, 300), (3, 30, 300), (3, 30, 300), (3, 30, 300), (3, 30, 300)]...
Amirhossein Teymourian's user avatar
1 vote
1 answer
22 views

ComputeError with polars dataframe while trying to pass a column expressions in a simple shift() operation

Sorry, I'm starting out in Polars. Is there a way to achieve the same functionality of the shift(n) function where n is a dataframe variable. When I try: df = pl.DataFrame({ "a": [1, 2, ...
user23486287's user avatar
0 votes
2 answers
67 views

The underline type for uint_fast8_t may be wider than a single byte, so the uint_fast8_t b = 0xF0; b<<4; isn't determined across different compilers?

uint_fast8_t is intended to provide the fastest possible 8-bit (or wider) integer type on the target platform, while uint8_t is a fixed 8-bit unsigned integer type. So the uint_fast8_t b = 0xF0; b<...
John's user avatar
  • 3,348
0 votes
1 answer
103 views

Bits and bytes shifts C++

I have a rather interesting task. I need to perform a bit shift with a cutout of the bits. That is, I have a binary .bin file. The first 16 bytes must be skipped, the byte numbering starts from 0, ...
Леонид Ильин's user avatar
2 votes
1 answer
79 views

pushing filtered values to a second array

I'm working through an application to a coding bootcamp and am stuck. I could use some help seeing what I'm doing wrong. I'll post the question, the code and the output. Any help is greatly ...
Room4Renzo's user avatar
2 votes
0 answers
63 views

TypeError when using whisper-node library for audio transcription in NestJS project

I'm encountering a TypeError while attempting to transcribe audio from a WAV file using the whisper-node library in my NestJS project. Here's my code snippet: import whisper from 'whisper-node'; ...
Vahe Vardanyan's user avatar
0 votes
2 answers
182 views

How to implement a template class in c++?

I'm learning c++ at uni for a few months so I'm a beginner and in my exam I encountered a problem with template class. The task was to implement a template class in a header file like it was given in ...
Zelei Ádám István's user avatar
0 votes
0 answers
14 views

Xcorr function in python for acceleration signal

I have two acceleration signals with different lengths, whose start and end times are not the same. I want to find the time difference between these two from the initial data and the end in seconds ...
azam zangoei's user avatar
1 vote
1 answer
67 views

How can I use `df.shift(n)` in pandas dataframe such that I can bring `n` item from bottom to the top instead of `nan` values or vice versa? [duplicate]

I have a pandas dataframe df containing 5 rows and 2 columns. A B 0 10 0 1 20 5 2 30 10 3 40 15 4 50 20 df.to_dict() returns {'A': {0: 10, 1: 20, 2: 30, 3: 40, 4: 50}, 'B': {0: 0, 1:...
hbstha123's user avatar
  • 1,456
0 votes
2 answers
101 views

On keyup event, when shift + key released , shift before key , event.key not reflects key

In javascript ,onkeyup event, when I press shfit + key , then release the shift before the key, I don't get the event.key for the key , instead I get "shift". Is there a way to get the event....
Yaakov Whise's user avatar
0 votes
0 answers
96 views

Creating a sliding window with a shift using array with elements

Hi just having an issue here with respect to creating a sliding window with a shift over a numpy array with X number of elements. weather_radiance_copy is a numpy array with 10 elements (although it ...
MedicineMan's user avatar

15 30 50 per page
1
2 3 4 5
71