text stringlengths 2.5k 6.39M | kind stringclasses 3
values |
|---|---|
```
# =============================================================
# Copyright © 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT
# =============================================================
```
# Daal4py K-Means Clustering Example for Distributed Memory Systems [SPMD mode]
## IMPORTANT NOTICE
When using... | github_jupyter |
```
# Basic python library imports
import math
import numpy
import scipy
import matplotlib.pyplot as plt
%matplotlib notebook
import mplhep as hep
plt.style.use(hep.style.ATLAS)
import ipywidgets as widgets
```
# Usage Instructions
* Use "ALT+r" key combination to go to slideshow mode
* Use Spacebar (SHIFT+Spacebar... | github_jupyter |
# What is the Requests Resource?
Requests is an Apache2 Licensed HTTP library, written in Python. It is designed to be used by humans to interact with the language. This means you don’t have to manually add query strings to URLs, or form-encode your POST data. Don’t worry if that made no sense to you. It will in due ti... | github_jupyter |
# BIDMach: basic classification
For this tutorial, we'll BIDMach's GLM (Generalized Linear Model) package. It includes linear regression, logistic regression, and support vector machines (SVMs). The imports below include both BIDMat's matrix classes, and BIDMach machine learning classes.
```
import $exec.^.lib.bidmac... | github_jupyter |
# Diseño de software para cómputo científico
----
## Unidad 5: Integración con lenguajes de alto nivel con bajo nivel.
## Agenda de la Unidad 5
- JIT (Numba)
- Cython.
- Integración de Python con FORTRAN.
- **Integración de Python con C.**
## Ctypes
- Permite usar bibliotecas existentes en otros lenguajes escrib... | github_jupyter |
# Unbinned Likelihood Tutorial
The detection, flux determination, and spectral modeling of Fermi LAT sources is accomplished by a maximum likelihood optimization technique as described in the [Cicerone](https://fermi.gsfc.nasa.gov/ssc/data/analysis/documentation/Cicerone/Cicerone_Likelihood/) (see also e.g. [Abdo, A. ... | github_jupyter |
##### Copyright 2020 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 |
# Creating your own dataset from Google Images
*by: Francisco Ingham and Jeremy Howard. Inspired by [Adrian Rosebrock](https://www.pyimagesearch.com/2017/12/04/how-to-create-a-deep-learning-dataset-using-google-images/)*
```
!curl https://course.fast.ai/setup/colab | bash
```
In this tutorial we will see how to easi... | github_jupyter |
# Logistic Regression with Eager API
A logistic regression implemented using TensorFlow's Eager API.
- Author: Aymeric Damien
- Project: https://github.com/aymericdamien/TensorFlow-Examples/
## MNIST Dataset Overview
This example is using MNIST handwritten digits. The dataset contains 60,000 examples for training a... | github_jupyter |
# Ray RLlib - RecSys: Recommender System
© 2019-2020, Anyscale. All Rights Reserved

This section explores one approach for using *reinforcement learning* with [Ray RLlib](https://rllib.io/) to build a [*recommender system*](https://en.wikipedia.org/wiki/Recom... | github_jupyter |
# Orchestrating Jobs, Model Registration, Continuous Deployment, and Lineage Tracking with Amazon SageMaker
Amazon SageMaker offers Machine Learning application developers and Machine Learning operations engineers the ability to orchestrate SageMaker jobs and author reproducible Machine Learning pipelines, deploy cust... | github_jupyter |
Code:<a href="https://github.com/lotapp/BaseCode" target="_blank">https://github.com/lotapp/BaseCode</a>
**多图旧版**:<a href="https://www.cnblogs.com/dunitian/p/9156097.html" target="_blank">https://www.cnblogs.com/dunitian/p/9156097.html</a>
**在线预览**:<a href="http://github.lesschina.com/python/base/pop/3.list_tuple_dic... | github_jupyter |
<a href="https://colab.research.google.com/github/ngupta23/pycaret_faqs/blob/main/time_series/pycaret_ts_custom_model_sktime_tuning.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
## Install & Import Library
```
try:
import pycaret
except:
!pip... | github_jupyter |
```
import os
import json
import pandas as pd
import numpy as np
from PIL import Image, ImageDraw
from pprint import pprint
import cv2
import matplotlib.pyplot as plt
%matplotlib inline
def batch_iou(boxes, box):
lr = np.maximum(
np.minimum(boxes[:, 2], box[2]) - np.maximum(boxes[:, 0], box[0]),
0.
... | github_jupyter |
```
# !pip install https://github.com/ClimateImpactLab/dodola.git
import numpy as np
import xarray as xr
from dodola.core import (
train_quantiledeltamapping,
adjust_quantiledeltamapping,
train_analogdownscaling,
adjust_analogdownscaling,
)
def test_qplad_integration_af_quantiles():
"""
Test QP... | github_jupyter |
# PyTorch in 12 Minutes 48 seconds
```
import torch
import torch.nn as nn
import torch.optim as optim
from torch.autograd import Variable
from torch.utils.data import DataLoader
from torch.utils.data import sampler
import torchvision
import torchvision.datasets as dset
import torchvision.transforms as T
import numpy... | github_jupyter |
# Quanvolutional Neural Networks
```
import pennylane as qml
# Just like standard NumPy, but with the added benefit of automatic differentiation
from pennylane import numpy as np
from pennylane.templates import RandomLayers
import tensorflow as tf
from tensorflow import keras
import matplotlib.pyplot as plt
%matplotli... | github_jupyter |
## Computação científica para biólogos
### Sumário
[**Introdução: o porquê deste curso**](./Introdução.html/)
I.1 Apresentação
I.2 Informática cada vez mais necessária
I.3 As ferramentas
[**Módulo 1: Ferramentas básicas**](./Módulo 1.html)
1.1 - Linha de comando: Terminal
1.2 - Editor de texto e IDE: Atom
1... | github_jupyter |
<a href="https://colab.research.google.com/github/NeuromatchAcademy/course-content-dl/blob/main/projects/Neuroscience/blurry_vision.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# Vision with Lost Glasses: Modelling how the brain deals with noisy ... | github_jupyter |
# CaBi ML fitting - Random Forest
Trying out Random Forest here since it seems so effective and quick to compute.
## 0. Data load, shaping, and split
* Read in data from AWS
* Encode time variable (day_of_year) as cyclical
* Split into Xtrain, Xtest, ytrain, ytest based on date
* Specify feature and target columns
... | github_jupyter |
```
import numpy as np
import pandas as pd
df = pd.read_csv('C:\\Ashish\\Clustering-Bin-Packing\\src\\main\\resources\\loads.csv', parse_dates=["collection_date","delivery_date"])
df.head()
df = df[df.collection_longitude < -1.5]
df = df[df.collection_longitude > -3.5]
df = df[df.collection_latitude < 60]
df = df[df.co... | github_jupyter |
#
# Note:
### This example notebook was written for modnet 0.1 and will not work as it !
### Please use the two other "ref_index" notebooks as tutorials, and this as an inspiration for multi-target learning.
### An update will follow...
# Predicting vibrational thermodynamics
The vibrational entropy, enthalpy, free ... | github_jupyter |
# Peter Moss Acute Myeloid & Lymphoblastic Leukemia AI Research Project
## ALL FastAI SqueezeNet 1_1 Classifier
**Using The ALL Image Database for Image Processing & The Leukemia Blood Cell Image Classification Using Convolutional Neural Network Research Paper**
The ALL FastAI SqueezeNet 1_1 Classifier was crea... | github_jupyter |
# Image Captioning with LSTM
This is a partial implementation of "Show and Tell: A Neural Image Caption Generator" (http://arxiv.org/abs/1411.4555), borrowing heavily from Andrej Karpathy's NeuralTalk (https://github.com/karpathy/neuraltalk)
This example consists of three parts:
1. COCO Preprocessing - prepare the da... | github_jupyter |
```
import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/Lambda-School-Labs/best-places-to-live-ds/master/data/best_places.csv')
# Look at only 256 largest cities
reduced_df = df[df['population'] >= 93298]
ranked_df = pd.read_csv('https://github.com/Lambda-School-Labs/best-places-to-live-ds/raw/mas... | github_jupyter |
```
import pandas as pd
import numpy as np
import sys
version = ".".join(map(str, sys.version_info[:3]))
print('python version ', version)
print('numpy version ', np.__version__)
print('pandas version ',pd.__version__)
import geopandas as gpd
import pysal
print("geopandas version ", gpd.__version__)
import matplotlib... | github_jupyter |
<img src="../Pierian-Data-Logo.PNG">
<br>
<strong><center>Copyright 2019. Created by Jose Marcial Portilla.</center></strong>
# Basic PyTorch Neural Network
Now it's time to put the pieces together. In this section we'll:
* create a multi-layer deep learning model
* load data
* train and validate the model<br>
We'll ... | github_jupyter |
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.

## Use MLflow with Azure Machine Learning for Local Traini... | github_jupyter |
```
import matplotlib.pyplot as plt
from sklearn.pipeline import Pipeline
from sklearn import datasets, linear_model
from sklearn import cross_validation
import numpy as np
import pandas as pd
from sklearn import preprocessing
df = pd.read_excel("data0505.xlsx",header=0)
# clean up data
df = df.dropna(how = 'all')
df =... | github_jupyter |
## Preliminary
```
!pip install -q pytorch-metric-learning[with-hooks]
!git clone https://github.com/manuel-tran/s5cl.git
%cd s5cl
import os
import sys
import random
import numpy as np
import torch
import torch.optim as optim
from torch.utils.data import DataLoader
import torchvision
from torchvision import datasets,... | github_jupyter |
# Gaussian-process optimisation demo
`GpOptimiser` extends the functionality of `GpRegressor` to perform Gaussian-process optimisation, also often referred to as 'Bayesian optimisation'.
Bayesian optimisation is suited to problems for which a single evaluation of the function being explored is expensive, such that th... | github_jupyter |
```
from google.colab import drive
drive.mount("/content/drive")
import os
os.chdir("/content/drive/MyDrive/RSO Activities/DAIS/DAIS FALL 2021/Project Term 2/조성근, 이진호/Codes")
#os.chdir("/content/drive/MyDrive/DAIS FALL 2021/Project Term 2/조성근, 이진호/Codes")
```
# Load the Data required for GNN
```
fr... | github_jupyter |
# A0: jQMM tests notebook
# Introduction
This notebook contains all unit tests fof the jQMM library compiled into a single notebook, for ease of use.
# Setup
First set environment and path variables properly:
```
quantmodelDir = '/users/hgmartin/libraries/quantmodel'
```
This is the only place where the jQMM libr... | github_jupyter |
```
import numpy as np
import matplotlib.pyplot as plt
import networkx as nx
```
Remember that in week 1 we had generated open-loop commands for a set of manoeuvres such as
$[("straight", 5), ("right", 90), ("straight", 6), ("left", 90)]$
Let us do repeat, but with a change. Instead of left/ right, simply use turn an... | github_jupyter |
# Deep Dreams (with Caffe)
This notebook demonstrates how to use [Caffe](http://caffe.berkeleyvision.org/) neural network framework to produce "dream" visuals shown in the [Google Research blog post](http://googleresearch.blogspot.ch/2015/06/inceptionism-going-deeper-into-neural.html).
It'll be interesting to see wha... | github_jupyter |
# # Condicionais if, else, elif 28/04/2020
```
# if permite dizer ao computador executar ações com base em um determinado conjunto de resultados. Em python a identação faz parte da sintaxe;
# Condicional simples
# if(expressão 1):
# print('Comando executado caso expressão 1 seja verdadeira')
# else:
# prin... | github_jupyter |
# Keras Intro: Fully Connected Models
Keras Documentation: https://keras.io
In this notebook we explore how to use Keras to implement Deep Fully Connected models
```
%matplotlib inline
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
```
## Shallow and Deep Networks
```
from sklearn.datasets... | github_jupyter |
This is a python notebook made by **Yoonsoo P. Bach** to do photometry to the data obtained from the Seoul National University Astronomical Observatory (SNUO, also known as SAO, which I'd avoid due to the possible confusion with [Smithsonian Astrophysical Observatory](https://www.cfa.harvard.edu/sao)).
Observation was... | github_jupyter |
# Tutorial - Plotting LUT
This tutorial shows how to plot Prime Implicants (F') and Two-Symbol (F'') schematas
```
%matplotlib inline
import os
import numpy as np
import matplotlib as mpl
import matplotlib.style
mpl.style.use('classic')
import matplotlib.pyplot as plt
from matplotlib.text import Text
from matplotlib.p... | github_jupyter |
Import data into Dataframe
```
import numpy as np
import pandas as pd
import seaborn as sns
pd.set_option("max_columns", None)
reviews = pd.read_csv(r"/Users/abhishekkonduri/Main/CMPE_256/Final_Project/seattle/reviews.csv")
listings = pd.read_csv(r"/Users/abhishekkonduri/Main/CMPE_256/Final_Project/seattle/listings.cs... | github_jupyter |
## Histone deacetylase 1 - part 4 (library enumeration)
### Import libraries
```
import pandas as pd
from rdkit import Chem
```
### Read in the datasets
```
df = pd.read_csv('hdac1_inhibitors_stripped.csv')
df_trans = pd.read_csv('hdac1_inhibitors_transformations.csv')
```
### Merge on assay identifier to enumera... | github_jupyter |
# Load previously exported files
The files being imported below were constructed in the last six exploratory notebooks (1.0 to 1.5). Here, we join them all using the `acct` column as key.
```
%load_ext autoreload
%autoreload 2
from pathlib import Path
import pickle
import pandas as pd
from src.definitions import RO... | github_jupyter |
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.

# Neural style trans... | github_jupyter |
#### Import statements
```
import sys
import os
import numpy as np
from opentrons import robot, instruments, labware
#Original Directory
og_dir = os.getcwd()
#Change your_path to your system's ../ot2protocols. You may or may not need r in front.
#I couldn't get this to work otherwise. I had to modify ot2protocols._... | github_jupyter |
# Labelling Tutorial
This Jupyter notebook provides a simple, semi-automated, method to produce a ground truth data set that can be used to train a neural network for use as a spectral shape classifier in the MCALF package. The following code can be adapted depending on the number of classifications that you want.
[D... | github_jupyter |
# Introduction to Machine Learning in Python
## What is Machine Learning?
### Machine Learning at Glance
<img src="../images/ml-wordle-436.jpg" width="60%">
> Machine learning teaches machines how to carry out tasks by themselves. It is that simple.
The complexity comes with the details.
_W. Richert & L.P. Coelho,... | github_jupyter |
# Python-Objekte
## Warum Objekte?
Eigenschaften (*properties*) und Verhalten (*behavior*) können in individuellen Objekten gebündelt werden.
Objekt-orientierte Programmierung (OOP) steht im Gegensatz zu prozeduralem Programmieren.
- **prozedural** Struktur wie ein Kochrezept, im Zentrum stehen die Daten und der Da... | github_jupyter |
## CIFAR 10
```
%matplotlib inline
%reload_ext autoreload
%autoreload 2
from fastai.conv_learner import *
PATH = Path("data/cifar10/")
os.makedirs(PATH,exist_ok=True)
torch.cuda.set_device(1)
classes = ('plane', 'car', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck')
stats = (np.array([ 0.4914 , 0.4821... | github_jupyter |
```
import cv2
import numpy as np
import tensorflow as tf
# Skip this, just move to a pure dockerized solution; there may be an
# interaction with trying to do this out of a Jupyter notebook and/or
# using uvicorn with concurrency and Jupyter.
# import tensorflow as tf
# from PIL import Image
# import numpy as np
# im... | github_jupyter |
# Transformer tap changer based on load flow results for the transformer
In this tuitorial, we describe a transformer tap control strategy in a Low-Voltage (LV) distribution grid with distributed generation. The concept of the tap changer control is based on reacting to the direction and magnitude of the power flowing... | github_jupyter |
# Running JAX on Cloud TPU VMs from Colab
**Authors**
* Gerardo Durán-Martín
* Mahmoud Soliman
* Kevin Murphy
# Define some global variables
We create a `commands.sh` file that defines some macros.
**Edit the values in this file to match your credentials**.
This file must be called in every cell below that begins w... | github_jupyter |
<p style="border: 1px solid #e7692c; border-left: 15px solid #e7692c; padding: 10px; text-align:justify;">
<strong style="color: #e7692c">Tip.</strong> <a style="color: #000000;" href="https://nbviewer.jupyter.org/github/PacktPublishing/Hands-On-Computer-Vision-with-TensorFlow-2/blob/master/Chapter07/ch7_nb7_genera... | github_jupyter |
# 5. The Need for Packages
Modules are sets of functions and classes that are oriented towards a given goal.
Say you have a bunch of functions that altogether serve one purpose (e.g., connect to a website and download stuff acccording to some criteria).
Then your bunch may be collected into a module.
Packages are sets... | github_jupyter |
# Filter By Polymer Chain Type Demo
Simple exmaple of reading an MMTF Hadoop Sequence file, filtering the entries by polymer chain type, L Protein Chain and D Saccharide Chain, and count the number of entires. This example also show show methods can be chained for a more concise syntax
#### Supported polymer chain ty... | github_jupyter |
## Common Error Messages
Hi guys, in this lecture we shall be looking at a couple of Python's error messages you are likely to see when writing scripts. We shall also cover a few fixes for said problems.
## Syntax Error
Syntax Error's occur when you have written something that Python violates the grammatical rules ... | github_jupyter |
# Analysis of order of contigs with QUAST
In order to analyse whether the plasmid sequences produced by Recycler correspond to the expected plasmids or whether misassembly events happened, we compared the sequences using QUAST.
*Summary:*
Recycler's predictions included misassemblies in only 5 test samples but in ... | github_jupyter |
```
%matplotlib inline
import datetime
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from os.path import join
monthly_bins = list(range(0, 30*11, 30)) # For charting, 30-days per group.
monthly_bins.append(9999)
grade_bins = [0, 69, 79, 89, 100]
grade_bin_labels = ['SCORE... | github_jupyter |
# [Implementation and application patterns for explaining methods](https://arxiv.org/abs/1904.04734)
-------
#### Software chapter of the "Interpretable AI: Interpreting, Explaining and Visualizing Deep Learning" book
--------
This is the accompanying code for the software chapter of the book "Interpretable AI: Inter... | github_jupyter |
```
#plot the impurity indices for the probability range [0,1]
import matplotlib.pyplot as plt
import numpy as np
def gini(p):
return (p)*(1 - (p)) + (1 - p)*(1 - (1-p))
def entropy(p):
return - p*np.log2(p) - (1 - p)*np.log2((1-p))
def error(p):
return 1 - np.max([p, 1 - p])
x = np.arange(0.0, 1.0, 0.01)
... | github_jupyter |
# Modelling polydeformation
### Imports
```
#import the Forward Modelling Engine modules - LoopStructural
from LoopStructural.interpolators.piecewiselinear_interpolator import PiecewiseLinearInterpolator as PLI
from LoopStructural.interpolators.discrete_fold_interpolator import DiscreteFoldInterpolator as DFI
from Lo... | github_jupyter |
# Plotting
A good way to illustrate the plotting possibilities is through a long list of demos.
Note that Osyris's plotting functions are wrapping Matplotlib's plotting functions,
and forwards most Matplotlib arguments to the underlying function.
```
import osyris
import numpy as np
import matplotlib.pyplot as plt
... | 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 |
# Couple channel model
In this notebook we will create a simple ocean-atmosphere system in a 1D channel. The two media are coupled through heat fluxes, but there is no exchange of momentum (could be added) as both are advected with pre-determined velocities. The governing equations for the atmospheric and the oceaning... | github_jupyter |
# 1-2.1 Intro Python
## Strings: input, testing, formatting
- **input() - gathering user input**
- print() formatting
- Quotes inside strings
- Boolean string tests methods
- String formatting methods
- Formatting string input()
- Boolean `in` keyword
-----
><font size="5" color="#00A0B2" face="verdana"> <B>Stud... | github_jupyter |
```
%matplotlib inline
import os
os.sys.path.append('..')
import torch
import matplotlib.pyplot as plt
import scipy.misc
import warnings
import sys
import argparse
warnings.filterwarnings("ignore")
from torch.autograd import Variable
from torchvision import datasets, transforms
import dataset_multi
from darknet_multi ... | github_jupyter |
# Seed List Cleanup
Prepare a clean list of seeds (candidates for pseudo-crawls)
- add columns required to get page locations and metrics from Common Crawl
- remove duplicated seeds
- normalize URLs
```
import pandas as pd
df = pd.read_csv('candidate_websites_for_crawling.csv')
df.head()
import json
# select mandat... | github_jupyter |
```
import pandas as pd
import numpy as np
from datetime import datetime
import os
def get_case_time_series(date):
# source_path="../RAWCSV/2021-11-01"
case_time_series_df=pd.read_csv("/home/swiadmin/test/csv/latest/case_time_series.csv")
TT_final_df=pd.read_csv("../RAWCSV/"+ date +"/TT_final.csv")
v=T... | github_jupyter |
##### Copyright 2019 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 |
### Missionaries and Cannibals
Missionaries and cannibals problem is a famous toy problem in artificial intelligence. You have one boat, three missionaries and three cannibals. The objective is to move everyone from left bank to right bank. There are two constraints. One, the boat can only take two people at m... | github_jupyter |
# DAT210x - Programming with Python for DS
## Module5- Lab10
```
import numpy as np
import pandas as pd
from sklearn.utils.validation import check_random_state
import scipy.io.wavfile as wavfile
```
Good Luck! Heh.
### About Audio
Samples are Observations. Each audio file will is a single sample in our dataset.
... | github_jupyter |
```
%load_ext autoreload
%autoreload 2
import sys
sys.path.append("../")
from IPython.core.display import HTML
import numpy as np
from olm_tasks.predictor_utils import load_predictor
from olm_tasks.classification.models.text_classifier import TextClassifier
from olm_tasks.classification.predictors.text_classifier_pr... | github_jupyter |
# Processing Bird Call Data
## Background
The following example was obtained by translating the R code from [TidyTuesday 2019-04-30](https://github.com/rfordatascience/tidytuesday/tree/47567cb80846739c8543d158c1f3ff226c7e5a5f/data/2019/2019-04-30)
to Python using Pandas and PyJanitor. It provides a simple example of ... | github_jupyter |
```
import json
import os
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.font_manager as font_manager
import scipy.stats
# Plotting defaults
font_manager.fontManager.ttflist.extend(
font_manager.createFontList(
font_manager.findSystemFonts(fontpaths="/users/amtseng/modules/fonts")
... | github_jupyter |
# Simple classification example with missing feature handling and parameter tuning
This tutorial will show you how to use CatBoost to train binary classifier for data with missing feature and how to do hyper-parameter tuning using Hyperopt framework.
Gaps in data may be a challenge to handle correctly, especially whe... | github_jupyter |
### Time Series Analysis on Corona Virus Data
https://machinelearningmastery.com/time-series-forecasting-methods-in-python-cheat-sheet/
```
from __future__ import print_function
import pandas as pd
import numpy as np
import os
import pickle
import os.path
from datetime import datetime
import pyarrow
import matplotli... | github_jupyter |
<img src="images/logo.jpg" style="display: block; margin-left: auto; margin-right: auto;" alt="לוגו של מיזם לימוד הפייתון. נחש מצויר בצבעי צהוב וכחול, הנע בין האותיות של שם הקורס: לומדים פייתון. הסלוגן המופיע מעל לשם הקורס הוא מיזם חינמי ללימוד תכנות בעברית.">
# <span style="text-align: right; direction: rtl; float: r... | github_jupyter |
# Sense and Move
In this notebook, let's put all of what we've learned together and see what happens to an initial probability distribution as a robot goes trough cycles of sensing then moving then sensing then moving, and so on! Recall that each time a robot senses (in this case a red or green color)it gains informat... | github_jupyter |
```
import pandas as pd
from global_land_mask import globe
ndf = pd.read_csv('../data/2_blank_da_data.csv')
ndf['index'] = ndf.index
ndf.head()
relevance_preds = pd.read_csv('../data/1_document_relevance.csv')
df_ndf = pd.read_csv(f'../data/study_gridcell_2.5.csv')
print(df_ndf.shape)
#df_ndf = df_ndf[df_ndf.doc_id.is... | github_jupyter |
# WARNING!
```
# this is a draft version; this notebook will be soon extended with real working code that
# uses data files and shows the examples of how to transform the data.
# Be patient, please
```
# Setup
This is an example of how the Jupyter kernel for this notebook can be configured path to the file with thi... | github_jupyter |
```
__depends__=["../results/ebtel_varying_tau_results.pickle"]
__dest__=["../results/tau20.electron.sol.txt","../results/tau20.ion.sol.txt","../results/tau20.single.sol.txt",
"../results/tau500.electron.sol.txt","../results/tau500.ion.sol.txt","../results/tau500.single.sol.txt"]
```
# Compute `IonPopSolver`... | github_jupyter |
<a href="https://colab.research.google.com/github/woorimlee/Algorithm-Repository/blob/master/TIL/CS.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
- - -
## CS
* 21.01.18 : 네트워크 개요, 물리 계층 신호 전송 규격
* 21.01.19 : 물리 계층 UTP, 허브 CSMA/CD, 단위와 성능(Bandwid... | github_jupyter |
# Name
Submitting a Cloud Machine Learning Engine training job as a pipeline step
# Label
GCP, Cloud ML Engine, Machine Learning, pipeline, component, Kubeflow, Kubeflow Pipeline
# Summary
A Kubeflow Pipeline component to submit a Cloud ML Engine training job as a step in a pipeline.
# Details
## Intended use
Use th... | github_jupyter |
```
x = 10
x + 1
else = false
```
- Names of variables are in lower case.
- Word separation can be indicated by underscores ('_'), but use of underscores is discouraged unless the name would be hard to read otherwise.
- Names of Types and Modules begin with a capital letter and word separation is shown with upper came... | github_jupyter |
# Zola
I saw [this post](https://hyperallergic.com/541775/zola-sundance-janicza-bravo-jeremy-o-harris/?utm_medium=social&utm_source=twitter&utm_campaign=sf) about a Twitter thread that has been turned into a movie. I thought it would be interesting to find the original thread on Twitter, but [the account](twitter.com/... | github_jupyter |
# Wen CNN
Simulate the CNN approach of Wen et al. 2019.
This was the first version that ran tom completion on trial data. The code needs improvement to remove hard-coded image size.
```
import time
def show_time():
t = time.time()
print(time.strftime('%Y-%m-%d %H:%M:%S %Z', time.localtime(t)))
show_time()
i... | github_jupyter |
# Chapter 3. Pandas 数据处理
```
import pandas as pd
import numpy as np
food_info = pd.read_csv("food_info.csv")
print(type(food_info)) # DataFrame
# Data types:
# object - For string values
# int - For integer values
# float - For float values
# datetime - For time values
# bool - For Boolean values
print(food_i... | github_jupyter |
```
import os
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from scipy.stats import pearsonr
LOCAL_ROOT = os.environ.get('LOCAL_ROOT')
type='power'
hbn_afni_good=np.load(f'{LOCAL_ROOT}/PipelineHarmonization/figure/s2/fd/HBN_AFNI_FD_'+type+'_low_motion.npy')
hbn_afni_bad=np.load(f'{LOCAL_ROOT... | github_jupyter |
# Training 10,000 layer ReZero neural network on CIFAR-10 data
In this notebook we will see how the [ReZero](https://arxiv.org/abs/2003.04887) architecture addition enables training of very deep networks. In particular, we will load the CIFAR-10 dataset via `torchvision` and train a deep fully connected network with v... | github_jupyter |
```
%pylab inline
import glob
import os
import pandas as pd
from collections import defaultdict
from riboraptor.utils import summary_starlogs_over_runs
from riboraptor.sradb import SRAdb
from riboraptor.helpers import path_leaf, parse_star_logs, millify, order_dataframe
from riboraptor.cutadapt_to_json import cutadapt... | github_jupyter |
# Bring Your Own Model (k-means)
_**Hosting a Pre-Trained Model in Amazon SageMaker Algorithm Containers**_
---
---
## Contents
1. [Background](#Background)
1. [Setup](#Setup)
1. [(Optional)](#Optional)
1. [Data](#Data)
1. [Train Locally](#Train Locally)
1. [Convert](#Convert)
1. [Host](#Host)
1. [Confirm](#C... | github_jupyter |
<h1 align="center">TensorFlow Neural Network Lab</h1>
<img src="image/notmnist.png">
In this lab, you'll use all the tools you learned from *Introduction to TensorFlow* to label images of English letters! The data you are using, <a href="http://yaroslavvb.blogspot.com/2011/09/notmnist-dataset.html">notMNIST</a>, consi... | github_jupyter |
[this doc on github](https://github.com/dotnet/interactive/tree/master/samples/notebooks/polyglot)
# Visualizing the Johns Hopkins COVID-19 time series data
**This is a work in progress.** It doesn't work yet in [Binder](https://mybinder.org/v2/gh/dotnet/interactive/master?urlpath=lab) because it relies on HTTP commu... | github_jupyter |
<a href="https://colab.research.google.com/github/sdsc-bw/Predictive-Maintenance/blob/master/Turbofan%20RUL%20Prediction/Turbofan%20remaining%20useful%20life%20Prediction.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
In dem vorliegenden Jupyte... | github_jupyter |
<a href="https://colab.research.google.com/github/DingLi23/s2search/blob/pipelining/pipelining/pdp-exp1/pdp-exp1_ice_cslg-rand-200_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 ... | github_jupyter |
## Integrating LSTM model with Azure Machine Learning Package for Forecasting
In this notebook, learn how to integrate LSTM model in the framework provided by Azure Machine Learning Package for Forecasting (AMLPF) to quickly build a forecasting model.
We will use dow jones dataset to build a model that forecasts qua... | github_jupyter |
# Quick script to look at all the files tagged as bc in `file_index.csv`
We import the data, filter out all the other provinces' data except bc, look at all the unique file tags and download all the files for the 3 relevant ones. Adapting this code to download other file tags or provice's data would be trivial.
```
... | github_jupyter |
# Simple Linear Regression
```
import math
import time
import random
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
from scipy.stats import norm
SAVEFIG = False
plt.rcParams["font.family"] = "serif"
plt.rcParams["mathtext.fontset"] = "dejavuserif"
plt.rcParams["figure.figsize"] = (3.5, 3)
... | github_jupyter |
# WMHpypes Quickstart
```
from IPython.display import Image
```
## Grab input data
```
models_dir = '../models' # Folder containing the models as .h5
temp_dir = './tmp' # Folder for the workflow's temporary files
import os
from nipype.pipeline.engine import Workflow, Node
from nipype import DataGrabber, DataSink, ... | github_jupyter |
```
%matplotlib inline
```
The transmission loss (TL) along a duct liner
==================================================
In this example we compute the transmission-loss of a duct liner with grazing flow (M=0.25). The data used in this
example was part of `this study <https://arc.aiaa.org/doi/abs/10.2514/6.2020-2... | github_jupyter |
```
def play_1():
p = player_choice()
(v1,v2) = p
position1 =''
while position1 not in range(1,9):
position1 = input(f'Enter the area where Player 1 need to put the {v1} :')
if position1.isdigit() ==False or position1== '0' :
print('Please enter a valid Digit !')
else... | github_jupyter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.