I hereby claim:
- I am devmnj on github.
- I am devmnj (https://keybase.io/devmnj) on keybase.
- I have a public key ASBneaQ1K2PbmDsm0g8_LYAgLc0zAvxCXj3ezNiNjjPlIwo
To claim this, I am signing this object:
//target type | |
export type LatestInvoice = { | |
id: string; | |
name: string; | |
image_url: string; | |
email: string; |
UPDATE TABLE_NAME SET COL1= REPLACE(COL1,'''','"') |
static class BackgroundDataFetcher | |
{ | |
private static int batchSize = 2; | |
public static BindingList<LedgerModel> ledgers = new BindingList<LedgerModel>(); | |
public static async Task FetchAsync(int ledId = 0) | |
{ | |
try | |
{ | |
# I encounter proplem while using Historical data | |
# For yfinance most of the case the data is in good shape | |
# The first thing I am looking for index column, of numbers. if it exist, need to replace with datetime | |
# the last thing I want make sure that the date column is in panda datetime type otherwise have to covert it. | |
df =pd.DataFrame(data['Success']) | |
df =df[['datetime','open','high','low','close','volume']] | |
df['datetime']= pd.to_datetime(df['datetime']) | |
df.set_index('datetime', inplace=True) |
import pandas as pd | |
import numpy as np | |
series=pd.read_excel(r'C:/Users/hp/OneDrive/documents/mahdata.xlsx',sheet_name='EASY', usecols='B:G',header=None, | |
index_col=False) | |
series= series.to_numpy() | |
data = np.flip(series,axis=0) |
Managing conda environments | |
It is recommended to install Zipline in an isolated conda environment. Installing Zipline in conda environments will not interfere your default Python deployment or site-packages, which will prevent any possible conflict with your global libraries. For more information on conda environment, see the Conda User Guide. | |
Assuming conda has been set up, you can create a conda environment: | |
$ conda create -n env_zipline python=3.10 | |
Now you have set up an isolated environment called env_zipline, a sandbox-like structure to install Zipline. Then you should activate the conda environment by using the command | |
$ conda activate env_zipline | |
You can install Zipline by running |
Conda Error | |
`conda error error: argument COMMAND: invalid choice: 'activate'` | |
# solution | |
`conda init powershell` |
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser |
def loadImage(url): | |
response = requests.get(url) | |
img_bytes = BytesIO(response.content) | |
img = Image.open(img_bytes) | |
img = img.convert('L') | |
# img = img.convert('1') | |
# img = img.convert('RGB') | |
img = img.resize((28, 28), Image.NEAREST) | |
img = keras.utils.img_to_array(img) |
I hereby claim:
To claim this, I am signing this object: