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
0x0004da82394ED7Aa756E6343F0A1a52609087d79 |
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
//! Simple module to implement [Sieve of Eratosthenes](https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes). | |
//! It implements both clasical sieve (starting from 2 to given limit) and segmented sieve (from min to max). | |
//! # Examples | |
//! | |
//! Primes under 20: | |
//! | |
//! ``` | |
//! use numbers::sieve::{Sieve,Eratosthenes}; | |
//! let s = Eratosthenes::new(20); | |
//! assert_eq!(s.first(), Some(2)); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import matplotlib.pyplot as lpt | |
import numpy as np | |
def pt(data, point=None): | |
p = plt.Polygon(data, closed=True, fill=None) | |
ax = plt.gca() | |
ax.add_patch(p) | |
x=data[:,0] | |
y=data[:,1] | |
if point: |
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
''' | |
Created on Nov 28, 2015 | |
@author: ivan | |
''' | |
from datetime import date, timedelta | |
from copy import copy | |
import pprint |
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
#!/bin/bash | |
BACKUP_DIR="/Root/Backup/" | |
PIECE_SIZE=10M | |
ACTION=store | |
trap "exit 2" SIGINT | |
if [[ $1 =~ -h|--help ]]; then |
NewerOlder