index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
45,424
wangyanxia-626/pythpn_15
refs/heads/master
/class_0304/demo_conf.py
# -*- coding:utf-8 -*- # @Time :2020-03-04 20:38 # @Email :876417305@qq.com # @Author :yanxia # @File :demo_conf.PY from configparser import ConfigParser #实例化类 cf=ConfigParser() #读取conf文件:文件路径 编码方式 #相对路径 cf.read("demo.cfg",encoding="utf-8") #绝对路径 # cf.read("C:\Users\10977\Desktop\剪切") #读取所有的sections 以列表的形式存在 secs=cf.se...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,425
wangyanxia-626/pythpn_15
refs/heads/master
/class_0228/boy_friend.py
# -*- coding:utf-8 -*- # @Time :2020-02-28 21:08 # @Email :876417305@qq.com # @Author :yanxia # @File :boy_friend.PY class BoyFriend:#类 sex='boy' height=180# 类属性 @staticmethod# 静态方法 def coding(language='python'):#类方法 print("会写{}代码,并且写得很好".format(language)) def cooking(self,*args): co...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,426
wangyanxia-626/pythpn_15
refs/heads/master
/class_0307/Sd_youjian.py
# -*- coding:utf-8 -*- # @Time :2020-03-10 15:49 # @Email :876417305@qq.com # @Author :yanxia # @File :email_colose.PY import ssl from smtplib import SMTP,SMTP_SSL from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.mime.application import MIMEApplication #配置各种邮件服务器 emailname=...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,427
wangyanxia-626/pythpn_15
refs/heads/master
/class_0310shizhan/call_web.py
# -*- coding:utf-8 -*- # @Time :2020-03-11 21:40 # @Email :876417305@qq.com # @Author :yanxia # @File :call_web.PY import requests # params={"username":"zhuge2019","password":"QAZwsx123"} # url="https://callapiv2.zhuge.com/home/index/index" # res=requests.post(url=url,data=params) # print(res.json()) # print(res.json()...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,428
wangyanxia-626/pythpn_15
refs/heads/master
/class_0314/testcase/test_bidLoan.py
# -*- coding:utf-8 -*- # @Time :2020-03-16 14:48 # @Email :876417305@qq.com # @Author :yanxia # @File :test_bidLoan.PY import unittest from ddt import ddt,data from class_0314.common import do_excel from class_0314.common import contants from class_0314.common.http_request import HttpRequest2 from class_0314.common imp...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,429
wangyanxia-626/pythpn_15
refs/heads/master
/class_0313/testcase/test_register.py
# -*- coding:utf-8 -*- # @Time :2020-03-13 16:33 # @Email :876417305@qq.com # @Author :yanxia # @File :test_register.PY import unittest from class_0313.common.http_request import HttpRequest2 from class_0313.common import do_excel from class_0313.common import contants from ddt import ddt, data from class_0313.common i...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,430
wangyanxia-626/pythpn_15
refs/heads/master
/class_0312/study_session_request.py
# -*- coding:utf-8 -*- # @Time :2020-03-12 10:56 # @Email :876417305@qq.com # @Author :yanxia # @File :study_session_request.PY import requests session=requests.sessions.session() #登录 params={"mobilephone":"15810447878","pwd":123456} "http://test.lemonban.com/futureloan/mvc/api/member/login" resp=session.request('post'...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,431
wangyanxia-626/pythpn_15
refs/heads/master
/class_0228/class_02.py
# -*- coding:utf-8 -*- # @Time :2020-02-28 22:47 # @Email :876417305@qq.com # @Author :yanxia # @File :class_02.PY # 手机 # 属性:价格 品牌 颜色 尺寸 # 方法:打电话 发短信 听音乐 class Phone: #手机属性 # color="black" # price=4500 # brand="oppo" # size="5.5" #初始化方法-参数化-魔法方法 def __init__(self,color,price,brand,size): ...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,432
wangyanxia-626/pythpn_15
refs/heads/master
/class_0314/testcase/test_addproject.py
# -*- coding:utf-8 -*- # @Time :2020-03-14 0:12 # @Email :876417305@qq.com # @Author :yanxia # @File :test_addproject.PY import unittest from ddt import ddt, data from class_0314.common import do_excel from class_0314.common import contants from class_0314.common.config import config from class_0314.common import conte...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,433
wangyanxia-626/pythpn_15
refs/heads/master
/class_0314/run.py
# -*- coding:utf-8 -*- # @Time :2020-03-23 13:16 # @Email :876417305@qq.com # @Author :yanxia # @File :run.py.PY import sys sys.path.append('./')#project跟目录 print(sys.path) import unittest import HTMLTestRunnerNew from class_0314.common import contants discover=unittest.defaultTestLoader.discover(contants.case_dir,'te...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,434
wangyanxia-626/pythpn_15
refs/heads/master
/class_0312/do_excel.py
# -*- coding:utf-8 -*- # @Time :2020-03-12 16:16 # @Email :876417305@qq.com # @Author :yanxia # @File :do_excel.PY #完成excel的读和写 import openpyxl from class_0312 import http_request class Case: """测试用例类,每个测试用例,实际上就是它的一个实例(每一个测试用例,实际就是Case的一个实例)""" def __init__(self): self.case_id=None self.title=N...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,435
wangyanxia-626/pythpn_15
refs/heads/master
/class_0307/http_xlsx.py
# -*- coding:utf-8 -*- # @Time :2020-03-09 11:08 # @Email :876417305@qq.com # @Author :yanxia # @File :http_xlsx.PY from openpyxl import load_workbook import json def get_datavalue(): wb=load_workbook("data.xlsx") #sheet=wb["Sheet1"] sheet=wb.worksheets[0]#是一个列表,取第一个 login_data=[] for row in range(...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,436
wangyanxia-626/pythpn_15
refs/heads/master
/class_0228/lujing.py
# -*- coding:utf-8 -*- # @Time :2020-03-09 18:29 # @Email :876417305@qq.com # @Author :yanxia # @File :lujing.PY # 文件的路径处理 import json a={"memberId":88538,"title":"借款300万","amount":300000,"loanRate":18.0,"loanTerm":6,"loanDateType":0,"repaymemtWay":5,"biddingDays":10} b=json.dumps(a) print(type(b))
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,437
wangyanxia-626/pythpn_15
refs/heads/master
/class_0307/http_unittest.py
# -*- coding:utf-8 -*- # @Time :2020-03-07 21:10 # @Email :876417305@qq.com # @Author :yanxia # @File :http_unittest.PY import unittest from class_0307.http_request import HttpRequests from ddt import ddt,data,unpack @ddt class TestHttp_Request(unittest.TestCase): url = "http://test.lemonban.com/futureloan/mvc/ap...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,438
wangyanxia-626/pythpn_15
refs/heads/master
/class_0308/learn_ddt.py
# -*- coding:utf-8 -*- # @Time :2020-03-08 15:24 # @Email :876417305@qq.com # @Author :yanxia # @File :learn_ddt.PY import unittest from ddt import ddt,data,unpack @ddt #@ddt装饰测试类unittest.TestCase的子类 class TestAdd(unittest.TestCase): # data里面的数据传进来是一个元组,共有一个元素,执行一条用例 # data加上*,变成了元组,有3个元素,执行3条用例 #unpack 根据...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,439
wangyanxia-626/pythpn_15
refs/heads/master
/class_0306/test_suite.py
# -*- coding:utf-8 -*- # @Time :2020-03-07 16:21 # @Email :876417305@qq.com # @Author :yanxia # @File :test_suite.PY # 第一种方法 import unittest import HTMLTestRunnerNew from class_0306.learn_unittest import * #存储用例的容器suite 套件 suite=unittest.TestSuite()#创建了一个对象 suite.addTest(TestAdd(0,0,0,"test_add_zero"))#添加测试用例到suite这个套件...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,440
wangyanxia-626/pythpn_15
refs/heads/master
/class_0310/基础面试题.py
# -*- coding:utf-8 -*- # @Time :2020-03-10 17:23 # @Email :876417305@qq.com # @Author :yanxia # @File :基础面试题.PY # a=[1,2,3,5,7,"q",3]#去重复数 # def del_repeat(a): # b=[] # for i in a: # if i not in b: # b.append(i) # return b # print(del_repeat (a)) # a=["t","2","6","a"] # print("".join(a)...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,441
wangyanxia-626/pythpn_15
refs/heads/master
/class_0314/common/config.py
# -*- coding:utf-8 -*- # @Time :2020-03-13 21:46 # @Email :876417305@qq.com # @Author :yanxia # @File :config.PY import configparser from class_0314.common import contants class ReadConfig: '''完成配置文件的读取''' def __init__(self): self.config=configparser.ConfigParser()#实例化这个ConfigParser()类 self.conf...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,442
wangyanxia-626/pythpn_15
refs/heads/master
/class_0314/common/do_excel.py
# -*- coding:utf-8 -*- # @Time :2020-03-13 11:58 # @Email :876417305@qq.com # @Author :yanxia # @File :do_excel.PY import openpyxl from class_0314.common import http_request from class_0314.common import contants class Case: def __init__(self): self.case_id = None self.title = None self.ur...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,443
wangyanxia-626/pythpn_15
refs/heads/master
/class_0306/learn_unittest.py
# -*- coding:utf-8 -*- # @Time :2020-03-06 21:52 # @Email :876417305@qq.com # @Author :yanxia # @File :learn_unittest.PY #单元测试 #类:属性、方法 #属性:类属性、类方法 #方法 类方法 静态方法 对象方法 # 单元测试时做什么呢?对某个功能去做测试,每一个功能都是封装在类里面 # ---类里面有属性和方法,单元测试测试的是方法:创建对象 调用方法 传参---通过传递多组数据来测试不同的情况 # 框架 unittest----pytest 断言:期望结果和实际结果的对比 import unittest fro...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,444
wangyanxia-626/pythpn_15
refs/heads/master
/class_0314/common/logger.py
# -*- coding:utf-8 -*- # @Time :2020-03-17 9:10 # @Email :876417305@qq.com # @Author :yanxia # @File :logger.PY '''日志模块''' import logging from class_0314.common import contants from class_0314.common.config import config def get_logger(name): logger=logging.getLogger(name) logger.setLevel('DEBUG') formatter...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,445
wangyanxia-626/pythpn_15
refs/heads/master
/class_0313/common/http_request.py
# -*- coding:utf-8 -*- # @Time :2020-03-13 11:58 # @Email :876417305@qq.com # @Author :yanxia # @File :http_request.PY import requests from class_0313.common.config import config class HttpRequest: def request(self, method, url, data=None, json=None, cookies=None): if type(data) == str: data = ...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,446
wangyanxia-626/pythpn_15
refs/heads/master
/class_0314/common/do_mysql.py
# -*- coding:utf-8 -*- # @Time :2020-03-14 17:31 # @Email :876417305@qq.com # @Author :yanxia # @File :do_mysql.PY import pymysql from class_0314.common.config import config class DoMysql: ''' 完成与mysql数据库的交互''' def __init__(self): #把这些参数放到配置文件里面,然后读取配置文件里面的值 # host = "test.lemonban.com" ...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,447
wangyanxia-626/pythpn_15
refs/heads/master
/class_0314/testcase/test_login.py
# -*- coding:utf-8 -*- # @Time :2020-03-13 15:05 # @Email :876417305@qq.com # @Author :yanxia # @File :test_login.PY import unittest from class_0314.common import do_excel from class_0314.common import contants from class_0314.common.http_request import HttpRequest2 from ddt import ddt, data from class_0314.common impo...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,448
wangyanxia-626/pythpn_15
refs/heads/master
/class_0314/testcase/test_recharge.py
# -*- coding:utf-8 -*- # @Time :2020-03-13 16:33 # @Email :876417305@qq.com # @Author :yanxia # @File :test_recharge.PY import unittest from class_0314.common.http_request import HttpRequest2 from class_0314.common import do_excel from class_0314.common import contants from ddt import ddt, data from class_0314.common.d...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,449
wangyanxia-626/pythpn_15
refs/heads/master
/class_0310shizhan/study_request.py
# -*- coding:utf-8 -*- # @Time :2020-03-10 21:52 # @Email :876417305@qq.com # @Author :yanxia # @File :study_request.PY import requests ''' 1、构造请求:请求方式、请求地址、请求参数 2、发起请求 3、返回响应 4、判断响应码,响应体''' #注册接口 params={"mobilephone":"15810447833","pwd":123456} resp=requests.get("http://test.lemonban.com/futureloan/mvc/api/member/reg...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,450
wangyanxia-626/pythpn_15
refs/heads/master
/class_0228/class_01.py
# -*- coding:utf-8 -*- # @Time :2020-02-28 20:51 # @Email :876417305@qq.com # @Author :yanxia # @File :class_01.PY class BoyFriend:#类 sex='boy' height=180# 类属性 def coding(self,language='python'):#类方法 print("会写{}代码,并且写得很好".format(language)) def cooking(self,*args): cook_name="" ...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,451
wangyanxia-626/pythpn_15
refs/heads/master
/class_0310shizhan/re_study.py
# -*- coding:utf-8 -*- # @Time :2020-03-16 8:51 # @Email :876417305@qq.com # @Author :yanxia # @File :re_study.PY import re #解析正则表达式 查找 替换 from class_0313.common.config import config # 正则表达式学习 data = '{"mobilephone":"#normal_user#","pwd":"#normal_pwd#"}' # 原本字符、元字符来组成 p = "#(.*?)#" # #表示开始和结束,.代表匹配除了换行符以外的任何字符,*表示匹配前面的...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,452
wangyanxia-626/pythpn_15
refs/heads/master
/class_0228/class_03.py
# -*- coding:utf-8 -*- # @Time :2020-02-29 11:09 # @Email :876417305@qq.com # @Author :yanxia # @File :class_03.PY # 继承 拓展 重写 # 新加了支付功能 from class_0228.class_02 import Phone class Phone_1(Phone): #括号里面的是父类 Phone_1是子类 # def __init__(self): #如果子类有自己的初始化,就不用继续使用父类的初始化,同样调用有用到父类里面的初始化函数的类时,就会报错 # pass def p...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,453
wangyanxia-626/pythpn_15
refs/heads/master
/class_0306/math_method.py
# -*- coding:utf-8 -*- # @Time :2020-03-07 15:39 # @Email :876417305@qq.com # @Author :yanxia # @File :math_method.PY class MathMethod: def add(self,a,b): return a+b def sub(self,a,b): return a-b
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,454
wangyanxia-626/pythpn_15
refs/heads/master
/class_0228/classhome_work.py
# -*- coding:utf-8 -*- # @Time :2020-02-28 22:29 # @Email :876417305@qq.com # @Author :yanxia # @File :home.PY class User: frist_name="yanxia" last_name="wang" sex="女" heigh=162 def describe_user(self): print("我叫{}{},性别{},身高{}".format(self.last_name,self.frist_name,self.sex,self.heigh)) ...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,455
wangyanxia-626/pythpn_15
refs/heads/master
/class_0312/http_request.py
# -*- coding:utf-8 -*- # @Time :2020-03-12 9:59 # @Email :876417305@qq.com # @Author :yanxia # @File :http_request.PY import requests class HttpRequest: """ 使用这类的request方法去完成不同的http请求,并且返回响应结果 """ def request(self,method,url,data=None,json=None,cookies=None): ''' :param method: 请求方法 ...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,456
wangyanxia-626/pythpn_15
refs/heads/master
/class_0303/learn_requests.py
# -*- coding:utf-8 -*- # @Time :2020-03-03 21:37 # @Email :876417305@qq.com # @Author :yanxia # @File :learn_requests.PY # 安装 pip install requests # 作用是什么:发送http请求。常见的有get,post,delete,put等 # 为什么学习它?http协议的接口 # request 客户端---服务端的请求 包含:请求头 请求地址 请求参数 http协议版本 # response 服务端对客户端的一个请求响应,包含:响应头 响应报文 状态码 import requests url="...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,457
wangyanxia-626/pythpn_15
refs/heads/master
/class_0303/learn_openpy_2.py
# -*- coding:utf-8 -*- # @Time :2020-03-04 17:27 # @Email :876417305@qq.com # @Author :yanxia # @File :learn_openpy_2.PY from openpyxl import load_workbook wb=load_workbook("py15.xlsx") sheet=wb["Sheet1"] # 循环取值第二种办法 print(sheet.max_row)#获取最大行 print(sheet.max_column)#获取最大列 # 循环取值第一种方法 for i in range(1,sheet.max_row+1):...
{"/class_0307/http_unittest2.py": ["/class_0307/http_xlsx.py"], "/class_0313/testcase/test_login.py": ["/class_0313/common/http_request.py"], "/class_0307/http_suit.py": ["/class_0307/http_unittest.py", "/class_0307/__init__.py"], "/class_0313/testcase/test_register.py": ["/class_0313/common/http_request.py"], "/class_...
45,478
gillie1022/mysite
refs/heads/master
/mysite/views.py
from django.shortcuts import render, redirect, get_object_or_404 from .models import Project, Technology def homepage(request): return render(request, 'mysite/index.html') def resumé(request): return render(request, 'mysite/resumé.html') def list_projects(request): projects = Project.objects.all().order_...
{"/mysite/views.py": ["/mysite/models.py"], "/mysite/admin.py": ["/mysite/models.py"]}
45,479
gillie1022/mysite
refs/heads/master
/mysite/migrations/0003_auto_20200828_1517.py
# Generated by Django 3.1 on 2020-08-28 15:17 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mysite', '0002_technology'), ] operations = [ migrations.AlterField( model_name='project', name='livesite', ...
{"/mysite/views.py": ["/mysite/models.py"], "/mysite/admin.py": ["/mysite/models.py"]}
45,480
gillie1022/mysite
refs/heads/master
/mysite/migrations/0009_project_outside_livesite.py
# Generated by Django 3.1.1 on 2020-09-14 14:45 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mysite', '0008_auto_20200909_1417'), ] operations = [ migrations.AddField( model_name='project', name='outside_lives...
{"/mysite/views.py": ["/mysite/models.py"], "/mysite/admin.py": ["/mysite/models.py"]}
45,481
gillie1022/mysite
refs/heads/master
/blog/views.py
from django.shortcuts import render, redirect, get_object_or_404 def homepage(request): return render(request, "mysite/index.html") def list_posts(request): post = Post.objects.all() return render(request, "mysite/list_posts.html", {"posts": posts}) def post_detail(request, post_pk): post = get_ob...
{"/mysite/views.py": ["/mysite/models.py"], "/mysite/admin.py": ["/mysite/models.py"]}
45,482
gillie1022/mysite
refs/heads/master
/mysite/admin.py
from django.contrib import admin from .models import Project, Technology admin.site.register(Project) admin.site.register(Technology)
{"/mysite/views.py": ["/mysite/models.py"], "/mysite/admin.py": ["/mysite/models.py"]}
45,483
gillie1022/mysite
refs/heads/master
/mysite/models.py
from django.db import models class Technology(models.Model): name = models.CharField(max_length=50) def __str__(self): return self.name class Project(models.Model): title = models.CharField(max_length=100) description = models.TextField() image = models.CharField(max_length=250, null=True...
{"/mysite/views.py": ["/mysite/models.py"], "/mysite/admin.py": ["/mysite/models.py"]}
45,484
gillie1022/mysite
refs/heads/master
/project/urls.py
"""project URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based...
{"/mysite/views.py": ["/mysite/models.py"], "/mysite/admin.py": ["/mysite/models.py"]}
45,485
gillie1022/mysite
refs/heads/master
/mysite/migrations/0004_auto_20200831_1818.py
# Generated by Django 3.1 on 2020-08-31 18:18 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mysite', '0003_auto_20200828_1517'), ] operations = [ migrations.RemoveField( model_name='technology', name='project',...
{"/mysite/views.py": ["/mysite/models.py"], "/mysite/admin.py": ["/mysite/models.py"]}
45,486
sheepcat/ceph-deploy
refs/heads/master
/ceph_deploy/config.py
import logging import os.path import ConfigParser import commands from ceph_deploy import exc from ceph_deploy import conf from ceph_deploy.cliutil import priority from ceph_deploy import hosts LOG = logging.getLogger(__name__) def config_push(args): conf_data = conf.ceph.load_raw(args) errors = 0 for ...
{"/ceph_deploy/config.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/tests/test_remotes.py": ["/ceph_deploy/hosts/remotes.py"], "/ceph_deploy/hosts/common.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/calamari.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/hosts/centos/mon/__init__.py": ["/ceph_deploy/hosts/comm...
45,487
sheepcat/ceph-deploy
refs/heads/master
/ceph_deploy/lib/vendor/remoto/lib/vendor/execnet/script/xx.py
import rlcompleter2 rlcompleter2.setup() import register, sys try: hostport = sys.argv[1] except: hostport = ':8888' gw = register.ServerGateway(hostport)
{"/ceph_deploy/config.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/tests/test_remotes.py": ["/ceph_deploy/hosts/remotes.py"], "/ceph_deploy/hosts/common.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/calamari.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/hosts/centos/mon/__init__.py": ["/ceph_deploy/hosts/comm...
45,488
sheepcat/ceph-deploy
refs/heads/master
/ceph_deploy/tests/parser/test_disk.py
import pytest from ceph_deploy.cli import get_parser from ceph_deploy.tests.util import assert_too_few_arguments SUBCMDS_WITH_ARGS = ['list', 'prepare', 'activate', 'zap'] class TestParserDisk(object): def setup(self): self.parser = get_parser() def test_disk_help(self, capsys): with pytes...
{"/ceph_deploy/config.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/tests/test_remotes.py": ["/ceph_deploy/hosts/remotes.py"], "/ceph_deploy/hosts/common.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/calamari.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/hosts/centos/mon/__init__.py": ["/ceph_deploy/hosts/comm...
45,489
sheepcat/ceph-deploy
refs/heads/master
/ceph_deploy/tests/test_remotes.py
from mock import patch from ceph_deploy.hosts import remotes from ceph_deploy.hosts.remotes import platform_information class FakeExists(object): def __init__(self, existing_paths): self.existing_paths = existing_paths def __call__(self, path): for existing_path in self.existing_paths: ...
{"/ceph_deploy/config.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/tests/test_remotes.py": ["/ceph_deploy/hosts/remotes.py"], "/ceph_deploy/hosts/common.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/calamari.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/hosts/centos/mon/__init__.py": ["/ceph_deploy/hosts/comm...
45,490
sheepcat/ceph-deploy
refs/heads/master
/ceph_deploy/hosts/remotes.py
try: import configparser except ImportError: import ConfigParser as configparser import errno import socket import os import shutil import tempfile import platform import commands disk_conf = '/opt/ceph/f2fs/conf/osddisk' ceph_conf_file = '/etc/ceph/ceph.conf' conf_hd = configparser.ConfigParser() conf_hd.read...
{"/ceph_deploy/config.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/tests/test_remotes.py": ["/ceph_deploy/hosts/remotes.py"], "/ceph_deploy/hosts/common.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/calamari.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/hosts/centos/mon/__init__.py": ["/ceph_deploy/hosts/comm...
45,491
sheepcat/ceph-deploy
refs/heads/master
/ceph_deploy/hosts/common.py
import commands import os import time import ConfigParser from os.path import join from ceph_deploy.util import paths from ceph_deploy import conf from ceph_deploy.lib import remoto from ceph_deploy.util import constants from ceph_deploy.util import system ceph_conf_file = '/root/ceph.conf' conf_hd = ConfigParser.Conf...
{"/ceph_deploy/config.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/tests/test_remotes.py": ["/ceph_deploy/hosts/remotes.py"], "/ceph_deploy/hosts/common.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/calamari.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/hosts/centos/mon/__init__.py": ["/ceph_deploy/hosts/comm...
45,492
sheepcat/ceph-deploy
refs/heads/master
/ceph_deploy/__init__.py
__version__ = '1.5.39'
{"/ceph_deploy/config.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/tests/test_remotes.py": ["/ceph_deploy/hosts/remotes.py"], "/ceph_deploy/hosts/common.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/calamari.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/hosts/centos/mon/__init__.py": ["/ceph_deploy/hosts/comm...
45,493
sheepcat/ceph-deploy
refs/heads/master
/ceph_deploy/tests/parser/test_osd.py
import pytest from ceph_deploy.cli import get_parser from ceph_deploy.tests.util import assert_too_few_arguments SUBCMDS_WITH_ARGS = ['list', 'create', 'prepare', 'activate'] class TestParserOSD(object): def setup(self): self.parser = get_parser() def test_osd_help(self, capsys): with pyte...
{"/ceph_deploy/config.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/tests/test_remotes.py": ["/ceph_deploy/hosts/remotes.py"], "/ceph_deploy/hosts/common.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/calamari.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/hosts/centos/mon/__init__.py": ["/ceph_deploy/hosts/comm...
45,494
sheepcat/ceph-deploy
refs/heads/master
/ceph_deploy/lib/vendor/remoto/lib/vendor/execnet/deprecated.py
""" some deprecated calls (c) 2008-2009, Holger Krekel and others """ import execnet def PopenGateway(python=None): """ instantiate a gateway to a subprocess started with the given 'python' executable. """ APIWARN("1.0.0b4", "use makegateway('popen')") spec = execnet.XSpec("popen") spec.py...
{"/ceph_deploy/config.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/tests/test_remotes.py": ["/ceph_deploy/hosts/remotes.py"], "/ceph_deploy/hosts/common.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/calamari.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/hosts/centos/mon/__init__.py": ["/ceph_deploy/hosts/comm...
45,495
sheepcat/ceph-deploy
refs/heads/master
/ceph_deploy/calamari.py
import errno import logging import os from ceph_deploy import hosts, exc from ceph_deploy.lib import remoto LOG = logging.getLogger(__name__) def distro_is_supported(distro_name): """ An enforcer of supported distros that can differ from what ceph-deploy supports. """ supported = ['centos', 'red...
{"/ceph_deploy/config.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/tests/test_remotes.py": ["/ceph_deploy/hosts/remotes.py"], "/ceph_deploy/hosts/common.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/calamari.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/hosts/centos/mon/__init__.py": ["/ceph_deploy/hosts/comm...
45,496
sheepcat/ceph-deploy
refs/heads/master
/ceph_deploy/hosts/centos/mon/__init__.py
from ceph_deploy.hosts.common import mon_add as add # noqa from ceph_deploy.hosts.common import mon_create as create # noqa from ceph_deploy.hosts.common import osd_create_all as create_all # noqa from ceph_deploy.hosts.common import mgr_create as create_mgr # noqa
{"/ceph_deploy/config.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/tests/test_remotes.py": ["/ceph_deploy/hosts/remotes.py"], "/ceph_deploy/hosts/common.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/calamari.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/hosts/centos/mon/__init__.py": ["/ceph_deploy/hosts/comm...
45,497
sheepcat/ceph-deploy
refs/heads/master
/ceph_deploy/lib/vendor/remoto/lib/vendor/execnet/__init__.py
""" execnet: pure python lib for connecting to local and remote Python Interpreters. (c) 2012, Holger Krekel and others """ __version__ = '1.2.0' from . import apipkg apipkg.initpkg(__name__, { 'PopenGateway': '.deprecated:PopenGateway', 'SocketGateway': '.deprecated:SocketGateway', 'SshGateway': ...
{"/ceph_deploy/config.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/tests/test_remotes.py": ["/ceph_deploy/hosts/remotes.py"], "/ceph_deploy/hosts/common.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/calamari.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/hosts/centos/mon/__init__.py": ["/ceph_deploy/hosts/comm...
45,498
sheepcat/ceph-deploy
refs/heads/master
/ceph_deploy/lib/vendor/remoto/lib/vendor/execnet/script/quitserver.py
""" send a "quit" signal to a remote server """ import sys import socket hostport = sys.argv[1] host, port = hostport.split(':') hostport = (host, int(port)) sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect(hostport) sock.sendall('"raise KeyboardInterrupt"\n')
{"/ceph_deploy/config.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/tests/test_remotes.py": ["/ceph_deploy/hosts/remotes.py"], "/ceph_deploy/hosts/common.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/calamari.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/hosts/centos/mon/__init__.py": ["/ceph_deploy/hosts/comm...
45,499
sheepcat/ceph-deploy
refs/heads/master
/ceph_deploy/tests/parser/test_calamari.py
import pytest from ceph_deploy.cli import get_parser from ceph_deploy.tests.util import assert_too_few_arguments class TestParserCalamari(object): def setup(self): self.parser = get_parser() def test_calamari_help(self, capsys): with pytest.raises(SystemExit): self.parser.parse_...
{"/ceph_deploy/config.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/tests/test_remotes.py": ["/ceph_deploy/hosts/remotes.py"], "/ceph_deploy/hosts/common.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/calamari.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/hosts/centos/mon/__init__.py": ["/ceph_deploy/hosts/comm...
45,500
sheepcat/ceph-deploy
refs/heads/master
/ceph_deploy/osd.py
import argparse import json import logging import os import re import sys import time from textwrap import dedent from ceph_deploy import conf, exc, hosts, mon from ceph_deploy.util import constants, system, packages, net from ceph_deploy.cliutil import priority from ceph_deploy.lib import remoto LOG = logging.getLo...
{"/ceph_deploy/config.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/tests/test_remotes.py": ["/ceph_deploy/hosts/remotes.py"], "/ceph_deploy/hosts/common.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/calamari.py": ["/ceph_deploy/__init__.py"], "/ceph_deploy/hosts/centos/mon/__init__.py": ["/ceph_deploy/hosts/comm...
45,501
femtotrader/alpha_vantage
refs/heads/develop
/alpha_vantage/timeseries.py
from .alphavantage import AlphaVantage as av class TimeSeries(av): """This class implements all the api calls to times series """ @av._output_format @av._call_api_on_func def get_intraday(self, symbol, interval='15min', outputsize='compact'): """ Return intraday time series in two json obj...
{"/alpha_vantage/timeseries.py": ["/alpha_vantage/alphavantage.py"], "/alpha_vantage/techindicators.py": ["/alpha_vantage/alphavantage.py"], "/test_alpha_vantage/testalphavantage.py": ["/alpha_vantage/alphavantage.py", "/alpha_vantage/timeseries.py", "/alpha_vantage/techindicators.py", "/alpha_vantage/sectorperformance...
45,502
femtotrader/alpha_vantage
refs/heads/develop
/alpha_vantage/techindicators.py
from .alphavantage import AlphaVantage as av class TechIndicators(av): """This class implements all the technical indicator api calls """ @av._output_format @av._call_api_on_func def get_sma(self, symbol, interval='60min', time_period=20, series_type='close'): """ Return simple moving ave...
{"/alpha_vantage/timeseries.py": ["/alpha_vantage/alphavantage.py"], "/alpha_vantage/techindicators.py": ["/alpha_vantage/alphavantage.py"], "/test_alpha_vantage/testalphavantage.py": ["/alpha_vantage/alphavantage.py", "/alpha_vantage/timeseries.py", "/alpha_vantage/techindicators.py", "/alpha_vantage/sectorperformance...
45,503
femtotrader/alpha_vantage
refs/heads/develop
/test_alpha_vantage/testalphavantage.py
#!/usr/bin/env python from ..alpha_vantage.alphavantage import AlphaVantage from ..alpha_vantage.timeseries import TimeSeries from ..alpha_vantage.techindicators import TechIndicators from ..alpha_vantage.sectorperformance import SectorPerformances from nose.tools import assert_true, assert_false from simplejson import...
{"/alpha_vantage/timeseries.py": ["/alpha_vantage/alphavantage.py"], "/alpha_vantage/techindicators.py": ["/alpha_vantage/alphavantage.py"], "/test_alpha_vantage/testalphavantage.py": ["/alpha_vantage/alphavantage.py", "/alpha_vantage/timeseries.py", "/alpha_vantage/techindicators.py", "/alpha_vantage/sectorperformance...
45,504
femtotrader/alpha_vantage
refs/heads/develop
/alpha_vantage/sectorperformance.py
#!/usr/bin/env python from .alphavantage import AlphaVantage as av from functools import wraps import pandas import re class SectorPerformances(av): """This class implements all the sector performance api calls """ def percentage_to_float(self, val): """ Transform a string of ther form f.f% into f...
{"/alpha_vantage/timeseries.py": ["/alpha_vantage/alphavantage.py"], "/alpha_vantage/techindicators.py": ["/alpha_vantage/alphavantage.py"], "/test_alpha_vantage/testalphavantage.py": ["/alpha_vantage/alphavantage.py", "/alpha_vantage/timeseries.py", "/alpha_vantage/techindicators.py", "/alpha_vantage/sectorperformance...
45,505
femtotrader/alpha_vantage
refs/heads/develop
/alpha_vantage/alphavantage.py
try: # Python 3 import from urllib.request import urlopen except ImportError: # Python 2.* import from urllib2 import urlopen from simplejson import loads from functools import wraps import inspect import pandas import re class AlphaVantage: """ Base class where the decorators and base function f...
{"/alpha_vantage/timeseries.py": ["/alpha_vantage/alphavantage.py"], "/alpha_vantage/techindicators.py": ["/alpha_vantage/alphavantage.py"], "/test_alpha_vantage/testalphavantage.py": ["/alpha_vantage/alphavantage.py", "/alpha_vantage/timeseries.py", "/alpha_vantage/techindicators.py", "/alpha_vantage/sectorperformance...
45,506
femtotrader/alpha_vantage
refs/heads/develop
/helpers/pipy_rst_convert.py
#!/usr/bin/env python import pypandoc import codecs from os import path if __name__ == '__main__': """ Simple script to generate the rst file for pipy """ parent = path.abspath(path.dirname(path.dirname(__file__))) readmemd_path = path.join(parent, 'README.md') readmerst_path = path.join(par...
{"/alpha_vantage/timeseries.py": ["/alpha_vantage/alphavantage.py"], "/alpha_vantage/techindicators.py": ["/alpha_vantage/alphavantage.py"], "/test_alpha_vantage/testalphavantage.py": ["/alpha_vantage/alphavantage.py", "/alpha_vantage/timeseries.py", "/alpha_vantage/techindicators.py", "/alpha_vantage/sectorperformance...
45,507
femtotrader/alpha_vantage
refs/heads/develop
/setup.py
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) try: with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() except IOError: long_description = 'Python module to get stock data from ...
{"/alpha_vantage/timeseries.py": ["/alpha_vantage/alphavantage.py"], "/alpha_vantage/techindicators.py": ["/alpha_vantage/alphavantage.py"], "/test_alpha_vantage/testalphavantage.py": ["/alpha_vantage/alphavantage.py", "/alpha_vantage/timeseries.py", "/alpha_vantage/techindicators.py", "/alpha_vantage/sectorperformance...
45,509
cppmx/flask-api-quickstart
refs/heads/master
/app/auth/service.py
import datetime import bcrypt import jwt from usernames import is_safe_username from validate_email import validate_email from app import app, db from app.auth.exceptions import ( InvalidCredentialsError, InvalidTokenError, TokenExpiredError, ) from app.exceptions import InvalidFieldError from app.models i...
{"/app/auth/service.py": ["/app/__init__.py", "/app/auth/exceptions.py", "/app/exceptions.py", "/app/models.py", "/app/utils.py"], "/app/models.py": ["/app/__init__.py"], "/app/auth/helpers.py": ["/app/auth/exceptions.py", "/app/auth/service.py", "/app/models.py"], "/tests/test_app.py": ["/tests/helpers.py"], "/app/aut...
45,510
cppmx/flask-api-quickstart
refs/heads/master
/app/models.py
from app import db class User(db.Model): id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(80), unique=True) email = db.Column(db.String(254), unique=True, nullable=False) password = db.Column(db.String(256), unique=False, nullable=False) created_on = db.Column(db.DateTim...
{"/app/auth/service.py": ["/app/__init__.py", "/app/auth/exceptions.py", "/app/exceptions.py", "/app/models.py", "/app/utils.py"], "/app/models.py": ["/app/__init__.py"], "/app/auth/helpers.py": ["/app/auth/exceptions.py", "/app/auth/service.py", "/app/models.py"], "/tests/test_app.py": ["/tests/helpers.py"], "/app/aut...
45,511
cppmx/flask-api-quickstart
refs/heads/master
/app/auth/helpers.py
from functools import wraps from flask import request from app.auth.exceptions import InvalidTokenError, TokenExpiredError from app.auth.service import decode_auth_token, is_token_blacklisted from app.models import User def get_token_from_header(): token = None if "Authorization" in request.headers: ...
{"/app/auth/service.py": ["/app/__init__.py", "/app/auth/exceptions.py", "/app/exceptions.py", "/app/models.py", "/app/utils.py"], "/app/models.py": ["/app/__init__.py"], "/app/auth/helpers.py": ["/app/auth/exceptions.py", "/app/auth/service.py", "/app/models.py"], "/tests/test_app.py": ["/tests/helpers.py"], "/app/aut...
45,512
cppmx/flask-api-quickstart
refs/heads/master
/tests/test_app.py
import json from tests.helpers import ( assert_error, assert_error_invalid_token, assert_success_200, get_valid_token, login_user, signup_user, ) def test_ping(client): response = client.get("/ping") data = json.loads(response.data) assert_success_200(response) assert data["st...
{"/app/auth/service.py": ["/app/__init__.py", "/app/auth/exceptions.py", "/app/exceptions.py", "/app/models.py", "/app/utils.py"], "/app/models.py": ["/app/__init__.py"], "/app/auth/helpers.py": ["/app/auth/exceptions.py", "/app/auth/service.py", "/app/models.py"], "/tests/test_app.py": ["/tests/helpers.py"], "/app/aut...
45,513
cppmx/flask-api-quickstart
refs/heads/master
/app/utils.py
import datetime import pytz def now(): time = datetime.datetime.utcnow() return time.replace(tzinfo=pytz.utc) def as_utc_iso(date): return date.astimezone(datetime.timezone.utc).isoformat()
{"/app/auth/service.py": ["/app/__init__.py", "/app/auth/exceptions.py", "/app/exceptions.py", "/app/models.py", "/app/utils.py"], "/app/models.py": ["/app/__init__.py"], "/app/auth/helpers.py": ["/app/auth/exceptions.py", "/app/auth/service.py", "/app/models.py"], "/tests/test_app.py": ["/tests/helpers.py"], "/app/aut...
45,514
cppmx/flask-api-quickstart
refs/heads/master
/app/exceptions.py
from flask import jsonify class AppError(Exception): """Base class for all errors. Can represent error as HTTP response for API calls""" status_code = 500 error_code = "INTERNAL_ERROR" message = "Request cannot be processed at the moment." def __init__(self, status_code=None, error_code=None, me...
{"/app/auth/service.py": ["/app/__init__.py", "/app/auth/exceptions.py", "/app/exceptions.py", "/app/models.py", "/app/utils.py"], "/app/models.py": ["/app/__init__.py"], "/app/auth/helpers.py": ["/app/auth/exceptions.py", "/app/auth/service.py", "/app/models.py"], "/tests/test_app.py": ["/tests/helpers.py"], "/app/aut...
45,515
cppmx/flask-api-quickstart
refs/heads/master
/app/auth/exceptions.py
from app.exceptions import AppError class InvalidCredentialsError(AppError): def __init__(self): AppError.__init__( self, status_code=401, error_code="INVALID_CREDENTIALS", message="Invalid username or password.", ) class InvalidTokenError(AppError...
{"/app/auth/service.py": ["/app/__init__.py", "/app/auth/exceptions.py", "/app/exceptions.py", "/app/models.py", "/app/utils.py"], "/app/models.py": ["/app/__init__.py"], "/app/auth/helpers.py": ["/app/auth/exceptions.py", "/app/auth/service.py", "/app/models.py"], "/tests/test_app.py": ["/tests/helpers.py"], "/app/aut...
45,516
cppmx/flask-api-quickstart
refs/heads/master
/tests/conftest.py
import pytest from app import app, db def create_app(): """Return Flask's app object with test configuration""" app.config.from_object("app.config.TestingConfig") return app def set_up(): """Create database tables according to the app models""" db.create_all() db.session.commit() def tear...
{"/app/auth/service.py": ["/app/__init__.py", "/app/auth/exceptions.py", "/app/exceptions.py", "/app/models.py", "/app/utils.py"], "/app/models.py": ["/app/__init__.py"], "/app/auth/helpers.py": ["/app/auth/exceptions.py", "/app/auth/service.py", "/app/models.py"], "/tests/test_app.py": ["/tests/helpers.py"], "/app/aut...
45,517
cppmx/flask-api-quickstart
refs/heads/master
/app/__init__.py
import os from flask import Flask, jsonify from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate app = Flask(__name__) app_settings = os.getenv("APP_SETTINGS", "app.config.DevelopmentConfig") app.config.from_object(app_settings) db = SQLAlchemy(app) migrate = Migrate(app, db) from app.auth.view...
{"/app/auth/service.py": ["/app/__init__.py", "/app/auth/exceptions.py", "/app/exceptions.py", "/app/models.py", "/app/utils.py"], "/app/models.py": ["/app/__init__.py"], "/app/auth/helpers.py": ["/app/auth/exceptions.py", "/app/auth/service.py", "/app/models.py"], "/tests/test_app.py": ["/tests/helpers.py"], "/app/aut...
45,518
cppmx/flask-api-quickstart
refs/heads/master
/tests/helpers.py
import json def signup_user(client, username, email, password): data = dict() if username: data["username"] = username if email: data["email"] = email if password: data["password"] = password return client.post( "/api/v1/auth/signup", content_type="application/json...
{"/app/auth/service.py": ["/app/__init__.py", "/app/auth/exceptions.py", "/app/exceptions.py", "/app/models.py", "/app/utils.py"], "/app/models.py": ["/app/__init__.py"], "/app/auth/helpers.py": ["/app/auth/exceptions.py", "/app/auth/service.py", "/app/models.py"], "/tests/test_app.py": ["/tests/helpers.py"], "/app/aut...
45,519
cppmx/flask-api-quickstart
refs/heads/master
/tests/test_auth.py
import json from tests.helpers import ( assert_error, assert_error_invalid_field, assert_error_missing_field, assert_error_token_expired, assert_success_200, get_valid_token, login_user, signup_user, ) def test_signup_success(client): response = signup_user( client=client,...
{"/app/auth/service.py": ["/app/__init__.py", "/app/auth/exceptions.py", "/app/exceptions.py", "/app/models.py", "/app/utils.py"], "/app/models.py": ["/app/__init__.py"], "/app/auth/helpers.py": ["/app/auth/exceptions.py", "/app/auth/service.py", "/app/models.py"], "/tests/test_app.py": ["/tests/helpers.py"], "/app/aut...
45,520
cppmx/flask-api-quickstart
refs/heads/master
/app/auth/views.py
from flask import Blueprint, jsonify, request from app.auth.helpers import auth_required, get_token_from_header from app.auth.service import ( blacklist_token, create_user, is_token_blacklisted, login_user, ) from app.exceptions import BadRequestError auth_api = Blueprint("auth_api", __name__) @auth...
{"/app/auth/service.py": ["/app/__init__.py", "/app/auth/exceptions.py", "/app/exceptions.py", "/app/models.py", "/app/utils.py"], "/app/models.py": ["/app/__init__.py"], "/app/auth/helpers.py": ["/app/auth/exceptions.py", "/app/auth/service.py", "/app/models.py"], "/tests/test_app.py": ["/tests/helpers.py"], "/app/aut...
45,522
20MESC/HTN_blockPlanning
refs/heads/master
/tableTopBlocks_operators.py
""" tableTopBlocks domain definition for Pyhop 1.1. Author:Rosario Scalise, April 30, 2016 """ import pyhop """Each Pyhop planning operator is a Python function. The 1st argument is the current state, and the others are the planning operator's usual arguments. This is analogous to how methods are defined for Python ...
{"/tableTopBlocks.py": ["/tableTopBlocks_operators.py", "/tableTopBlocks_methods.py"]}
45,523
20MESC/HTN_blockPlanning
refs/heads/master
/tableTopBlocks_methods.py
""" tableTopBlocks methods for Pyhop 1.1. Author: Rosario Scalise, April 30, 2016 """ import pyhop from pyhop import Goal from bidict import bidict from tableTopBlocks_utils import get_line import math """ Here are some helper functions that are used in the methods' preconditions. """ # CHECKS TO SEE IF BLOCK IS WHER...
{"/tableTopBlocks.py": ["/tableTopBlocks_operators.py", "/tableTopBlocks_methods.py"]}
45,524
20MESC/HTN_blockPlanning
refs/heads/master
/tableTopBlocks.py
""" Table Top Blocks-world . Author: Rosario Scalise, April 30, 2016 """ from __future__ import print_function from pyhop import * from bidict import bidict """ List all operators and methods Check here to see that everything is loaded correctly """ import tableTopBlocks_operators print('') print_operators() import...
{"/tableTopBlocks.py": ["/tableTopBlocks_operators.py", "/tableTopBlocks_methods.py"]}
45,544
joncastillo/AivenCloudTest
refs/heads/main
/PostgresService.py
import psycopg2 class PostgresService: def __init__(self, aiven_service): self.m_aiven_service = aiven_service self.m_conn = None def connect(self): host = self.m_aiven_service.m_service_config_postgres.m_hostname port = self.m_aiven_service.m_service_config_postgres...
{"/KafkaService.py": ["/AivenService.py"], "/AivenCloudTest.py": ["/AivenService.py", "/ServiceConfigPostGres.py", "/KafkaService.py", "/MonitoringTool.py", "/PostgresService.py"]}
45,545
joncastillo/AivenCloudTest
refs/heads/main
/AivenService.py
import aiven.client.client as ac class AivenService: """ Class for Initializing Aiven's Services Attributes ---------- m_aiven_client : AivenClient class provided by the Aiven Client Python library. Used for configuring Aiven services. m_aiven_project_name : str Th...
{"/KafkaService.py": ["/AivenService.py"], "/AivenCloudTest.py": ["/AivenService.py", "/ServiceConfigPostGres.py", "/KafkaService.py", "/MonitoringTool.py", "/PostgresService.py"]}
45,546
joncastillo/AivenCloudTest
refs/heads/main
/ServiceConfigPostGres.py
class ServiceConfigPostGres: """ Class that defines configuration for Aiven's Postgres service """ def __init__(self, service_name, username, password, port, database_name): self.m_serviceName = service_name self.m_username = username self.m_password = password ...
{"/KafkaService.py": ["/AivenService.py"], "/AivenCloudTest.py": ["/AivenService.py", "/ServiceConfigPostGres.py", "/KafkaService.py", "/MonitoringTool.py", "/PostgresService.py"]}
45,547
joncastillo/AivenCloudTest
refs/heads/main
/KafkaService.py
import json from kafka import KafkaProducer from kafka import KafkaConsumer from AivenService import AivenService class KafkaService: """ Helper methods for sending/receiving messages through Aiven's Kafka Attributes ---------- m_aiven_service : AivenService Contains configurat...
{"/KafkaService.py": ["/AivenService.py"], "/AivenCloudTest.py": ["/AivenService.py", "/ServiceConfigPostGres.py", "/KafkaService.py", "/MonitoringTool.py", "/PostgresService.py"]}
45,548
joncastillo/AivenCloudTest
refs/heads/main
/MonitoringTool.py
import json import re import requests import time from datetime import datetime class MonitoringTool(object): """ This monitoring tool polls a website for its status and snippets of its contents Attributes ---------- m_url : str the url of website to be polled. For exampl...
{"/KafkaService.py": ["/AivenService.py"], "/AivenCloudTest.py": ["/AivenService.py", "/ServiceConfigPostGres.py", "/KafkaService.py", "/MonitoringTool.py", "/PostgresService.py"]}
45,549
joncastillo/AivenCloudTest
refs/heads/main
/AivenCloudTest.py
import argparse import threading from AivenService import AivenService from ServiceConfigKafka import ServiceConfigKafka from ServiceConfigPostGres import ServiceConfigPostGres from KafkaService import KafkaService from MonitoringTool import MonitoringTool from PostgresService import PostgresService def m...
{"/KafkaService.py": ["/AivenService.py"], "/AivenCloudTest.py": ["/AivenService.py", "/ServiceConfigPostGres.py", "/KafkaService.py", "/MonitoringTool.py", "/PostgresService.py"]}
45,561
DiMaksimov/DB2_Test
refs/heads/master
/users/migrations/0002_auto_20190403_1827.py
# Generated by Django 2.2 on 2019-04-03 15:27 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] operations = [ migrations.AlterField( model_name='db2user', name='birthday', fi...
{"/users/forms.py": ["/users/models.py"], "/users/admin.py": ["/users/forms.py", "/users/models.py"]}
45,562
DiMaksimov/DB2_Test
refs/heads/master
/users/models.py
from django.contrib.auth.models import AbstractUser from django.db import models class DB2User(AbstractUser): birthday = models.DateField(null=True) country = models.CharField(max_length=50, default='Unknown') city = models.CharField(max_length=50, default='Unknown') def __str__(self): return...
{"/users/forms.py": ["/users/models.py"], "/users/admin.py": ["/users/forms.py", "/users/models.py"]}
45,563
DiMaksimov/DB2_Test
refs/heads/master
/users/forms.py
from django import forms from django.contrib.auth.forms import UserCreationForm, UserChangeForm from .models import DB2User class DB2UserCreationForm(UserCreationForm): class Meta(UserCreationForm): model = DB2User fields = ('username', 'email', 'birthday', 'country', 'city', ) birthday =...
{"/users/forms.py": ["/users/models.py"], "/users/admin.py": ["/users/forms.py", "/users/models.py"]}
45,564
DiMaksimov/DB2_Test
refs/heads/master
/users/admin.py
from django.contrib import admin from django.contrib.auth import get_user_model from django.contrib.auth.admin import UserAdmin from .forms import DB2UserCreationForm, DB2UserChangeForm from .models import DB2User class CustomUserAdmin(UserAdmin): add_form = DB2UserCreationForm form = DB2UserChangeForm m...
{"/users/forms.py": ["/users/models.py"], "/users/admin.py": ["/users/forms.py", "/users/models.py"]}
45,566
schallerdavid/moldbprep
refs/heads/master
/moldbprep/io.py
import multiprocessing import os import pandas as pd from rdkit import Chem from rdkit.Chem import AllChem from rdkit import RDLogger from rdkit.Chem.Descriptors import ExactMolWt import re import sys import time def count_sdf_mols(file_path): """ This function returns the number of molecules in an sdf-file. ...
{"/moldbprep/tests/test_standardize.py": ["/moldbprep/standardize.py"], "/moldbprep.py": ["/moldbprep/io.py", "/moldbprep/standardize.py"], "/moldbprep/standardize.py": ["/moldbprep/io.py"], "/moldbprep/tests/test_io.py": ["/moldbprep/io.py"]}
45,567
schallerdavid/moldbprep
refs/heads/master
/moldbprep/tests/test_standardize.py
from moldbprep.standardize import protonate_mol, enumerate_stereo_isomers, merge_ids import pandas as pd import pytest from rdkit import Chem @pytest.mark.parametrize("input_smiles, output_smiles", [ ("CNC1CCN(CCCN)CC1", "C[NH2+]C1CC[NH+](CCC[NH3+])CC1"), ("CC[O-]", "CCO"), ("CNC(N)=N", "CNC(N)=[NH2+]"), ...
{"/moldbprep/tests/test_standardize.py": ["/moldbprep/standardize.py"], "/moldbprep.py": ["/moldbprep/io.py", "/moldbprep/standardize.py"], "/moldbprep/standardize.py": ["/moldbprep/io.py"], "/moldbprep/tests/test_io.py": ["/moldbprep/io.py"]}
45,568
schallerdavid/moldbprep
refs/heads/master
/moldbprep.py
""" moldbprep.py Prepare, standardize and merge molecule databases for virtual screening. Handles the primary functions """ import argparse import math from moldbprep.io import count_sdf_mols, database_prompt, write_sdf, write_statistics, time_to_text from moldbprep.standardize import standardize_mols, merge_ids impor...
{"/moldbprep/tests/test_standardize.py": ["/moldbprep/standardize.py"], "/moldbprep.py": ["/moldbprep/io.py", "/moldbprep/standardize.py"], "/moldbprep/standardize.py": ["/moldbprep/io.py"], "/moldbprep/tests/test_io.py": ["/moldbprep/io.py"]}
45,569
schallerdavid/moldbprep
refs/heads/master
/moldbprep/standardize.py
from moldbprep.io import update_progress import pandas as pd from molvs.standardize import Standardizer, LargestFragmentChooser, Uncharger from molvs.tautomer import TautomerCanonicalizer from rdkit import Chem from rdkit import RDLogger from rdkit.Chem.AllChem import ReactionFromSmarts from rdkit.Chem.Descriptors impo...
{"/moldbprep/tests/test_standardize.py": ["/moldbprep/standardize.py"], "/moldbprep.py": ["/moldbprep/io.py", "/moldbprep/standardize.py"], "/moldbprep/standardize.py": ["/moldbprep/io.py"], "/moldbprep/tests/test_io.py": ["/moldbprep/io.py"]}
45,570
schallerdavid/moldbprep
refs/heads/master
/moldbprep/tests/test_io.py
from moldbprep.io import count_sdf_mols, sdf_properties, time_to_text, sdf_text import pytest import os from rdkit import Chem def test_count_sdf_mols(): assert count_sdf_mols(os.path.join(os.getcwd(), "moldbprep", "data", "db1.sdf")) == 3 def test_sdf_properties(): assert sdf_properties(os.path.join(os.get...
{"/moldbprep/tests/test_standardize.py": ["/moldbprep/standardize.py"], "/moldbprep.py": ["/moldbprep/io.py", "/moldbprep/standardize.py"], "/moldbprep/standardize.py": ["/moldbprep/io.py"], "/moldbprep/tests/test_io.py": ["/moldbprep/io.py"]}
45,571
torresdaniel11/innova6_backend
refs/heads/master
/gti/migrations/0006_auto_20180330_0409.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-03-30 04:09 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('gti', '0005_auto_20180330_0406'), ] operations = [...
{"/gti/views.py": ["/gti/models.py"], "/gti/admin.py": ["/gti/models.py"], "/gti/serializers.py": ["/gti/models.py"]}
45,572
torresdaniel11/innova6_backend
refs/heads/master
/gti/models.py
from __future__ import unicode_literals import binascii import os from django.db import models from django.template.defaultfilters import slugify class Articles(models.Model): article_tittle = models.CharField(max_length=200) article_content = models.TextField() article_slug = models.SlugField(editable=...
{"/gti/views.py": ["/gti/models.py"], "/gti/admin.py": ["/gti/models.py"], "/gti/serializers.py": ["/gti/models.py"]}
45,573
torresdaniel11/innova6_backend
refs/heads/master
/gti/urls.py
from django.conf.urls import url, include from rest_framework import routers from gti import views suggested_questions = views.ConversationView.as_view({ 'get': 'suggested_questions_get', 'post': 'save_response_suggested_questions_post' }) suggested_questions_records = views.ConversationView.as_view({ 'ge...
{"/gti/views.py": ["/gti/models.py"], "/gti/admin.py": ["/gti/models.py"], "/gti/serializers.py": ["/gti/models.py"]}
45,574
torresdaniel11/innova6_backend
refs/heads/master
/gti/views.py
import random from rest_framework import status from rest_framework import viewsets, permissions from rest_framework.response import Response from rest_framework.decorators import detail_route from serializers import ArticlesSerializers from serializers import ConversationsSerializers from serializers import Questions...
{"/gti/views.py": ["/gti/models.py"], "/gti/admin.py": ["/gti/models.py"], "/gti/serializers.py": ["/gti/models.py"]}
45,575
torresdaniel11/innova6_backend
refs/heads/master
/gti/admin.py
from django.contrib import admin from .models import Articles from .models import ConversationLevels from .models import Conversations from .models import Questions from .models import QuestionArticles from .models import QuestionRecords from .models import Category # Register your models here. class ArticlesAdmin(ad...
{"/gti/views.py": ["/gti/models.py"], "/gti/admin.py": ["/gti/models.py"], "/gti/serializers.py": ["/gti/models.py"]}
45,576
torresdaniel11/innova6_backend
refs/heads/master
/gti/migrations/0007_auto_20180330_0622.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-03-30 06:22 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('gti', '0006_auto_20180330_0409'), ] operations = [ migrations.AddField( ...
{"/gti/views.py": ["/gti/models.py"], "/gti/admin.py": ["/gti/models.py"], "/gti/serializers.py": ["/gti/models.py"]}