This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###################################################### | |
######## mandelplot: plot the mandelbrot set ######### | |
###################################################### | |
import numpy as np # load numerical python | |
import matplotlib.pyplot as plt # load plotting tools | |
bailout = 10**62 # bound on the number of iterations | |
radial_pixels = 512 # resolution of plot | |
sequence = [-2 + 4/radial_pixels*count for count in range(radial_pixels)] | |
image = np.zeros((radial_pixels,radial_pixels)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> from sklearn import preprocessing | |
>>> lb = preprocessing.LabelBinarizer() | |
>>> lb.fit_transform(['cat', 'dog', 'bird', 'cat']) | |
array([[0, 1, 0], | |
[0, 0, 1], | |
[1, 0, 0], | |
[0, 1, 0]]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
from requests import request | |
from pprint import pprint | |
import re | |
file_path = './index.html' | |
with open(file_path, encoding='utf8') as file_object: | |
file_markup = file_object.read() | |
file_soup = bs(file_markup, 'lxml') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[a4paper,twoside]{scrbook} | |
\begin{document} | |
\title{Computer programing} | |
\author{nedlud} | |
\frontmatter | |
\maketitle | |
\tableofcontents | |
\mainmatter | |
\chapter{Introduction} | |
Some text ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
% General document formatting | |
\usepackage[margin=0.7in]{geometry} | |
\usepackage[parfill]{parskip} | |
\usepackage[utf8]{inputenc} | |
% Related to math | |
\usepackage{amsmath,amssymb,amsfonts,amsthm} | |
\begin{document} |