Skip to content

Instantly share code, notes, and snippets.

@thelazyliz
thelazyliz / get_masv.py
Last active Jul 16, 2020
get direct resource link from masv download link
View get_masv.py
import requests
import re
import sys
root_url = "https://api.massive.app/v1"
def get_masv(dl_link, password=None):
print('Retrieving direct link(s)...')
split_link = re.split('[/?=]', dl_link)
View keybase.md

Keybase proof

I hereby claim:

  • I am thelazyliz on github.
  • I am thelazyliz (https://keybase.io/thelazyliz) on keybase.
  • I have a public key ASCDOd9cOci9-n4M-vDnHrtmpuFxeaC8c04J4Dq8sI-1qAo

To claim this, I am signing this object:

@thelazyliz
thelazyliz / read_spreadsheet.py
Created Nov 21, 2017
read google spreadsheet using pandas
View read_spreadsheet.py
import gspread
import pandas as pd
from oauth2client.service_account import ServiceAccountCredentials
def main():
df_tracking = read_sheet('Olympus Labs tracking spreadsheet')
df_movement = read_sheet('Olympus Labs TG movement spreadsheet')
get_invites_count(df_movement, 366664457) # specific example of user_id given here
get_eth_address(df_tracking, 359780450) # specific example of user_id given here
return
@thelazyliz
thelazyliz / admin.py
Last active Aug 1, 2017
django extend admin
View admin.py
from django.contrib import admin
from django.contrib.admin import AdminSite
from django.contrib.auth.models import User, Group
from . models import Book
class MyAdminSite(AdminSite):
site_header = 'New Admin Interface'
admin_site = MyAdminSite(name='new_admin')
@thelazyliz
thelazyliz / admin.py
Last active Aug 1, 2017
change what is being displayed using list_display in django admin change list page
View admin.py
from django.contrib import admin
from . models import Book
class BookAdmin(admin.ModelAdmin):
list_display = ('book_title', 'author', 'ISBN_code')
admin.site.register(Book, BookAdmin)
You can’t perform that action at this time.