Skip to content

Instantly share code, notes, and snippets.

View saiankit's full-sized avatar
🛹
Git Shit Done

Sai Ankit saiankit

🛹
Git Shit Done
View GitHub Profile
This file has been truncated, but you can view the full file.
[
{
"cid": "UgzsMwsHZhNP-qXiiZV4AaABAg",
"text": "Fascinating episode. Is it right to assume that topical caffiene should be avoided in the evening as to avoid disrupting sleep like with ingesting caffiene? Thanks",
"time": "38 minutes ago",
"author": "C",
"channel": "UCtM2OpGI8brBNEWsdhgEgOg",
"votes": "0",
"photo": "https://yt3.ggpht.com/ytc/AGIKgqNXJW8NBYOKCigjVMpWS5dQlXlQ8t0PZXUk=s176-c-k-c0x00ffffff-no-rj",
"heart": false,
@saiankit
saiankit / whatsapp.py
Created August 31, 2022 10:57
Send bulk whatsapp messages
from time import sleep
import pywhatkit as pw
import pandas as pd
df = pd.read_csv("data.csv")
for i, j in df.iterrows():
print(j["phone_number"])
pw.sendwhats_image("+" + str(j["phone_number"]), "image.jpg", "Wishes " + j["name"])
sleep(3)
@saiankit
saiankit / format_phone_number.py
Created August 31, 2022 10:54
Phone number cleaning from contacts
import pandas as pd
data = pd.read_csv("final.csv")
for i, j in data.iterrows():
j["phone_number"] = "+91" + j["phone_number"].replace("-","").replace(" ","").replace("(","").replace(")","")
data.to_csv('send.csv')
@saiankit
saiankit / usage.dart
Created May 25, 2022 10:51
Usage - Design System
Text(
widget.courseCode,
style: ThemeStyles.t12TextStyle.copyWith(
color: Colors.white,
fontWeight: FontWeight.w100,
),
),
padding: EdgeInsets.symmetric(vertical: Converts.c8),
@saiankit
saiankit / textstyles_screen_config.dart
Created May 25, 2022 10:48
Text Styles - Screen Config
class ThemeStyles {
static TextStyle t8TextStyle = TextStyle(
fontSize: Converts.c8,
fontWeight: FontWeight.w700,
);
static TextStyle t12TextStyle = TextStyle(
fontSize: Converts.c12,
fontWeight: FontWeight.w700,
);
static TextStyle t16TextStyle = TextStyle(
@saiankit
saiankit / converts_size_config.dart
Created May 25, 2022 10:41
Converts - Size Config
class Converts {
static double c8 = 1 * SizeConfig.textMultiplier;
static double c12 = 1.5 * SizeConfig.textMultiplier;
static double c16 = 2 * SizeConfig.textMultiplier;
static double c20 = 2.5 * SizeConfig.textMultiplier;
static double c24 = 3 * SizeConfig.textMultiplier;
static double c32 = 4 * SizeConfig.textMultiplier;
static double c40 = 5 * SizeConfig.textMultiplier;
static double c48 = 6 * SizeConfig.textMultiplier;
static double c56 = 7 * SizeConfig.textMultiplier;
@saiankit
saiankit / main.dart
Created May 25, 2022 10:39
Layout builder - wrapper for main widget
return LayoutBuilder(
builder: (context, constraints) {
SizeConfig().init(constraints);
return MaterialApp(
debugShowCheckedModeBanner: false,
home: AnotherWidget(),
);
},
);
@saiankit
saiankit / screen_config.dart
Created May 25, 2022 10:28
Screen Config - Flutter
import 'dart:developer';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
class SizeConfig {
static double _screenWidth = 0;
static double _screenHeight = 0;
static double _blockWidth = 0;
static double _blockHeight = 0;
@saiankit
saiankit / pdfedit.py
Created December 13, 2021 12:08
Delete Select Pages from a given PDF
from PyPDF2 import PdfFileWriter, PdfFileReader
# Enter the pages to delete inside this array
# 1st page refers to 1
# If you want to delete the pages 2,18,222 enter 2,18,22 inside the array
pages_to_delete = []
#pdfName refers to the name of the PDF File, and also ensure that this code is inside the same directory where the PDF file is located
# or else move the PDF File to this directory and then run the code.