Skip to content

Instantly share code, notes, and snippets.

View sinadalvand's full-sized avatar
💻
Born to Code ;)

Sina Dalvand sinadalvand

💻
Born to Code ;)
View GitHub Profile
@sinadalvand
sinadalvand / Logestic_regression_Imports.py
Last active April 8, 2022 04:07
Logistic Regression Implementation
# 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()
{
"status": 0 , کد وضعیت درخواست
"msg": "responce message will be here" , متن همراه درخواست
"body": {} // داده های ارسالی درخواست داده شده
}
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);
}
@sinadalvand
sinadalvand / Downloader.java
Last active July 26, 2021 17:37
Download Code
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];
@sinadalvand
sinadalvand / cloudSettings
Last active May 3, 2022 23:15
encryption and decryption class (base64) for kotlin
{"lastUpload":"2022-05-03T23:15:33.480Z","extensionVersion":"v3.4.3"}