text
stringlengths
2.5k
6.39M
kind
stringclasses
3 values
# Update attachment keywords in ArcGIS Enterprise <table class="tfo-notebook-buttons" align="right"> <td> <a target="_blank" href="https://www.arcgis.com/home/item.html?id=a02d62ef8b4e456d86b755b15dfb8204">Try it live</a> </td> <td> <a target="_blank" href="https://github.com/Esri/Survey123-tools/tree/ma...
github_jupyter
#this code reads in the NDBC buoy data at 1 hour and 10 minute resolution the first notebook section is just some subroutines I write to read in the data and mask it correctly ``` #import libraries import numpy.ma as MA import datetime as dt from datetime import datetime, timedelta import xarray as xr import numpy as ...
github_jupyter
# Eliminating Outliers Eliminating outliers is a big topic. There are many different ways to eliminate outliers. A data engineer's job isn't necessarily to decide what counts as an outlier and what does not. A data scientist would determine that. The data engineer would code the algorithms that eliminate outliers from...
github_jupyter
``` %pylab inline import matplotlib.pyplot as plt import pickle import numpy as np import os import sys sys.path.append('../../code/scripts') import fit_scaling_law import plotting as p ``` # 1. aggregate data ``` acc_key = '1 - auc_roc' acc_keys = ['auc_roc', 'acc'] group_names_r = [r' age $< 55$', r' age $\geq 55...
github_jupyter
``` import sys, os, glob import numpy as np import pandas as pd import matplotlib import matplotlib.pyplot as plt import seaborn as sns from sw_plotting import change_bar_width from sw_utilities import tukeyTest # Make a folder if it is not already there to store exported figures !mkdir ../jupyter_figures # Data wrang...
github_jupyter
# Imports ``` import numpy as np from sklearn import metrics from sklearn.preprocessing import MinMaxScaler from sklearn.model_selection import train_test_split from sklearn.metrics import mean_absolute_error , mean_squared_error , mean_absolute_percentage_error import tensorflow as tf from tensorflow.keras.layers i...
github_jupyter
#Strings Strings are used in Python to record text information, such as name. Strings in Python are actually a *sequence*, which basically means Python keeps track of every element in the string as a sequence. For example, Python understands the string "hello' to be a sequence of letters in a specific order. This mean...
github_jupyter
<a href="https://colab.research.google.com/github/studio-ousia/luke/blob/master/notebooks/huggingface_open_entity.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> # Reproducing experimental results of LUKE on Open Entity Using Hugging Face Transforme...
github_jupyter
``` dbutils.widgets.text("entityName", "", "Entity Name") dbutils.widgets.text("dataSourceName", "", "Data Source Name") dbutils.widgets.text("version", "", "Version") dbutils.widgets.text("inputPath", "", "Input path") dbutils.widgets.text("inputContainer", "", "Input container") dbutils.widgets.text("outputPath", "",...
github_jupyter
# Spatial Data Overview of today's topics: - Working with shapefiles, GeoPackages, CSV files, and rasters - Projection - Geometric operations - Spatial joins - Web mapping - Spatial indexing ``` import ast import contextily as cx import folium import geopandas as gpd import matplotlib.pyplot as plt impor...
github_jupyter
``` import pandas as pd from matplotlib import pyplot as plt from sklearn.utils import resample import datetime as dt from sklearn.metrics import confusion_matrix import seaborn as sns sns.set() file = '/home/roscon/Desktop/Data_latest/Model/report/d/0.xlsx' data = pd.read_excel(file,sheet_name=0) data['Manual label'] ...
github_jupyter
``` %matplotlib inline ``` What is PyTorch? ================ It’s a Python-based scientific computing package targeted at two sets of audiences: - A replacement for NumPy to use the power of GPUs - a deep learning research platform that provides maximum flexibility and speed Getting Started --------------- #...
github_jupyter
``` import keras from keras.models import Sequential, Model, load_model from keras.layers import Dense, Dropout, Activation, Flatten, Input, Lambda from keras.layers import Conv2D, MaxPooling2D, AveragePooling2D, Conv1D, MaxPooling1D, LSTM, ConvLSTM2D, GRU, CuDNNLSTM, CuDNNGRU, BatchNormalization, LocallyConnected2D, ...
github_jupyter
``` print ('Shreyans') ``` # Session 1: Introduction to Tensorflow <p class='lead'> Creative Applications of Deep Learning with Tensorflow<br /> Parag K. Mital<br /> Kadenze, Inc.<br /> </p> <a name="learning-goals"></a> # Learning Goals * Learn the basic idea behind machine learning: learning from data and discover...
github_jupyter
# `xarray-leaflet` `xarray-leaflet` ist eine xarray-Erweiterung für das Plotten von gekachelten Karten. Sowohl [xarray](http://xarray.pydata.org/) als auch [Leaflet](ipyleaflet.ipynb) können mit Datenfragmenten arbeiten, `xarray` durch [Dask Chunks](https://docs.dask.org/en/latest/array-chunks.html) und Leaflet durch ...
github_jupyter
#### 분산 강화학습을 DQN을 이용하여 구현해보겠습니다. <br>기본적인 방식은 다음과 같습니다. <br> 1. Replay Buffer: Actor로부터 data를 받고, Learner에게 data를 전달하는 역할 2. Parameter Server: Learner로부터 parameter를 받고, Actor에게 paramter를 전달하는 역할. 3. Learner: Replay Buffer로 부터 데이터를 받아 학습을 진행하고, Parameter Server로 Learner 모델의 parameter를 전달하는 역할. 4. Acto...
github_jupyter
Computes a Bayesian Ridge Regression on a synthetic dataset. See [Bayesian Ridge Regression](http://scikit-learn.org/stable/modules/linear_model.html#bayesian-ridge-regression) for more information on the regressor. Compared to the OLS (ordinary least squares) estimator, the coefficient weights are slightly shifted t...
github_jupyter
``` # Load the data # Clean the data # Feature Enginnering # Preproccessing # Modelling # RandomSearching # GridSearchings import cv2 import pandas as pd import numpy as np import matplotlib.pyplot as plt import sklearn from sklearn.preprocessing import ( StandardScaler, RobustScaler, MinMaxScaler, MaxA...
github_jupyter
# Arize Tutorial: SHAP Value For Every Model Let's get started on using Arize! ✨ Arize helps you visualize your model performance, understand drift & data quality issues, and share insights learned from your models. **SHAP (SHapley Additive exPlanations)** is a game theoretic approach to explain the output of any ma...
github_jupyter
``` #test277 BB123789 import cv2 import numpy as np import matplotlib.pyplot as plt import skimage import urllib import os from scipy.interpolate import make_interp_spline, BSpline import matplotlib.gridspec as gridspec from numpy import percentile import gc def extractFrame(mp4DIR,frmID): vid = cv2.VideoCapture(...
github_jupyter
# Practice data structures We will create a data structure to hold our Germplasm data (I have updated it to be a little bit more complex... now a germplasm may hold TWO alleles - i.e. one germplasm has connections to more than one gene) Represent these data in Python - create a **single variable** that contains all o...
github_jupyter
# Walkthough of Vamb from the Python interpreter The Vamb pipeline consist of a series of tasks each which have a dedicated module: 1) Parse fasta file and get TNF of each sequence, as well as sequence length and names (module `parsecontigs`) 2) Parse the BAM files and get abundance estimate for each sequence in the...
github_jupyter
# 우직한 방식의 확률 계산<br>Brute Force Probability What if we mobilize computers' massive processing power and memory capacity to compute probabilities by, let's say, generate all possible cases?<br> 컴퓨터의 방대한 처리 능력과 기역 용량을 확률 계산에 사용하기 위해, 이를테면, 모든 경우를 발생시켜본다면 어떨까? ## 주사위 확률 예<br>An example of die roll probability * 다음 비디오 ...
github_jupyter
## 7.3 高级功能 在本节中,我们将介绍除直线以外的复杂功能,如:非规则曲线、复杂函数绘图、区域填充、填写标签等等。 ### 7.3.1 矩形、圆形、曲线 我们可以通过`\draw (x,y) rectangle (w,h);`的方式绘制一个矩形,其左下角坐标位于点($x$,$y$)处,长度为$w$,高度为$h$。类似地,我们也可以通过`\draw (x,y) circle [radius=r];`的方式绘制一个圆形,其圆心落在点($x$,$y$)处,半径为$r$。除此之外,我们可以通过`\draw (x,y) arc [radius=r, start angle=a1, end angle=a2]`的方式绘制一条弧线,...
github_jupyter
``` %matplotlib inline import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy.integrate import odeint plt.style.use('ggplot') ``` # Read example Tarland data ``` # Download Tarland data into a Pandas dataframe data_url = r'https://raw.githubusercontent.com/JamesSample/enviro_mod_notes/mast...
github_jupyter
## 今天的範例,帶著大家一起如何找到好特徵 ``` # library import matplotlib.pyplot as plt import numpy as np import pandas as pd from scipy import stats import math import statistics import seaborn as sns from IPython.display import display import sklearn print(sklearn.__version__) #如果只有 0.19 記得要更新至 最新版本 %matplotlib inline # 特徵選取會用到的函數 f...
github_jupyter
## Our Mission ## Spam detection is one of the major applications of Machine Learning in the interwebs today. Pretty much all of the major email service providers have spam detection systems built in and automatically classify such mail as 'Junk Mail'. In this mission we will be using the Naive Bayes algorithm to cr...
github_jupyter
``` import os from glob import glob import psutil import numpy as np import matplotlib.pyplot as plt from decode_trf import decode_trf from mosaiq_field_export import Delivery config = { "linac_logfile_data_directory": "S:\\Physics\\Programming\\data\\LinacLogFiles", "machine_types": { "elekta-agilit...
github_jupyter
# EHR Project Extract/Transform/Load ``` # from __future__ import absolute_import, division, print_function, unicode_literals import os import numpy as np import tensorflow as tf from tensorflow.keras import layers import tensorflow_probability as tfp # import tensorflow_data_validation as tfdv # blursed library impor...
github_jupyter
``` import os import torch import torch.nn as nn import torch.nn.functional as F from model import Stage2Model, FaceModel, SelectNet_resnet, SelectNet from helper_funcs import affine_crop, stage2_pred_softmax, calc_centroid, affine_mapback import os import torch class ModelEnd2End(nn.Module): def __init__(self): ...
github_jupyter
## Questionário 31 (Q31) Orientações: - Registre suas respostas no questionário de mesmo nome no SIGAA. - O tempo de registro das respostas no questionário será de 10 minutos. Portanto, resolva primeiro as questões e depois registre-as. - Haverá apenas 1 (uma) tentativa de resposta. - Submeta seu arquivo-fonte (util...
github_jupyter
# Analysis of the Cicero corpus & comparison to other authors and works This notebook was used to develop a talk I gave at the Cicero Digitalis Conference on Feb 25, 2021 video here: https://www.youtube.com/watch?v=tJwmXZHZ924 ``` import os.path from collections import Counter from glob import glob import inspect impo...
github_jupyter
``` %matplotlib inline import seaborn import numpy, scipy, matplotlib.pyplot as plt, librosa, IPython.display, urllib ``` # Homework Part 1: Understanding Audio Features through Sonification *There is no written component to be submitted for this part, Part 1.* This section is intended to acquaint you with Python, th...
github_jupyter
# Python Vorbereitungen Dieses Dokument beinhaltet eine Einführung in die für das Praktikum wichtigsten Python-Befehle. Das Dokument wird einige Beispiele enthalten. Die wichtigesten Befehle werden aber von euch selbst erarbeitet. ## Vorwissen von Pythoneinführung Ich erwarte, dass Ihr euch (zumindest) die Folien vo...
github_jupyter
# Know your customer (KYC) - [Lead Scoring] ## Marketing a new product to customers In this short note we discuss **customer targeting** through **telemarketing phone calls** to sell **long-term deposits**. More specifically, within a campaign, the human agents execute phone calls to a list of clients to sell the dep...
github_jupyter
<table align="center"> <td align="center"><a target="_blank" href="http://introtodeeplearning.com"> <img src="https://i.ibb.co/Jr88sn2/mit.png" style="padding-bottom:5px;" /> Visit MIT Deep Learning</a></td> <td align="center"><a target="_blank" href="https://colab.research.google.com/github/aamini/in...
github_jupyter
``` import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from datetime import datetime, date pd.set_option('display.max_rows', 500) pd.set_option('display.max_columns', 500) pd.set_option('display.width', 1000) !ls ../data/csv/ ``` # Load all data at once ``` conditions = pd.read_csv("../data/cs...
github_jupyter
``` ## Name: Chandni Patel ## ID: A20455322 ## CS 512 - Fall 2020 ## Non-planar Camera Calibration import numpy as np import random import math import cv2 np.set_printoptions(formatter={'float': "{0:.4f}".format}) ``` ## Non-Planar Camera Calibration ``` #input point pairs def GetFilePoint(filename): point_3...
github_jupyter
# Analysis and Results Visualization This script describes the procedure to request an analysis to the Viking Analytics' MultiViz Analytics Engine (MVG) service. It shows how to query for results of single-asset or asset-population analyses. In addition, it presents some examples of how to visualize the results availa...
github_jupyter
``` !pip install -r requeriments.txt import time import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns sns.set() %matplotlib inline def preprocessing(data, train=True): # Drop features data = data.drop(['StartTime', 'SrcAddr', 'Sport', 'DstAddr', 'Dport'], axis=1) ...
github_jupyter
# Multiclass Support Vector Machine exercise *Complete and hand in this completed worksheet (including its outputs and any supporting code outside of the worksheet) with your assignment submission. For more details see the [assignments page](http://vision.stanford.edu/teaching/cs231n/assignments.html) on the course we...
github_jupyter
# Building your Recurrent Neural Network - Step by Step Welcome to Course 5's first assignment! In this assignment, you will implement your first Recurrent Neural Network in numpy. Recurrent Neural Networks (RNN) are very effective for Natural Language Processing and other sequence tasks because they have "memory". T...
github_jupyter
``` ! nvidia-smi ! cat /proc/cpuinfo ! pip install fastcore --upgrade -qq ! pip install fastai --upgrade -qq ! pip install transformers --upgrade -qq ! pip install datasets --upgrade -qq ! pip install pytorch_lightning --upgrade -qq ! pip install wandb --upgrade -qq ! pip install ohmeow-blurr --upgrade -qq ! pip instal...
github_jupyter
``` %matplotlib inline from macrospin import * from macrospin import crystal, demag, energy, normalize, plot import numpy as np from __future__ import division from mpl_toolkits.mplot3d import Axes3D, proj3d from matplotlib import rcParams from matplotlib import pylab as plt rcParams['font.size'] = 16 ``` # Crysta...
github_jupyter
# Convolutional Neural Networks In the [previous notebook](./pytorchIntro.ipynb) we have seen how you can train a neural network with pytorch. Next we will learn about the torchvision package and how you can use it to classify images. As our challenge for this notebook, we will use the [Dogs vs. Cats](https://www.kagg...
github_jupyter
``` import h5py import scipy.io import numpy as np import pickle import pandas as pd import matplotlib.pyplot as plt import seaborn as sns matFilename = ('C:\\Users\\mopu\\Machine Learning\\Battery Cycle Life Capacity Prediction\\batteryDischargeData.mat') f = h5py.File(matFilename,'r') ``` # Dataset The dataset cont...
github_jupyter
# CIC Darknet 2020 We will be using the darknet dataset from Canada Institute of Cyber Security. Our goal is to work with the data to categorize darknet traffic. Steps we will take include: 1. Load data 2. Analyze data 1. Cleaning the data 2. Data Analysis 3. Visualize data 4. Split data into train-test set 5....
github_jupyter
## Support Vector Machine SVM is a type of supervised machine learning classification algorithm In case of linearly separable data in two dimensions, a typical machine learning algorithm tries to find a line that divides the data in such a way that the misclassification error can be minimized. For higher dimension ...
github_jupyter
#### Copyright 2017 Google LLC. ``` # 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 agreed to in writin...
github_jupyter
``` import pandas as pd import matplotlib.pyplot as plt import seaborn as sns ``` # Data Gather We need lots of data to provide a meaningful prior - at a minimum we need: [ID, epsilon, epsilon_err, numax, numax_err, dnu, dnu_err, BP_RP, BP_RP_err, Teff, Teff_err] First we need a set of star catalogues to work from....
github_jupyter
*Contenuti* === - [La libreria NumPy](#La-libreria-NumPy) - [Gli array](#Gli-array) - [Costruzione](#Costruzione) - [Accesso ai singoli elementi](#Accesso-ai-singoli-elementi) - [*shape*, *size* e *ndim*](#shape,-size-e-ndim) - [*Esercizio 1*](#Esercizio-1) - [Slicing e accesso a singole dim...
github_jupyter
# Derivation of Expectation and Variance of Power from Thermal Noise ## Preliminaries For the general likelihood of the 2D power (or even 1D power), one needs to know the contribution to the power (and its uncertainty) from thermal noise. In fact, of course, the thermal noise is added in a non-Gaussian manner (same a...
github_jupyter
## Introduction This notebook is part of the workshop "Mathematics of Deep Learning" run by Aggregate Intellect Inc. ([https://ai.science](https://ai.science)), and is released under 'Creative Commons Attribution-NonCommercial-ShareAlike CC BY-NC-SA" license. This material can be altered and distributed for non-commer...
github_jupyter
``` %matplotlib inline from preamble import * ``` # Representing Data and Engineering Features ## Categorical Variables ### One-Hot-Encoding (Dummy variables) ``` import pandas as pd # The file has no headers naming the columns, so we pass header=None and provide the column names explicitly in "names" data = pd.rea...
github_jupyter
``` import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from sklearn.preprocessing import MinMaxScaler # Read The Dataset data = pd.read_csv('data/google_stock.csv', index_col='Date', parse_dates=['Date']).copy() data.tail() # Check For NAN Values OR Missing Values data.isna().a...
github_jupyter
Now we run this a second time, on the second (`b`) feature table that has removed all epithets with fewer than 27 representative documents. The results are better (overall F1 score for decision tree is `0.44`, random forest is `0.47`; in `a` these were `0.33` and `0.40`, respectively). ``` import os from sklearn impor...
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
# Machine Learning Engineer Nanodegree ## Supervised Learning ## Project 2: Building a Student Intervention System Welcome to the second project of the Machine Learning Engineer Nanodegree! In this notebook, some template code has already been provided for you, and it will be your job to implement the additional funct...
github_jupyter
``` # look at tools/set_up_magics.ipynb yandex_metrica_allowed = True ; get_ipython().run_cell('# one_liner_str\n\nget_ipython().run_cell_magic(\'javascript\', \'\', \'// setup cpp code highlighting\\nIPython.CodeCell.options_default.highlight_modes["text/x-c++src"] = {\\\'reg\\\':[/^%%cpp/]} ;\')\n\n# creating magics\...
github_jupyter
# Lesson 3 Demo 2: Focus on Primary Key <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Cassandra_logo.svg/1200px-Cassandra_logo.svg.png" width="250" height="250"> ### In this demo we are going to walk through the basics of creating a table with a good Primary Key in Apache Cassandra, inserting ro...
github_jupyter
``` # Copyright 2021 NVIDIA Corporation. 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. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
github_jupyter
``` import pickle import numpy as np import matplotlib.pyplot as plt %matplotlib inline plt.rcParams['figure.figsize'] = (10.0, 8.0) plt.rcParams['image.interpolation'] = 'nearest' plt.rcParams['image.cmap'] = 'gray' unpickle = lambda filename: pickle.Unpickler(open(filename, 'rb'), encoding = 'latin1').load() data_b...
github_jupyter
# Pybind11 (partial) code generator This is an attempt for a simple code generator to generate python binding for C++ libraries using [Pybind11](https://pybind11.readthedocs.io/en/stable/). It is completely based on the ideas and code presented in the excelent article [implementing a code generator with libclang](htt...
github_jupyter
# Video using the Base Overlay The PYNQ-Z1 board contains a HDMI input port, and a HDMI output port connected to the FPGA fabric of the Zynq® chip. This means to use the HDMI ports, HDMI controllers must be included in a hardware library or overlay. The base overlay contains a HDMI input controller, and a HDMI Outpu...
github_jupyter
# Wissenschaftliches Python Tutorial Nachdem wir uns im Python Tutorial um die Grundlagen gekümmert haben, wollen wir uns nun mit einigen Bibliotheken beschäftigen, die das wissenschaftliche Arbeiten erleichtern. Diese sind * [Numpy](http://www.numpy.org/) für effiziente Berechnungen auf strukturierten Daten * [Matp...
github_jupyter
### Компиляция и линковка. <br /> ##### Hello world одним файлом: компиляция и линковка Напишем программу `hello_world.cpp` одним файлом: ```c++ #include <cstdio> void print_hello_world() { std::puts("hello world!"); } int main() { print_hello_world(); return 0; } ``` Сборка С++ - программ делится на...
github_jupyter
<a href="https://colab.research.google.com/github/daveluo/opencitiesaichallenge-stac/blob/master/challengestac_browser_modify.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> ``` !pip install pystac from pystac import (Catalog, CatalogType, Item, Ass...
github_jupyter
<a href="https://colab.research.google.com/github/Nburkhal/DS-Unit-2-Kaggle-Challenge/blob/master/assignment_kaggle_challenge_4.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: Predictive Modeling # Kaggle Challen...
github_jupyter
``` import numpy as np import pandas as pd import tensorflow as tf from transformers import * import tokenizers import tensorflow.keras.backend as K from sklearn.model_selection import StratifiedKFold MAX_LEN = 192 PATH = '../input/tf-roberta/' tokenizer = tokenizers.ByteLevelBPETokenizer( vocab_file=PATH+'vocab-...
github_jupyter
# Nonuniform sensitivity ## Background Not all pixels in a camera have the same sensitivity to light: there are intrinsic differences from pixel-to-pixel. Vignetting, a dimming near the corners of an image caused by the optical system to which the camera is attached, and dust on optical elements such as filters, the ...
github_jupyter
# SST in Bavi, Mayas, Haishen Authors * [Dr Chelle Gentemann](mailto:gentemann@faralloninstitute.org) - Farallon Institute, USA ## In Feb 2020 a GRL [paper](https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2020GL091430) came out connecting 3 closely occuring Typhoons near Korea to the California wildfires ...
github_jupyter
# Tutorial: Conceptos básicos de Tensorflow En este tutorial veremos algunos conceptos importantes para poder comenzar a utilizar tensorflow para tareas de deep learning. ## Tensores Un **tensor** es un arreglo multidimensional con elementos del mismo tipo (dtype). En escencia, un tensor de tensorflow es muy similar e...
github_jupyter
``` # default_exp callback.core ``` # Callback > Miscellaneous callbacks for timeseriesAI. ``` #export from tsai.imports import * from tsai.utils import * from tsai.data.preprocessing import * from tsai.data.transforms import * from tsai.models.layers import * from fastai.callback.all import * #export import torch....
github_jupyter
### 背景 来源百度百科: #### 【什么是滑脱】 腰椎滑脱 是由于先天性发育不良、创伤、劳损等原因造成相邻椎体骨性连接异常而发生的上位椎体与下位椎体部分或全部滑移,表现为腰骶部疼痛、坐骨神经受累、间歇性跛行等症状的疾病。 在所有的腰椎滑脱中,由峡部崩裂引起的滑脱约占15%,退行性腰椎滑脱约占35%。在我国腰椎滑脱的发病年龄多在20~50岁,占85%;男性明显多于女性,男女之比为 29:1。腰椎滑脱最常见的部位是 L4~L5 及 L5~S1,其中腰5椎体发生率为82~90% 。滑脱的椎体可引起或加重椎管狭窄,刺激或挤压神经,引起腰痛、下肢痛、下肢麻木、甚至大小便功能障碍等症状。另外,滑脱后腰背肌的保护性收缩可引起腰背肌劳损...
github_jupyter
# Named Entity Recognition in Mandarin on the MSRA/SIGHAN2006 Dataset --- [Github](https://github.com/eugenesiow/practical-ml/blob/master/notebooks/Named_Entity_Recognition_Mandarin_MSRA.ipynb) | More Notebooks @ [eugenesiow/practical-ml](https://github.com/eugenesiow/practical-ml) --- Notebook to train/fine-...
github_jupyter
<a href="https://colab.research.google.com/github/nephylum/DS-Unit-2-Linear-Models/blob/master/module3-ridge-regression/DS9_assignment_regression_classification_3.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, S...
github_jupyter
``` import mxnet as mx from mxnet import ndarray as nd from easydict import EasyDict as edict import numpy as np import os from tqdm import tqdm import skimage.io as io import tensorflow as tf import tensorflow.contrib.slim as slim gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.3) sess = tf.Session(con...
github_jupyter
# 2.1 Sampling [Preparation](#Preparation) Constants Functions [2018-03-23 - 2018-04-27 Online campaign - 1.52.2](#2018-03-23---2018-04-27-Online-campaign---1.52.2) [2018-04-27 - 2018-07-05 Online campaign - 1.60](#2018-04-27---2018-07-05-Online-campaign---1.60) [2018-04-10 - 2018-04-28 Playtest - 1.52.2 & 1.60](...
github_jupyter
# RidgeClassifier with MinMaxScaler & Power Transformer This Code template is for the Classification tasks using RidgeClassifier with MinMaxScaler feature scaling technique and PowerTransformer as Feature Transformation Technique in a pipeline. ### Required Packages ``` !pip install imblearn --q import warnings i...
github_jupyter
$ \newcommand{\ket}[1]{\left|{#1}\right\rangle} \newcommand{\bra}[1]{\left\langle{#1}\right|} $ $\newcommand{\au}{\hat{a}^\dagger}$ $\newcommand{\ad}{\hat{a}}$ $\newcommand{\bu}{\hat{b}^\dagger}$ $\newcommand{\bd}{\hat{b}}$ # Cat state encoding The main goal is to find control pulses which will realise the state transf...
github_jupyter
# Tracklist Generator: Data Preparation This notebook contains the code for the data processing of the 1001Tracklists dataset. We will take tracklist data and dictionaries containing co-occurrence information for songs and artists, and produce filtered sparse matrices to be used in recommendation models. We will also u...
github_jupyter
``` from scapy.all import * from pprint import pprint import sys import numpy as np import os import dpkt import matplotlib.pyplot as plt KEYLEN=8 UNCOMPRESSED_PKT_SIZE = 1000 COMPRESSED_PKT_SIZE = 977.6 MAX_LINE_RATE =10e9 def read_pcap_with_pkt(out_dir, dst_mac_is_ts = True, try_compare_counters = True): i...
github_jupyter
# `git`, `GitHub`, `GitKraken` (continuación) <img style="float: left; margin: 15px 15px 15px 15px;" src="http://conociendogithub.readthedocs.io/en/latest/_images/Git.png" width="180" height="50" /> <img style="float: left; margin: 15px 15px 15px 15px;" src="https://c1.staticflickr.com/3/2238/13158675193_2892abac95_z....
github_jupyter
``` #%pip install -I git+https://github.com/qiskit-community/may4_challenge.git@0.4.30 #packages from qiskit import QuantumCircuit, Aer, execute from may4_challenge.ex4 import get_unitary,check_circuit, submit_circuit import numpy as np from IPython.core.display import display, HTML from qiskit.visualization import * d...
github_jupyter
``` from IPython.display import HTML # Cell visibility - COMPLETE: tag = HTML('''<style> div.input { display:none; } </style>''') display(tag) # #Cell visibility - TOGGLE: # tag = HTML('''<script> # code_show=true; # function code_toggle() { # if (code_show){ # $('div.input').hide() # } else { # ...
github_jupyter
# Interface Java is a typed language, even if you don't explicitly write a type the compiler you compute the type of every variables Once you start to want to mix several records, you need to declare common type between records, such type are known as interface ## The problem let say we have a Square and Rectangle, an...
github_jupyter
## Quantium Task1 #### By Samuel Waweru, Mechatronic Engineering Undergraduate 2025. Analysis of Customer Data and data visualization. Quantium’s retail analytics team :Chips and their purchasing behaviour within the region. ``` #importing libraries import pandas as pd import numpy as np import matplotlib.pyplot as ...
github_jupyter
``` import numpy as np from bqplot import * np.random.seed(0) size = 100 x_data = range(size) y_data = np.cumsum(np.random.randn(size) * 100.0) y_data_2 = np.cumsum(np.random.randn(size)) ``` ## Miscellaneous Properties ``` y_sc = LinearScale() ax_x = Axis(label='Test X', scale=y_sc, grid_lines='solid') ax_y = Axis(...
github_jupyter
# States for MDP States from paper http://www.ijmlc.org/vol5/515-C003.pdf ``` %load_ext autoreload %autoreload 2 %matplotlib inline import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from sklearn import cluster from sklearn.svm import SVC from sklearn.metrics import roc_auc_score, roc_curve ...
github_jupyter
# Table of Contents <p><div class="lev1 toc-item"><a href="#Speed-Detection" data-toc-modified-id="Speed-Detection-1"><span class="toc-item-num">1&nbsp;&nbsp;</span>Speed Detection</a></div><div class="lev2 toc-item"><a href="#Algorithm" data-toc-modified-id="Algorithm-11"><span class="toc-item-num">1.1&nbsp;&nbsp;</s...
github_jupyter
``` # -- Tensorflow -- # import tensorflow as tf from tensorflow.keras.layers import ( Softmax, Dense, AdditiveAttention, MultiHeadAttention, Layer, LayerNormalization, Dropout, Embedding ) from tensorflow.keras import ( Sequential, Model ) ``` # Transformer Pipeline ``` @dat...
github_jupyter
<h1> Epitope Prediction </h1> This tutorial illustrates the use of epytope to predict HLA-I/II epitopes and how to analyze results. epytope offers a long list of epitope prediction methods and was designed in such a way that extending epytope with your favorite method is easy. This tutorial will entail: - Simple epit...
github_jupyter
``` import pandas as pd import numpy as np import re import os import utils import string pd.options.display.max_columns = 100 pd.options.display.max_rows = 1000 data_dir = "data/" files = ["H-1B_Disclosure_Data_FY16.xlsx", "H-1B_Disclosure_Data_FY15_Q4.xlsx", "H-1B_FY14_Q4.xlsx", ...
github_jupyter
# Basic training functionality ``` from fastai.basic_train import * from fastai.gen_doc.nbdoc import * from fastai import * from fastai.vision import * ``` [`basic_train`](/basic_train.html#basic_train) wraps together the data (in a [`DataBunch`](/basic_data.html#DataBunch) object) with a pytorch model to define a [`...
github_jupyter
# TensorFlow script mode training and serving Script mode is a training script format for TensorFlow that lets you execute any TensorFlow training script in SageMaker with minimal modification. The [SageMaker Python SDK](https://github.com/aws/sagemaker-python-sdk) handles transferring your script to a SageMaker train...
github_jupyter
# The Correlation Coefficient The correlation coefficient measures the extent to which the relationship between two variables is linear. Its value is always between -1 and 1. A positive coefficient indicates that the variables are directly related, i.e. when one increases the other one also increases. A negative coeff...
github_jupyter
``` import numpy as np import matplotlib.pyplot as plt import random as rand from matplotlib.animation import FuncAnimation from IPython import display N=int(input("Enter number of steps: ")) line_width=input("Enter line width for the plot(Use smaller number for larger steps): ") if N>=1000: case=input("Type 'yes' fo...
github_jupyter
``` !git clone https://github.com/twintproject/twint.git %cd twint !pip3 install . -r requirements.txt %cd twint import twint import os tweets_file_path = "./tweet" def export_tweets(username): if os.path.isfile(tweets_file_path): return c = twint.Config() c.Username = username c.Store_csv =...
github_jupyter
# AUTOMATIC TEXT SUMMARIZATION ![image.png](attachment:image.png) # Some Use Cases ![image.png](attachment:image.png) ![image.png](attachment:image.png) ## Extraction based Text Summarization using NLTK #Source: Stackabuse.com (Usman Malik) ![image.png](attachment:image.png) ``` !pip install lxml import nltk ...
github_jupyter
# Reusable Embeddings **Learning Objectives** 1. Learn how to use a pre-trained TF Hub text modules to generate sentence vectors 1. Learn how to incorporate a pre-trained TF-Hub module into a Keras model ## Introduction In this notebook, we will implement text models to recognize the probable source (Github, Tech-...
github_jupyter