Skip to content

Instantly share code, notes, and snippets.

View mrsaicharan1's full-sized avatar
:electron:
Building new experiences

Saicharan Reddy mrsaicharan1

:electron:
Building new experiences
  • Plano, Texas
View GitHub Profile
@mrsaicharan1
mrsaicharan1 / GSoC-2020-Work-Product.md
Last active August 26, 2020 01:15
GSoC 2020 Work Product

Saicharan Reddy | @mrsaicharan1 | CHAOSS | GSoC Work Product

About the Project & Technologies

Augur is a tool for collecting and measuring structured data about free (https://www.fsf.org/about/) and open source (FOSS) communities.

@mrsaicharan1
mrsaicharan1 / routes.py
Created April 8, 2020 05:29
AliPay - After AliPay authorization, the order is saved and payment is completed
@alipay_blueprint.route('/alipay_return_uri/', methods=['GET', 'POST'])
def alipay_return_uri(order_identifier):
"""
Charge Object creation & Order finalization for Alipay payments.
:param order_identifier:
:return: JSON response of the payment status.
"""
try:
charge_response = AliPayPaymentsManager.charge_source(order_identifier)
if charge_response.status == 'succeeded':
@mrsaicharan1
mrsaicharan1 / routes.py
Created April 8, 2020 05:27
Alipay - Route which creates the source and returns external redirection url
@alipay_blueprint.route('/create_source/<string:order_identifier>', methods=['GET', 'POST'])
def create_source(order_identifier):
"""
Create a source object for alipay payments.
:param order_identifier:
:return: The alipay redirection link.
"""
try:
order = safe_query(db, Order, 'identifier', order_identifier, 'identifier')
source_object = AliPayPaymentsManager.create_source(amount=int(order.amount), currency='usd',
@mrsaicharan1
mrsaicharan1 / source.py
Created April 8, 2020 05:26
AliPay - Methods to create & charge the source
class AliPayPaymentsManager(object):
"""
Class to manage AliPay Payments
"""
@staticmethod
def create_source(amount, currency, redirect_return_uri):
stripe.api_key = get_settings()['alipay_publishable_key']
response = stripe.Source.create(type='alipay',
currency=currency,
@mrsaicharan1
mrsaicharan1 / email_send.py
Created April 1, 2020 06:01
email_send.py
def send_email(to, action, subject, html, attachments=None):
"""
Sends email and records it in DB
"""
from .tasks import send_email_task_sendgrid, send_email_task_smtp
if not string_empty(to):
email_service = get_settings()['email_service']
email_from_name = get_settings()['email_from_name']
if email_service == 'smtp':
email_from = email_from_name + '<' + get_settings()['email_from'] + '>'
@mrsaicharan1
mrsaicharan1 / scheduled_task_email.py
Created April 1, 2020 06:00
scheduled_task_email.py
@celery.task(name='send.email.post.sendgrid')
def send_email_task_sendgrid(payload, headers, smtp_config):
try:
message = Mail(from_email=From(payload['from'], payload['fromname']),
to_emails=payload['to'],
subject=payload['subject'],
html_content=payload["html"])
if payload['attachments'] is not None:
for attachment in payload['attachments']:
with open(attachment, 'rb') as f:
@mrsaicharan1
mrsaicharan1 / check_smtp_config.py
Created April 1, 2020 05:58
check_smtp_config.py
def check_smtp_config(smtp_encryption):
"""
Checks config of SMTP
"""
config = {
'host': get_settings()['smtp_host'],
'username': get_settings()['smtp_username'],
'password': get_settings()['smtp_password'],
'encryption': smtp_encryption,
'port': get_settings()['smtp_port'],
@mrsaicharan1
mrsaicharan1 / Codeheat-2019.md
Last active February 4, 2020 20:22
Codeheat 2019 Gist

Codeheat 2019

Saicharan Reddy | @mrsaicharan1 | Codeheat - 2019

Overview :

I am Saicharan Reddy, pursuing my Master's in IT. I was a successful Google Summer of Code student with FOSSASIA in 2019. Throughout the duration of the Codeheat program, I have worked on the Open Event Project where my main contributions covered the areas of Model migrations to dataclasses, increasing the test coverage of the whole project, writing unit & integration tests for the recently developed Event Invoicing features and many other notable contributions. I've also reviewed many PRs which involved high priority issues.

I have open PRs which aim to make the Event Invoicing more stable, fix the failing celery tasks which generate the event invoice mails and generation of invoices. In the near future, I also aim to recreate the Orders API, build a more stable image resizing component and bridge the error gaps between the frontend and server.

@mrsaicharan1
mrsaicharan1 / GSoC-work-product.md
Last active November 22, 2019 17:31
Google Summer of Code 2019 Work Product

Saicharan Reddy | @mrsaicharan1 | FOSSASIA

During the course of this summer, I've worked on FOSSASIA's robust event management solution, The Open Event Project. I've been building features and fixing bugs for the project by contributing to the frontend & backend repositories namely, Open Event Frontend and Open Event Server.

About the Project & Technologies

The Open Event Project, which is popularly known as Eventyay is an event management solution which aids organizers to manage public events, conferences, tech meetups etc. and supports the sale of paid, free and donation tickets. In addition, the management of a huge event becomes less of a cumbersome task due to the provision of sessions & speakers management, session scheduling,

@mrsaicharan1
mrsaicharan1 / resume.txt
Created June 28, 2019 02:53
Resume, Resume, Resyme
EDUCATION Information Technology
Indian Institute of Information Technology, Allahabad
SKILLS
Version Control Flask SQL Computer Vision Data Visualization AWS Django
PROJECTS
Git HTML CSS Python
07/2016 – Present
Data Structures Object-Oriented Methodologies Algorithms
Theory of Computation
Bachelors of Technology(B.Tech)