code
stringlengths
2.5k
150k
kind
stringclasses
1 value
# МАДМО <a href="https://mipt.ru/science/labs/laboratoriya-neyronnykh-sistem-i-glubokogo-obucheniya/"><img align="right" src="https://avatars1.githubusercontent.com/u/29918795?v=4&s=200" alt="DeepHackLab" style="position:relative;top:-40px;right:10px;height:100px;" /></a> ### Физтех-Школа Прикладной математики и ин...
github_jupyter
# Colab-pytorch-image-classification Original repo: [bentrevett/pytorch-image-classification](https://github.com/bentrevett/pytorch-image-classification) [SqueezeNet code](https://github.com/pytorch/vision/blob/master/torchvision/models/squeezenet.py): [pytorch/vision](https://github.com/pytorch/vision) My fork:...
github_jupyter
# From Variables to Classes ## A short Introduction Python - as any programming language - has many extensions and libraries at its disposal. Basically, there are libraries for everything. <center>But what are **libraries**? </center> Basically, **libraries** are a collection of methods (_small pieces of code...
github_jupyter
``` import pandas as pd import numpy as np pd.set_option('display.max_columns', None) pd.set_option('display.max_rows', None) pd.set_option('display.max_colwidth', -1) %matplotlib inline from sidecar import Sidecar from ipywidgets import IntSlider sc = Sidecar(title='Sidecar Output') sl = IntSlider(description='S...
github_jupyter
``` import numpy as np import matplotlib.pyplot as plt from sklearn import datasets from tqdm import tqdm from collections import defaultdict from itertools import combinations import re import time ### You may import any Python's standard library here (Do not import other external libraries) ### pass_test1_1_1 = Fals...
github_jupyter
``` import sys sys.path.append("..") import numpy as np np.seterr(divide="ignore") import logging import pickle import glob from sklearn.metrics import roc_curve from sklearn.metrics import roc_auc_score from sklearn.preprocessing import RobustScaler from sklearn.utils import check_random_state from scipy import inte...
github_jupyter
``` import numpy as np from keras.models import Model from keras.layers import Input from keras.layers.pooling import AveragePooling3D from keras import backend as K import json from collections import OrderedDict def format_decimal(arr, places=6): return [round(x * 10**places) / 10**places for x in arr] DATA = Ord...
github_jupyter
# Debugging strategies In this notebook, we'll talk about what happens when you get an error message (it will happen often!) and some steps you can take to resolve them. Run the code in the next cell. ``` x = 10 if x > 20 print(f'{x} is greater than 20!') ``` The "traceback" message shows you a couple of usefu...
github_jupyter
``` import subprocess try: import dgl except: subprocess.check_call(["python", '-m', 'pip', 'install', 'dgl-cu110']) import dgl import os import dgl.data from dgl.data import DGLDataset import torch import torch.nn as nn import torch.nn.functional as F import pandas as pd import numpy as np import tqdm from sklea...
github_jupyter
``` !wget http://www.cs.cornell.edu/~cristian/data/cornell_movie_dialogs_corpus.zip !unzip cornell_movie_dialogs_corpus.zip -d dialogues import torch from torch.jit import script, trace import torch.nn as nn from torch import optim import torch.nn.functional as F import csv import random import re import os import unic...
github_jupyter
# When can we start watching? --- Henry Rachootin - December 2018 MIT License: https://opensource.org/licenses/MIT --- BitTorrent allows people to download movies without staying strictly within the confines of the law, but because of the peer to peer nature of the download, the file will not download sequentially. ...
github_jupyter
# Notebook para o PAN - Atribuição Autoral - 2018 ``` %matplotlib inline #python basic libs from __future__ import print_function from tempfile import mkdtemp from shutil import rmtree import os; from os.path import join as pathjoin; import re; import glob; import json; import codecs; from collections import default...
github_jupyter
##### Copyright 2018 The TensorFlow Authors. ``` #@title Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
github_jupyter
<h1 style="text-align:center;text-decoration: underline">Stream Analytics Tutorial</h1> <h1>Overview</h1> <p>Welcome to the stream analytics tutorial for EpiData. In this tutorial we will perform near real-time stream analytics on sample weather data acquired from a simulated wireless sensor network.</p> <h2>Package a...
github_jupyter
``` # %load train.py #!/usr/bin/env python # In[1]: from t_cnn import tcnn model = tcnn(num_classes = 2,pretrained = True, model_root = '/home/krf/model/BALL/') import senet import os import numpy as np import torch from torchvision.datasets import ImageFolder from utils import TransformImage import shutil import ti...
github_jupyter
``` import geemap geemap.show_youtube('OwjSJnGWKJs') ``` ## Update the geemap package If you run into errors with this notebook, please uncomment the line below to update the [geemap](https://github.com/giswqs/geemap#installation) package to the latest version from GitHub. Restart the Kernel (Menu -> Kernel -> Resta...
github_jupyter
``` # Copyright © 2020, Johan Vonk # SPDX-License-Identifier: MIT %matplotlib inline import numpy as np import pandas as pd import math import matplotlib.pyplot as plt from sklearn.manifold import MDS from sklearn.metrics import pairwise_distances import paho.mqtt.client as mqtt from threading import Timer import json ...
github_jupyter
##### Copyright 2019 The TensorFlow Hub Authors. Licensed under the Apache License, Version 2.0 (the "License"); ``` # Copyright 2019 The TensorFlow Hub Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. ...
github_jupyter
COPYRIGHT © 2018 Kiran Arun <kironni@gmail.com> ### Setup ``` # install dependencies !rm -r Neural_Networks-101-demo !git clone -b explanations https://github.com/KiranArun/Neural_Networks-101-demo.git !python3 /content/Neural_Networks-101-demo/scripts/setup.py helper_funcs tensorboard # run tensorboard get_ipython()...
github_jupyter
**Chapter 16 – Reinforcement Learning** This notebook contains all the sample code and solutions to the exercices in chapter 16. # Setup First, let's make sure this notebook works well in both python 2 and 3, import a few common modules, ensure MatplotLib plots figures inline and prepare a function to save the figur...
github_jupyter
[![AnalyticsDojo](https://github.com/rpi-techfundamentals/spring2019-materials/blob/master/fig/final-logo.png?raw=1)](http://rpi.analyticsdojo.com) <center><h1>Basic Text Feature Creation in Python</h1></center> <center><h3><a href = 'http://rpi.analyticsdojo.com'>rpi.analyticsdojo.com</a></h3></center> # Basic Text F...
github_jupyter
<a href="https://colab.research.google.com/github/NeuromatchAcademy/course-content/blob/master/tutorials/W1D5_DimensionalityReduction/W1D5_Tutorial3.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Neuromatch Academy: Week 1, Day 5, Tutorial 3 # Di...
github_jupyter
# Quick Start **A tutorial on Renormalized Mutual Information** We describe in detail the implementation of RMI estimation in the very simple case of a Gaussian distribution. Of course, in this case the optimal feature is given by the Principal Component Analysis ``` import numpy as np # parameters of the Gaussian ...
github_jupyter
# UPDATE This notebook is no longer being used. Please look at the most recent version, NLSS_V2 found in the same directory. My project looks at the Northernlion Live Super Show, a thrice a week Twitch stream which has been running since 2013. Unlike a video service like Youtube, the live nature of Twitch allows for ...
github_jupyter
# Boltzmann Machines Notebook ini berdasarkan kursus __Deep Learning A-Z™: Hands-On Artificial Neural Networks__ di Udemy. [Lihat Kursus](https://www.udemy.com/deeplearning/). ## Informasi Notebook - __notebook name__: `taruma_udemy_boltzmann` - __notebook version/date__: `1.0.0`/`20190730` - __notebook server__: Goo...
github_jupyter
As a demonstration, create an ARMA22 model drawing innovations from there different distributions, a bernoulli, normal and inverse normal. Then build a keras/tensorflow model for the 1-d scattering transform to create "features", use these features to classify which model for the innovations was used. ``` from blusky....
github_jupyter
# Apply Signature Analysis to Cell Morphology Features Gregory Way, 2020 Here, I apply [`singscore`](https://bioconductor.org/packages/devel/bioc/vignettes/singscore/inst/doc/singscore.html) ([Foroutan et al. 2018](https://doi.org/10.1186/s12859-018-2435-4)) to our Cell Painting profiles. This notebook largely follow...
github_jupyter
# Generating an ROC Curve This notebook is meant to be be an introduction to generating an ROC curve for multi-class prediction problems and the code comes directly from an [Scikit-Learn demo](http://scikit-learn.org/stable/auto_examples/model_selection/plot_roc.html). Please issue a comment on my Github account if ...
github_jupyter
# In-Class Coding Lab: Strings The goals of this lab are to help you to understand: - String slicing for substrings - How to use Python's built-in String functions in the standard library. - Tokenizing and Parsing Data - How to create user-defined functions to parse and tokenize strings # Strings ## Strings are im...
github_jupyter
# CH. 8 - Market Basket Analysis ## Activities #### Activity 8.01: Load and Prep Full Online Retail Data ``` import matplotlib.pyplot as plt import mlxtend.frequent_patterns import mlxtend.preprocessing import numpy import pandas online = pandas.read_excel( io="./Online Retail.xlsx", sheet_name="Online Retai...
github_jupyter
# Welcome to Jupyter Notebooks! Author: Shelley Knuth Date: 23 August 2019 Purpose: This is a general purpose tutorial to designed to provide basic information about Jupyter notebooks ## Outline 1. General information about notebooks 1. Formatting text in notebooks 1. Formatting mathematics in notebooks 1...
github_jupyter
<a href="https://colab.research.google.com/github/DingLi23/s2search/blob/pipelining/pipelining/pdp-exp1/pdp-exp1_cslg-rand-5000_plotting.ipynb" target="_blank"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ### Experiment Description Produce PDP for a randomly picked dat...
github_jupyter
# Alzhippo Pr0gress ##### Possible Tasks - **Visualizing fibers** passing through ERC and hippo, for both ipsi and contra cxns (4-figs) (GK) - **Dilate hippocampal parcellations**, to cover entire hippocampus by nearest neighbour (JV) - **Voxelwise ERC-to-hippocampal** projections + clustering (Both) ## Visulaizating...
github_jupyter
# Course introduction ## A. Overview ### Am I ready to take this course? Yes. Probably. Some programming experience will help, but is not required. If you have no programming experience, I strongly encourage you to go through the first handful of modules on the [Codecademy Python course](https://www.codecademy.com/l...
github_jupyter
# Optimization > Marcos Duarte > Laboratory of Biomechanics and Motor Control ([http://demotu.org/](http://demotu.org/)) > Federal University of ABC, Brazil <div style="text-align: right"> <i>If there occur some changes in nature, the amount of action necessary for this change must be as small as possible.</i> <...
github_jupyter
___ <a href='http://www.pieriandata.com'><img src='../Pierian_Data_Logo.png'/></a> ___ <center><em>Copyright Pierian Data</em></center> <center><em>For more information, visit us at <a href='http://www.pieriandata.com'>www.pieriandata.com</a></em></center> # Pandas Data Visualization Exercises This is just a quick e...
github_jupyter
# Disk Stacking [link](https://www.algoexpert.io/questions/Disk%20Stacking) ## My Solution ``` def diskStacking(disks): # Write your code here. disks.sort(key=lambda x: x[1]) globalMaxHeight = 0 prevDiskIdx = [None for _ in range(len(disks) + 1)] opt = [0 for _ in range(len(disks) + 1)] for i ...
github_jupyter
``` import re from Bio import SeqIO from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from Bio.Alphabet import IUPAC from Bio.SeqFeature import SeqFeature, FeatureLocation #first 6 aas of each domain #from uniprot: NL63 (Q6Q1S2), 229e(P15423), oc43 (P36334), hku1 (Q0ZME7) #nl63 s1 domain definition: https://w...
github_jupyter
``` %matplotlib inline ``` # Active Contour Model The active contour model is a method to fit open or closed splines to lines or edges in an image [1]_. It works by minimising an energy that is in part defined by the image and part by the spline's shape: length and smoothness. The minimization is done implicitly in ...
github_jupyter
``` import pandas as pd import numpy as np import sklearn.neighbors from sklearn.model_selection import train_test_split from sklearn.neighbors import KNeighborsClassifier from sklearn.metrics import accuracy_score import matplotlib.pyplot as plt from sklearn.metrics import confusion_matrix from sklearn.preprocessing i...
github_jupyter
``` import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import FormatStrFormatter import cv2 import glob import h5py from skimage.morphology import disk from scipy.stats import pearsonr from scipy.ndimage import gaussian_filter %matplotlib inline %load_ext autoreload %autoreload 2 # for plot figu...
github_jupyter
<h1><center>How to export 🤗 Transformers Models to ONNX ?<h1><center> [ONNX](http://onnx.ai/) is open format for machine learning models. It allows to save your neural network's computation graph in a framework agnostic way, which might be particulary helpful when deploying deep learning models. Indeed, businesses m...
github_jupyter
# Lecture 1. Introduction to CUDA Programming Model and Toolkit. Welcome to the GPU short course exercies! During this course we will introduce you with the syntax of CUDA programming in Python using `numba.cuda` package. During the first lecture we will try to focus on optimizing the following function, which adds ...
github_jupyter
``` %matplotlib inline import matplotlib import numpy as np import matplotlib.pyplot as plt import pandas as pd cases = pd.read_csv('https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_US.csv') deaths = pd.read_csv('https://raw.gith...
github_jupyter
# **CS224W - Colab 2** In Colab 2, we will work to construct our own graph neural network using PyTorch Geometric (PyG) and then apply that model on two Open Graph Benchmark (OGB) datasets. These two datasets will be used to benchmark your model's performance on two different graph-based tasks: 1) node property predic...
github_jupyter
``` import matplotlib import matplotlib.pyplot as plt import numpy as np import os import pandas as pd from sklearn.metrics import confusion_matrix,balanced_accuracy_score,roc_auc_score,roc_curve,recall_score,precision_score from p4tools import io ResultsPath = '../../Data/SummaryResults/' FiguresPath = '../../Data/Fig...
github_jupyter
# Example 1: Detecting an obvious outlier ``` import numpy as np from isotree import IsolationForest ### Random data from a standard normal distribution np.random.seed(1) n = 100 m = 2 X = np.random.normal(size = (n, m)) ### Will now add obvious outlier point (3, 3) to the data X = np.r_[X, np.array([3, 3]).reshape(...
github_jupyter
# 决策树 ----- ``` # 准备工作 # Common imports import numpy as np import os # to make this notebook's output stable across runs np.random.seed(42) # To plot pretty figures %matplotlib inline import matplotlib import matplotlib.pyplot as plt plt.rcParams['axes.labelsize'] = 14 plt.rcParams['xtick.labelsize'] = 12 plt.rcPar...
github_jupyter
# TAG MATRIX DATA SCRAPER - author: Richard Castro - sticky_rank: 1 - toc: true - badges: true - comments: false - categories: [Matrix] - image: images/scraper.jpg ``` import pandas as pd import requests import datetime date=datetime.datetime.now().strftime("%Y-%m-%d") import dash import dash_core_components as dcc d...
github_jupyter
Import all libraries ``` import requests import json import time import multiprocessing import psycopg2 ``` Functions for loading the data and counting rows in meanwhile ``` # Postgres def load_data_postgres(data): start = time.time() for line in data: response_insert = requests.post('http://localhos...
github_jupyter
``` import numpy as np from sklearn.datasets import fetch_olivetti_faces import matplotlib.pyplot as plt np.random.seed(42) %matplotlib inline data = fetch_olivetti_faces() x = data.data y = data.target print(x.shape) print(y.shape) plt.imshow(x[0].reshape(64, 64), cmap='gray') # Looking on a random set of images fig ...
github_jupyter
``` %matplotlib inline ``` Creating Extensions Using numpy and scipy ========================================= **Author**: `Adam Paszke <https://github.com/apaszke>`_ **Updated by**: `Adam Dziedzic <https://github.com/adam-dziedzic>`_ In this tutorial, we shall go through two tasks: 1. Create a neural network laye...
github_jupyter
##### Copyright 2018 The TensorFlow Authors. Licensed under the Apache License, Version 2.0 (the "License"); ``` #@title Licensed under the Apache License, Version 2.0 (the "License"); { display-mode: "form" } # you may not use this file except in compliance with the License. # You may obtain a copy of the License at...
github_jupyter
# SageMaker Pipelines to Train a BERT-Based Text Classifier In this lab, we will do the following: * Define a set of Workflow Parameters that can be used to parametrize a Workflow Pipeline * Define a Processing step that performs cleaning and feature engineering, splitting the input data into train and test data sets ...
github_jupyter
``` #These dictionaries describe the local hour of the satellite local_times = {"aquaDay":"13:30", "terraDay":"10:30", "terraNight":"22:30", "aquaNight":"01:30" } # and are used to load the correct file for dealing with the date-line. min_hours = {"aquaDay":2, ...
github_jupyter
``` class Person: def __init__(self, fname, lname): self.firstname = fname self.lastname = lname def printname(self): print(self.firstname, self.lastname) class Student(Person): def __init__(self, fname, lname, year): super().__init__(fname, lname) self.graduationye...
github_jupyter
# GradientBoostingRegressor with MinMaxScaler This Code template is for regression analysis using a simple GradientBoostingRegressor based on the Gradient Boosting Ensemble Learning Technique using MinMaxScalerfor Feature Rescaling. ### Required Packages ``` import warnings import numpy as np import pandas as pd ...
github_jupyter
# Plagiarism Text Data In this project, you will be tasked with building a plagiarism detector that examines a text file and performs binary classification; labeling that file as either plagiarized or not, depending on how similar the text file is when compared to a provided source text. The first step in working wi...
github_jupyter
#### New to Plotly? Plotly's Python library is free and open source! [Get started](https://plot.ly/python/getting-started/) by downloading the client and [reading the primer](https://plot.ly/python/getting-started/). <br>You can set up Plotly to work in [online](https://plot.ly/python/getting-started/#initialization-fo...
github_jupyter
### Name: Anjum Rohra # Overview ![it_sector-2.jpg](attachment:it_sector-2.jpg) Being a popular finance journalist of Europe, everyone is waiting for the IT Salary Survey report you release every 3 years. The IT Sector is booming and the younger aspirants keep themselves updated with the trends by the beautiful visu...
github_jupyter
``` from pymongo import MongoClient client = MongoClient(host='localhost', port=27017) db = client['test'] cursor = db.score.find() for data in list(cursor): print(data['a']) db.score.save({'a':6, 'exam': 6}) #내려간 커서를 다시 위로 끌어올림 cursor.rewind() for data in list(cursor): print(data['a']) # 데이터 수정 db.score.update...
github_jupyter
``` %matplotlib inline import glob import numpy as np import matplotlib.pyplot as plt import tensorflow as tf import tensorflow.contrib.learn as skflow from sklearn import metrics datadir='/home/bonnin/dev/cifar-10-batches-bin/' plt.ion() G = glob.glob (datadir + '*.bin') A = np.fromfile(G[0],dtype=np.uint8).reshape(...
github_jupyter
## Crypto Arbitrage In this Challenge, you'll take on the role of an analyst at a high-tech investment firm. The vice president (VP) of your department is considering arbitrage opportunities in Bitcoin and other cryptocurrencies. As Bitcoin trades on markets across the globe, can you capitalize on simultaneous price d...
github_jupyter
Design MERFISH probes using the example inputs from Jeff Moffitt. The original MATLAB design pipeline can be found at https://github.com/ZhuangLab/MERFISH_analysis. # Prepare inputs ``` # Download the input data # This is for the UNIX-like operating systems. If you are using Windows, just download the files according...
github_jupyter
``` %gui qt %matplotlib qt from glob import glob import os, sys # only necessary if using without installing sys.path.append("..") from xmcd_projection import * from skimage.io import imread, imsave from PIL import Image import meshio import trimesh ``` ### Get file paths ``` msh_file = "DW_MeshConv4nm_25nmSep.vtu" m...
github_jupyter
# Dask Overview Dask is a flexible library for parallel computing in Python that makes scaling out your workflow smooth and simple. On the CPU, Dask uses Pandas (NumPy) to execute operations in parallel on DataFrame (array) partitions. Dask-cuDF extends Dask where necessary to allow its DataFrame partitions to be pro...
github_jupyter
<table class="ee-notebook-buttons" align="left"> <td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/FeatureCollection/distance.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td> <td><a target="_blank" h...
github_jupyter
# Hypothesis: Are digitised practices causing more failures? ## Hypothesis We believe that practices undergoing Lloyd Gerge digitisation have an increased failure rate. We will know this to be true when we look at their data for the last three months, and see that either their failures have increased, or that in gen...
github_jupyter
# Data Collection Using Web Scraping ## To solve this problem we will need the following data : ● List of neighborhoods in Pune. ● Latitude and Longitudinal coordinates of those neighborhoods. ● Venue data for each neighborhood. ## Sources ● For the list of neighborhoods, I used (https://en.wikipedia.org/wiki/Cat...
github_jupyter
# Monte Carlo Simulation This notebook provides introduction to Monte Carlo simulation using a toy example. The example is built upon a famous casino game known as **Rouulette** (Ruletka). During the game, players (bettros) make a bet on an integer, colour or a range and win if they bet was correct. Roulettes usually ...
github_jupyter
# Tabulate results ``` import os import sys from typing import Tuple import pandas as pd from tabulate import tabulate from tqdm import tqdm sys.path.append('../src') from read_log_file import read_log_file LOG_HOME_DIR = os.path.join('../logs_v1/') assert os.path.isdir(LOG_HOME_DIR) MODEL_NAMES = ['logistic_regressio...
github_jupyter
# Preparation ``` # dependencies import pandas as pd import numpy as np import missingno as msno import matplotlib.pyplot as plt import re from sklearn.model_selection import train_test_split from textwrap import wrap from sklearn.preprocessing import StandardScaler import warnings warnings.filterwarnings("ignore") ...
github_jupyter
<a href="https://colab.research.google.com/github/PacktPublishing/Hands-On-Computer-Vision-with-PyTorch/blob/master/Chapter15/Handwriting_transcription.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ``` !wget https://www.dropbox.com/s/l2ul3upj7dkv4...
github_jupyter
## Dependencies ``` import json, glob from tweet_utility_scripts import * from tweet_utility_preprocess_roberta_scripts_aux import * from transformers import TFRobertaModel, RobertaConfig from tokenizers import ByteLevelBPETokenizer from tensorflow.keras import layers from tensorflow.keras.models import Model ``` # L...
github_jupyter
``` import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import numpy as np import statsmodels.formula.api as smf import statsmodels.api as sm from statsmodels.graphics.regressionplots import influence_plot import sklearn startup=pd.read_csv("50_Startups.csv") startup startup.describe() startup.hea...
github_jupyter
## Importing Modules ``` #%matplotlib notebook from tqdm import tqdm %matplotlib inline #Module to handle regular expressions import re #manage files import os #Library for emoji import emoji #Import pandas and numpy to handle data import pandas as pd import numpy as np #import libraries for accessing the database im...
github_jupyter
# QA Sentiment Analysis: Critical Thinking 9.2.2 # Naive Bayes ### By JEFFREY BLACK # Introduction Question: "How does increasing the sample size affect a t test? Why does it affect a t test in this manner?" Answer: "In the long run, it means that the obtained t is more likely to be significant. In terms of the form...
github_jupyter
<a href="https://colab.research.google.com/github/ziatdinovmax/atomai/blob/master/atomai_atomstat.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Multivariate analysis of ferroic distortions with *atomstat* module Prepared by Maxim Ziatdinov E-m...
github_jupyter
## Load Estonian weather service - https://www.ilmateenistus.ee/teenused/ilmainfo/ilmatikker/ ``` import requests import datetime import xml.etree.ElementTree as ET import pandas as pd from pandas.api.types import is_string_dtype from pandas.api.types import is_numeric_dtype import geopandas as gpd import fiona fr...
github_jupyter
# Distirbuted Training of Mask-RCNN in Amazon SageMaker using EFS This notebook is a step-by-step tutorial on distributed tranining of [Mask R-CNN](https://arxiv.org/abs/1703.06870) implemented in [TensorFlow](https://www.tensorflow.org/) framework. Mask R-CNN is also referred to as heavy weight object detection model...
github_jupyter
# Plotting and Programming in Python (Continued) ## Plotting ``` %matplotlib inline import matplotlib.pyplot as plt time = [0, 1, 2, 3] position = [0, 100, 200, 300] plt.plot(time, position) plt.xlabel('Time (hr)') plt.ylabel('Position (km)') ``` ## Plot direclty from Pandas DataFrame ``` import pandas as pd data...
github_jupyter
# Декораторы Декоратор это функция, которая в качестве одного из аргументов принимает объект и что-то возвращает. Декораторы в Python можно применять ко всему: функциям, классам и методам. Основная цель декораторов – изменить поведение объекта, не меняя сам объект. Это очень гибкая функциональная возможность языка. Д...
github_jupyter
<a href="https://colab.research.google.com/github/john-s-butler-dit/Numerical-Analysis-Python/blob/master/Chapter%2008%20-%20Heat%20Equations/801_Heat%20Equation-%20FTCS.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # The Explicit Forward Time Cen...
github_jupyter
## DS/CMPSC 410 MiniProject #3 ### Spring 2021 ### Instructor: John Yen ### TA: Rupesh Prajapati and Dongkuan Xu ### Learning Objectives - Be able to apply thermometer encoding to encode numerical variables into binary variable format. - Be able to apply k-means clustering to the Darknet dataset based on both thermome...
github_jupyter
<a href="https://cognitiveclass.ai/"> <img src="https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/PY0101EN/Ad/CCLog.png" width="200" align="center"> </a> <h1>Dictionaries in Python</h1> <p><strong>Welcome!</strong> This notebook will teach you about the dictionaries in the Python Pr...
github_jupyter
In this assignment, you'll continue working with the U.S. Education Dataset from Kaggle. The data gives detailed state level information on several facets of education on an annual basis. To learn more about the data and the column descriptions, you can view the Kaggle link above. Access this data using the Thinkful d...
github_jupyter
<a href="https://colab.research.google.com/github/Ayanlola2002/deep-learning-flower-identifier/blob/master/Image_Classifier_Project.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Developing an AI application Going forward, AI algorithms will be ...
github_jupyter
``` import numpy as np import pandas as pd import matplotlib.pyplot as plt data = pd.read_csv("iris.data") data.head() data = pd.read_csv("iris.data", header= None) column_name = ['sepal length', 'sepal width', 'petal length', 'petal width', 'class'] data.columns = column_name data.head() ``` ``` # Split the dataset b...
github_jupyter
# Stochastic Variational GP Regression ## Overview In this notebook, we'll give an overview of how to use SVGP stochastic variational regression ((https://arxiv.org/pdf/1411.2005.pdf)) to rapidly train using minibatches on the `3droad` UCI dataset with hundreds of thousands of training examples. This is one of the mo...
github_jupyter
``` import torch from abc import ABC, abstractmethod import numpy as np def calc_out_shape(input_matrix_shape, out_channels, kernel_size, stride, padding): batch_size, channels_count, input_height, input_width = input_matrix_shape output_height = (input_height + 2 * padding - (kernel_size - 1) - 1) // stride + ...
github_jupyter
# MRCA estimation ------- You can access your data via the dataset number. For example, ``handle = open(get(42), 'r')``. To save data, write your data to a file, and then call ``put('filename.txt')``. The dataset will then be available in your galaxy history. Notebooks can be saved to Galaxy by clicking the large gree...
github_jupyter
**Notas para contenedor de docker:** Comando de docker para ejecución de la nota de forma local: nota: cambiar `<ruta a mi directorio>` por la ruta de directorio que se desea mapear a `/datos` dentro del contenedor de docker. ``` docker run --rm -v <ruta a mi directorio>:/datos --name jupyterlab_numerical -p 8888:88...
github_jupyter
<div style="width:1000 px"> <div style="float:right; width:98 px; height:98px;"> <img src="https://raw.githubusercontent.com/Unidata/MetPy/master/metpy/plots/_static/unidata_150x150.png" alt="Unidata Logo" style="height: 98px;"> </div> <h1>Introduction to Pandas</h1> <h3>Unidata Python Workshop</h3> <div style="clea...
github_jupyter
## Generate test.txt, train.txt, validation.txt and class_weights to be used in training ``` %load_ext autoreload %autoreload 2 import os os.getcwd() import sys, glob, shutil os.chdir(os.path.dirname(os.getcwd())) os.getcwd() ``` ## Input params ``` import fnmatch import numpy as np import pickle base = "data/Engli...
github_jupyter
420-A52-SF - Algorithmes d'apprentissage supervisé - Hiver 2020 - Spécialisation technique en Intelligence Artificielle<br/> MIT License - Copyright (c) 2020 Mikaël Swawola <br/> ![Projet #2 - Solution](static/project2-banner.png) <br/> ``` %reload_ext autoreload %autoreload 2 %matplotlib inline ``` ## 0 - Import des...
github_jupyter
``` !git clone https://github.com/parhamzm/Beijing-Pollution-DataSet !ls Beijing-Pollution-DataSet import torch import torchvision import torch.nn as nn from torchvision import transforms import pandas as pd import matplotlib.pyplot as plt import numpy as np from torch.utils.data import random_split from math import...
github_jupyter
# Simulation iteration Let $A$ be an $m \times m$ real symmetric matrix with eigenvalue decomposition: $\newcommand{\ffrac}{\displaystyle \frac} \newcommand{\Tran}[1]{{#1}^{\mathrm{T}}}A = Q \Lambda \Tran{Q}$, where the eigenvalues of $A$ ar ordered as $\left| \lambda_1 \right| > \left| \lambda_2 \right| > \left| \lamb...
github_jupyter
``` import numpy as np import pandas as pd import statsmodels.api as sm import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression import seaborn as sns sns.set() raw_data = pd.read_csv('1.04. Real-life example.csv') raw_data.head() ``` ## Preprocessing ``` raw_data.describe(include='all') data...
github_jupyter
<a href="https://colab.research.google.com/github/AnzorGozalishvili/active_learning_playground/blob/main/notebooks/regular_sentiment_analysis_pipeline.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Simple Sentiment Analysis Pipeline Here we trai...
github_jupyter
# Bias Removal Climate models can have biases relative to different verification datasets. Commonly, biases are removed by postprocessing before verification of forecasting skill. `climpred` provides convenience functions to do so. ``` import climpred import xarray as xr import matplotlib.pyplot as plt from climpred ...
github_jupyter