This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Easy way is to navigate to the folder where your file/folders lie and then - | |
gcloud compute scp FILENAME sudevchirappat@gcmbox:"/home/sudevchirappat/" | |
#Note : change FILENAME to the file you need upload | |
#If an entire folder needs to be moved use the recursion flag. | |
gcloud compute scp --recurse FOLDERNAME sudevchirappat@gcmbox:"/home/sudevchirappat/" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pigpio | |
from time import sleep, strftime | |
from telegram.ext import Updater | |
BOT_TOKEN = "" | |
CHAT_ID = "" | |
# Pin | |
PIN = 17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
import csv | |
import json | |
import time | |
#Output file | |
out_file = open('distance_output.csv','a') | |
i = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd # pylint: disable=import-error | |
import re | |
from pathlib import Path | |
import logging | |
import sys | |
import os | |
from urllib.error import HTTPError | |
# Set logging level | |
logging.basicConfig(stream=sys.stdout, | |
format="%(message)s", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(#AndamanFightsCOVID19) (from:ChetanSanghi) | |
------------------------------ | |
(COVID-19 OR patients OR recovered OR discharged OR Active) (from:Andaman_admin) | |
------------------------------ | |
*** | |
http://twitter.com/Andaman_Admin/status/1287044453862055936 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
import pandas as pd | |
import numpy as np | |
# Read merged data | |
df = pd.read_csv('https://api.covid19india.org/csv/latest/raw_data.csv') | |
df.head() | |
df['Date Announced'] = pd.to_datetime(df['Date Announced']) | |
df = df[df['Date Announced'] <= '2020-04-26'] | |
df['District_Key'] = df['State code'] + "_" + df['Detected District'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
label_annotations { | |
mid: "/m/0fbf1m" | |
description: "Terrestrial animal" | |
score: 0.993838369846344 | |
topicality: 0.993838369846344 | |
} | |
label_annotations { | |
mid: "/m/03bk1" | |
description: "Giraffe" | |
score: 0.9926815032958984 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import pandas as pd | |
r = requests.get("https://api.covid19india.org/raw_data.json") | |
pdb = r.json() | |
df = pd.DataFrame.from_dict(pdb['raw_data']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function time_wise_update(){ | |
var getSheet = SpreadsheetApp.getActive().getSheetByName("Sheet1"); | |
var setSheet = SpreadsheetApp.getActive().getSheetByName("Sheet2"); | |
var url = 'https://xxx/data.json'; | |
var response = UrlFetchApp.fetch(url, {'muteHttpExceptions': true}); | |
var json = response.getContentText(); | |
var data = JSON.parse(json); | |
var ss = data.ss; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def rand_color_gen(n=1): | |
h_v = [] | |
for i in range(0,n): | |
i+=1 | |
r = lambda: random.randint(0,255) | |
h_v.append('#%02X%02X%02X' % (r(),r(),r())) | |
return h_v | |
# Just random colors. No guarantee of any sort. |
NewerOlder