Skip to content

Instantly share code, notes, and snippets.

@tushar4303
tushar4303 / pyCatch.txt
Last active June 8, 2022 08:28
Imp points to be noted in python
----------------------------------------------------------------------------------
Python Notes
----------------------------------------------------------------------------------
#when you equate a list to a new list, it doesn't actually copy the list
but instead points to the locations in your original list thus any changes
made in the new list reflects in the old one as well
my_list = your_list
#to avoid this do:
@tushar4303
tushar4303 / notifications.json
Last active March 7, 2023 12:56
CluedIn notifications
{
"labels": [
"Academics",
"Exam Cell",
"T&P Cell"
],
"senderRoles": [
"Principal",
"Class Teacher",
"HOD",
{
"labels": [
"Technical",
"Cultural",
"Sports"
],
"organizers": [
"Institute Level",
"T&P Cell",
"Computer Society of India (CSI)",
@tushar4303
tushar4303 / main.dart
Created January 3, 2023 10:59
main.dart file for the example app
import 'dart:async';
import 'dart:io';
import 'package:flutter/material.dart';
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:retry/retry.dart';
import 'package:intl/intl.dart';
import 'package:navbar_router/navbar_router.dart';
import 'dart:convert';
import 'package:collection/collection.dart';
{
"featured_carousel": [
{
"event_name": "Event 1",
"photo_link": "https://www.itcluster.ck.ua/wp-content/uploads/2019/03/661821a9442a8dbd824e89bd18c0fd2e_XL.jpg",
"redirect_link": "https://csi.dbit.in/"
},
{
"event_name": "Event 2",
"photo_link": "https://ictframe.com/wp-content/uploads/Digital-Ocean-Summit-Nepal-2020.jpg",
@tushar4303
tushar4303 / Filter.dart
Created January 9, 2023 02:23
Snippet from my code from the filter section
                         //For filterchip row and i am clearing filtered list in init state            
onSelected: ((value) {
                                          setState(() {
                                            if (value) {
                                              _filters.add(filterType);
                                            } else {
                                              _filters.removeWhere((name) {
                                                return name == filterType;
                                              });
                                            }
const express = require('express');
const bodyParser = require('body-parser');
const mysql = require('mysql');
const msg91 = require('msg91')('YOUR_API_KEY', 'YOUR_SENDER_ID', 'ROUTE_NO');
const app = express();
app.use(bodyParser.urlencoded({
extended: true
}));
[
{
"time": "2022-01-01T00:00:00Z",
"temperature": 25.0,
"humidity": 60.0,
"co2": 800.0
},
{
"time": "2022-01-01T01:00:00Z",
"temperature": 26.0,
[
{
"attendance_id": 1,
"user_id": 1,
"session_id": 1,
"name": "Jasmit Rathod",
"roll_no": 54,
"year": 4,
"branch": "IT"
},
@tushar4303
tushar4303 / contacts.json
Created January 1, 2024 19:46
contacts.json
[
{
"name": "Academics",
"contacts": [
{"name": "Professor 1", "phoneNumber": "111-111-1111", "position": "Assistant Professor"},
{"name": "Professor 2", "phoneNumber": "222-222-2222", "position": "Associate Professor"},
{"name": "Professor 3", "phoneNumber": "333-333-3333", "position": "Professor"}
]
},
{