This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import libraries and fetch data from dataset and parsing into NumPy Dataframe | |
import numpy as np | |
import pandas as pd | |
df = pd.read_excel('dataset.xls', 'Data').to_numpy() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"status": 0 , کد وضعیت درخواست | |
"msg": "responce message will be here" , متن همراه درخواست | |
"body": {} // داده های ارسالی درخواست داده شده | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void channelMaker() { | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { | |
NotificationChannel serviceChannel = new NotificationChannel( | |
ChannelID, | |
"Dowload Channel", | |
NotificationManager.IMPORTANCE_DEFAULT | |
); | |
NotificationManager manager = getSystemService(NotificationManager.class); | |
manager.createNotificationChannel(serviceChannel); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void download(String url,String path){ | |
try { | |
URL u = new URL(url); | |
URLConnection conn = u.openConnection(); | |
int contentLength = conn.getContentLength(); | |
DataInputStream stream = new DataInputStream(u.openStream()); | |
String filePath = Environment.getExternalStorageDirectory().getPath().toString() + "/app.apk"; | |
File f = new File(filePath); | |
DataOutputStream fos = new DataOutputStream(new FileOutputStream(f, false)); | |
byte data[] = new byte[4096]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2022-05-03T23:15:33.480Z","extensionVersion":"v3.4.3"} |