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 numpy as np | |
import keras_cv | |
model = keras_cv.models.RetinaNet(backbone=keras_cv.models.MobileNetV3Backbone.from_preset('mobilenet_v3_small_imagenet'), | |
num_classes=2, | |
bounding_box_format="xywh", | |
) | |
image= np.random.randint(0, 255, size=(1, 640, 480, 3), dtype=np.uint8) | |
model(image) |
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 numpy as np | |
import scipy.optimize as spo | |
import scipy.stats as sps | |
import matplotlib.pyplot as plt | |
x, y = np.array([[3.16275414, 3.79136358], | |
[3.06332232, 3.56686702], | |
[2.71045949, 3.65764056], | |
[3.31620986, 3.9009491 ], | |
[3.0538026 , 3.77374607], |
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 | |
import pylab as plt | |
df_allcauses = pd.read_excel('datasetfinalcorrected3.xlsx', sheet_name='Table 2', header=4, nrows=38) | |
df_covid = pd.read_excel('datasetfinalcorrected3.xlsx', sheet_name='Table 1', header=4, nrows=38) | |
for k in df_covid.keys(): | |
if k.startswith('Age-st'): | |
df_covid[k] = pd.to_numeric(df_covid[k], errors='coerce').fillna(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 numpy as np | |
import matplotlib.pyplot as plt | |
import cartopy.crs as ccrs | |
import cartopy.feature as cfeature | |
lon = 10 + 15 * np.random.random(30) | |
lat = 55 + 15 * np.random.random(30) | |
data = np.random.randn(30) |
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
# Run this to get the example file | |
import tables | |
import numpy as np | |
h5 = tables.open_file('onefile.h5', 'w', filters=tables.Filters(8, 'lzo')) | |
g = h5.create_group(h5.root, 'data') | |
h5.create_carray(g, 'data_array', obj=np.random.random((int(1e6), 20))) | |
h5.close() |
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
[Version] | |
AppVersion=5.7 | |
Version=346 | |
[General] | |
Rank=-1 | |
ColorLabel=0 | |
InTrash=false | |
[Exposure] |
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
\version "2.19.83" | |
\language "espanol" | |
\header { | |
title = "Amazing Grace" | |
composer = "Trad. Scottish" | |
%tagline = "" | |
} |
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 numpy as np | |
import netCDF4 as nc | |
from scipy import stats | |
import pylab as plt | |
import seaborn as sns | |
rootgrp = nc.Dataset('HadCRUT.4.6.0.0.median.nc') | |
t = rootgrp['time'][:] / 365 + 1850 |
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 os | |
# os.environ['CUDA_VISIBLE_DEVICES'] = '1' | |
import time | |
import numpy | |
import jax.numpy as np | |
from jax import random, grad, jit |
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 time | |
import numpy | |
import jax.numpy as np | |
from jax import random, grad, jit | |
from jax import vmap | |
def _compute_single_loss(h, J, sigma, N, lambda_h, lambda_j): |
NewerOlder