Skip to content

Instantly share code, notes, and snippets.

View vipulgupta2048's full-sized avatar
🐣
Working from home

Vipul Gupta vipulgupta2048

🐣
Working from home
View GitHub Profile
@vipulgupta2048
vipulgupta2048 / Checklist.md
Last active March 29, 2018 10:42
Migration Checklist and Important formats [Sugar Labs]

Checklist for WikiPort - GSoC 2018 #Sugar_Labs

This pad contains the list which would eventully help me later to figure out what is left to be done in the context of migration of an actiivty that to ensure end-to-end migration of the Wikipages by WikiPort. All edits and suggestions are welcomed.

The list will also contain specific formats of pull requests and commit messges, other details which would be kept in mind for the people contributing to this project to ensure synchronization between contributors and make the task of reviewing easier.

Points to remember

  • use migrate rather than migrated, to fit the imperative mood in the checklist,
  • The name of the activity is redundant; whoever is reading the commit should already know which repository they are looking at.
@vipulgupta2048
vipulgupta2048 / github-filefinder.py
Created March 30, 2018 12:33
Script to find repositories not containing specific files like README.md
# Author: vipulgupta2048
# Date: 30/03/18
# Script to find repositories not containing specific files like README.md, requirements.txt in an organisation
# Reference: https://gist.github.com/Pro-Panda/0e96e9011fd118e684ff93fd972299de#file-github-sugarlabs-analysis-py-L13
# Libraries needed - Install PyGitHub in Python 3.6 ----> run " pip3 install pygithub --user " before execution
from github import Github
def readme(repo):
'''Return True if the repository has a README.md, else false'''
@vipulgupta2048
vipulgupta2048 / avengers.py
Last active April 20, 2019 18:24
Get notified about tickets @ BookMyShow, whatever it takes.
# Owner - Vipul Gupta (@vipulgupta2048)
# Description - A infinite loop trapping Bookmyshow to let them know that you have come to bargain for tickets. Well, only until they block you.
# Real Description - Infinite loop requesting BMS every 3 minutes for availablity for Movie Tickets.
# Pre-requistes - sudo apt install beep
# - pip install beautifulsoup4 requests
# - sudo modprobe pcspkr
# Language - Python3
import requests
from lxml import html
@vipulgupta2048
vipulgupta2048 / vipulcopy
Created July 30, 2019 12:37
[Homework] Creating your own copy util for Linux Distributions
#!/usr/bin/env python3
import sys
import shutil
arg = sys.argv
source = str(arg[1:2])[2:-2]
dest = str(arg[2:3])[2:-2]
print("Source location of the file is {}".format(source))
print("Destination of the file {}".format(dest))
@vipulgupta2048
vipulgupta2048 / automating-happiness-packets.py
Last active March 21, 2020 07:08
Automating Happiness Packets (for Acknowledgementations!) by vipulgupta2048
# Author: vipulgupta2048
# Date: 20/03/20
# Script to send bulk Happiness Packets (HP) to groups of people. With every loop, the script prefills information of sender, recipient and message in respective fields and repeats the process in a new tab. The result (https://imgur.com/a/kR2EP4j) is pre-filled tabs with ready to send content.
# Limits: I didn't automate the script to send the packet, because even though I want the content to be similar. Each HP that I send has something unique. Also, because HP limits 20 packets per email per 24 hours.
# License: Do whatever you want with it
# Libraries needed - Selenium, Chromedriver or Geckodriver
# Reference: https://pythonspot.com/category/selenium/ | https://selenium-python.readthedocs.io/installation.html
@vipulgupta2048
vipulgupta2048 / party.py
Created June 11, 2020 22:17
Main Code for PartyStarter
from PIL import Image
import os
from helpers import party_saver, party_changer
# Secret RGBA sauce for Party Parrot colors
secret_sauces = [
(255, 107, 107, 255),
(255, 107, 181, 255),
(255, 129, 255, 255),
(208, 129, 255, 255),
@vipulgupta2048
vipulgupta2048 / party_changer.py
Created June 15, 2020 20:33
party_changer.py (Party of Party Starter)
# secret sauce is the RGBA color tuple we are passing
def party_changer(width, height, pixels, secret_sauce):
for x in range(width):
for y in range(height):
if pixels[x, y] != (0, 0, 0, 0):
pixels[x, y] = secret_sauce
@vipulgupta2048
vipulgupta2048 / party_saver.py
Created June 15, 2020 20:35
party_saver (Part of PartyStarter)
def party_saver(file):
images_list = []
for filename in glob(
"~/partystarter/output/" + file + "/*.png"
):
frame = Image.open(filename)
images_list.append(frame)
images_list[0].save(
f"{file}.gif",
save_all=True,
repoUrl: "https://github.com/balena-io-playground/balena-webdriverio"
tarballUrl: "https://github.com/balena-io-playground/balena-webdriverio/archive/master.tar.gz"
applicationConfigVariables:
- RESIN_HOST_CONFIG_gpu_mem: 128
applicationEnvironmentVariables:
- CONFIG_MODE: 0
- CUSTOM_VALUE: my_value
defaultDeviceType: 'fincm3'
@vipulgupta2048
vipulgupta2048 / resource-gen-function guide
Created April 3, 2021 15:42
Azure Immersive Reader resource generator function
Create-ImmersiveReaderResource
-SubscriptionName 'MyOrganizationSubscriptionName' [1]
-ResourceName 'MyOrganizationImmersiveReader' [0]
-ResourceSubdomain 'MyOrganizationImmersiveReader' [0]
-ResourceSKU 'S0' [0]
-ResourceLocation 'westus2' [0]
-ResourceGroupName 'MyResourceGroupName' [2]
-ResourceGroupLocation 'westus2' [2]
-AADAppDisplayName 'MyOrganizationImmersiveReaderAADApp' [3]
-AADAppIdentifierUri 'https://MyOrganizationImmersiveReaderAADApp' [3]