One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| import json | |
| import os | |
| def parse_imports(file_path): | |
| abs_file_path = os.path.abspath(file_path) | |
| if abs_file_path.endswith(".js") or abs_file_path.endswith(".jsx"): | |
| if abs_file_path.endswith(".js"): | |
| abs_file_path = abs_file_path.strip(".js") | |
| if abs_file_path.endswith(".jsx"): |
| import os | |
| import csv | |
| RUN_FILE_NAME = "models_dict.py" | |
| VTUNE_COMMAND = "vtune -collect performance-snapshot ./models_dict.py" | |
| NUM_RUNS = 10 | |
| METRICS = ["SP GFLOPS", "DP GFLOPS", "x87 GFLOPS", "Elapsed Time", "Average CPU Frequency"] | |
| content = list() | |
| layers = list() |
| from selenium.webdriver import Firefox | |
| from os import getenv | |
| import time | |
| def refresh_feed_elements(driver: Firefox): | |
| main_feed = driver.find_elements_by_xpath(".//div[@role='feed']")[1] | |
| posts = main_feed.find_elements_by_xpath("./div") | |
| return main_feed, posts |
| #define byte unsigned char | |
| void printBytes(byte *target, int size) { | |
| byte select = 128; | |
| byte *i = target; | |
| while(size--) { | |
| byte currentByte = *i; | |
| for(int k = 0; k < 8*sizeof(byte); k++) { | |
| printf("%d", (int)((currentByte & select) > 0)); | |
| currentByte <<= 1; |
| # Usage: python json_to_csv.py <JSON file> | |
| import json | |
| import csv | |
| from sys import argv | |
| with open(argv[1], 'r') as json_file: | |
| data = json.load(json_file) | |
| with open("result.csv", "w") as csv_file: | |
| writer = csv.DictWriter(csv_file, fieldnames = list(data[0].keys())) | |
| writer.writeheader() |
| from sys import argv | |
| import csv | |
| import json | |
| with open(argv[1], 'r') as csv_file: | |
| reader = csv.DictReader(csv_file) | |
| data = [d for d in reader] | |
| with open("result.json", 'w') as f: | |
| json.dump(data, f) |
| var table = ee.FeatureCollection("users/parthparadkar3/india_pc_2014"); | |
| var districts = ee.FeatureCollection(table) | |
| // Considering data for January 2010 | |
| var dataset = ee.ImageCollection('NOAA/DMSP-OLS/NIGHTTIME_LIGHTS') | |
| .filter(ee.Filter.date('2010-01-01', '2010-01-31')); | |
| var nighttimeLights = dataset.select('avg_vis'); | |
| var totalNightLights = nighttimeLights.reduce(ee.Reducer.mean()); | |
| var districtLights = totalNightLights.reduceRegions({ | |
| collection: districts, | |
| reducer: ee.Reducer.mean(), |