index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
37,697 | andytrandaoanh/map-words | refs/heads/master | /text_processor_2.py | import os, sys
import system_handler as sH
from mysql_handler import getWordList
import re
def getOutPath(inFile, outDir):
filePath = os.path.basename(inFile)
#fname, fext = os.path.splitext(temp_path)
pathOut = os.path.join(outDir, filePath)
return(pathOut)
def processText(inFile, outDir):
outFilePath = getO... | {"/text_processor_2.py": ["/system_handler.py", "/mysql_handler.py"], "/database_handler.py": ["/mysql_handler.py"], "/text_processor.py": ["/system_handler.py"]} |
37,698 | andytrandaoanh/map-words | refs/heads/master | /system_handler.py | import os, sys
def openDir(targetdir):
#open directory when done
rpath = os.path.realpath(targetdir)
os.startfile(rpath)
def getNormalPath(bookID, outDir):
fname = "Matches Book"
TEXT_EXT = ".txt"
incString = str(bookID)
increment = incString.zfill(4)
normal_path = os.path.join(outDir, fname + increment + T... | {"/text_processor_2.py": ["/system_handler.py", "/mysql_handler.py"], "/database_handler.py": ["/mysql_handler.py"], "/text_processor.py": ["/system_handler.py"]} |
37,699 | andytrandaoanh/map-words | refs/heads/master | /database_handler.py | import os, sys
import json
from mysql_handler import prepare_data_for_update
def getCorrectPath(fileIn, dirIn):
JSON_EXTENSION = ".json"
temp_path = fileIn
temp_path = os.path.basename(temp_path)
fname, fext = os.path.splitext(temp_path)
pathOut = os.path.join(dirIn, fname + JSON_EXTENSION)
return(pathOut)... | {"/text_processor_2.py": ["/system_handler.py", "/mysql_handler.py"], "/database_handler.py": ["/mysql_handler.py"], "/text_processor.py": ["/system_handler.py"]} |
37,700 | andytrandaoanh/map-words | refs/heads/master | /extracts.py | import os, sys
import re
from nltk import tokenize
import json
def open_dir(targetdir):
#open directory when done
rpath = os.path.realpath(targetdir)
os.startfile(rpath)
def read_text_file(filepath):
try:
ofile = open(filepath, 'r', encoding = 'utf-8')
data = ofile.read()
return data... | {"/text_processor_2.py": ["/system_handler.py", "/mysql_handler.py"], "/database_handler.py": ["/mysql_handler.py"], "/text_processor.py": ["/system_handler.py"]} |
37,701 | andytrandaoanh/map-words | refs/heads/master | /text_processor.py | import sys
import re
import system_handler as sysHand
import mysql_data as sqlData
def matchWordToSent(wordList, sentList, bookID):
results = []
for word in wordList:
for item in sentList:
sentText = item[0]
sentID = item[1]
reWord = re.escape(word)
pattern = re.compile(r'\b%s\b' % reWord, re.I)
tr... | {"/text_processor_2.py": ["/system_handler.py", "/mysql_handler.py"], "/database_handler.py": ["/mysql_handler.py"], "/text_processor.py": ["/system_handler.py"]} |
37,702 | andytrandaoanh/map-words | refs/heads/master | /mysql_handler.py | import os, sys
import mysql.connector
from mysql.connector import errorcode
def getConnection(dbname=''):
try:
connection = mysql.connector.connect(
user='andyanh', password='DGandyanh#1234',
host='127.0.0.1', database = dbname)
if connection.is_connected():
return connection
except Error as e:
retu... | {"/text_processor_2.py": ["/system_handler.py", "/mysql_handler.py"], "/database_handler.py": ["/mysql_handler.py"], "/text_processor.py": ["/system_handler.py"]} |
37,733 | jmacario-gmu/gmuj-python-web-scraping | refs/heads/master | /functions.py | ### import libraries
import sys, os, urllib.request, requests, bs4, datetime, re, webbrowser, getpass, time, winsound, argparse
from urllib.error import URLError, HTTPError
### define classes
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '... | {"/gmuj-scrape.py": ["/functions.py"]} |
37,734 | jmacario-gmu/gmuj-python-web-scraping | refs/heads/master | /gmuj-scrape.py | # Summary: Program to scrape a list of URLs pages and output the main content HTML to an HTML file and as well as saving all linked stylesheets, javascript files, images, documents to local subfolders
# Details: This program requires a text file in the working directory containing a list of URLs to fetch. Each URL shou... | {"/gmuj-scrape.py": ["/functions.py"]} |
37,735 | smileyk/kaggle-decmeg2014 | refs/heads/master | /predict_subject.py | from scipy.io import loadmat
import numpy as np
from path import path
data_dir = path('data')
train_subject_ids = range(1, 11)
train_subject_names = ["train_subject%02d.mat" % sid
for sid in train_subject_ids]
all_data = []
all_targets = []
all_sids = []
for sid, subject in zip(train_subject_... | {"/svm_test.py": ["/utils.py"], "/minimal_clf.py": ["/utils.py"]} |
37,736 | smileyk/kaggle-decmeg2014 | refs/heads/master | /svm_test.py | import numpy as np
from sklearn.externals.joblib import Memory
from sklearn.preprocessing import StandardScaler
from sklearn.svm import SVC
from sklearn.metrics import accuracy_score
from sklearn.pipeline import make_pipeline
from utils import load_train_subjects, load_test_subjects
import matplotlib.pyplot as plt
... | {"/svm_test.py": ["/utils.py"], "/minimal_clf.py": ["/utils.py"]} |
37,737 | smileyk/kaggle-decmeg2014 | refs/heads/master | /minimal_clf.py | import numpy as np
from sktensor import dtensor, cp_als
from sklearn.externals.joblib import Memory
from sklearn.pipeline import make_union, make_pipeline
from sklearn.preprocessing import StandardScaler
from sklearn.linear_model import LogisticRegressionCV
from sklearn.metrics import accuracy_score
from sklearn.base i... | {"/svm_test.py": ["/utils.py"], "/minimal_clf.py": ["/utils.py"]} |
37,738 | smileyk/kaggle-decmeg2014 | refs/heads/master | /subject_autoencoder.py | import numpy as np
import theano
import theano.tensor as T
theano.config.floatX = 'float32'
from utils import load_train_subjects, load_test_subjects
train_data, train_targets, train_labels = load_train_subjects([4])
rank = 2
all_subject_labels = train_labels
unique_subject_labels, label_associations = np.unique(... | {"/svm_test.py": ["/utils.py"], "/minimal_clf.py": ["/utils.py"]} |
37,739 | smileyk/kaggle-decmeg2014 | refs/heads/master | /basic_clf.py | """
DecMeg2014 example code.
Simple prediction of the class labels of the test set by:
- pooling all the training trials of all subjects in one dataset.
- Extracting the MEG data in the first 500ms from when the
stimulus starts.
- Projecting with RandomProjection
- Using a classifier.
Copyright Emanuele Olivetti 20... | {"/svm_test.py": ["/utils.py"], "/minimal_clf.py": ["/utils.py"]} |
37,740 | smileyk/kaggle-decmeg2014 | refs/heads/master | /energy_maximum.py | import numpy as np
from scipy.io import loadmat
import mne
import scipy
from path import path
train_subject_ids = range(1, 17)
train_subject_names = ["train_subject%02d.mat" % sid
for sid in train_subject_ids]
test_subject_ids = range(17, 24)
test_subject_names = ["test_subject%02d.mat" % sid
... | {"/svm_test.py": ["/utils.py"], "/minimal_clf.py": ["/utils.py"]} |
37,741 | smileyk/kaggle-decmeg2014 | refs/heads/master | /lasso_timecourse_selection.py | import numpy as np
from scipy.io import loadmat
from path import path
from sklearn.externals.joblib import Memory
train_subject_ids = range(1, 17)
train_subject_names = ["train_subject%02d.mat" % sid
for sid in train_subject_ids]
data_dir = path("data")
from sklearn.linear_model import Lasso... | {"/svm_test.py": ["/utils.py"], "/minimal_clf.py": ["/utils.py"]} |
37,742 | smileyk/kaggle-decmeg2014 | refs/heads/master | /tensor_decomp_clf.py | """
DecMeg2014 example code.
Simple prediction of the class labels of the test set by:
- pooling all the training trials of all subjects in one dataset.
- Extracting the MEG data in the first 500ms from when the
stimulus starts.
- Projecting with RandomProjection
- Using a classifier.
Copyright Emanuele Olivetti 20... | {"/svm_test.py": ["/utils.py"], "/minimal_clf.py": ["/utils.py"]} |
37,743 | smileyk/kaggle-decmeg2014 | refs/heads/master | /conv_mp.py | import numpy as np
from numpy.lib.stride_tricks import as_strided
from sklearn.utils import check_random_state
def fft_convolution_product(a, b, axes=((0,), (0,)), mode="valid"):
"""Does an fft convolution product along given axes.
If sizes along axes correspond and `valid` is chosen, then this reduces
to... | {"/svm_test.py": ["/utils.py"], "/minimal_clf.py": ["/utils.py"]} |
37,744 | smileyk/kaggle-decmeg2014 | refs/heads/master | /intra_subject_decoding.py | import numpy as np
from path import path
from scipy.io import loadmat
subject_ids = [4]
subject_names = ["train_subject%02d.mat" % sid for sid in subject_ids]
data_dir = path("data")
timecourses = np.load('timecourses.npz')["A"]
from sklearn.linear_model import LogisticRegression
from sklearn.pipeline import Pipel... | {"/svm_test.py": ["/utils.py"], "/minimal_clf.py": ["/utils.py"]} |
37,745 | smileyk/kaggle-decmeg2014 | refs/heads/master | /theano_lowrank_net.py | import numpy as np
# from scipy.io import loadmat
# train_subject_ids = range(1, 17)
# test_subject_ids = range(17, 24)
# train_subject_names = ["train_subject%02d.mat" % sid
# for sid in train_subject_ids]
# test_subject_names = ["test_subject%02d.mat" % sid
# for sid in ... | {"/svm_test.py": ["/utils.py"], "/minimal_clf.py": ["/utils.py"]} |
37,746 | smileyk/kaggle-decmeg2014 | refs/heads/master | /shift_to_energy_peak.py | import numpy as np
from scipy.ndimage import gaussian_filter
from scipy.io import loadmat
from path import path
from sklearn.decomposition import PCA
import scipy.signal as sig
def notch(Wn, bandwidth):
"""
Notch filter to kill line-noise.
"""
f = Wn / 2.0
R = 1.0 - 3.0 * (bandwidth / 2.0)
num... | {"/svm_test.py": ["/utils.py"], "/minimal_clf.py": ["/utils.py"]} |
37,747 | smileyk/kaggle-decmeg2014 | refs/heads/master | /epochs_analysis_mne.py | import numpy as np
from scipy.io import loadmat
import mne
from path import path
subject_ids = [1] # range(1, 17)
subject_names = ["train_subject%02d.mat" % sid for sid in subject_ids]
data_dir = path('data')
reject = dict(mag=5e-12, grad=400e-13)
layout = mne.layouts.read_layout('Vectorview-all')
info = mne.creat... | {"/svm_test.py": ["/utils.py"], "/minimal_clf.py": ["/utils.py"]} |
37,748 | smileyk/kaggle-decmeg2014 | refs/heads/master | /full_ds.py | """
DecMeg2014 example code.
Simple prediction of the class labels of the test set by:
- pooling all the training trials of all subjects in one dataset.
- Extracting the MEG data in the first 500ms from when the
stimulus starts.
- Projecting with RandomProjection
- Using a classifier.
Copyright Emanuele Olivetti 20... | {"/svm_test.py": ["/utils.py"], "/minimal_clf.py": ["/utils.py"]} |
37,749 | smileyk/kaggle-decmeg2014 | refs/heads/master | /utils.py | """Utilities for data preprocessing"""
from path import path
from scipy.io import loadmat
import numpy as np
from math import sqrt
from IPython import embed
TRIAL_NORM_REJECTION_THRESHOLD = sqrt(1e-21)
TRIAL_REJECTION_THRESHOLD_AFTER_NORMALIZING = 2.5
# subject_index, channel, channel_type, watch out subject_index o... | {"/svm_test.py": ["/utils.py"], "/minimal_clf.py": ["/utils.py"]} |
37,750 | smileyk/kaggle-decmeg2014 | refs/heads/master | /amievil_clf.py | from scipy.io import loadmat
import numpy as np
from sklearn.linear_model import LogisticRegression
from sklearn.preprocessing import StandardScaler
from sklearn.pipeline import Pipeline
from sklearn.metrics import accuracy_score
import matplotlib.pyplot as plt
def load_training_data():
print("Creating the trains... | {"/svm_test.py": ["/utils.py"], "/minimal_clf.py": ["/utils.py"]} |
37,751 | smileyk/kaggle-decmeg2014 | refs/heads/master | /one_pred_all.py | import numpy as np
from scipy.io import loadmat
from path import path
train_subject_ids = range(1, 17)
train_subject_names = ["train_subject%02d.mat" % sid
for sid in train_subject_ids]
data_dir = path("data")
all_data = []
all_targets = []
all_labels = []
for subject, sid in zip(train_subjec... | {"/svm_test.py": ["/utils.py"], "/minimal_clf.py": ["/utils.py"]} |
37,752 | emildiaz/Twitter-Bot | refs/heads/master | /goodreads.py | import random
import requests
from bs4 import BeautifulSoup
def getSoup(page):
url = f'https://www.goodreads.com/quotes/tag/love?page={page}'
page = requests.get(url)
soup = BeautifulSoup(page.text, 'html.parser')
return soup
def getQuotes(soup):
quotes = soup.find_all('div', {'class':'quoteText... | {"/twitter_bot.py": ["/goodreads.py"], "/cronjobs.py": ["/twitter_bot.py"]} |
37,753 | emildiaz/Twitter-Bot | refs/heads/master | /twitter_bot.py | import tweepy
import requests
import random
import time
import goodreads
from datetime import datetime
consumer_key = 'JKJajqHdI4bKiih5xH16VBKal'
consumer_secret = 'FD7UgwNlx4lCJTvLzmEjES4TsDAA5vTtsvQN3hpZoB7h9Ohsjt'
access_token = '1079243430038028288-shSBTbf57mgg0YDXrVuTjAla26Fz3Q'
access_token_secret = 'cWmD8ySydu0... | {"/twitter_bot.py": ["/goodreads.py"], "/cronjobs.py": ["/twitter_bot.py"]} |
37,754 | emildiaz/Twitter-Bot | refs/heads/master | /cronjobs.py | from apscheduler.schedulers.blocking import BlockingScheduler
import twitter_bot
#creating a time scheduler to run code every two hours
scheduler = BlockingScheduler()
scheduler.add_job(twitter_bot.main, 'interval', hours=2)
scheduler.start()
| {"/twitter_bot.py": ["/goodreads.py"], "/cronjobs.py": ["/twitter_bot.py"]} |
37,827 | mhalittokluoglu/python_doc_scanner | refs/heads/main | /th_image.py | import cv2
import os
images = os.listdir('./Scanned_images/')
images.sort()
c = 12
a = 125
image_counter = 0
for image in images:
image_counter += 1
os. system('rm -f ./TH_Images/*')
for image in images:
img = cv2.imread('./Scanned_images/'+image)
gray_img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
th2 ... | {"/main.py": ["/utilities.py"]} |
37,828 | mhalittokluoglu/python_doc_scanner | refs/heads/main | /utilities.py | import cv2
import numpy as np
def order_points(h):
h = h.reshape((4,2))
hnew = np.zeros((4,2), dtype = "float32")
s = h.sum(1)
hnew[0] = h[np.argmin(s)]
hnew[2] = h[np.argmax(s)]
diff = np.diff(h, axis = 1)
hnew[1] = h[np.argmin(diff)]
hnew[3] = h[np.argmax(diff)]
return hnew
de... | {"/main.py": ["/utilities.py"]} |
37,829 | mhalittokluoglu/python_doc_scanner | refs/heads/main | /main.py | import os
import cv2
import utilities
images = os.listdir('./Images/')
images.sort()
image_counter = 0
for image in images:
image_counter += 1
os.system('rm -f ./Scanned_images/*')
for image in images:
img = utilities.scan_image('./Images/'+image)
cv2.imwrite('./Scanned_images/'+image,img)
convert_li... | {"/main.py": ["/utilities.py"]} |
37,830 | mhalittokluoglu/python_doc_scanner | refs/heads/main | /del_images.py | import os
del_scanned_images = 'rm -f ./Scanned_images/*'
del_img = 'rm -f ./Images/*'
del_th_images = 'rm -f ./TH_Images/*'
os.system(del_scanned_images)
os.system(del_img)
os.system(del_th_images)
| {"/main.py": ["/utilities.py"]} |
37,839 | Te-k/webcache | refs/heads/master | /webcache/utils.py | from urllib.parse import urlparse, parse_qs
def same_url(url1, url2):
"""
Check for minor differences between url1 and url2, return True if they are the same
Currently only consider extra www. in domain, https/http and extra fragment
"""
if url1 == url2:
return True
# Dirty hacks
i... | {"/webcache/google.py": ["/webcache/utils.py"], "/webcache/__init__.py": ["/webcache/google.py", "/webcache/yandex.py", "/webcache/bing.py", "/webcache/archiveis.py"], "/webcache/main.py": ["/webcache/google.py", "/webcache/yandex.py", "/webcache/bing.py", "/webcache/archiveis.py"], "/webcache/bing.py": ["/webcache/uti... |
37,840 | Te-k/webcache | refs/heads/master | /webcache/archiveis.py | import requests
import archiveis
from dateutil.parser import parse
from .memento import MementoClient
class ArchiveIs(object):
"""
Class to request achive.is website
"""
@staticmethod
def snapshots(url):
"""
Return all the screenshot of an url
"""
mc = MementoClient... | {"/webcache/google.py": ["/webcache/utils.py"], "/webcache/__init__.py": ["/webcache/google.py", "/webcache/yandex.py", "/webcache/bing.py", "/webcache/archiveis.py"], "/webcache/main.py": ["/webcache/google.py", "/webcache/yandex.py", "/webcache/bing.py", "/webcache/archiveis.py"], "/webcache/bing.py": ["/webcache/uti... |
37,841 | Te-k/webcache | refs/heads/master | /webcache/google.py | import requests
import html
from dateutil.parser import parse
from bs4 import BeautifulSoup
from urllib.parse import urlparse, parse_qs
from webcache.utils import same_url
class Google(object):
@staticmethod
def download_cache(url):
"""
Download cache from a cache url
"""
r = r... | {"/webcache/google.py": ["/webcache/utils.py"], "/webcache/__init__.py": ["/webcache/google.py", "/webcache/yandex.py", "/webcache/bing.py", "/webcache/archiveis.py"], "/webcache/main.py": ["/webcache/google.py", "/webcache/yandex.py", "/webcache/bing.py", "/webcache/archiveis.py"], "/webcache/bing.py": ["/webcache/uti... |
37,842 | Te-k/webcache | refs/heads/master | /webcache/__init__.py | from .google import Google
from .yandex import Yandex
from .bing import Bing
from .archiveis import ArchiveIs
from .archiveorg import ArchiveOrg
| {"/webcache/google.py": ["/webcache/utils.py"], "/webcache/__init__.py": ["/webcache/google.py", "/webcache/yandex.py", "/webcache/bing.py", "/webcache/archiveis.py"], "/webcache/main.py": ["/webcache/google.py", "/webcache/yandex.py", "/webcache/bing.py", "/webcache/archiveis.py"], "/webcache/bing.py": ["/webcache/uti... |
37,843 | Te-k/webcache | refs/heads/master | /webcache/main.py | import argparse
from .google import Google
from .yandex import Yandex
from .bing import Bing
from .archiveis import ArchiveIs
from .archiveorg import ArchiveOrg
def main():
parser = argparse.ArgumentParser(description='Search or do cache')
subparsers = parser.add_subparsers(help='subcommand')
parser_a = s... | {"/webcache/google.py": ["/webcache/utils.py"], "/webcache/__init__.py": ["/webcache/google.py", "/webcache/yandex.py", "/webcache/bing.py", "/webcache/archiveis.py"], "/webcache/main.py": ["/webcache/google.py", "/webcache/yandex.py", "/webcache/bing.py", "/webcache/archiveis.py"], "/webcache/bing.py": ["/webcache/uti... |
37,844 | Te-k/webcache | refs/heads/master | /webcache/yandex.py | import urllib
import requests
from bs4 import BeautifulSoup
class Yandex:
@staticmethod
def search(req):
'''
Search for a request in Yandex and return results
Does not work all the time, Yandex has a captcha often
'''
r = requests.get('https://yandex.ru/search/?text=%s'... | {"/webcache/google.py": ["/webcache/utils.py"], "/webcache/__init__.py": ["/webcache/google.py", "/webcache/yandex.py", "/webcache/bing.py", "/webcache/archiveis.py"], "/webcache/main.py": ["/webcache/google.py", "/webcache/yandex.py", "/webcache/bing.py", "/webcache/archiveis.py"], "/webcache/bing.py": ["/webcache/uti... |
37,845 | Te-k/webcache | refs/heads/master | /webcache/bing.py | import requests
from bs4 import BeautifulSoup
from urllib.parse import urlencode
from dateutil.parser import parse
from .utils import same_url
class Bing(object):
@staticmethod
def search(query):
"""
Search in bing
"""
# FIXME : change default UA
r = requests.get(
... | {"/webcache/google.py": ["/webcache/utils.py"], "/webcache/__init__.py": ["/webcache/google.py", "/webcache/yandex.py", "/webcache/bing.py", "/webcache/archiveis.py"], "/webcache/main.py": ["/webcache/google.py", "/webcache/yandex.py", "/webcache/bing.py", "/webcache/archiveis.py"], "/webcache/bing.py": ["/webcache/uti... |
37,846 | AjayRad/project3.5_catalog_app_v2 | refs/heads/master | /catalogapp/models/__init__.py | from catalog_dao import get_all_categories, get_catg_by_id, get_products_by_catg
| {"/catalogapp/models/dbsetup.py": ["/config.py"]} |
37,847 | AjayRad/project3.5_catalog_app_v2 | refs/heads/master | /catalogapp/models/db_sampledata.py | from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
# get config file from the /vagrant/catlog dir
import sys
sys.path.insert(0, '/vagrant/catalog')
print sys.path
from config import SQLALCHEMY_DATABASE_URI
from dbsetup import ProdCat, Base, ProdItem, User
from catalog_dao import get_al... | {"/catalogapp/models/dbsetup.py": ["/config.py"]} |
37,848 | AjayRad/project3.5_catalog_app_v2 | refs/heads/master | /run.py | #!flask/bin/python
from catalogapp import app
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--debug", help="run Falsk app in debug mode",
action="store_true")
args = parser.parse_args()
if __name__ == '__main__':
if args.debug:
print "debug mode tur... | {"/catalogapp/models/dbsetup.py": ["/config.py"]} |
37,849 | AjayRad/project3.5_catalog_app_v2 | refs/heads/master | /catalogapp/models/dbsetup.py | from sqlalchemy import Column, ForeignKey, Integer, String, Float, Boolean
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy import create_engine
from flask.ext.login import UserMixin
from config import SQLALCHEMY_DATABASE_URI
Base = declarative_base... | {"/catalogapp/models/dbsetup.py": ["/config.py"]} |
37,850 | AjayRad/project3.5_catalog_app_v2 | refs/heads/master | /config.py | import os
GOOGLE_LOGIN_CLIENT_ID = "83450637791-rob75ftrerqkh3hsohmgndjrhl76ifbh.apps.googleusercontent.com"
GOOGLE_LOGIN_CLIENT_SECRET = "K3-8LX3y9187INWj1mvl04AN"
FB_LOGIN_CLIENT_ID = '470154729788964'
FB_LOGIN_CLIENT_SECRET = '010cc08bd4f51e34f3f3e684fbdea8a7'
OAUTH_CREDENTIALS = {
'google': {
'... | {"/catalogapp/models/dbsetup.py": ["/config.py"]} |
37,851 | AjayRad/project3.5_catalog_app_v2 | refs/heads/master | /catalogapp/views.py | from flask import render_template, url_for, request, redirect, flash, jsonify
from flask.ext.login import login_user, logout_user, login_required
from flask.ext.login import current_user, LoginManager
from catalogapp import app
from models import catalog_dao
from oauth import OAuthSignIn
from functools import wra... | {"/catalogapp/models/dbsetup.py": ["/config.py"]} |
37,852 | AjayRad/project3.5_catalog_app_v2 | refs/heads/master | /catalogapp/__init__.py | from flask import Flask
app = Flask(__name__)
app.secret_key = 'genrandomnum'
app.config.from_object('config')
from catalogapp import views
if not app.debug:
# Setup logging for application
import logging
from logging.handlers import RotatingFileHandler
file_handler = RotatingFileHandler('t... | {"/catalogapp/models/dbsetup.py": ["/config.py"]} |
37,853 | AjayRad/project3.5_catalog_app_v2 | refs/heads/master | /catalogapp/models/catalog_dao.py | from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from dbsetup import ProdCat, Base, ProdItem, User
from flask import current_app
from config import SQLALCHEMY_DATABASE_URI
def db_init():
engine = create_engine(SQLALCHEMY_DATABASE_URI)
Base.metadata.bind = engine
dbses... | {"/catalogapp/models/dbsetup.py": ["/config.py"]} |
37,999 | joaobose/CI3641-exam-1 | refs/heads/main | /pregunta-3/tests/buddy_test.py | from ..src.buddy import BuddySystem
import unittest
class TestBuddy(unittest.TestCase):
def test_allocate(self):
system = BuddySystem(120)
out = system.allocate(16, 'A')
self.assertEqual(out, 'Se reservaron 30 bloques para 16 bloques de A')
self.assertTrue('A' in system.allocated)... | {"/pregunta-3/tests/buddy_test.py": ["/pregunta-3/src/buddy.py"], "/pregunta-6/tests/expression_test.py": ["/pregunta-6/src/expression.py"], "/pregunta-3/src/main.py": ["/pregunta-3/src/buddy.py"], "/pregunta-6/src/main.py": ["/pregunta-6/src/expression.py"]} |
38,000 | joaobose/CI3641-exam-1 | refs/heads/main | /pregunta-4/misterio.py | # --- Parte a)
def zip(a, b):
if a and b:
yield (a[0], b[0])
for p in zip(a[1:], b[1:]):
yield p
# for p in zip([1, 2, 3], ['a', 'b', 'c']):
# print(p)
def zipWith(a, b, f):
if a and b:
yield f(a[0], b[0])
for p in zipWith(a[1:], b[1:], f):
yield... | {"/pregunta-3/tests/buddy_test.py": ["/pregunta-3/src/buddy.py"], "/pregunta-6/tests/expression_test.py": ["/pregunta-6/src/expression.py"], "/pregunta-3/src/main.py": ["/pregunta-3/src/buddy.py"], "/pregunta-6/src/main.py": ["/pregunta-6/src/expression.py"]} |
38,001 | joaobose/CI3641-exam-1 | refs/heads/main | /pregunta-6/src/expression.py |
def isOperator(x):
return x == '+' or x == '-' or x == '*' or x == '/'
def hasLowestPrecedence(x):
return x == '+' or x == '-'
def hasHighestPrecedence(x):
return x == '*' or x == '/'
# Representamos una expresion como un arbol binario.
# Esto porque todos lo operadores soportados son binarios.
class... | {"/pregunta-3/tests/buddy_test.py": ["/pregunta-3/src/buddy.py"], "/pregunta-6/tests/expression_test.py": ["/pregunta-6/src/expression.py"], "/pregunta-3/src/main.py": ["/pregunta-3/src/buddy.py"], "/pregunta-6/src/main.py": ["/pregunta-6/src/expression.py"]} |
38,002 | joaobose/CI3641-exam-1 | refs/heads/main | /pregunta-3/src/buddy.py | import math
class Partition:
def __init__(self, lower, upper, relative_order):
self.upper = upper
self.lower = lower
self.name = None
self.used = None
self.relative_order = relative_order
def size(self):
return self.upper - self.lower + 1
def representatio... | {"/pregunta-3/tests/buddy_test.py": ["/pregunta-3/src/buddy.py"], "/pregunta-6/tests/expression_test.py": ["/pregunta-6/src/expression.py"], "/pregunta-3/src/main.py": ["/pregunta-3/src/buddy.py"], "/pregunta-6/src/main.py": ["/pregunta-6/src/expression.py"]} |
38,003 | joaobose/CI3641-exam-1 | refs/heads/main | /pregunta-6/tests/expression_test.py | from ..src.expression import ExpressionTree, postfixToExpressionTree, prefixToExpressionTree
import unittest
class TestBuddy(unittest.TestCase):
def test_infix(self):
expression = postfixToExpressionTree('8 3 - 8 4 4 + * +')
infix = expression.infix()
self.assertEqual(infix, '8 - 3 + 8 * (... | {"/pregunta-3/tests/buddy_test.py": ["/pregunta-3/src/buddy.py"], "/pregunta-6/tests/expression_test.py": ["/pregunta-6/src/expression.py"], "/pregunta-3/src/main.py": ["/pregunta-3/src/buddy.py"], "/pregunta-6/src/main.py": ["/pregunta-6/src/expression.py"]} |
38,004 | joaobose/CI3641-exam-1 | refs/heads/main | /pregunta-3/src/main.py | from .buddy import BuddySystem
n = int(input('Ingrese el numero de bloques de memoria a manejar: '))
system = BuddySystem(n)
while True:
args = input("Introduzca su comando: ").split()
command = args[0]
if command == 'SALIR':
break
if command == 'MOSTRAR':
print(system.representati... | {"/pregunta-3/tests/buddy_test.py": ["/pregunta-3/src/buddy.py"], "/pregunta-6/tests/expression_test.py": ["/pregunta-6/src/expression.py"], "/pregunta-3/src/main.py": ["/pregunta-3/src/buddy.py"], "/pregunta-6/src/main.py": ["/pregunta-6/src/expression.py"]} |
38,005 | joaobose/CI3641-exam-1 | refs/heads/main | /pregunta-6/src/main.py | from .expression import ExpressionTree, postfixToExpressionTree, prefixToExpressionTree
while True:
args = input("Introduzca su comando: ").split()
command = args[0]
if command == 'SALIR':
break
if command == 'EVAL':
orden = args[1]
expression = ' '.join(args[2:])
if... | {"/pregunta-3/tests/buddy_test.py": ["/pregunta-3/src/buddy.py"], "/pregunta-6/tests/expression_test.py": ["/pregunta-6/src/expression.py"], "/pregunta-3/src/main.py": ["/pregunta-3/src/buddy.py"], "/pregunta-6/src/main.py": ["/pregunta-6/src/expression.py"]} |
38,033 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio17.py | # Desafio 17 Curso em Video Python
# Calcula o valor da hipotenusa de um triângulo retângulo a partir dos catetos informados
#By Rafabr
import sys,time
import math as matematica
print('\nDesafio 17')
print('Este programa calcula o valor da hipotenusa de um triângulo retângulo a partir dos catetos informados\n')
ca... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,034 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio51.py | # Desafio 51 Curso em Video Python
# By Rafabr
from sys import exit
from estrutura_modelo import cabecalho, rodape
cabecalho(51, "Termos de uma Progressão Aritmética - I")
try:
p0 = float(input('Digite o Termo inicial da PA: '))
r = float(input('Digite a razão da PA: '))
except ValueError:
print('Voçe d... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,035 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio22.py | # Desafio 22 Curso em Video Python
# Este programa utiliza diversos métodos de strings para mostrar algumas informações.
# By Rafabr
print('\nDesafio 22')
print('Este programa utiliza diversos métodos de strings para mostrar algumas informações.\n')
print()
nome = str(input('Digite seu nome completo: ')).strip()
pr... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,036 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio25.py | # Desafio 25 Curso em Video Python
# Este programa verifica se uma pessoa tem 'silva' no nome.
# By Rafabr
import os
os.system('clear')
print('\nDesafio 25')
print('Este programa verifica se uma pessoa tem \'silva\' no nome.\n\n')
nome = input('Digite seu nome completo: ')
print()
nome = nome.lower()
lista_nome ... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,037 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio9.py | # Desafio 9 Curso em Video Python
# Mostra a tabuada multiplicativa de um número digitado!
#By Rafabr
import sys,time
import os
os.system('clear')
print('\033[1;47;30m',end="")
print('\n'+'*'*80)
print('Desafio 9'.center(80))
print('Este programa mostra a tabuada multiplicativa de um número digitado!'.center(80))
p... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,038 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio46.py | # Desafio 46 Curso em Video Python
# By Rafabr
from time import sleep
from sys import exit
from os import system
from estrutura_modelo import cabecalho,rodape
from emoji import emojize as em
def fireworks():
system('clear')
cabecalho(46,"Contagem Regressiva!")
print(em(':balloon::balloon::balloon:'))
... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,039 | rafarbop/Python-Curso-em-Video | refs/heads/master | /aula11-FimModulo1-exemplos.py | #Aula 11 do Curso Python em Video!
#By Rafabr
import time,sys
import os
os.system('clear')
print('\033[7;1;47;34m',end="")
print('\n'+'*'*80)
print('Aula XX'.center(80))
print('Esta programa ...'.center(80))
print('*'*80+'\n')
print('\033[m',end="")
print('\033[1;36m')
print('TESTE'.center(80,"*"))
print('\033[m... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,040 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio47.py | # Desafio 47 Curso em Video Python
# By Rafabr
from time import sleep
from sys import exit
from os import system
from estrutura_modelo import cabecalho,rodape
cabecalho(47,"Números pares entre 1 e um número positivo qualquer!")
try:
numeroLimite = int(input("Digite um número positivo inteiro: "))
except ValueE... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,041 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio13.py | # Desafio 13 Curso em Video Python
# Calcula um aumento de 15% no salário de uma pessoa
#By Rafabr
import sys,time
import os
os.system('clear')
print('\033[1;47;30m',end="")
print('\n'+'*'*80)
print('Desafio 13'.center(80))
print('Este programa calcula um aumento de 15% no salário de uma pessoa.'.center(80))
print(... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,042 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio14.py | # Desafio 14 Curso em Video Python
# Transforma uma temperatura em Celsuis para Fahrenheit
#By Rafabr
import sys,time
import os
os.system('clear')
print('\033[1;47;30m',end="")
print('\n'+'*'*80)
print('Desafio 14'.center(80))
print('Este programa transforma uma temperatura em Celsuis para Fahrenheit!'.center(80))... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,043 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio19.py | # Desafio 19 Curso em Video Python
# Sorteia um aluno entre quatro alunos informados
#By Rafabr
import sys,time
import random as ale
print('\nDesafio 19')
print('Este programa sorteia um aluno entre quatro alunos informados\n')
a1 = input("Digite o nome do primeiro aluno: ")
a2 = input("Digite o nome do segundo al... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,044 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio43.py | # Desafio 43 Curso em Video Python
# By Rafabr
import os,time,sys
from estrutura_modelo import cabecalho,rodape
cabecalho(43,"Cálculo e Avaliação de IMC")
try:
peso = float(input("Informe o seu peso(Em Kg - Ex.: 80) : ").replace(',','.'))
altura = float(input('Informe sua altura(Em metros - Ex.: 1,73): ')... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,045 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio32.py | # Desafio 32 Curso em Video Python
# Este programa verifica se o ano informado é bissexto.
# By Rafabr
import sys
import time
import os
import random
os.system('clear')
print('\nDesafio 32')
print('Este programa verifica se o ano informado é bissexto\n\n')
try:
ano = int(input('Informe o ano que deseja verific... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,046 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio64.py | # Desafio 64 Curso em Video Python
# By Rafabr
from estrutura_modelo import cabecalho, rodape
cabecalho(64, "Soma de números informados - com while")
print('Digite abaixo os números que deseja incluir ou digite 999 para sair!')
numeros = []
while True:
try:
n = float(input('Digite um número: '))
ex... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,047 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio21.py | # Desafio 21 Curso em Video Python
# Executa um arquivo de música MP3
# By Rafabr
import time
import playsound
try:
import replit
except ImportError:
import pygame
print('\nDesafio 21')
print('Este programa executa um arquivo de música MP3.\n')
# playsound.playsound('a.mp3')
try:
source = replit.audio... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,048 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio56.py | # Desafio 56 Curso em Video Python
# By Rafabr
from time import sleep
from sys import exit
from estrutura_modelo import cabecalho, rodape
from statistics import fmean
cabecalho(56, "Analisar dados - médio, maior, menor")
try:
dicionario_pessoas = {}
quantidade_pessoas = int(input("Informe quantas pessoas de... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,049 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio23.py | # Desafio 23 Curso em Video Python
# Este programa separa um número em unidades, dezenas, centenas e milhares de um número.
# By Rafabr
import sys
import time
import os
os.system('clear')
print('\nDesafio 23')
print('Este programa separa um número em unidades, dezenas, centenas e milhares de um número.\n')
numero ... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,050 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio3.py | # Desafio 3 Curso em Video Python
# Fazer a soma e diferença de valores informados pelo usuário, convertendo a entrada para números!
#By Rafabr
'''O detalhe do exercício e saber como converter caractere de entrada
em uma variável do tipo float para poder realizar a soma dos números'''
import os
os.system('clear')
... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,051 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio57.py | # Desafio 57 Curso em Video Python
# By Rafabr
from estrutura_modelo import cabecalho, rodape
cabecalho(57, "Solicitar entrada enquanto valor padrão não for digitado")
while True:
sexo = input('Informe qual é o seu sexo (M ou F): ').strip().upper()
if sexo in 'MmFf':
break
print('Dado Inválido!'... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,052 | rafarbop/Python-Curso-em-Video | refs/heads/master | /aula04-exemplo1.py | #Aula 04 do Curso Python em Video!
#Exercício de Desafio da Aula 04!
#By Rafabr
'''Este programa pergunta o nome da pessoa e retorna uma saudação, após isso
solicita o dia o mês e o ano do usuário e retorna a data completade nascimento
de forma configurada'''
print('*************************************************... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,053 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio49.py | # Desafio 49 Curso em Video Python
# By Rafabr
from time import sleep
from sys import exit
from os import system
from estrutura_modelo import cabecalho,rodape
cabecalho(49,"Tabuada!")
try:
num_tab = int(input('Informe o número que deseja ver a tabuada completa: '))
except ValueError:
print('Voçe digitou um... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,054 | rafarbop/Python-Curso-em-Video | refs/heads/master | /aula09-exemplos.py | #Aula 9 do Curso Python em Video!
#Exercício da Aula 09!
#By Rafabr
''''''
print('\n'+'*'*80)
print('Aula 09 - Exemplos e Testes'.center(80)+'\n')
frase = input("Digite uma Frase para testar alguns métodos utilizados com Strings: ")
print(f'\nA frase digitada possui {len(frase)} caracteres!\n')
print('\t',end = ""... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,055 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio35.py | # Desafio 35 Curso em Video Python
# Este programa verifica se 3 comprimentos de retas informados formam um triângulo.
# By Rafabr
import sys
import time
import os
import random
os.system('clear')
print('\nDesafio 35')
print('Este programa verifica se 3 comprimentos de retas informados formam um triângulo.\n\n')
t... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,056 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio33.py | # Desafio 33 Curso em Video Python
# Este programa ordena três números em sequência.
# By Rafabr
import sys
import time
import os
import random
os.system('clear')
print('\nDesafio 33')
print('Este programa ordena três números em sequência.\n\n')
try:
n1 = float(input('Informe o primeiro número: ').strip())
... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,057 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio65.py | # Desafio 65 Curso em Video Python
# By Rafabr
from estrutura_modelo import cabecalho, rodape
cabecalho(65, "Média, Maior e Menor valor de numeros informados")
def maisNumeros():
try:
qtd_numeros_incluir = int(
input('\nInforme quantos números deseja incluir: ')
)
except Valu... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,058 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio38.py | # Desafio 38 Curso em Video Python
# By Rafabr
import os,time,sys
from estrutura_modelo import cabecalho,rodape
cabecalho(38,"Comparar dois números")
try:
n1 = int(input('Digite um número inteiro: '))
n2 = int(input('Digite outro número inteiro: '))
print()
except ValueError:
print('Voçe digitou um ... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,059 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio44.py | # Desafio 44 Curso em Video Python
# By Rafabr
import os,time,sys
from estrutura_modelo import cabecalho,rodape
cabecalho(44,"Valor de Produto com Diversas Meios de Pagamentos")
try:
valor_normal = float(input("Informe o preço normal do produto(Em R$ - Ex.: 20,44) : ").replace(',','.'))
meio_pag = int(inp... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,060 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio42.py | # Desafio 42 Curso em Video Python
# By Rafabr
import os,time,sys
from estrutura_modelo import cabecalho,rodape
cabecalho(42,"Classificação de Triângulos 2")
try:
retas = str(input("Informe 3 medidas de reta separadas por virgula ','(Ex.: 4,5,6): ")).strip().split(',')
r = [float(retas[0]),float(retas[1]),f... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,061 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio39.py | # Desafio 39 Curso em Video Python
# By Rafabr
import os,time,sys
from estrutura_modelo import cabecalho,rodape
cabecalho(39,"Informação sobre alistamento militar")
try:
ano_nasc = int(input('Digite o ano de seu nascimento: '))
print()
except ValueError:
print('Voçe digitou um valor indevido!')
time... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,062 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio52.py | # Desafio 52 Curso em Video Python
# By Rafabr
from time import sleep
from sys import exit
from os import system
from estrutura_modelo import cabecalho,rodape
cabecalho(52,"Verificador de número primo!")
try:
numero = int(input('Digite o número a ser análisado: '))
except ValueError:
print('Voçe digitou um... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,063 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio10.py | # Desafio 10 Curso em Video Python
# Converte um valor em reais para dólares americanos!
#By Rafabr
import sys,time
import os
os.system('clear')
print('\033[1;47;30m',end="")
print('\n'+'*'*80)
print('Desafio 10'.center(80))
print('Este programa converte um valor em reais para dólares americanos!'.center(80))
print... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,064 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio54.py | # Desafio 54 Curso em Video Python
# By Rafabr
from time import sleep
from datetime import date
from sys import exit
from estrutura_modelo import cabecalho, rodape
cabecalho(54, "Verificar maioridade de pessoas")
print("Este programa irá verificar quantas das pessoas informadas são maiores que 18 anos!\n")
try:
... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,065 | rafarbop/Python-Curso-em-Video | refs/heads/master | /aula13-exemplos.py | #Aula 13 do Curso Python em Video!
#By Rafabr
import time,sys
import os
from estrutura_modelo import cabecalho,rodape
cabecalho(13,"Esta Aula será sobre Estruturas de Repetição FOR!")
print('Exemplo 01 - Imprimindo usando repetição!')
for c in range(0,6):
print(c)
print('Usado range(0,6)')
print('─── Fim Exempl... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,066 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio7.py | # Desafio 7 Curso em Video Python
# Ler duas notas do aluno, calcula e mostra a média!
#By Rafabr
import sys,time
import os
os.system('clear')
print('\033[1;47;30m',end="")
print('\n'+'*'*80)
print('Desafio 7'.center(80))
print('Este programa recebe duas notas e calcula a média delas!'.center(80))
print(80*'*')
pri... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,067 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio36.py | # Desafio 36 Curso em Video Python
# By Rafabr
import os,time
from estrutura_modelo import cabecalho,rodape
cabecalho(36,"Análise de um financiamento de Imóvel")
print('\tPrezado Cliente,\n\tIremos coletar algumas informações para analisar sua solicitação de financiamento.\n')
valor_casa = float(input('Informe o va... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,068 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio12.py | # Desafio 12 Curso em Video Python
# Recebe o preço de um produto e cálcula uma desconto de 5% eno preço.
#By Rafabr
import sys,time
import os
os.system('clear')
print('\033[1;47;30m',end="")
print('\n'+'*'*80)
print('Desafio 12'.center(80))
print('Este programa recebe o preço de um produto e calcula uma desconto d... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,069 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio6.py | # Desafio 6 Curso em Video Python
# Receber um número da usuário e informar o seu dobro, triplo e a raiz quadrada
#By Rafabr
import sys,time
import os
os.system('clear')
print('\033[1;47;30m',end="")
print('\n'+'*'*80)
print('Desafio 6'.center(80))
print('Este programa mostra o dobro, o triplo e a raiz quadrada de ... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,070 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio31.py | # Desafio 31 Curso em Video Python
# Este programa calcula o preço de viagem cujo valor depende da distâcia a ser percorrida.
# By Rafabr
import sys
import time
import os
import random
os.system('clear')
print('\nDesafio 31')
print('Este programa calcula o preço de viagem cujo valor depende da distâcia a ser percor... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,071 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio15.py | # Desafio 15 Curso em Video Python
# Calcula o valor a pagar pelo aluguel de um carro
#By Rafabr
import sys,time
print('\nDesafio 15')
print('Este programa calcula o valor a pagar pelo aluguel de um carro.\n')
try:
km = float(input('Informe quantos Km (número inteiro ou decimal) voçe percorreu com o carro alug... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,072 | rafarbop/Python-Curso-em-Video | refs/heads/master | /estrutura_modelo.py | # Estruturas para os desafios Curso em Video Python
# By Rafabr
import os
def cabecalho(aula, sobre: str):
os.system('clear')
print('\033[;1;44;37m', end="")
print('\n'+'*'*100)
print(f'Aula/Desafio {aula}'.center(100))
print(sobre.center(100))
print('*'*100+'\n')
print('\033[m', end="")
... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,073 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio4.py | # Desafio 4 Curso em Video Python
# Usa uma função que retorna o tipo primitivo e utiliza alguns métodos utilizados com strings!
# By Rafabr
import os
os.system('clear')
print('\033[1;47;30m',end="")
print('\n'+'*'*80)
print('Desafio 4'.center(80))
print('Este programa estuda os tipos primitivos de Python e utiliza... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,074 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio5.py | # Desafio 5 Curso em vídeo Python
# Receber um número do usuário emostrar sucessor e antecessor
#By Rafabr
import sys,time
import os
os.system('clear')
print('\033[1;47;30m',end="")
print('\n'+'*'*80)
print('Desafio 5'.center(80))
print('Este programa mostra o antecessor e o sucessor de qualquer número'.center(80))... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,075 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio59.py | # Desafio 59 Curso em Video Python
# By Rafabr
from time import sleep
from os import system
from estrutura_modelo import cabecalho, rodape
cabecalho(59, "Menu de Operações Aritméticas")
print('Este programa calcula uma operação matemática com os números \
informados.'.center(100).upper(), end='\n\n')
while True:
... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,076 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio45.py | # Desafio 45 Curso em Video Python
# By Rafabr
import os,time,sys
import random
from estrutura_modelo import cabecalho,rodape
cabecalho(45,"Jogo do Jokenpô!")
try:
player = int(input('''Bem vindo ao Jogo da Pedra, Papel e Tesoura!
Para Jogar escolha umas das opções abaixo:
1 - Pedra
2 - Papel
... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,077 | rafarbop/Python-Curso-em-Video | refs/heads/master | /desafio63.py | # Desafio 63 Curso em Video Python
# By Rafabr
from estrutura_modelo import cabecalho, rodape
cabecalho(63, "Sequência de Fibonacci")
while True:
try:
print('Esse programa mostra alguns termos da Sequência de Finobacci!')
termos = float(input('Digite o número de Termos que deseja ver: '))
exc... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
38,078 | rafarbop/Python-Curso-em-Video | refs/heads/master | /aula08-exemplos.py | #Aula 8 do Curso Python em Video!
#Exercício da Aula 08!
#By Rafabr
'''Este exercicio testa o comando import para importar módulos com comandos
não disponíveis em python. Foi testado a biblioteca math para importar.
Foi testado também a importação somente da função específica através do comando from'''
from math ... | {"/desafio51.py": ["/estrutura_modelo.py"], "/desafio46.py": ["/estrutura_modelo.py"], "/desafio47.py": ["/estrutura_modelo.py"], "/desafio43.py": ["/estrutura_modelo.py"], "/desafio64.py": ["/estrutura_modelo.py"], "/desafio56.py": ["/estrutura_modelo.py"], "/desafio57.py": ["/estrutura_modelo.py"], "/desafio49.py": [... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.