Skip to content

Instantly share code, notes, and snippets.

Sharoon Thomas sharoonthomas

Block or report user

Report or block sharoonthomas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sharoonthomas
sharoonthomas / pull_fulfil_activity_stream.py
Created Nov 20, 2018
Utilize Fulfil API to download complete Activity Stream Data history
View pull_fulfil_activity_stream.py
import requests
import pandas as pd
from pandas.io.json import json_normalize
import numpy as np
import os
import json
from google.cloud import storage, bigquery
import datetime
import time
from multiprocessing.pool import ThreadPool
View gist:10639248
class Router(object):
def __init__(self):
self.methods = {}
def route(self, url):
def decorator(wrapped):
wrapped.__route_info__ = (self, url)
return wrapped
return decorator
def register(self, url, method):
self.methods[url] = method
View gist:6464922
def get_bins(self, cr, uid, bin_selection, storage_type, list_exclusions, qty_dict, context=None):
""" Find a list of locations based on user-defined criteria
:param :bin_selection Selection field, Bins with no assignment, bins with assignment only, or all
:param :storage_type Filter based on a specified storage type, i.e, overstock, backstock
:param :list_exclusions List of bin_ids to exclude from the search
:param :qty_dict Quantity in bin GT/LT threshold
@return list of bin_ids with travel sequence
"""
View activation-html.jinja
Hola {{ nereid_user.display_name }},
<br/>
Thank you for registering for an Openlabs account.
<br/><br/>
To activate your account, please click the link <a href="{{ url_for('nereid.user.activate', user_id=nereid_user.id, activation_code=nereid_user.activation_code, _external=True) }}">here</a>
<br/>
Kind regards <br/>
<br/>
<br/>
Customer Support<br/>
View gist:5682610
from connection import NetSuiteConnect
from SuiteREST import SuiteRequest
from forms import send_error
class ExportFulfillments(object):
def __init__(self):
self.instance = NetSuiteConnect()
self.conn = self.instance.erp_connection()
@sharoonthomas
sharoonthomas / change_db_owner.sh
Created Jun 11, 2012 — forked from gingerlime/change_db_owner.sh
Postgresql - Changing ownership on all tables
View change_db_owner.sh
#!/bin/bash
usage()
{
cat << EOF
usage: $0 options
This script set ownership for all table, sequence and views for a given database
Credit: Based on http://stackoverflow.com/a/2686185/305019 by Alex Soto
You can’t perform that action at this time.