Skip to content

Instantly share code, notes, and snippets.

View shivamMg's full-sized avatar

shivam mamgain shivamMg

View GitHub Profile
print("Hello World")
Downloading https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz to ../data/cifar-10-python.tar.gz
0.0%
0.0%
0.0%
0.0%
0.0%
0.0%
0.0%
0.0%
The future depends on what we do in the present
It’s easy to stand in the crowd but it takes courage to stand alone
Our greatest ability as humans is not to change the world, but to change ourselves
Service without humility is selfishness and egotism
It does not require money to live neat, clean, and dignified
My life is my message
Speak only if it improves upon the silence
Satisfaction lies in the effort, not in the attainment
Relationships are based on four principles: respect, understanding, acceptance and appreciation
Hate the sin, love the sinner
@shivamMg
shivamMg / poweroff.py
Created April 24, 2022 18:04
poweroff.py
#!/bin/env python3
from http.server import BaseHTTPRequestHandler, HTTPServer
import subprocess
HOST = '0.0.0.0'
PORT = 9000
HTML = '''
<html>
@shivamMg
shivamMg / dashboard.json
Created January 13, 2022 12:13
Rapyuta IO Spidermon
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@shivamMg
shivamMg / dashboard.json
Last active January 13, 2022 12:20
Rapyuta IO Device Metrics
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@shivamMg
shivamMg / against-bots
Last active September 8, 2021 16:21
csgo
mp_maxrounds 20
bot_quota 14
bot_add_ct / bot_add_t
@shivamMg
shivamMg / js.py
Created November 1, 2020 10:06
JavaScript objects in python
class JSObject:
def __init__(self):
self.__dict__['_props'] = {}
def __setattr__(self, name, value):
self.__dict__['_props'][name] = value
def __getattr__(self, name):
return self.__dict__['_props'].get(name)
def __setitem__(self, name, value):
self.__dict__['_props'][name] = value
def __getitem__(self, name):
printf "♜ ♞ ♝ ♛ ♚ ♝ ♞ ♜\n♟︎ ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ ♟︎ ♟︎\n\n\n\n\n♙ ♙ ♙ ♙ ♙ ♙ ♙ ♙\n♖ ♘ ♗ ♕ ♔ ♗ ♘ ♖\n"
#!/usr/bin/env python2
# Need to install rapyuta_io Python SDK to use this script:
# pip install https://storage.googleapis.com/rio-sdk-python/rapyuta_io-0.13.0-py2-none-any.whl
from rapyuta_io import Client, DeploymentPhaseConstants
# Read how to get auth-token and project-guid here:
# https://userdocs.rapyuta.io/developer-guide/tooling-automation/python-sdk/sdk-tokens-parameters/
AUTH_TOKEN = ''