code
stringlengths
2.5k
150k
kind
stringclasses
1 value
## Die Navier-Stokes-Gleichungen Die Navier-Stokes-Gleichungen sind die Grundgleichungen zur Berechnung reibungsbehafteter Strömungen. Obwohl mit dem Begriff im strengen Sinne nur die Impulsgleichung gemeint ist, wird damit in der numerischen Strömungsmechanik gleich der ganze Gleichungssatz aus Kontinuitäts-, Impuls-...
github_jupyter
# Ensemble Learning ## Initial Imports ``` import warnings warnings.filterwarnings('ignore') import numpy as np import pandas as pd from pathlib import Path from collections import Counter from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.metrics import...
github_jupyter
# Using AI planning to explore data science pipelines ``` from __future__ import print_function import sys import os import types sys.path.append(os.path.abspath(os.path.join(os.getcwd(), "../grammar2lale"))) # Clean output directory where we store planning and result files os.system('rm -rf ../output') os.system('m...
github_jupyter
This Jupyter notebook details theoretically the architecture and the mechanism of the Convolutional Neural Network (ConvNet) step by step. Then, we implement the CNN code for multi-class classification task using pytorch. <br> The notebook was implemented by <i>Nada Chaari</i>, PhD student at Istanbul Technical Univer...
github_jupyter
![](https://files.realpython.com/media/YXhT6fA.d277d5317026.gif) ``` # import requests # with open("mynote.ipynb", "w") as f: # f.write(requests.get("https://raw.githubusercontent.com/polyrand/teach/master/05_testing/testing.ipynb").text) # !pip install ipytest import warnings warnings.filterwarnings("ignore") i...
github_jupyter
# Read in catalog information from a text file and plot some parameters ## Authors Adrian Price-Whelan, Kelle Cruz, Stephanie T. Douglas ## Learning Goals * Read an ASCII file using `astropy.io` * Convert between representations of coordinate components using `astropy.coordinates` (hours to degrees) * Make a spherica...
github_jupyter
#Feature Engineering Notebook Data given was in raw format and it needed to be converted into format which model could make sense. We considered data of 150K users while modelling. <br> A data frame **final_df** was created with all the features.<br> A dataframe **uninstall_unique** was created which had data of the us...
github_jupyter
``` import os import cv2 import numpy as np #import layers import matplotlib.pyplot as plt # credits to https://towardsdatascience.com/lines-detection-with-hough-transform-84020b3b1549 import matplotlib.lines as mlines # ist a,b == m, c def line_detection_non_vectorized(image, edge_image, num_rhos=100, num_thetas=10...
github_jupyter
# Activity 02 ``` import pandas as pd import numpy as np from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from keras.models import Sequential from keras.layers import Dense from tensorflow import random import matplotlib.pyplot as plt import matplotlib %matplotlib ...
github_jupyter
# Autoregressions This notebook introduces autoregression modeling using the `AutoReg` model. It also covers aspects of `ar_select_order` assists in selecting models that minimize an information criteria such as the AIC. An autoregressive model has dynamics given by $$ y_t = \delta + \phi_1 y_{t-1} + \ldots + \phi_...
github_jupyter
``` import os import pandas as pd import math import nltk import numpy as np import matplotlib import matplotlib.pyplot as plt %matplotlib inline import re from nltk.tokenize import WordPunctTokenizer import pickle def load_csv_as_df(file_name, sub_directories, col_name=None): ''' Load any csv as a pandas dat...
github_jupyter
# Deploy the Model The pipeline that was executed created a Model Package version within the specified Model Package Group. Of particular note, the registration of the model/creation of the Model Package was done so with approval status as `PendingManualApproval`. As part of SageMaker Pipelines, data scientists can r...
github_jupyter
# Example: CanvasXpress bubble Chart No. 4 This example page demonstrates how to, using the Python package, create a chart that matches the CanvasXpress online example located at: https://www.canvasxpress.org/examples/bubble-4.html This example is generated using the reproducible JSON obtained from the above page an...
github_jupyter
## Imports ``` import os import sys %env CUDA_VISIBLE_DEVICES=0 %matplotlib inline import pickle import numpy as np import matplotlib import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from matplotlib.ticker import FormatStrFormatter import tensorflow as tf root_path = os.path.dirname(os.path.dirn...
github_jupyter
# Data description & Problem statement: This dataset is originally from the National Institute of Diabetes and Digestive and Kidney Diseases. The objective of the dataset is to diagnostically predict whether or not a patient has diabetes, based on certain diagnostic measurements included in the dataset. Several constr...
github_jupyter
# Simple Hashing and Collisions This is a very simple example of hashing based on the modulo function and neglecting the issue of collisions mentioned in the lecture. ## Introduction Good hashing approaches are available in Python for the *Dictionary* data type. However here is a demonstration of a simple hashing fu...
github_jupyter
``` # Select TensorFlow 2.0 environment (works only on Colab) %tensorflow_version 2.x # Install wandb (ignore if already done) !pip install wandb # Authorize wandb !wandb login # Imports from tensorflow.keras.models import * from tensorflow.keras.layers import * from wandb.keras import WandbCallback import tensorflow a...
github_jupyter
# Integrate 3rd party transforms into MONAI program This tutorial shows how to integrate 3rd party transforms into MONAI program. Mainly shows transforms from `BatchGenerator`, `TorchIO`, `Rising` and `ITK`. ``` ! pip install batchgenerators==0.20.1 ! pip install torchio==0.16.21 ! pip install rising==0.2.0 ! pip i...
github_jupyter
``` import matplotlib,aplpy from astropy.io import fits from general_functions import * import matplotlib.pyplot as plt font = {'size' : 14, 'family' : 'serif', 'serif' : 'cm'} plt.rc('font', **font) plt.rcParams['image.interpolation'] = 'nearest' plt.rcParams['lines.linewidth'] = 1 plt.rcParams['axes.linewidth'] = 1...
github_jupyter
``` import matplotlib.pyplot as plt import numpy as np import numpy.linalg as nplin import itertools #from coniii import * from sklearn.linear_model import LinearRegression np.random.seed(0) def operators(s): #generate terms in the energy function n_seq,n_var = s.shape ops = np.zeros((n_seq,n_var+int(n_var*...
github_jupyter
# Global Segment Overflow - recall function pointers are pointers that store addresses of functions/code - see [Function-Pointers notebook](./Function-Pointers.ipynb) for a review - function pointers can be overwritten using overflow techniques to point to different code/function ## Lucky 7 game - various luck-ba...
github_jupyter
``` #import modules import re import nltk import numpy as np import pandas as pd from nltk.stem.porter import PorterStemmer from nltk.corpus import stopwords from sklearn.naive_bayes import GaussianNB from sklearn.model_selection import train_test_split from sklearn.feature_extraction.text import CountVectorizer from s...
github_jupyter
This notebook contains the code needed to process the data which tracks the POIS and diversity, as generated by the SOS framework Because of the large size of these tables, not all in-between artifacts are provided This code is part of the paper "The Importance of Being Restrained" ``` import numpy as np import pick...
github_jupyter
# Welcome to Covid19 Data Analysis Notebook ------------------------------------------ ### Let's Import the modules ``` import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt ``` ## Task 2 ### Task 2.1: importing covid19 dataset importing "Covid19_Confirmed_dataset.csv" from ...
github_jupyter
# Stability verification of a fixed uncertain system (without dynamic programming) ``` from __future__ import division, print_function import tensorflow as tf import gpflow import numpy as np import matplotlib.pyplot as plt from future.builtins import * from functools import partial %matplotlib inline import plottin...
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
# Deep Learning with PyTorch Step-by-Step: A Beginner's Guide # Chapter 1 ``` try: import google.colab import requests url = 'https://raw.githubusercontent.com/dvgodoy/PyTorchStepByStep/master/config.py' r = requests.get(url, allow_redirects=True) open('config.py', 'wb').write(r.content) excep...
github_jupyter
# Transfer Learning ## Imports and Version Selection ``` # TensorFlow ≥2.0 is required for this notebook import tensorflow as tf from tensorflow import keras assert tf.__version__ >= "2.0" # check if GPU is available as this notebook will be very slow without GPU if not tf.test.is_gpu_available(): print("No GPU w...
github_jupyter
# KAIST AI605 Assignment 1: Text Classification TA in charge: Miyoung Ko (miyoungko@kaist.ac.kr) **Due Date:** September 29 (Wed) 11:00pm, 2021 ## Your Submission If you are a KAIST student, you will submit your assignment via [KLMS](https://klms.kaist.ac.kr). If you are a NAVER student, you will submit via [Google F...
github_jupyter
# Regression Metrics Metrics covered: #### 1) MSE, RMSE, R-squared #### 2) MAE #### 3) (R)MSPE, MAPE #### 4) (R)MSLE #### Notation ![image.png](../images/notation_regression.png) # MSE: Mean Squared Error ![image.png](images/mse.png) ### How to evaluate MSE ? First, you make baseline and check if your mode...
github_jupyter
# Example of simple use of active learning API Compare 3 query strategies: random sampling, uncertainty sampling, and active search. Observe how we trade off between finding targets and accuracy. # Imports ``` import warnings warnings.filterwarnings(action='ignore', category=RuntimeWarning) from matplotlib import py...
github_jupyter
<a href="https://colab.research.google.com/github/gagansingh23/DS-Unit-2-Applied-Modeling/blob/master/Gagan_Singh_DS11_Sprint_Challenge_7.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> _Lambda School Data Science, Unit 2_ # Applied Modeling Sprint...
github_jupyter
<a href="https://colab.research.google.com/github/aruanalucena/Car-Price-Prediction-Machine-Learning/blob/main/Car_Price_Prediction_.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # **Car Price Prediction with python**. # **Previsão de carrro com P...
github_jupyter
``` import seaborn as sns import matplotlib.pyplot as plt sns.set(style="ticks") %matplotlib inline import numpy as np np.random.seed(sum(map(ord, "axis_grids"))) ``` ``` tips = sns.load_dataset("tips") g = sns.FacetGrid(tips, col="time") ``` ``` g = sns.FacetGrid(tips, col="time") g.map(plt.hist, "tip"); ``` ``` g ...
github_jupyter
**handson用資料としての注意点** 普通、同じセル上で何度も試行錯誤するので、最終的に上手くいったセルしか残らず、失敗したセルは残りませんし、わざわざ残しません。 今回はhandson用に 試行・思考過程を残したいと思い、エラーやミスが出ても下のセルに進んで処理を実行するようにしています。 notebookのセル単位の実行ができるからこそのやり方かもしれません。良い。 (下のセルから文は常体で書きます。) kunai (@jdgthjdg) --- # ここまでの処理を整理して、2008〜2019のデータを繋いでみる ## xls,xlsxファイルを漁る ``` from pathlib import Pa...
github_jupyter
**Outline of Steps** + Initialization + Download COCO detection data from http://cocodataset.org/#download + http://images.cocodataset.org/zips/train2014.zip <= train images + http://images.cocodataset.org/zips/val2014.zip <= validation images + http://images.cocodataset....
github_jupyter
# Explore secretion system genes [KEGG enrichment analysis](5_KEGG_enrichment_of_stable_genes.ipynb) found that genes associated with ribosome, Lipopolysaccharide (outer membrane) biosynthesis, citrate cycle are significantly conserved across strains. Indeed functions that are essential seem to be significantly conser...
github_jupyter
## Launching Spark Spark's Python console can be launched directly from the command line by `pyspark`. SparkSession can be found by calling `spark` object. The Spark SQL console can be launced by `spark-sql`. We will experiment with these in the upcoming sessions. If we have `pyspark` and other required packages inst...
github_jupyter
``` import torch import math import torch.nn as nn import torch.optim as optim import torch.utils import PIL from matplotlib import pyplot as plt from PIL import Image from torchvision import transforms from torchvision import datasets #Downloading CIFAR-10 data_path = '../data-unversioned/p1ch7/' cifar10 = datasets.C...
github_jupyter
2018-10-26 실용주의 파이썬 101 - Part 2 [김영호](https://www.linkedin.com/in/danielyounghokim/) 난이도 ● ● ◐ ○ ○ # Data Structures - Immutable vs. Mutable - Immutable: `tuple` - Mutable: `list`, `set`, `dict` - Mutable Container 설명 순서 - 초기화 - 추가/삭제 - 특정 값 접근(access) - 정렬 ## `tuple` ### 초기화 ``` seq = () t...
github_jupyter
# Logistic Regression Notebook version: 2.0 (Nov 21, 2017) 2.1 (Oct 19, 2018) Author: Jesús Cid Sueiro (jcid@tsc.uc3m.es) Jerónimo Arenas García (jarenas@tsc.uc3m.es) Changes: v.1.0 - First version v.1.1 - Typo correction. Prepared for slide presentation ...
github_jupyter
<div class="alert alert-block alert-info"> <b><h1>ENGR 1330 Computational Thinking with Data Science </h1></b> </div> Copyright © 2021 Theodore G. Cleveland and Farhang Forghanparast Last GitHub Commit Date: # 15: The `matplotlib` package - explore different types of plots - user defined functions for spe...
github_jupyter
<a href="https://colab.research.google.com/github/mmoghadam11/ReDet/blob/master/train_UCAS_AOD.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ``` from google.colab import drive drive.mount('/content/drive') #باشد tesla t4 باید #اگر نبود در بخش ران ...
github_jupyter
## Importing the library ``` import numpy as np ``` ## Data Types ### Scalars ``` # creating a scalar, we use the 'array' in order to create any type of data type e.g. scalar, vector, matrix s = np.array(5) # visualizing the shape of a scalar, in the example below it returns an empty tuple which is normal # a scala...
github_jupyter
``` %load_ext autoreload %autoreload 2 import datetime import os print(datetime.datetime.now()) from pygentoolbox import SplitFastqFileBySeqLength # from pygentoolbox.Tools import read_interleaved_fasta_as_noninterleaved # from pygentoolbox.Tools import make_circos_karyotype_file #dir(pygentoolbox.Tools) %matplotlib i...
github_jupyter
``` #Load dependencies import numpy as np import pandas as pd pd.options.display.float_format = '{:,.1e}'.format import sys sys.path.insert(0, '../../statistics_helper') from CI_helper import * from excel_utils import * ``` # Estimating the total biomass of marine deep subsurface archaea and bacteria We use our best ...
github_jupyter
``` #%%appyter init from appyter import magic magic.init(lambda _=globals: _()) %%appyter hide_code {% do SectionField( name='PRIMARY', title='1. Upload your data', subtitle='Upload up and down gene-sets to perform two-sided rank enrichment. '+ 'Upload up- or down-only gene-sets to perform rank...
github_jupyter
# Probabilistic Matrix Factorization for Making Personalized Recommendations ``` %matplotlib inline import numpy as np import pandas as pd import pymc3 as pm from matplotlib import pyplot as plt plt.style.use("seaborn-darkgrid") print(f"Running on PyMC3 v{pm.__version__}") ``` ## Motivation So you are browsing for...
github_jupyter
# Making your own modules If a function will be used in multiple programs, it should be written as a module instead. All one has to do is put the functions in a program_name.py file and import it (the whole thing) or the functions, then use them in the main program. Exactly the same way how you import and use oth...
github_jupyter
<a href="https://colab.research.google.com/github/josearangos/PDI/blob/Colab/Colab_Class/binarySegmentation.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ``` import cv2 import numpy as np import matplotlib.pyplot as plt from google.colab.patches i...
github_jupyter
``` import torch import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from sklearn import svm from xgboost import XGBClassifier from sklearn.metrics import recall_score from joblib import dump, load from sklearn.metrics import roc_curve, auc import matplotlib.pyplot as plt from s...
github_jupyter
# Housing economy, home prices and affordibility Alan Greenspan in 2014 pointed out that there was never a recovery from recession without improvements in housing construction. Here we examine some relevant data, including the Case-Shiller series, and derive an insightful measure of the housing economy, **hscore**,...
github_jupyter
<table class="ee-notebook-buttons" align="left"> <td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/Tutorials/Keiko/glad_alert.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
``` # Initial imports and notebook setup, click arrow to show %matplotlib inline # The first step is to be able to bring things in from different directories import sys import os sys.path.insert(0, os.path.abspath('../lib')) import matplotlib.pyplot as plt import numpy as np from copy import deepcopy from util import...
github_jupyter
<h1> Simple Single Layer RNN with Monthly dataset</h1> ``` import os import numpy as np import math import pandas as pd import seaborn as sns import tensorflow as tf import matplotlib.pyplot as plt from keras.optimizers import SGD from keras.models import Sequential from keras.layers import Dense, LSTM, Dropout, GRU...
github_jupyter
# Welcome to DFL-Colab! This is an adapted version of the DFL for Google Colab. # Overview * Extractor works in full functionality. * Training can work without preview. * Merger works in full functionality. * You can import/export workspace with your Google Drive. * Import/export and another manipulations ...
github_jupyter
# Convert verse ranges of genres to TF verse node features ``` import collections import pandas as pd from tf.fabric import Fabric from tf.compose import modify from tf.app import use A = use('bhsa', hoist=globals()) genre_ranges = pd.read_csv('genre_ranges.csv') genre_ranges ``` # Compile data & sanity checks ``` #...
github_jupyter
``` #--------- # Recommend System in NetEase # # Modify History : 2019 - Jan - 22 # Platform: Win7 + Python2 #--------- ``` ### 1 从原始文件中抽取期望的歌单数据 ``` #coding:urf-8 import json import sys # 从Json文件中提取特定格式的文本数据 # # 返回的文本格式:歌曲名字##歌曲标签##歌单ID##歌曲收藏数目 歌曲信息 def parse_song_inline(in_line): loaded_data = json.loa...
github_jupyter
## 1. Importing the required libraries for EDA ``` import pandas as pd import numpy as np # For mathematical calculations import seaborn as sns # For data visualization import matplotlib.pyplot as plt # For plotting graphs %matplotlib inline sns.set(color_codes=True) im...
github_jupyter
# Regularization Welcome to the second assignment of this week. Deep Learning models have so much flexibility and capacity that **overfitting can be a serious problem**, if the training dataset is not big enough. Sure it does well on the training set, but the learned network **doesn't generalize to new examples** that...
github_jupyter
<a href="https://colab.research.google.com/github/jeffheaton/t81_558_deep_learning/blob/master/t81_558_class_08_4_bayesian_hyperparameter_opt.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # T81-558: Applications of Deep Neural Networks **Module 8:...
github_jupyter
``` name = '2015-12-11-meeting-summary' title = 'Introducing Git' tags = 'git, github, version control' author = 'Denis Sergeev' from nb_tools import connect_notebook_to_post from IPython.core.display import HTML html = connect_notebook_to_post(name, title, tags, author) ``` Today we talked about git and its function...
github_jupyter
# Observations 1. It appears the salaries are very high on the high end and very low at the low end. 2. Mimics the business model of a franchise restaurant where most of the lower end employees make minimum wage. ``` from sqlalchemy import create_engine, Table, Column, MetaData, Integer, Computed from random import ra...
github_jupyter
<a href="https://colab.research.google.com/github/MarceloClaro/python-business/blob/gh-pages/Avaliar_o_desempenho_de_um_aluno_usando_t%C3%A9cnicas_de_Machine_Learning_e_python.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # **AVALIAÇÃO DO DESEMPEN...
github_jupyter
# Basic Bayesian Linear Regression Implementation ``` # Pandas and numpy for data manipulation import pandas as pd import numpy as np # Matplotlib and seaborn for visualization import matplotlib.pyplot as plt %matplotlib inline import seaborn as sns # Linear Regression to verify implementation from sklearn.linear_...
github_jupyter
<a href="https://colab.research.google.com/github/hoops92/DS-Unit-2-Kaggle-Challenge/blob/master/module3-cross-validation/Scott_LS_DS10_223_assignment.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> Lambda School Data Science *Unit 2, Sprint 2, Mod...
github_jupyter
# Text recognition We have a set of water meter images. We need to get each water meter’s readings. We ask performers to look at the images and write down the digits on each water meter. To get acquainted with Toloka tools for free, you can use the promo code **TOLOKAKIT1** on $20 on your [profile page](https://toloka...
github_jupyter
# Multi-Layer Perceptron, MNIST --- In this notebook, we will train an MLP to classify images from the [MNIST database](http://yann.lecun.com/exdb/mnist/) hand-written digit database. The process will be broken down into the following steps: >1. Load and visualize the data 2. Define a neural network 3. Train the model...
github_jupyter
``` %matplotlib inline import numpy as np import matplotlib.pyplot as plt import seaborn as sns from scipy import stats import statsmodels as stm from os import walk sns.set(rc={'figure.figsize':(14.7,8.27)}) OxA00=np.load("NeuroNER-master/src/SalmanTest/MyTrain385SeparateRepFlag00/Mr1mainSalmanUnary_scorestest.npy") O...
github_jupyter
# A Cartographers Expedition You and your friends have decided to tackle NYC old school! No cell phones or GPS devices allowed. Although everyone is a bit nervous, you realize that using an actual map might be pretty cool. Your goal is to generate a map that plots your between five and six locations in the city. Pl...
github_jupyter
``` import emcee import pandas as pd import numpy as np from scipy import stats import chainconsumer import matplotlib.pyplot as plt from scipy.integrate import quad from chainconsumer import ChainConsumer plt.rc('font', size=15) # controls default text sizes plt.rc('axes', titlesize=15) # fontsize of the...
github_jupyter
# 붓꽃(Iris) 품종 데이터 예측하기 <h1>Table of Contents<span class="tocSkip"></span></h1> <div class="toc"><ul class="toc-item"><li><span><a href="#DataFrame" data-toc-modified-id="DataFrame-1"><span class="toc-item-num">1&nbsp;&nbsp;</span>DataFrame</a></span></li><li><span><a href="#Train/Test-데이터-나누어-학습하기" data-toc-modified-i...
github_jupyter
<a id="title_ID"></a> # JWST Pipeline Validation Notebook: AMI3, AMI3 Pipeline <span style="color:red"> **Instruments Affected**</span>: NIRISS ### Table of Contents <div style="text-align: left"> <br> [Introduction](#intro) <br> [JWST CalWG Algorithm](#algorithm) <br> [Defining Terms](#terms) <br> [Test Desc...
github_jupyter
# Density estimation demo Here we demonstrate how to use the ``inference.pdf`` module for estimating univariate probability density functions from sample data. ``` from numpy import linspace, zeros, exp, log, sqrt, pi from numpy.random import normal, exponential from scipy.special import erfc import matplotlib.pyplot...
github_jupyter
# Assignment 3: RTRL Implement an RNN with RTRL. The ds/dw partial derivative is 2D hidden x (self.n_hidden * self.n_input) instead of 3d. ``` %matplotlib inline import numpy as np import matplotlib.pyplot as plt class RNN(object): def __init__(self, n_input, n_hidden, n_output): # init weights and biases...
github_jupyter
=============================== ### IMPORTS & GET DATABASE INFO ``` from jsons import read_json_to_dict from mysql_driver import MySQL import pandas as pd from sqlalchemy import create_engine json_readed = read_json_to_dict("sql_server_settings.json") IP_DNS = json_readed["IP_DNS"] USER = json_readed["USER"] PASSWOR...
github_jupyter
# 各主流摄像头的rtsp地址格式 ## 海康威视 ### IPC 摄像头 >rtsp://[username]:[password]@[ip]:[port]/[codec]/[channel]/[subtype]/av_stream 说明: - username: 用户名。例如admin。 - password: 密码。例如12345。 - ip: 为设备IP。例如 192.0.0.64。 - port: 端口号默认为554,若为默认可不填写。 - codec:有h264、MPEG-4、mpeg4这几种。 - channel: 通道号,起始为1。例如通道1,则为ch1。 - subtype: 码流类型,主码流为main,...
github_jupyter
# Heating Mesh Tally on CAD geometry made from Shapes This constructs a reactor geometry from 3 Shape objects each made from points. The Shapes made include a breeder blanket, PF coil and a central column shield. 2D and 3D Meshes tally are then simulated to show nuclear heating, flux and tritium_production across th...
github_jupyter
``` from gtts import gTTS LANG_PATH = '../lang/{0}/speech/{1}.mp3' tts = gTTS(text='Se ha detectado más de una persona, inténtelo de nuevo con una persona sólo por favor', lang='es', slow=False) tts.save(LANG_PATH.format('es', 'more_than_one_face')) tts = gTTS(text='There appears to be more than one person, try again ...
github_jupyter
<a href="https://colab.research.google.com/github/MoRebaie/Sequences-Time-Series-Prediction-in-Tensorflow/blob/master/Course_4_Week_1_Exercise_Question.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ``` !pip install tensorflow==2.0.0b1 import tenso...
github_jupyter
<img src="../../images/qiskit-heading.gif" alt="Note: In order for images to show up in this jupyter notebook you need to select File => Trusted Notebook" width="500 px" align="left"> # Getting Started with Qiskit Here, we provide an overview of working with Qiskit. Qiskit provides the basic building blocks necessary...
github_jupyter
____ __Universidad Tecnológica Nacional, Buenos Aires__\ __Ingeniería Industrial__\ __Cátedra de Investigación Operativa__\ __Autor: Martín Palazzo__ (Mpalazzo@frba.utn.edu.ar) y __Rodrigo Maranzana__ (Rmaranzana@frba.utn.edu.ar) ____ # Simulación con distribución Exponencial <h1>Índice<span class="tocSkip"></span></...
github_jupyter
<p><font size="6"><b>Visualization - Matplotlib</b></font></p> > *DS Data manipulation, analysis and visualization in Python* > *May/June, 2021* > > *© 2021, Joris Van den Bossche and Stijn Van Hoey (<mailto:jorisvandenbossche@gmail.com>, <mailto:stijnvanhoey@gmail.com>). Licensed under [CC BY 4.0 Creative Commons]...
github_jupyter
# Reproduce CheXNet: Explore Predictions ## Import other modules and pandas ``` import visualize_prediction as V import pandas as pd #suppress pytorch warnings about source code changes import warnings warnings.filterwarnings('ignore') ``` ## Settings for review We can examine individual results in more detail, se...
github_jupyter
# Assignment 1 #### Student ID: *Double click here to fill the Student ID* #### Name: *Double click here to fill the name* ## Q1: Exploring the TensorFlow playground http://playground.tensorflow.org/ (a) Execute the following steps first: 1. Change the dataset to exclusive OR dataset (top-right dataset under "DATA...
github_jupyter
#### The purpose of this notebook is to compare D-REPR with other methods such as KR2RML and R2RML in term of performance ``` import re, numpy as np import matplotlib.pyplot as plt from tqdm import tqdm_notebook as tqdm %matplotlib inline plt.rcParams["figure.figsize"] = (10.0, 8.0) # set default size of plots plt.rc...
github_jupyter
``` #Importing necessary libraries import keras import numpy as np import pandas as pd from keras.applications import VGG16, inception_v3, resnet50, mobilenet from keras import models from keras import layers from keras import optimizers from sklearn.metrics import classification_report, confusion_matrix import matplo...
github_jupyter
# Chapter 1: Pandas Foundations ``` import pandas as pd import numpy as np ``` ## Introduction ## Dissecting the anatomy of a DataFrame ``` pd.set_option('max_columns', 4, 'max_rows', 10) movies = pd.read_csv('../data/movie.csv') movies.head() ``` ### How it works... ## DataFrame Attributes ### How to do it... {...
github_jupyter
``` %matplotlib inline ``` # Tuning a scikit-learn estimator with `skopt` Gilles Louppe, July 2016 Katie Malone, August 2016 Reformatted by Holger Nahrstaedt 2020 .. currentmodule:: skopt If you are looking for a :obj:`sklearn.model_selection.GridSearchCV` replacement checkout `sphx_glr_auto_examples_sklearn-grids...
github_jupyter
# Using Convolutional Neural Networks Welcome to the first week of the first deep learning certificate! We're going to use convolutional neural networks (CNNs) to allow our computer to see - something that is only possible thanks to deep learning. ## Introduction to this week's task: 'Dogs vs Cats' We're going to tr...
github_jupyter
``` import pandas as pd import numpy as np import xgboost as xgb from sklearn import preprocessing from sklearn.cross_validation import KFold from sklearn.metrics import mean_absolute_error %matplotlib inline train = pd.read_csv('train.csv') cat_feats = train.select_dtypes(include=["object"]).columns for feat in ca...
github_jupyter
# <center>MobileNet - Pytorch # Step 1: Prepare data ``` # MobileNet-Pytorch import argparse import torch import numpy as np import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.optim.lr_scheduler import StepLR from torchvision import datasets, transforms from torch.autograd i...
github_jupyter
# Lab 1: Tensor Manipulation First Author: Seungjae Ryan Lee (seungjaeryanlee at gmail dot com) Second Author: Ki Hyun Kim (nlp.with.deep.learning at gmail dot com) <div class="alert alert-warning"> NOTE: This corresponds to <a href="https://www.youtube.com/watch?v=ZYX0FaqUeN4&t=23s&list=PLlMkM4tgfjnLSOjrEJN31gZA...
github_jupyter
## Tutorial on how to simulate an Argo float in Parcels This tutorial shows how simple it is to construct a Kernel in Parcels that mimics the [vertical movement of Argo floats](http://www.argo.ucsd.edu/operation_park_profile.jpg). ``` # Define the new Kernel that mimics Argo vertical movement def ArgoVerticalMovement...
github_jupyter
# 고객의 행동 분석/파악 * use_log.csv : 선테 이용 이력(2018년 4월 ~ 2019년 3월) * customer_master.csv : 2019년 3월 말 회원 데이터(이전 탈퇴 회원 포함) * class_master.csv : 회원 구분(종일, 주간, 야간) * campaign_master.csv : 행사 구분(입회비 유무) ## 1. 데이터 확인 ``` import pandas as pd uselog = pd.read_csv('use_log.csv') print(len(uselog)) uselog.head() customer = pd.read_...
github_jupyter
``` from database.market import Market from database.strategy import Strategy from extractor.tiingo_extractor import TiingoExtractor from preprocessor.model_preprocessor import ModelPreprocessor from preprocessor.predictor_preprocessor import PredictorPreprocessor from modeler.modeler import Modeler from datetime impor...
github_jupyter
# Use Keras to recognize hand-written digits with `ibm-watson-machine-learning` This notebook uses the Keras machine learning framework with the Watson Machine Learning service. It contains steps and code to work with [ibm-watson-machine-learning](https://pypi.python.org/pypi/ibm-watson-machine-learning) library avai...
github_jupyter
<a href="https://colab.research.google.com/github/katie-chiang/ARMultiDoodle/blob/master/Copy_of_Welcome_To_Colaboratory.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> <p><img alt="Colaboratory logo" height="45px" src="/img/colab_favicon.ico" align...
github_jupyter
``` import random import copy import logging import sys from run_tests_201204 import * import os import sys import importlib from collections import defaultdict sys.path.insert(0, '/n/groups/htem/Segmentation/shared-nondev/cb2_segmentation/analysis_mf_grc') from tools_pattern import get_eucledean_dist import compress...
github_jupyter
<a href="https://colab.research.google.com/github/RoisulIslamRumi/MNIST-PyTorch/blob/main/MNist_with_Pytorch.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ``` #Import required libraries import torch #imports all essential modules to build NN impor...
github_jupyter