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
Verifying my Blockstack ID is secured with the address 15oca1RKDVnhc49xWA7P4ttqB47pN87Yai https://explorer.blockstack.org/address/15oca1RKDVnhc49xWA7P4ttqB47pN87Yai |
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
#!/usr/bin/python | |
# coding: utf-8 | |
from flask import Flask | |
from flask_sqlalchemy import SQLAlchemy | |
from sqlalchemy import Column, ForeignKey, Integer, String, Sequence, BigInteger | |
from sqlalchemy.orm import backref, configure_mappers, relationship | |
from sqlalchemy_continuum import make_versioned, VersioningManager | |
from sqlalchemy_continuum.transaction import TransactionBase | |
app = Flask(__name__) |
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 subprocess import Popen | |
from subprocess import PIPE | |
# def run(command): | |
# '''Run the given command and return its output | |
# and exit_code''' | |
# setting parameter shell=True does the same thing, but, security matters | |
# process = Popen(command.split(), stdout=PIPE, shell=True) | |
# (output, _status) = process.communicate() | |
# exit_code = process.wait() |
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 unittest | |
default = ["spare", "hello", "pears", "world", "reaps"] | |
letters = ["abcde", "qwerty", "yuiop", "edcba"] | |
word_list = ["abba", "aabb", "bbaa", "abbc", "aacc"] | |
def find_anagrams(list_of_strings, word): | |
anagrams = [] | |
for w in list_of_strings: |
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 unittest | |
import string | |
def adjacent_digits_product(numb_str, digits_count): | |
max_number = 1 | |
for i in range(0, len(numb_str) - (digits_count - 1)): | |
sub_string = numb_str[i:i + digits_count] | |
product = 1 | |
for digit in sub_string: |
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
### Assignment ### | |
# | |
# Your assignment is to implement the | |
# following function: `find_next_prime`. | |
# As the name states, given the number `n` the | |
# function should return the next closest prime. | |
# | |
# Examples: | |
# * `find_next_prime(6)` should return 7. | |
# * `find_next_prime(10)` should return 11. |
NewerOlder