Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

two python scripts updated#21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
optimist2309 wants to merge1 commit intorealpython:master
base:master
Choose a base branch
Loading
fromoptimist2309:master
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletionsreadme.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,3 +34,5 @@
1. **32_stock_scraper.py**: Get stock prices
1. **33_country_code.py**: Convert country code to country name
1. **34_git_all_repos.py**: Clone all repositories from a public user or organization on Github. Usage: `python git_all_repos.py users USER_NAME` or `python git_all_repos.py orgs ORG_NAME`
1. **35_qr_code.py**: Convert user input text to qr code image
1. **36_git_repo_creator.py**: Create github repo from command line.
31 changes: 31 additions & 0 deletionsscripts/git_repo_creator.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
# Script Name : git_repo_creator.py
# Author : Harish Tiwari
# Created : 2nd October 2020
# Last Modified: -
# Version : 1.0.0

# Modifications :

# Description : This python script will create a github repo from command line.

import requests
import json

user_name = input("Enter your github user name: ")
print(user_name)

github_token = input("Enter your github tokne: ")
print(github_token)

repo_name = input("Enter your repo Name: ")
print(repo_name)

repo_description = input("Enter your repo description: ")
print(repo_description)

payload = {'name': repo_name, 'description': repo_description, 'auto_init': 'true'}
repo_request = requests.post('https://api.github.com/' + 'user/repos', auth=(user_name,github_token), data=json.dumps(payload))
if repo_request.status_code == 422:
print("Github repo already exists try wih other name.")
elif repo_request.status_code == 201:
print("Github repo has created successfully.")
8 changes: 8 additions & 0 deletionsscripts/qr_code.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
import pyqrcode
import png
from pyqrcode import QRCode


user_input = raw_input("Enter web page address or info you want to convert into qr code: ")
user_input = pyqrcode.create(user_input)
user_input.png('myqr.png', scale = 6)

[8]ページ先頭

©2009-2025 Movatter.jp