• 我跟我女朋友吵架后的一段对话吧

    我:我只是觉得我不配而已
    她:你配,我说你配你就配

    因为她的这句话我放弃了分手的想法

  • 作业一
    1.设计一个表示服务器的类。包含服务器的属性有:CPU个数,内存大小,磁盘空间大小,操作系统类型(Linux, Windows)。其中操作系统类型设置为私有变量,外部不可以更改。实现一个方法,输出服务器的属性内容为以下格式:8 核CPU, 40G 内存,150G 磁盘空间,Linux

    class Server:
    def __init__(self, cpu_acount, mem_size, disk_spce, os_sys):
    self.cpu_acount = cpu_acount
    self.mem_size = mem_size
    self.disk_space = disk_spce
    self.os_space = os_sys

    @property
    def get_Server_info(self):
    Server_info = ('{}cpu, {}G内存, {}G磁盘空间, {}'.format(self.cpu_acount, self.mem_size, self.disk_space, self.os_space))
    return Server_info

    if __name__ == '__main__':
    info = Server(8,40,150,'Linux')
    print(info.get_Server_info())

    2.设计一个作业1中服务器的子类,实现一个新的方法,根据cpu个数,内存大小,磁盘空间大小计算出服务器当前价格 在子类里面实现一个服务价格的函数。计算公式为: CPU 个数* 1527.679+内存大小G* 100.21+磁盘空间大小G* 50.789。 返回数据类型为浮点型。保留小数点后2位 。 并实例化此方法,打印出价格。

    from work import Server

    class Serverprice(Server):
    def __init__(self, cpu_acount, mem_size, disk_spce, os_sys):
    self.cpu_acount = cpu_acount
    self.mem_size = mem_size
    self.disk_space = disk_spce
    self.os_space = os_sys

    def get_Server_price(self):
    Server_price = round((self.cpu_acount *1527.679 + self.mem_size *100.21 + self.disk_space *50.789),2)
    return Server_price

    if __name__ == '__main__':
    info = Serverprice(8, 40, 150, 'Linux')
    print(info.get_Server_price())
  • 😧 你们公司没有普调的嘛

  • 作业一

    问题 webview的控件click事件不生效,例如已有蛋卷基金账户登陆不点击,但是基金开户又会去点击,这是为什么

    # This sample code uses the Appium python client
    # pip install Appium-Python-Client
    # Then you can paste this into a file and simply run with Python
    from appium import webdriver
    import pytest
    from appium.webdriver.common.mobileby import MobileBy
    from appium.webdriver.webdriver import WebDriver
    from selenium.webdriver.support.wait import WebDriverWait
    from selenium.webdriver.support import expected_conditions as EC

    class TestXueqiudemon(object):

    driver=WebDriver
    @classmethod
    def setup_class(cls):
    print("setup_class")

    def setup_method(self):
    print("setup_method")
    TestXueqiudemon.driver=self.start_appium()
    self.driver=TestXueqiudemon.driver
    WebDriverWait(self.driver, 20, 1).until(EC.presence_of_element_located((MobileBy.XPATH, "//*[@text='交易']")))
    self.driver.find_element_by_xpath("//*[@text='交易']").click()
    self.driver.find_element_by_accessibility_id("基金开户").click()

    @pytest.mark.parametrize('account, password', [('17621462634', '7777777')])
    def test_failed_login(self, account, password):
    WebDriverWait(self.driver, 20).until(EC.presence_of_element_located((MobileBy.ACCESSIBILITY_ID, "已有蛋卷基金账户登陆")))
    self.driver.find_element_by_accessibility_id("已有蛋卷基金账户登陆").click()
    WebDriverWait(self.driver, 20).until(EC.presence_of_element_located((MobileBy.ACCESSIBILITY_ID, "使用密码登陆")))
    self.driver.find_element_by_accessibility_id("使用密码登陆").click()
    self.driver.find_element_by_id("telno").send_keys(account)
    self.driver.find_element_by_id("pass").send_keys(password)
    self.driver.find_element_by_id("next").click()
    msg = self.driver.find_element_by_id("android:id/message").text
    assert msg == '输入的手机号或者密码有误'

    def teardown_method(self):
    TestXueqiudemon.driver.quit()

    @classmethod
    def start_appium(cls) -> WebDriver:
    caps = {}
    caps["platformName"] = "android"
    caps["deviceName"] = "emulator-5554"
    caps["appPackage"] = "com.xueqiu.android"
    caps["appActivity"] = ".view.WelcomeActivityAlias"
    caps["autoGrantPermissions"] = "true"
    # caps["noReset"] = "true"
    caps["unicodeKeyboard"] = "true"

    driver = webdriver.Remote("http://localhost:4723/wd/hub", caps)
    driver.implicitly_wait(10)
    return driver

  • 说的特真实 😞

  • 进入舒适区了,可曾考虑过年龄大了技术能力没有增长也没有往管理层发展该怎么办 回老家?

  • 1.我跳槽多次怎么说呢,前面两个实习,一个是没岗位留用,第二个是能留缺没能留下来。毕业后的工作,第一份是测试组长劝我走,第二份是明白了外包待了也只是浪费时间吧,学了东西就走了。
    2.你说房贷的事情,我觉得看个人我现在在上海,房贷的问题正常家庭都是这个数,但是你也别想太多对吧,这个基本是两个家庭承担的东西
    3.你考虑的青春饭的事情的确在理,肯定还是得走管理路线的,但不是现在,现在我还年轻

  • 你这有点转型的样子为啥不继续了呢,你说到不爱学可是好歹转开发了 还是可以当饭碗的吧

  • 作业1:

    //*[@text='基金' and @instance='9']
    //*[@resource-id='com.xueqiu.android:id/indicator']//*[@text='基金']
    //*[contains(@resource-id,'indicator')]//*[@text='基金']

    作业2:

    # This sample code uses the Appium python client
    # pip install Appium-Python-Client
    # Then you can paste this into a file and simply run with Python
    import time
    from appium import webdriver
    import pytest
    from appium.webdriver.common.touch_action import TouchAction
    from appium.webdriver.webdriver import WebDriver


    class TestXueqiudemon(object):

    driver=WebDriver
    @classmethod
    def setup_class(cls):
    print("setup_class")

    def setup_method(self):
    print("setup_method")
    TestXueqiudemon.driver=self.start_appium()
    self.driver=TestXueqiudemon.driver

    def test_action_swipe(self):
    time.sleep(2)
    self.driver.find_element_by_xpath("//*[contains(@resource-id,'indicator')]//*[@text='基金']").click()
    rect=self.driver.get_window_rect()
    action=TouchAction(self.driver)
    for i in range(5):
    action.press(x=rect['width']*0.7, y=rect['height']*0.8).move_to(x=rect['width']*0.7, y=rect['height']*0.2).release().perform()
    time.sleep(2)
    action.press(x=rect['width']*0.8, y=rect['height']*0.5).move_to(x=rect['width']*0.2, y=rect['height']*0.5).release().perform()
    time.sleep(5)


    def teardown_method(self):
    TestXueqiudemon.driver.quit()

    @classmethod
    def start_appium(cls) -> WebDriver:
    caps = {}
    caps["platformName"] = "android"
    caps["deviceName"] = "emulator-5554"
    caps["appPackage"] = "com.xueqiu.android"
    caps["appActivity"] = ".view.WelcomeActivityAlias"
    caps["autoGrantPermissions"] = "true"
    # caps["noReset"] = "true"
    caps["unicodeKeyboard"] = "true"

    driver = webdriver.Remote("http://localhost:4723/wd/hub", caps)
    driver.implicitly_wait(10)
    return driver

  • Author only