Skip to main content

All kinds of things written by Suluoya.

Project description

Suluoya

This is a package written by Suluoya just for fun!

If this is the first time...

#Install requirements
import Suluoya.pip as sp
sp.pip()

If you wanna auto import some packages...

use"import Suluoya.Import as SI" instead of "import pandas as pd,import numpy as np"...

#pass
import pandas as pd
import numpy as np
...
df=pd.Dataframe()
#now
import Suluoya.Import as SI
df=pd.Dataframe()
SI.check()#just to check what you import by using SI,can be omitted
#ps.go and see a file named "auto_imports.py"!

If you wanna writer the crawler simper...

import Suluoya.spider as sp

directly get soup from an URL

not need to fill all the blank

url='https://pypi.org/project/Suluoya-pkg/' in default

encoding='utf8' in defaults

payloads means data in module "requests"

"show=False" means 'print(soup)' instead of 'return soup'

sp.get_soup(url='',encoding='',headers='',params={},payloads={},show=False)

directly get json from an URL

not need to fill all

if url='',Suluoya will go on strike

encoding='utf8' in default

payloads means data in module "requests"

"show=False" means show the json instead of return it

sp.get_json(url='',encoding='utf8',headers={},params={},payload={},show=False)

directly get tables from an URL

if url='',Suluoya will go on strike

encoding='utf8' in default

header is the header of the table,try "header=0" instead of "header=None" in default

caption is the caption of the table,capture all the tables from the URL in defaults

if "save=True",tables will be saved in "1.xlsx","2.xlsx","3.xlsx"...

sp.get_table(url,encoding='utf8',header=None,caption='.+',save=False)

search question

#search question by inputting for only once
sly.search_question()
#search question by inputting for many times
sly.search_question(again=True)
#search question by calling parameters and return answer
print(sly.search_question(question='Besides key points, the other element a summary should include is:'))
#search question by calling parameters and directly print answer 
sly.search_question(question='Besides key points, the other element a summary should include is:',show=True)

If you wanna do something with your texts...

import Suluota.text as st

translate both English and Chinese into each other

if "show=False",return instead of print

st.translate(text='hello word!',show=True)

compare the texts

accurate=True --> accurate match mode

accurate=False --> fuzzy match mode

show=False --> return ratio instead of print

st.text_compare(text1='',text2='',accurate=True,show=True)

guess gender

name should be a Chinese name!

show=False --> return instead of print

st.gender_guess(name='',show=True)

If you wanna download something...

import Suluoya.download as sd

download music

#download music to d:\ 
sly.download_music()
#download music to any path you want
sly.download_music(path='c:\\')

download anything you want with an URL

sly.download('http:\\...')

If you wanna make a QRcode...

import Suluoya.QRcode as sq

make a QRcode

fill in an url or some strings in content

fill in the name of the png in name

sq.QRcode(content='',name='')

contact

If you wanna contact Suluoya...

sq.contact(mode='wechat')
sq.contact(mode='qq')

pay

If you wanna make a donation...

sq.pay(mode='alipay')
sq.pay(mode='wechatpay')

If you wanna have fun...

import Suluoya.fun as sf

draw a heart

#draw a Suluoya heart
sf.draw_a_heart()
#draw any hearts you want
sf.draw_a_heart(name='any name you like')

xkcd

#you do know what I mean!
sf.xkcd()

standard time

get standard time

show=False --> return instead of print

sf.standard_time(show=True)

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Suluoya-1.2.1.tar.gz (8.2 kB view details)

Uploaded Source

File details

Details for the file Suluoya-1.2.1.tar.gz.

File metadata

  • Download URL: Suluoya-1.2.1.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.4.2 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.6.5

File hashes

Hashes for Suluoya-1.2.1.tar.gz
Algorithm Hash digest
SHA256 47e6e63cc6275cc97af23240d83eef320bd5ffb4dfa7ba3219a3f10982ff5646
MD5 ba5be2c103a32857b5890586f33262dc
BLAKE2b-256 e5d71ee022cebdff33c936fedcdd3fd916ed8cb35c36aeab052b993bd975ef9a

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page