home = os.environ['HOME'] config_dir = '/.config/nvim/location.npy' file_path = home + config_dir
if os.path.exists(file_path): read_location = np.load(file_path,allow_pickle=True).item() latitude = read_location.get('result').get('location').get('lat') longtitude = read_location.get('result').get('location').get('lng')
else: np.save(file_path,ret) read_location = np.load(file_path,allow_pickle=True).item() latitude = read_location.get('result').get('location').get('lat') longtitude = read_location.get('result').get('location').get('lng')
if now > date_early and now < date_late: vim.command('set background=dark') vim.command('colorscheme deus') else: vim.command('set background=dark') vim.command('colorscheme onedark ')
import datetime from suntime import Sun, SunTimeException
latitude = 51.21 longitude = 21.01
sun = Sun(latitude, longitude)
# Get today's sunrise and sunset in UTC today_sr = sun.get_sunrise_time() today_ss = sun.get_sunset_time() print('Today at Warsaw the sun raised at {} and get down at {} UTC'. format(today_sr.strftime('%H:%M'), today_ss.strftime('%H:%M')))
home = os.environ['HOME'] config_dir = '/.config/nvim/location.npy' file_path = home + config_dir
if os.path.exists(file_path): read_location = np.load(file_path,allow_pickle=True).item() latitude = read_location.get('result').get('location').get('lat') longtitude = read_location.get('result').get('location').get('lng')
else: np.save(file_path,ret) read_location = np.load(file_path,allow_pickle=True).item() latitude = read_location.get('result').get('location').get('lat') longtitude = read_location.get('result').get('location').get('lng')