SYMBOL INDEX (7491 symbols across 341 files) FILE: r2/r2/__init__.py function make_app (line 39) | def make_app(*args, **kwargs): FILE: r2/r2/commands.py class RunCommand (line 32) | class RunCommand(command.Command): method command (line 49) | def command(self): FILE: r2/r2/config/environment.py function load_environment (line 44) | def load_environment(global_conf={}, app_conf={}, setup_globals=True): FILE: r2/r2/config/extensions.py function api_type (line 25) | def api_type(subtype = ''): function is_api (line 28) | def is_api(subtype = ''): function get_api_subtype (line 31) | def get_api_subtype(): function set_extension (line 55) | def set_extension(environ, ext): FILE: r2/r2/config/feature/feature.py function is_enabled (line 33) | def is_enabled(name, user=None, subreddit=None): function variant (line 60) | def variant(name, user=None): function all_enabled (line 76) | def all_enabled(user=None): function clear_featurestate_cache (line 116) | def clear_featurestate_cache(): function _get_featurestate (line 121) | def _get_featurestate(name): FILE: r2/r2/config/feature/state.py class FeatureState (line 31) | class FeatureState(object): method __init__ (line 54) | def __init__(self, name, world, config_name=None, config_str=None): method _parse_config (line 59) | def _parse_config(self, name, config_name=None, config_str=None): method get_all (line 92) | def get_all(world): method is_user_experiment (line 108) | def is_user_experiment(experiment): method is_page_experiment (line 112) | def is_page_experiment(experiment): method _calculate_bucket (line 115) | def _calculate_bucket(self, seed, experiment_seed=None): method _choose_variant (line 130) | def _choose_variant(cls, bucket, variants): method _is_variant_enabled (line 211) | def _is_variant_enabled(cls, variant): method is_enabled (line 223) | def is_enabled(self, user=None, subreddit=None, subdomain=None, method _is_config_enabled (line 253) | def _is_config_enabled( method _is_percent_enabled (line 312) | def _is_percent_enabled(self, cfg, user=None): method _is_experiment_enabled (line 335) | def _is_experiment_enabled(self, experiment, user=None): method variant (line 397) | def variant(self, user): method _get_user_experiment_variant (line 420) | def _get_user_experiment_variant(self, experiment, user): method get_content_id (line 439) | def get_content_id(): method _get_page_experiment_variant (line 459) | def _get_page_experiment_variant(self, experiment): FILE: r2/r2/config/feature/world.py class World (line 28) | class World(object): method stacked_proxy_safe_get (line 35) | def stacked_proxy_safe_get(stacked_proxy, key, default=None): method current_user (line 54) | def current_user(self): method current_subreddit (line 58) | def current_subreddit(self): method current_subdomain (line 67) | def current_subdomain(self): method current_oauth_client (line 70) | def current_oauth_client(self): method current_loid_obj (line 74) | def current_loid_obj(self): method current_loid (line 77) | def current_loid(self): method is_admin (line 83) | def is_admin(self, user): method is_employee (line 89) | def is_employee(self, user): method user_has_beta_enabled (line 94) | def user_has_beta_enabled(self, user): method has_gold (line 99) | def has_gold(self, user): method is_user_loggedin (line 105) | def is_user_loggedin(self, user): method url_features (line 110) | def url_features(self): method live_config (line 113) | def live_config(self, name): method live_config_iteritems (line 117) | def live_config_iteritems(self): method simple_event (line 121) | def simple_event(self, name): FILE: r2/r2/config/hooks.py function register_hooks (line 24) | def register_hooks(): FILE: r2/r2/config/middleware.py class HTTPTooManyRequests (line 56) | class HTTPTooManyRequests(webob.exc.HTTPClientError): function _stub (line 69) | def _stub(*args, **kwargs): function error_mapper (line 76) | def error_mapper(code, message, environ, global_conf=None, **kw): function ErrorDocuments (line 120) | def ErrorDocuments(app, global_conf, mapper, **kw): class ProfilingMiddleware (line 131) | class ProfilingMiddleware(object): method __init__ (line 132) | def __init__(self, app, directory): method __call__ (line 136) | def __call__(self, environ, start_response): class DomainMiddleware (line 153) | class DomainMiddleware(object): method __init__ (line 155) | def __init__(self, app, config): method __call__ (line 159) | def __call__(self, environ, start_response): class SubredditMiddleware (line 231) | class SubredditMiddleware(object): method __init__ (line 234) | def __init__(self, app): method __call__ (line 237) | def __call__(self, environ, start_response): class DomainListingMiddleware (line 246) | class DomainListingMiddleware(object): method __init__ (line 247) | def __init__(self, app): method __call__ (line 250) | def __call__(self, environ, start_response): class ExtensionMiddleware (line 261) | class ExtensionMiddleware(object): method __init__ (line 264) | def __init__(self, app): method __call__ (line 267) | def __call__(self, environ, start_response): class FullPathMiddleware (line 288) | class FullPathMiddleware(object): method __init__ (line 292) | def __init__(self, app): method __call__ (line 295) | def __call__(self, environ, start_response): class StaticTestMiddleware (line 302) | class StaticTestMiddleware(object): method __init__ (line 303) | def __init__(self, app, static_path, domain): method __call__ (line 308) | def __call__(self, environ, start_response): function _wsgi_json (line 315) | def _wsgi_json(start_response, status_int, message=""): class LimitUploadSize (line 330) | class LimitUploadSize(object): method __init__ (line 335) | def __init__(self, app, max_size=1024*500): method __call__ (line 339) | def __call__(self, environ, start_response): class CleanupMiddleware (line 384) | class CleanupMiddleware(object): method __init__ (line 391) | def __init__(self, app): method __call__ (line 394) | def __call__(self, environ, start_response): class SafetyMiddleware (line 408) | class SafetyMiddleware(object): method __init__ (line 414) | def __init__(self, app): method __call__ (line 417) | def __call__(self, environ, start_response): class RedditApp (line 428) | class RedditApp(PylonsApp): method __init__ (line 432) | def __init__(self, *args, **kwargs): method setup_app_env (line 438) | def setup_app_env(self, environ, start_response): method _check_csrf_prevention (line 449) | def _check_csrf_prevention(self): method load_controllers (line 461) | def load_controllers(self): method register_hooks (line 472) | def register_hooks(self): method find_controller (line 479) | def find_controller(self, controller_name): function make_app (line 487) | def make_app(global_conf, full_stack=True, **app_conf): FILE: r2/r2/config/paths.py function get_r2_path (line 26) | def get_r2_path(): function get_built_statics_path (line 34) | def get_built_statics_path(): function get_raw_statics_path (line 40) | def get_raw_statics_path(): FILE: r2/r2/config/queues.py class Queues (line 29) | class Queues(dict): method __init__ (line 31) | def __init__(self, queues): method __iter__ (line 37) | def __iter__(self): method declare (line 42) | def declare(self, queues): class MessageQueue (line 51) | class MessageQueue(object): method __init__ (line 57) | def __init__(self, durable=True, exclusive=False, method _bind (line 64) | def _bind(self, routing_key): method __lshift__ (line 67) | def __lshift__(self, routing_keys): function declare_queues (line 74) | def declare_queues(g): FILE: r2/r2/config/routing.py function not_in_sr (line 29) | def not_in_sr(environ, results): function partial_connect (line 37) | def partial_connect(mc, **override_args): function make_map (line 46) | def make_map(config): FILE: r2/r2/config/templates.py function api (line 28) | def api(type, cls): function register_api_templates (line 34) | def register_api_templates(template_name, template_class): FILE: r2/r2/controllers/__init__.py function get_controller (line 26) | def get_controller(name): function add_controller (line 35) | def add_controller(controller): function load_controllers (line 41) | def load_controllers(): FILE: r2/r2/controllers/admin.py class AdminToolController (line 27) | class AdminToolController(RedditController): method GET_creddits (line 32) | def GET_creddits(self, recipient): method GET_gold (line 39) | def GET_gold(self, recipient): FILE: r2/r2/controllers/api.py class ApiminimalController (line 142) | class ApiminimalController(MinimalController): method POST_new_captcha (line 155) | def POST_new_captcha(self, form, jquery, *a, **kw): class ApiController (line 171) | class ApiController(RedditController): method ajax_login_redirect (line 176) | def ajax_login_redirect(self, form, jquery, dest): method GET_info (line 185) | def GET_info(self, things, url): method GET_url_info (line 210) | def GET_url_info(self, url, count, things): method GET_me (line 231) | def GET_me(self, responder): method GET_username_available (line 246) | def GET_username_available(self, responder, user): method POST_check_username (line 255) | def POST_check_username(self, responder, user): method POST_check_password (line 270) | def POST_check_password(self, responder, password): method POST_check_email (line 284) | def POST_check_email(self, responder, email, newsletter_subscribe, spo... method POST_newsletter (line 312) | def POST_newsletter(self, responder, email, source): method GET_needs_captcha (line 331) | def GET_needs_captcha(self, responder): method POST_compose (line 349) | def POST_compose(self, form, jquery, from_sr, to, subject, body): method GET_submit_text (line 413) | def GET_submit_text(self, responder): method POST_submit (line 449) | def POST_submit(self, form, jquery, url, selftext, kind, title, method POST_fetch_title (line 589) | def POST_fetch_title(self, form, jquery, url): method _login (line 605) | def _login(self, responder, user, rem = None): method POST_login (line 626) | def POST_login(self, form, responder, user, rem=None, **kwargs): method POST_register (line 655) | def POST_register(self, form, responder, name, email, password, **kwar... method POST_leavemoderator (line 679) | def POST_leavemoderator(self, container): method POST_leavecontributor (line 695) | def POST_leavecontributor(self, container): method check_api_friend_oauth_scope (line 734) | def check_api_friend_oauth_scope(self, type_): method POST_unfriend (line 755) | def POST_unfriend(self, nuser, iuser, container, type): method POST_setpermissions (line 872) | def POST_setpermissions(self, form, jquery, target, type_and_permissio... method POST_friend (line 928) | def POST_friend(self, form, jquery, friend, method POST_friendnote (line 1183) | def POST_friendnote(self, form, jquery, friend, note): method POST_relnote (line 1195) | def POST_relnote(self, form, jquery, type, user, note): method POST_accept_moderator_invite (line 1217) | def POST_accept_moderator_invite(self, form, jquery): method POST_clear_sessions (line 1246) | def POST_clear_sessions(self, form, jquery, password, dest): method revoke_sessions_and_login (line 1264) | def revoke_sessions_and_login(self, user, password): method revoke_sessions (line 1273) | def revoke_sessions(self, user): method POST_update_email (line 1286) | def POST_update_email(self, form, jquery, email, verify, dest): method POST_update_password (line 1337) | def POST_update_password(self, form, jquery, password, invalidate_oauth): method POST_deactivate_user (line 1373) | def POST_deactivate_user(self, form, jquery, deactivate_message, usern... method POST_del (line 1403) | def POST_del(self, thing): method POST_lock (line 1449) | def POST_lock(self, thing): method POST_unlock (line 1472) | def POST_unlock(self, thing): method POST_marknsfw (line 1495) | def POST_marknsfw(self, thing): method POST_unmarknsfw (line 1516) | def POST_unmarknsfw(self, thing): method POST_sendreplies (line 1546) | def POST_sendreplies(self, thing, state): method POST_rescrape (line 1563) | def POST_rescrape(self, thing): method POST_set_suggested_sort (line 1585) | def POST_set_suggested_sort(self, form, jquery, thing, sort, timeout): method POST_set_contest_mode (line 1611) | def POST_set_contest_mode(self, form, jquery, thing, state, timeout): method POST_set_subreddit_sticky (line 1638) | def POST_set_subreddit_sticky(self, form, jquery, thing, state, num, method POST_report (line 1683) | def POST_report(self, form, jquery, thing, reason, site_reason, other_... method POST_del_msg (line 1776) | def POST_del_msg(self, thing): method POST_block (line 1801) | def POST_block(self, thing): method POST_unblock_subreddit (line 1860) | def POST_unblock_subreddit(self, thing): method POST_mute_message_author (line 1880) | def POST_mute_message_author(self, message): method POST_unmute_message_author (line 1926) | def POST_unmute_message_author(self, message): method POST_editusertext (line 1957) | def POST_editusertext(self, form, jquery, item, text): method POST_comment (line 2043) | def POST_comment(self, commentform, jquery, parent, comment): method POST_share (line 2197) | def POST_share(self, shareform, jquery, share_to, message, link): method POST_vote (line 2301) | def POST_vote(self, direction, thing, rank): method POST_subreddit_stylesheet (line 2360) | def POST_subreddit_stylesheet(self, form, jquery, method POST_delete_sr_img (line 2448) | def POST_delete_sr_img(self, form, jquery, name): method POST_delete_sr_header (line 2482) | def POST_delete_sr_header(self, form, jquery): method POST_delete_sr_icon (line 2515) | def POST_delete_sr_icon(self, form, jquery): method POST_delete_sr_banner (line 2542) | def POST_delete_sr_banner(self, form, jquery): method GET_upload_sr_img (line 2562) | def GET_upload_sr_img(self, *a, **kw): method POST_upload_sr_img (line 2585) | def POST_upload_sr_img(self, file, header, name, form_id, img_type, method POST_site_admin (line 2749) | def POST_site_admin(self, form, jquery, name, sr, **kw): method POST_remove (line 3037) | def POST_remove(self, thing, spam): method POST_approve (line 3098) | def POST_approve(self, thing): method POST_ignore_reports (line 3142) | def POST_ignore_reports(self, thing): method POST_unignore_reports (line 3170) | def POST_unignore_reports(self, thing): method POST_distinguish (line 3197) | def POST_distinguish(self, form, jquery, thing, how): method GET_saved_categories (line 3323) | def GET_saved_categories(self, responder): method POST_save (line 3345) | def POST_save(self, thing, category): method POST_unsave (line 3371) | def POST_unsave(self, thing): method collapse_handler (line 3384) | def collapse_handler(self, things, collapse): method POST_collapse_message (line 3404) | def POST_collapse_message(self, things): method POST_uncollapse_message (line 3416) | def POST_uncollapse_message(self, things): method POST_unread_message (line 3429) | def POST_unread_message(self, things): method POST_read_message (line 3443) | def POST_read_message(self, things): method POST_read_all_messages (line 3457) | def POST_read_all_messages(self): method POST_hide (line 3474) | def POST_hide(self, links): method POST_unhide (line 3492) | def POST_unhide(self, links): method POST_moremessages (line 3507) | def POST_moremessages(self, form, jquery, parent): method GET_morechildren (line 3542) | def GET_morechildren(self, form, jquery, link, sort, children, mc_id): method POST_morechildren (line 3616) | def POST_morechildren(self): method POST_claimgold (line 3623) | def POST_claimgold(self, form, jquery, code): method POST_password (line 3680) | def POST_password(self, form, jquery, user): method POST_resetpassword (line 3716) | def POST_resetpassword(self, form, jquery, token, password): method POST_subscribe (line 3766) | def POST_subscribe(self, action, sr): method POST_quarantine (line 3807) | def POST_quarantine(self, form, jquery, subreddit, quarantine, subject... method POST_quarantine_optout (line 3848) | def POST_quarantine_optout(self, sr): method POST_quarantine_optin (line 3864) | def POST_quarantine_optin(self, sr): method POST_edit_error (line 3882) | def POST_edit_error(self, form, jquery, hexkey, nickname, status): method POST_editaward (line 3908) | def POST_editaward(self, form, jquery, award, colliding_award, codename, method POST_flair (line 3962) | def POST_flair(self, form, jquery, user, link, text, css_class): method POST_deleteflair (line 4015) | def POST_deleteflair(self, form, jquery, user): method POST_flaircsv (line 4037) | def POST_flaircsv(self, flair_csv): method POST_setflairenabled (line 4111) | def POST_setflairenabled(self, form, jquery, flair_enabled): method POST_flairconfig (line 4130) | def POST_flairconfig(self, form, jquery, flair_enabled, flair_position, method GET_flairlist (line 4165) | def GET_flairlist(self, num, after, reverse, count, user): method POST_flairtemplate (line 4186) | def POST_flairtemplate(self, form, jquery, flair_template, text, method POST_deleteflairtemplate (line 4257) | def POST_deleteflairtemplate(self, form, jquery, flair_template): method POST_clearflairtemplates (line 4278) | def POST_clearflairtemplates(self, form, jquery, flair_type): method POST_flairselector (line 4292) | def POST_flairselector(self, user, link): method POST_selectflair (line 4338) | def POST_selectflair(self, form, jquery, user, link, flair_template_id, method POST_set_sr_style_enabled (line 4428) | def POST_set_sr_style_enabled(self, form, jquery, sr_style_enabled): method POST_givetrophy (line 4461) | def POST_givetrophy(self, form, jquery, secret_used, award, description, method POST_removetrophy (line 4484) | def POST_removetrophy(self, form, jquery, secret_used, trophy): method POST_givecreddits (line 4506) | def POST_givecreddits(self, form, jquery, recipient, num_creddits): method POST_givegold (line 4525) | def POST_givegold(self, form, jquery, recipient, num_months): method POST_disable_ui (line 4540) | def POST_disable_ui(self, ui_elem): method POST_set_nsfw_media_pref (line 4550) | def POST_set_nsfw_media_pref(self, show_nsfw_media): method GET_gadget (line 4568) | def GET_gadget(self, form, jquery, type, links): method POST_search_reddit_names (line 4587) | def POST_search_reddit_names(self, responder, query, include_over_18, ... method GET_expando (line 4614) | def GET_expando(self, link): method POST_expando (line 4632) | def POST_expando(self): method POST_adminon (line 4644) | def POST_adminon(self, form, jquery, remember, dest): method POST_generate_otp_secret (line 4667) | def POST_generate_otp_secret(self, form, jquery): method POST_enable_otp (line 4683) | def POST_enable_otp(self, form, jquery, otp): method POST_disable_otp (line 4714) | def POST_disable_otp(self, form, jquery): method GET_subreddits_by_topic (line 4730) | def GET_subreddits_by_topic(self, responder, query): method POST_revokeapp (line 4782) | def POST_revokeapp(self, client): method POST_updateapp (line 4794) | def POST_updateapp(self, form, jquery, name, about_url, icon_url, method POST_adddeveloper (line 4862) | def POST_adddeveloper(self, form, jquery, client, account): method POST_removedeveloper (line 4897) | def POST_removedeveloper(self, form, jquery, client, account): method POST_deleteapp (line 4912) | def POST_deleteapp(self, client): method POST_setappicon (line 4923) | def POST_setappicon(self, form, jquery, client, icon_file): method POST_generate_payment_blob (line 4950) | def POST_generate_payment_blob(self, responder, thing, signed): method POST_modify_payment_blob (line 4990) | def POST_modify_payment_blob(self, responder, code, signed, message): method OPTIONS_request_promo (line 5002) | def OPTIONS_request_promo(self): method POST_request_promo (line 5015) | def POST_request_promo(self, srnames): method POST_set_left_bar_collapsed (line 5047) | def POST_set_left_bar_collapsed(self, responder, collapsed): method GET_subreddit_recommendations (line 5055) | def GET_subreddit_recommendations(self, srs, to_omit): method POST_rec_feedback (line 5076) | def POST_rec_feedback(self, form, jquery, action, srs): method POST_server_seconds_visibility (line 5091) | def POST_server_seconds_visibility(self, form, jquery, seconds_visibil... method POST_store_visits (line 5104) | def POST_store_visits(self, links): method POST_add_admin_note (line 5118) | def POST_add_admin_note(self, form, jquery, system, subject, note, aut... method POST_add_subreddit_rule (line 5136) | def POST_add_subreddit_rule(self, form, jquery, short_name, description, method POST_update_subreddit_rule (line 5166) | def POST_update_subreddit_rule(self, form, jquery, rule, method POST_remove_subreddit_rule (line 5200) | def POST_remove_subreddit_rule(self, form, jquery, rule): method GET_report_form (line 5215) | def GET_report_form(self, form, jquery, thing): method POST_hide_locationbar (line 5239) | def POST_hide_locationbar(self, form, jquery): method POST_use_global_defaults (line 5245) | def POST_use_global_defaults(self, form, jquery): FILE: r2/r2/controllers/api_docs.py function api_doc (line 85) | def api_doc(section, uses_site=False, **kwargs): class ApidocsController (line 102) | class ApidocsController(RedditController): method docs_from_controller (line 104) | def docs_from_controller(controller, url_prefix='/api', oauth_only=Fal... method GET_docs (line 189) | def GET_docs(self, mode): FILE: r2/r2/controllers/apiv1/gold.py class APIv1GoldController (line 44) | class APIv1GoldController(OAuth2OnlyController): method _gift_using_creddits (line 45) | def _gift_using_creddits(self, recipient, months=1, thing_fullname=None, method POST_gild (line 86) | def POST_gild(self, target): method POST_give (line 113) | def POST_give(self, user, months, timeout): FILE: r2/r2/controllers/apiv1/login.py class APIv1LoginController (line 40) | class APIv1LoginController(RedditController): method pre (line 42) | def pre(self): method POST_register (line 55) | def POST_register(self, responder, name, email, password, **kwargs): method POST_login (line 71) | def POST_login(self, responder, user, **kwargs): method _login (line 80) | def _login(self, responder, user, rem=None): FILE: r2/r2/controllers/apiv1/scopes.py class APIv1ScopesController (line 31) | class APIv1ScopesController(RedditController): method GET_scopes (line 40) | def GET_scopes(self, scope_str): FILE: r2/r2/controllers/apiv1/user.py class APIv1UserController (line 56) | class APIv1UserController(OAuth2OnlyController): method GET_me (line 62) | def GET_me(self): method GET_prefs (line 77) | def GET_prefs(self, fields): method GET_usertrophies (line 90) | def GET_usertrophies(self, user): method GET_trophies (line 102) | def GET_trophies(self): method GET_karma (line 114) | def GET_karma(self): method PATCH_prefs (line 130) | def PATCH_prefs(self, validated_prefs): method PUT_friends (line 154) | def PUT_friends(self, friend, notes_json): method GET_friends (line 197) | def GET_friends(self, friend_rel): method DELETE_friends (line 208) | def DELETE_friends(self, friend_rel): FILE: r2/r2/controllers/awards.py class AwardsController (line 30) | class AwardsController(RedditController): method GET_index (line 33) | def GET_index(self): method GET_give (line 44) | def GET_give(self, award, recipient, desc, url, hours): method GET_winners (line 55) | def GET_winners(self, award): FILE: r2/r2/controllers/buttons.py class ButtonsController (line 33) | class ButtonsController(RedditController): method get_wrapped_link (line 34) | def get_wrapped_link(self, url, link = None, wrapper = None): method GET_button_embed (line 70) | def GET_button_embed(self, buttontype): method GET_button_lite (line 82) | def GET_button_lite(self, buttonimage, title, url, styled, newwindow): method GET_button_demo_page (line 104) | def GET_button_demo_page(self): method GET_widget_demo_page (line 112) | def GET_widget_demo_page(self): FILE: r2/r2/controllers/captcha.py class CaptchaController (line 31) | class CaptchaController(RedditController): method GET_captchaimg (line 34) | def GET_captchaimg(self, iden): FILE: r2/r2/controllers/embed.py function renderurl_cached (line 41) | def renderurl_cached(path): class EmbedController (line 56) | class EmbedController(RedditController): method rendercontent (line 59) | def rendercontent(self, input, fp): method renderurl (line 76) | def renderurl(self, override=None): method GET_blog (line 89) | def GET_blog(self): method GET_faq (line 93) | def GET_faq(self): FILE: r2/r2/controllers/error.py function make_failien_url (line 88) | def make_failien_url(): class ErrorController (line 94) | class ErrorController(RedditController): method check_for_bearer_token (line 106) | def check_for_bearer_token(self): method __before__ (line 113) | def __before__(self): method __after__ (line 129) | def __after__(self): method __call__ (line 135) | def __call__(self, environ, start_response): method send400 (line 142) | def send400(self): method send403 (line 152) | def send403(self): method send404 (line 163) | def send404(self): method send429 (line 169) | def send429(self): method send503 (line 183) | def send503(self): method GET_document (line 189) | def GET_document(self): function handle_awful_failure (line 271) | def handle_awful_failure(fail_text): FILE: r2/r2/controllers/front.py class FrontController (line 72) | class FrontController(RedditController): method GET_link_id_redirect (line 77) | def GET_link_id_redirect(self, link): method GET_oldinfo (line 96) | def GET_oldinfo(self, article, type, dest, rest=None, comment=''): method GET_random (line 127) | def GET_random(self): method GET_details (line 165) | def GET_details(self, thing, oldid36, after, before, count, listing_on... method GET_explore (line 193) | def GET_explore(self): method GET_shirt (line 206) | def GET_shirt(self, article): method GET_comments (line 231) | def GET_comments( method _add_show_comments_link (line 538) | def _add_show_comments_link(self, array, article, num, max_comm, gold=... method GET_newreddit (line 558) | def GET_newreddit(self, name): method GET_stylesheet (line 572) | def GET_stylesheet(self): method GET_share_close (line 588) | def GET_share_close(self): method _make_moderationlog (line 595) | def _make_moderationlog(self, srs, num, after, reverse, count, mod=Non... method GET_moderationlog (line 615) | def GET_moderationlog(self, num, after, reverse, count, mod, action): method _make_spamlisting (line 703) | def _make_spamlisting(self, location, only, num, after, reverse, count): method _edit_normal_reddit (line 791) | def _edit_normal_reddit(self, location, created): method GET_spamlisting (line 847) | def GET_spamlisting(self, location, only, num, after, reverse, count, method GET_flairlisting (line 898) | def GET_flairlisting(self, num, after, reverse, count, name, timeout): method GET_editreddit (line 916) | def GET_editreddit(self, location, created): method GET_about (line 934) | def GET_about(self): method GET_sidebar (line 955) | def GET_sidebar(self): method GET_rules (line 962) | def GET_rules(self): method GET_sticky (line 992) | def GET_sticky(self, num): method GET_awards (line 1010) | def GET_awards(self): method GET_related (line 1017) | def GET_related(self, num, article, after, reverse, count): method GET_duplicates (line 1032) | def GET_duplicates(self, article, num, after, reverse, count): method GET_search_reddits (line 1059) | def GET_search_reddits(self, query, reverse, after, count, num, sort): method GET_search (line 1122) | def GET_search(self, query, num, reverse, after, count, sort, recent, method _search_builder_wrapper (line 1287) | def _search_builder_wrapper(self, q): method _legacy_search_builder_wrapper (line 1304) | def _legacy_search_builder_wrapper(self): method _search (line 1313) | def _search(self, query_obj, num, after, reverse, count=0, type=None, method GET_comment_by_id (line 1350) | def GET_comment_by_id(self, comment): method GET_submit (line 1358) | def GET_submit(self, url, title, text, selftext): method GET_catchall (line 1428) | def GET_catchall(self): method GET_traffic (line 1437) | def GET_traffic(self, link, campaign, before, after): method GET_site_traffic (line 1452) | def GET_site_traffic(self): method GET_lang_traffic (line 1456) | def GET_lang_traffic(self, langcode): method GET_advert_traffic (line 1460) | def GET_advert_traffic(self, code): method GET_subreddit_traffic_report (line 1464) | def GET_subreddit_traffic_report(self): method GET_account_activity (line 1472) | def GET_account_activity(self): method GET_contact_us (line 1475) | def GET_contact_us(self): method GET_goldthanks (line 1484) | def GET_goldthanks(self, vendor): method GET_confirm_award_claim (line 1521) | def GET_confirm_award_claim(self, token): method POST_claim_award (line 1534) | def POST_claim_award(self, token): method GET_received_award (line 1550) | def GET_received_award(self, trophy, preexisting): method GET_gilding (line 1554) | def GET_gilding(self): method _modify_hsts_grant (line 1564) | def _modify_hsts_grant(self, dest): class FormsController (line 1585) | class FormsController(RedditController): method GET_password (line 1587) | def GET_password(self): method GET_verify (line 1594) | def GET_verify(self, dest, reason): method GET_verify_email (line 1614) | def GET_verify_email(self, token, dest): method GET_resetpassword (line 1642) | def GET_resetpassword(self, token, key): method GET_unsubscribe_emails (line 1669) | def GET_unsubscribe_emails(self, user_id36, provided_mac): method GET_prefs (line 1691) | def GET_prefs(self, location='', verified=False): method GET_login (line 1724) | def GET_login(self, dest): method GET_register (line 1737) | def GET_register(self, dest): method GET_logout (line 1746) | def GET_logout(self, dest): method POST_logout (line 1752) | def POST_logout(self, dest): method GET_adminon (line 1759) | def GET_adminon(self, dest): method GET_adminoff (line 1771) | def GET_adminoff(self, dest): method _render_opt_in_out (line 1778) | def _render_opt_in_out(self, msg_hash, leave): method GET_optout (line 1790) | def GET_optout(self, msg_hash): method GET_optin (line 1798) | def GET_optin(self, msg_hash): method GET_try_compact (line 1806) | def GET_try_compact(self, dest): method GET_claim (line 1812) | def GET_claim(self, secret): method GET_creditgild (line 1818) | def GET_creditgild(self, passthrough): method GET_gold (line 1884) | def GET_gold(self, is_payment, goldtype, period, months, num_creddits, method GET_creddits (line 1999) | def GET_creddits(self): method GET_subscription (line 2007) | def GET_subscription(self): class FrontUnstyledController (line 2017) | class FrontUnstyledController(FrontController): FILE: r2/r2/controllers/googletagmanager.py class GoogleTagManagerController (line 38) | class GoogleTagManagerController(MinimalController): method pre (line 39) | def pre(self): method GET_jail (line 52) | def GET_jail(self, container_id): method GET_gtm (line 58) | def GET_gtm(self, container_id): FILE: r2/r2/controllers/health.py class HealthController (line 35) | class HealthController(MinimalController): method pre (line 36) | def pre(self): method post (line 39) | def post(self): method GET_health (line 42) | def GET_health(self): method GET_promohealth (line 50) | def GET_promohealth(self): method GET_cachehealth (line 54) | def GET_cachehealth(self): FILE: r2/r2/controllers/ipn.py function generate_blob (line 88) | def generate_blob(data): function get_blob (line 97) | def get_blob(code): function update_blob (line 111) | def update_blob(code, updates=None): function has_blob (line 124) | def has_blob(custom): function dump_parameters (line 131) | def dump_parameters(parameters): function check_payment_status (line 135) | def check_payment_status(payment_status): function check_txn_type (line 160) | def check_txn_type(txn_type, psl): function existing_subscription (line 187) | def existing_subscription(subscr_id, paying_id, custom): function months_and_days_from_pennies (line 227) | def months_and_days_from_pennies(pennies, discount=False): function send_gift (line 244) | def send_gift(buyer, recipient, months, days, signed, giftmessage, function send_gold_code (line 324) | def send_gold_code(buyer, months, days, class IpnController (line 363) | class IpnController(RedditController): method POST_spendcreddits (line 369) | def POST_spendcreddits(self, form, jquery, months, passthrough): method POST_ipn (line 461) | def POST_ipn(self, paypal_secret, payment_status, txn_id, paying_id, method finish (line 532) | def finish(self, parameters, txn_id, class Webhook (line 648) | class Webhook(object): method __init__ (line 649) | def __init__(self, passthrough=None, transaction_id=None, subscr_id=None, method load_blob (line 668) | def load_blob(self): method __repr__ (line 679) | def __repr__(self): class GoldPaymentController (line 683) | class GoldPaymentController(RedditController): method POST_goldwebhook (line 691) | def POST_goldwebhook(self, secret): method validate_secret (line 707) | def validate_secret(self, secret): method process_response (line 714) | def process_response(cls): method process_webhook (line 718) | def process_webhook(self, event_type, webhook): method complete_gold_purchase (line 791) | def complete_gold_purchase(cls, webhook): function handle_stripe_error (line 877) | def handle_stripe_error(fn): class StripeController (line 899) | class StripeController(GoldPaymentController): method process_response (line 935) | def process_response(cls): method create_customer (line 1025) | def create_customer(cls, form, token, description): method charge_customer (line 1043) | def charge_customer(cls, form, customer, pennies, passthrough, method set_creditcard (line 1055) | def set_creditcard(cls, form, user, token): method set_subscription (line 1066) | def set_subscription(cls, form, customer, plan_id): method cancel_subscription (line 1072) | def cancel_subscription(cls, form, user): method POST_goldcharge (line 1092) | def POST_goldcharge(self, form, jquery, token, passthrough, pennies, m... method POST_modify_subscription (line 1166) | def POST_modify_subscription(self, form, jquery, token): method POST_cancel_subscription (line 1176) | def POST_cancel_subscription(self, form, jquery, user): class CoinbaseController (line 1185) | class CoinbaseController(GoldPaymentController): method process_response (line 1198) | def process_response(cls): class RedditGiftsController (line 1216) | class RedditGiftsController(GoldPaymentController): method process_response (line 1240) | def process_response(self): class GoldException (line 1266) | class GoldException(Exception): pass function validate_blob (line 1269) | def validate_blob(custom): function days_from_months (line 1322) | def days_from_months(months): function subtract_gold_days (line 1332) | def subtract_gold_days(user, days): function subtract_gold_creddits (line 1339) | def subtract_gold_creddits(user, num): function reverse_gold_purchase (line 1343) | def reverse_gold_purchase(transaction_id): function cancel_stripe_subscription (line 1383) | def cancel_stripe_subscription(customer_id): function subscr_pm (line 1391) | def subscr_pm(pennies, months, new_subscr=True): FILE: r2/r2/controllers/listingcontroller.py class ListingController (line 69) | class ListingController(RedditController): method menus (line 112) | def menus(self): method can_send_referrer (line 117) | def can_send_referrer(self): method build_listing (line 123) | def build_listing(self, num, after, reverse, count, sr_detail=None, **... method content (line 160) | def content(self): method query (line 164) | def query(self): method builder (line 168) | def builder(self): method keep_fn (line 197) | def keep_fn(self): method prewrap_fn (line 218) | def prewrap_fn(self): method listing (line 221) | def listing(self): method title (line 243) | def title(self): method rightbox (line 247) | def rightbox(self): method GET_listing (line 255) | def GET_listing(self, **env): class SubredditListingController (line 272) | class SubredditListingController(ListingController): method _build_og_title (line 275) | def _build_og_title(self, max_length=256): method canonical_link (line 295) | def canonical_link(self): method _build_og_description (line 314) | def _build_og_description(self): method render_params (line 321) | def render_params(self): class ListingWithPromos (line 376) | class ListingWithPromos(SubredditListingController): method make_requested_ad (line 379) | def make_requested_ad(self, requested_ad): method make_single_ad (line 396) | def make_single_ad(self): method make_spotlight (line 402) | def make_spotlight(self): method content (line 454) | def content(self): class HotController (line 482) | class HotController(ListingWithPromos): method query (line 489) | def query(self): method trending_info (line 521) | def trending_info(cls): method content (line 537) | def content(self): method title (line 566) | def title(self): method GET_listing (line 571) | def GET_listing(self, **env): class NewController (line 575) | class NewController(ListingWithPromos): method keep_fn (line 582) | def keep_fn(self): method query (line 590) | def query(self): method POST_listing (line 594) | def POST_listing(self, **env): method GET_listing (line 600) | def GET_listing(self, **env): class RisingController (line 603) | class RisingController(NewController): method query (line 608) | def query(self): class BrowseController (line 617) | class BrowseController(ListingWithPromos): method keep_fn (line 622) | def keep_fn(self): method menus (line 637) | def menus(self): method query (line 640) | def query(self): method POST_listing (line 645) | def POST_listing(self, sort, t, **env): method GET_listing (line 655) | def GET_listing(self, sort, t, **env): class AdsController (line 673) | class AdsController(SubredditListingController): method infotext (line 679) | def infotext(self): method keep_fn (line 686) | def keep_fn(self): method query (line 696) | def query(self): method listing (line 702) | def listing(self): method GET_listing (line 706) | def GET_listing(self, *a, **kw): class RandomrisingController (line 713) | class RandomrisingController(ListingWithPromos): method query (line 718) | def query(self): class ByIDController (line 734) | class ByIDController(ListingController): method query (line 738) | def query(self): method GET_listing (line 745) | def GET_listing(self, links, **env): class UserController (line 757) | class UserController(ListingController): method menus (line 763) | def menus(self): method title (line 816) | def title(self): method keep_fn (line 833) | def keep_fn(self): method query (line 868) | def query(self): method GET_listing (line 925) | def GET_listing(self, where, vuser, sort, time, show, **env): method render_params (line 1028) | def render_params(self): method GET_about (line 1053) | def GET_about(self, vuser): method GET_saved_redirect (line 1061) | def GET_saved_redirect(self): method GET_rel_user_redirect (line 1075) | def GET_rel_user_redirect(self, rest=""): method GET_trophies (line 1084) | def GET_trophies(self, user): class MessageController (line 1091) | class MessageController(ListingController): method show_sidebar (line 1100) | def show_sidebar(self): method menus (line 1107) | def menus(self): method title (line 1128) | def title(self): method keep_fn (line 1131) | def keep_fn(self): method builder_wrapper (line 1175) | def builder_wrapper(thing): method builder (line 1188) | def builder(self): method _verify_inbox_count (line 1249) | def _verify_inbox_count(self, kept_msgs): method listing (line 1270) | def listing(self): method query (line 1290) | def query(self): method render_params (line 1333) | def render_params(self): method GET_listing (line 1359) | def GET_listing(self, where, mark, message, subwhere = None, **env): method GET_compose (line 1410) | def GET_compose(self, to, subject, message): class RedditsController (line 1457) | class RedditsController(ListingController): method title (line 1461) | def title(self): method keep_fn (line 1464) | def keep_fn(self): method query (line 1475) | def query(self): method render_params (line 1550) | def render_params(self): method GET_listing (line 1579) | def GET_listing(self, where, **env): class MyredditsController (line 1591) | class MyredditsController(ListingController): method menus (line 1596) | def menus(self): method title (line 1604) | def title(self): method builder_wrapper (line 1607) | def builder_wrapper(self, thing): method query (line 1615) | def query(self): method content (line 1636) | def content(self): method build_listing (line 1653) | def build_listing(self, after=None, **kwargs): method render_params (line 1660) | def render_params(self): method GET_listing (line 1682) | def GET_listing(self, where='subscriber', **env): class CommentsController (line 1700) | class CommentsController(SubredditListingController): method keep_fn (line 1703) | def keep_fn(self): method query (line 1727) | def query(self): method GET_listing (line 1731) | def GET_listing(self, **env): class UserListListingController (line 1737) | class UserListListingController(ListingController): method infotext (line 1744) | def infotext(self): method render_params (line 1752) | def render_params(self): method render_cls (line 1759) | def render_cls(self): method moderator_wrap (line 1764) | def moderator_wrap(self, rel, invited=False): method builder_wrapper (line 1770) | def builder_wrapper(self): method title (line 1789) | def title(self): method rel (line 1803) | def rel(self): method name (line 1808) | def name(self): method query (line 1822) | def query(self): method listing (line 1839) | def listing(self): method invited_mod_listing (line 1849) | def invited_mod_listing(self): method content (line 1861) | def content(self): method GET_user_prefs (line 1887) | def GET_user_prefs(self, where, **kw): method GET_listing (line 1926) | def GET_listing(self, where, user=None, **kw): class GildedController (line 2009) | class GildedController(SubredditListingController): method infotext (line 2014) | def infotext(self): method infotext_class (line 2030) | def infotext_class(self): method keep_fn (line 2033) | def keep_fn(self): method query (line 2038) | def query(self): method GET_listing (line 2045) | def GET_listing(self, **env): FILE: r2/r2/controllers/login.py function handle_login (line 37) | def handle_login( function handle_register (line 87) | def handle_register( FILE: r2/r2/controllers/mailgun.py function validate_mailgun_webhook (line 54) | def validate_mailgun_webhook(timestamp, token, signature): class MailgunWebhookController (line 80) | class MailgunWebhookController(RedditController): method POST_zendeskreply (line 84) | def POST_zendeskreply(self): FILE: r2/r2/controllers/mediaembed.py class MediaembedController (line 39) | class MediaembedController(MinimalController): method GET_mediaembed (line 44) | def GET_mediaembed(self, link, credentials): class AdController (line 73) | class AdController(MinimalController): method GET_ad (line 74) | def GET_ad(self): FILE: r2/r2/controllers/multi.py class MultiApiController (line 90) | class MultiApiController(RedditController): method on_validation_error (line 91) | def on_validation_error(self, error): method pre (line 94) | def pre(self): method _format_multi_list (line 98) | def _format_multi_list(self, multis, viewer, expand_srs): method GET_list_multis (line 110) | def GET_list_multis(self, user, expand_srs): method GET_my_multis (line 118) | def GET_my_multis(self, expand_srs): method _format_multi (line 123) | def _format_multi(self, multi, expand_sr_info=False): method GET_multi (line 137) | def GET_multi(self, multi, expand_srs): method _check_new_multi_path (line 141) | def _check_new_multi_path(self, path_info): method _add_multi_srs (line 147) | def _add_multi_srs(self, multi, sr_datas): method _write_multi_data (line 175) | def _write_multi_data(self, multi, data): method POST_multi (line 207) | def POST_multi(self, path_info, data): method PUT_multi (line 241) | def PUT_multi(self, path_info, data): method DELETE_multi (line 262) | def DELETE_multi(self, multi): method _copy_multi (line 266) | def _copy_multi(self, from_multi, to_path_info, rename=False): method POST_multi_copy (line 300) | def POST_multi_copy(self, from_multi, to_path_info, display_name): method POST_multi_rename (line 349) | def POST_multi_rename(self, from_multi, to_path_info, display_name): method _get_multi_subreddit (line 367) | def _get_multi_subreddit(self, multi, sr): method GET_multi_subreddit (line 382) | def GET_multi_subreddit(self, multi, sr): method PUT_multi_subreddit (line 395) | def PUT_multi_subreddit(self, multi, sr_name, data): method DELETE_multi_subreddit (line 418) | def DELETE_multi_subreddit(self, multi, sr): method _format_multi_description (line 423) | def _format_multi_description(self, multi): method GET_multi_description (line 436) | def GET_multi_description(self, multi): method PUT_multi_description (line 448) | def PUT_multi_description(self, multi, data): FILE: r2/r2/controllers/newsletter.py class NewsletterController (line 27) | class NewsletterController(RedditController): method GET_newsletter (line 28) | def GET_newsletter(self): FILE: r2/r2/controllers/oauth2.py function _update_redirect_uri (line 64) | def _update_redirect_uri(base_redirect_uri, params, as_fragment=False): function get_device_id (line 73) | def get_device_id(client): class OAuth2FrontendController (line 78) | class OAuth2FrontendController(RedditController): method check_for_bearer_token (line 79) | def check_for_bearer_token(self): method pre (line 82) | def pre(self): method _abort_oauth_error (line 86) | def _abort_oauth_error(self, error): method _check_redirect_uri (line 90) | def _check_redirect_uri(self, client, redirect_uri): method _check_response_type_and_scope (line 97) | def _check_response_type_and_scope(self, response_type, scope): method _check_client_type_and_duration (line 104) | def _check_client_type_and_duration(self, response_type, client, durat... method _error_response (line 114) | def _error_response(self, state, redirect_uri, as_fragment=False): method _check_employee_grants (line 128) | def _check_employee_grants(self, client, scope): method GET_authorize (line 154) | def GET_authorize(self, response_type, client, redirect_uri, scope, st... method POST_authorize (line 199) | def POST_authorize(self, authorize, client, redirect_uri, scope, state, class OAuth2AccessController (line 265) | class OAuth2AccessController(MinimalController): method pre (line 268) | def pre(self): method _get_client_auth (line 278) | def _get_client_auth(self): method OPTIONS_access_token (line 292) | def OPTIONS_access_token(self): method POST_access_token (line 323) | def POST_access_token(self, grant_type): method _check_for_errors (line 371) | def _check_for_errors(self): method _make_new_token_response (line 380) | def _make_new_token_response(cls, access_token, refresh_token=None): method _access_token_code (line 401) | def _access_token_code(self, code, redirect_uri): method _access_token_refresh (line 439) | def _access_token_refresh(self, refresh_token): method _access_token_password (line 467) | def _access_token_password(self, user, scope): method _access_token_client_credentials (line 506) | def _access_token_client_credentials(self, scope): method _access_token_extension_client_credentials (line 539) | def _access_token_extension_client_credentials(self, scope, device_id): method OPTIONS_revoke_token (line 572) | def OPTIONS_revoke_token(self): method POST_revoke_token (line 597) | def POST_revoke_token(self, token_id, token_hint): function require_oauth2_scope (line 650) | def require_oauth2_scope(*scopes): function allow_oauth2_access (line 657) | def allow_oauth2_access(fn): FILE: r2/r2/controllers/oembed.py function _oembed_for (line 56) | def _oembed_for(thing, **embed_options): function _oembed_post (line 70) | def _oembed_post(thing, **embed_options): function _oembed_comment (line 117) | def _oembed_comment(thing, **embed_options): class OEmbedController (line 162) | class OEmbedController(MinimalController): method pre (line 163) | def pre(self): method GET_oembed (line 175) | def GET_oembed(self, url, parent, live, omitscript): FILE: r2/r2/controllers/policies.py class PoliciesController (line 38) | class PoliciesController(RedditController): method GET_policy_page (line 40) | def GET_policy_page(self, page, requested_rev): method _number_sections (line 101) | def _number_sections(self, soup): method _linkify_headings (line 114) | def _linkify_headings(self, soup): FILE: r2/r2/controllers/post.py class PostController (line 46) | class PostController(ApiController): method POST_unlogged_options (line 50) | def POST_unlogged_options(self, all_langs, pref_lang): method POST_options (line 59) | def POST_options(self, all_langs, **prefs): method GET_over18 (line 81) | def GET_over18(self): method GET_quarantine (line 90) | def GET_quarantine(self, dest): method POST_over18 (line 116) | def POST_over18(self, over18, dest): method POST_quarantine (line 138) | def POST_quarantine(self, sr, accept, dest): method POST_optout (line 155) | def POST_optout(self, msg_hash): method POST_optin (line 166) | def POST_optin(self, msg_hash): method POST_login (line 178) | def POST_login(self, dest, *a, **kw): method POST_reg (line 191) | def POST_reg(self, dest, *a, **kw): method GET_login (line 202) | def GET_login(self, *a, **kw): method POST_explore_settings (line 213) | def POST_explore_settings(self, FILE: r2/r2/controllers/promotecontroller.py function _format_expires (line 162) | def _format_expires(expires): function _get_callback_hmac (line 166) | def _get_callback_hmac(username, key, expires): function _force_images (line 174) | def _force_images(link, thumbnail, mobile): function campaign_has_oversold_error (line 188) | def campaign_has_oversold_error(form, campaign): function has_oversold_error (line 204) | def has_oversold_error(form, campaign, start, end, total_budget_pennies,... function _key_to_dict (line 227) | def _key_to_dict(key, data=False): function _get_ads_keyspace (line 249) | def _get_ads_keyspace(thing): function _get_ads_images (line 253) | def _get_ads_images(thing, data=False, **kwargs): function _clear_ads_images (line 275) | def _clear_ads_images(thing): class PromoteController (line 284) | class PromoteController(RedditController): method GET_new_promo (line 286) | def GET_new_promo(self): method GET_edit_promo (line 298) | def GET_edit_promo(self, link): method GET_refund (line 310) | def GET_refund(self, link, campaign): method GET_pay (line 320) | def GET_pay(self, link, campaign): class SponsorController (line 345) | class SponsorController(PromoteController): method GET_report (line 352) | def GET_report(self, start, end, grouping, link_text=None, owner=None): method GET_promote_inventory (line 399) | def GET_promote_inventory(self, start, end, sr_name, collection_name): method GET_lookup_user (line 433) | def GET_lookup_user(self, id_user, email): class PromoteListingController (line 440) | class PromoteListingController(ListingController): method title (line 472) | def title(self): method title_text (line 476) | def title_text(self): method menus (line 480) | def menus(self): method builder_wrapper (line 500) | def builder_wrapper(self, thing): method keep_fn (line 507) | def keep_fn(self): method query (line 523) | def query(self): method GET_listing (line 540) | def GET_listing(self, sort="all", **env): class SponsorListingController (line 545) | class SponsorListingController(PromoteListingController): method title_text (line 555) | def title_text(self): method menus (line 559) | def menus(self): method _live_by_subreddit (line 607) | def _live_by_subreddit(cls, sr_names): method live_by_subreddit (line 611) | def live_by_subreddit(cls, sr): method get_house_link_names (line 616) | def get_house_link_names(cls): method keep_fn (line 626) | def keep_fn(self): method query (line 644) | def query(self): method listing (line 674) | def listing(self): method GET_listing (line 699) | def GET_listing(self, srname=None, include_managed=False, function allowed_location_and_target (line 718) | def allowed_location_and_target(location, target): class PromoteApiController (line 729) | class PromoteApiController(ApiController): method GET_check_inventory (line 737) | def GET_check_inventory(self, responder, sr, collection, location, start, method POST_freebie (line 759) | def POST_freebie(self, form, jquery, link, campaign): method POST_promote_note (line 775) | def POST_promote_note(self, form, jquery, link, note): method POST_review_fraud (line 787) | def POST_review_fraud(self, form, jquery, thing, is_fraud): method POST_promote (line 800) | def POST_promote(self, thing): method POST_unpromote (line 808) | def POST_unpromote(self, thing, reason): method POST_refund_campaign (line 816) | def POST_refund_campaign(self, form, jquery, link, campaign): method POST_create_promo (line 869) | def POST_create_promo(self, form, jquery, username, title, url, method POST_edit_promo (line 915) | def POST_edit_promo(self, form, jquery, username, title, url, method _edit_promo (line 935) | def _edit_promo(self, form, jquery, username, title, url, method _lowest_max_cpm_bid_dollars (line 1163) | def _lowest_max_cpm_bid_dollars(self, total_budget_dollars, bid_dollars, method POST_edit_campaign (line 1199) | def POST_edit_campaign(self, form, jquery, is_auction, link, campaign_... method POST_delete_campaign (line 1486) | def POST_delete_campaign(self, form, jquery, l, campaign): method POST_toggle_pause_campaign (line 1498) | def POST_toggle_pause_campaign(self, form, jquery, link, campaign, method POST_terminate_campaign (line 1515) | def POST_terminate_campaign(self, form, jquery, link, campaign): method POST_update_pay (line 1537) | def POST_update_pay(self, form, jquery, link, campaign, customer_id, p... method POST_ad_s3_params (line 1632) | def POST_ad_s3_params(self, responder, link, kind, filepath, ajax): method GET_ad_s3_callback (line 1675) | def GET_ad_s3_callback(self, expires, signature, callback, key): FILE: r2/r2/controllers/reddit_base.py class UnloggedUser (line 143) | class UnloggedUser(FakeAccount): method __init__ (line 151) | def __init__(self, browser_langs, *a, **kw): method name (line 161) | def name(self): method _decode_json (line 164) | def _decode_json(self, json_blob): method _from_cookie (line 176) | def _from_cookie(self): method _to_cookie (line 196) | def _to_cookie(self, data): method _subscribe (line 202) | def _subscribe(self, sr): method _unsubscribe (line 205) | def _unsubscribe(self, sr): method _commit (line 208) | def _commit(self): function read_user_cookie (line 214) | def read_user_cookie(name): function set_user_cookie (line 222) | def set_user_cookie(name, val, **kwargs): function set_recent_clicks (line 228) | def set_recent_clicks(): function delete_obsolete_cookies (line 254) | def delete_obsolete_cookies(): function over18 (line 259) | def over18(): function set_over18_cookie (line 271) | def set_over18_cookie(): function delete_over18_cookie (line 275) | def delete_over18_cookie(): function set_obey_over18 (line 279) | def set_obey_over18(): function set_subreddit (line 284) | def set_subreddit(): function set_multireddit (line 374) | def set_multireddit(): function set_content_type (line 439) | def set_content_type(): function get_browser_langs (line 497) | def get_browser_langs(): function set_iface_lang (line 518) | def set_iface_lang(): function set_colors (line 539) | def set_colors(): function ratelimit_agent (line 549) | def ratelimit_agent(agent, limit=10, slice_size=10): function ratelimit_agents (line 565) | def ratelimit_agents(): function ratelimit_throttled (line 585) | def ratelimit_throttled(): function paginated_listing (line 591) | def paginated_listing(default_page_size=25, max_page_size=100, backend='... function base_listing (line 637) | def base_listing(fn): function is_trusted_origin (line 640) | def is_trusted_origin(origin): function cross_domain (line 648) | def cross_domain(origin_check=is_trusted_origin, **options): function make_url_https (line 677) | def make_url_https(url): function generate_modhash (line 686) | def generate_modhash(): function enforce_https (line 700) | def enforce_https(): function require_https (line 752) | def require_https(): function require_domain (line 757) | def require_domain(required_domain): function disable_subreddit_css (line 762) | def disable_subreddit_css(): function request_timer_name (line 772) | def request_timer_name(action): function flatten_response (line 776) | def flatten_response(content): function abort_with_error (line 783) | def abort_with_error(error, code=None): class MinimalController (line 795) | class MinimalController(BaseController): method run_sitewide_ratelimits (line 800) | def run_sitewide_ratelimits(self): method pre (line 886) | def pre(self): method post (line 952) | def post(self): method on_validation_error (line 1043) | def on_validation_error(self, error): method abort404 (line 1049) | def abort404(self): method abort403 (line 1052) | def abort403(self): method check_cors (line 1062) | def check_cors(self): method OPTIONS (line 1096) | def OPTIONS(self): method update_qstring (line 1100) | def update_qstring(self, dict): method api_wrapper (line 1105) | def api_wrapper(self, kw): method should_update_last_visit (line 1110) | def should_update_last_visit(self): class OAuth2ResourceController (line 1123) | class OAuth2ResourceController(MinimalController): method authenticate_with_token (line 1126) | def authenticate_with_token(self): method check_for_bearer_token (line 1162) | def check_for_bearer_token(self): method _auth_error (line 1166) | def _auth_error(self, code, error): method _get_bearer_token (line 1169) | def _get_bearer_token(self, strict=True): method set_up_user_context (line 1183) | def set_up_user_context(self): class OAuth2OnlyController (line 1191) | class OAuth2OnlyController(OAuth2ResourceController): method pre (line 1198) | def pre(self): method on_validation_error (line 1205) | def on_validation_error(self, error): class RedditController (line 1209) | class RedditController(OAuth2ResourceController): method login (line 1212) | def login(user, rem=False): method logout (line 1224) | def logout(): method enable_admin_mode (line 1229) | def enable_admin_mode(user, first_login=None): method remember_otp (line 1239) | def remember_otp(user): method disable_admin_mode (line 1249) | def disable_admin_mode(user): method pre (line 1252) | def pre(self): method post (line 1460) | def post(self): method _embed_html_timing_data (line 1479) | def _embed_html_timing_data(self): method search_fail (line 1502) | def search_fail(self, exception): FILE: r2/r2/controllers/redirect.py class RedirectController (line 32) | class RedirectController(BaseController): method pre (line 33) | def pre(self, *k, **kw): method GET_redirect (line 37) | def GET_redirect(self, dest): method GET_user_redirect (line 40) | def GET_user_redirect(self, username, rest=None): method GET_timereddit_redirect (line 51) | def GET_timereddit_redirect(self, timereddit, rest=None): FILE: r2/r2/controllers/robots.py class RobotsController (line 31) | class RobotsController(MinimalController): method pre (line 32) | def pre(self): method post (line 35) | def post(self): method on_crawlable_domain (line 38) | def on_crawlable_domain(self): method GET_robots (line 56) | def GET_robots(self): method GET_crossdomain (line 63) | def GET_crossdomain(self): FILE: r2/r2/controllers/toolbar.py function demangle_url (line 44) | def demangle_url(path): function force_html (line 67) | def force_html(): class ToolbarController (line 80) | class ToolbarController(RedditController): method GET_goto (line 86) | def GET_goto(self, link1, link2): method GET_s (line 94) | def GET_s(self, urloid): method GET_redirect (line 120) | def GET_redirect(self): FILE: r2/r2/controllers/web.py class WebLogController (line 50) | class WebLogController(RedditController): method POST_message (line 65) | def POST_message(self, level, logs): method OPTIONS_report_cache_poisoning (line 97) | def OPTIONS_report_cache_poisoning(self): method POST_report_cache_poisoning (line 133) | def POST_report_cache_poisoning( FILE: r2/r2/controllers/wiki.py class WikiController (line 115) | class WikiController(RedditController): method GET_wiki_page (line 126) | def GET_wiki_page(self, pv, page_name): method GET_wiki_revisions (line 190) | def GET_wiki_revisions(self, num, after, reverse, count, page): method GET_wiki_create (line 204) | def GET_wiki_create(self, wp, page): method GET_wiki_revise (line 233) | def GET_wiki_revise(self, wp, page, message=None, **kw): method GET_wiki_recent (line 251) | def GET_wiki_recent(self, num, after, reverse, count): method GET_wiki_listing (line 265) | def GET_wiki_listing(self): method GET_wiki_redirect (line 272) | def GET_wiki_redirect(self, page='index'): method GET_wiki_discussions (line 279) | def GET_wiki_discussions(self, page, num, after, reverse, count): method GET_wiki_settings (line 291) | def GET_wiki_settings(self, page): method POST_wiki_settings (line 313) | def POST_wiki_settings(self, page, permlevel, listed): method on_validation_error (line 342) | def on_validation_error(self, error): method handle_error (line 347) | def handle_error(self, code, reason=None, **data): method pre (line 350) | def pre(self): method GET_faq (line 374) | def GET_faq(self): class WikiApiController (line 380) | class WikiApiController(WikiController): method POST_wiki_edit (line 388) | def POST_wiki_edit(self, pageandprevious, content, page_name, reason): method POST_wiki_allow_editor (line 471) | def POST_wiki_allow_editor(self, act, page, user): method POST_wiki_revision_delete (line 493) | def POST_wiki_revision_delete(self, pv, deleted): method POST_wiki_revision_hide (line 508) | def POST_wiki_revision_hide(self, pv): method POST_wiki_revision_revert (line 523) | def POST_wiki_revision_revert(self, pv): method pre (line 550) | def pre(self): FILE: r2/r2/lib/amqp.py function initialize (line 54) | def initialize(app_globals): class Config (line 63) | class Config(object): method __init__ (line 64) | def __init__(self, g): class Worker (line 77) | class Worker: method __init__ (line 78) | def __init__(self): method _handle (line 84) | def _handle(self): method do (line 96) | def do(self, fn, *a, **kw): method join (line 100) | def join(self): class ConnectionManager (line 104) | class ConnectionManager(local): method __init__ (line 109) | def __init__(self): method get_connection (line 114) | def get_connection(self): method get_channel (line 138) | def get_channel(self, reconnect = False): method init_queue (line 158) | def init_queue(self): function _add_item (line 181) | def _add_item(routing_key, body, message_id = None, function add_item (line 220) | def add_item(routing_key, body, message_id=None, function add_kw (line 232) | def add_kw(routing_key, **kw): function consume_items (line 235) | def consume_items(queue, callback, verbose=True): function handle_items (line 288) | def handle_items(queue, callback, ack=True, limit=1, min_size=0, function empty_queue (line 357) | def empty_queue(queue): function black_hole (line 363) | def black_hole(queue): function dedup_queue (line 370) | def dedup_queue(queue, rk = None, limit=None, FILE: r2/r2/lib/app_globals.py function extract_live_config (line 100) | def extract_live_config(config, plugins): function _decode_secrets (line 117) | def _decode_secrets(secrets): function extract_secrets (line 121) | def extract_secrets(config): function fetch_secrets (line 129) | def fetch_secrets(zk_client): class PermissionFilteredEmployeeList (line 142) | class PermissionFilteredEmployeeList(object): method __init__ (line 143) | def __init__(self, config, type): method __iter__ (line 147) | def __iter__(self): method __getitem__ (line 152) | def __getitem__(self, key): method __contains__ (line 155) | def __contains__(self, item): method __repr__ (line 161) | def __repr__(self): function on_app_shutdown (line 166) | def on_app_shutdown(arbiter, worker): class Globals (line 171) | class Globals(object): method __init__ (line 429) | def __init__(self, config, global_conf, app_conf, paths, **extra): method __getattr__ (line 509) | def __getattr__(self, name): method setup (line 515) | def setup(self): method setup_complete (line 962) | def setup_complete(self): method record_repo_version (line 979) | def record_repo_version(self, repo_name, git_dir): method load_db_params (line 1000) | def load_db_params(self): method __del__ (line 1075) | def __del__(self): method search (line 1083) | def search(self): method search_syntaxes (line 1095) | def search_syntaxes(self): FILE: r2/r2/lib/authorize/api.py class AuthorizeNetException (line 74) | class AuthorizeNetException(Exception): method __init__ (line 75) | def __init__(self, msg, code=None): class TransactionError (line 87) | class TransactionError(Exception): method __init__ (line 88) | def __init__(self, message): class DuplicateTransactionError (line 92) | class DuplicateTransactionError(TransactionError): method __init__ (line 93) | def __init__(self, transaction_id): class AuthorizationHoldNotFound (line 100) | class AuthorizationHoldNotFound(Exception): pass class SimpleXMLObject (line 107) | class SimpleXMLObject(object): method __init__ (line 114) | def __init__(self, **kw): method simple_tag (line 121) | def simple_tag(name, content, **attrs): method toXML (line 128) | def toXML(self): method fromXML (line 150) | def fromXML(cls, data): method __repr__ (line 159) | def __repr__(self): method _name (line 164) | def _name(self): method _wrapper (line 168) | def _wrapper(self, content): class Auth (line 172) | class Auth(SimpleXMLObject): class Address (line 177) | class Address(SimpleXMLObject): method __init__ (line 183) | def __init__(self, **kw): class CreditCard (line 191) | class CreditCard(SimpleXMLObject): class Profile (line 195) | class Profile(SimpleXMLObject): method __init__ (line 199) | def __init__(self, description, merchantCustomerId, customerProfileId, class PaymentProfile (line 212) | class PaymentProfile(SimpleXMLObject): method __init__ (line 214) | def __init__(self, billTo, card, customerPaymentProfileId=None, method fromXML (line 225) | def fromXML(cls, res): class Order (line 233) | class Order(SimpleXMLObject): class Transaction (line 237) | class Transaction(SimpleXMLObject): method __init__ (line 241) | def __init__(self, amount, customerProfileId, customerPaymentProfileId, method _wrapper (line 248) | def _wrapper(self, content): class ProfileTransAuthOnly (line 254) | class ProfileTransAuthOnly(Transaction): pass class ProfileTransPriorAuthCapture (line 259) | class ProfileTransPriorAuthCapture(Transaction): pass class ProfileTransRefund (line 264) | class ProfileTransRefund(Transaction): pass class ProfileTransVoid (line 269) | class ProfileTransVoid(Transaction): pass class AuthorizeNetRequest (line 273) | class AuthorizeNetRequest(SimpleXMLObject): method merchantAuthentication (line 277) | def merchantAuthentication(self): method _wrapper (line 281) | def _wrapper(self, content): method make_request (line 286) | def make_request(self): method is_error_code (line 296) | def is_error_code(self, res, code): method _autoclose_handler (line 301) | def _autoclose_handler(self, m): method handle_response (line 304) | def handle_response(self, res): method process_response (line 314) | def process_response(self, res): method process_error (line 317) | def process_error(self, res): class CreateCustomerProfileRequest (line 323) | class CreateCustomerProfileRequest(AuthorizeNetRequest): method __init__ (line 326) | def __init__(self, profile, validationMode=None): method process_response (line 330) | def process_response(self, res): method process_error (line 334) | def process_error(self, res): class CreateCustomerPaymentProfileRequest (line 350) | class CreateCustomerPaymentProfileRequest(AuthorizeNetRequest): method __init__ (line 354) | def __init__(self, customerProfileId, paymentProfile, validationMode=N... method process_response (line 359) | def process_response(self, res): method process_error (line 363) | def process_error(self, res): class GetCustomerProfileRequest (line 368) | class GetCustomerProfileRequest(AuthorizeNetRequest): method __init__ (line 371) | def __init__(self, customerProfileId): method process_response (line 375) | def process_response(self, res): method process_error (line 401) | def process_error(self, res): class DeleteCustomerPaymentProfileRequest (line 408) | class DeleteCustomerPaymentProfileRequest(AuthorizeNetRequest): method __init__ (line 412) | def __init__(self, customerProfileId, customerPaymentProfileId): method process_response (line 417) | def process_response(self, res): method process_error (line 420) | def process_error(self, res): class UpdateCustomerPaymentProfileRequest (line 428) | class UpdateCustomerPaymentProfileRequest(AuthorizeNetRequest): method __init__ (line 432) | def __init__(self, customerProfileId, paymentProfile, validationMode=N... method process_response (line 437) | def process_response(self, res): method process_error (line 440) | def process_error(self, res): class CreateCustomerProfileTransactionRequest (line 445) | class CreateCustomerProfileTransactionRequest(AuthorizeNetRequest): method __init__ (line 482) | def __init__(self, **kw): method extraOptions (line 487) | def extraOptions(self): method process_response (line 491) | def process_response(self, res): method process_error (line 494) | def process_error(self, res): method package_response (line 497) | def package_response(self, res): class GetSettledBatchListRequest (line 508) | class GetSettledBatchListRequest(AuthorizeNetRequest): method __init__ (line 512) | def __init__(self, start_date, end_date, **kw): method process_response (line 519) | def process_response(self, res): method process_error (line 522) | def process_error(self, res): function create_customer_profile (line 527) | def create_customer_profile(merchant_customer_id, description): function get_customer_profile (line 545) | def get_customer_profile(customer_id): function create_payment_profile (line 556) | def create_payment_profile(customer_id, address, credit_card, validate=F... function update_payment_profile (line 570) | def update_payment_profile(customer_id, payment_profile_id, address, function delete_payment_profile (line 590) | def delete_payment_profile(customer_id, payment_profile_id): function create_authorization_hold (line 604) | def create_authorization_hold(customer_id, payment_profile_id, amount, i... function capture_authorization_hold (line 634) | def capture_authorization_hold(customer_id, payment_profile_id, amount, function void_authorization_hold (line 656) | def void_authorization_hold(customer_id, payment_profile_id, transaction... function refund_transaction (line 674) | def refund_transaction(customer_id, payment_profile_id, amount, transact... FILE: r2/r2/lib/authorize/interaction.py function get_or_create_customer_profile (line 42) | def get_or_create_customer_profile(user): function add_payment_method (line 60) | def add_payment_method(user, address, credit_card, validate=False): function update_payment_method (line 70) | def update_payment_method(user, payment_method_id, address, credit_card, function delete_payment_method (line 79) | def delete_payment_method(user, payment_method_id): function add_or_update_payment_method (line 87) | def add_or_update_payment_method(user, address, credit_card, pay_id=None): function is_charged_transaction (line 96) | def is_charged_transaction(trans_id, campaign): function auth_freebie_transaction (line 110) | def auth_freebie_transaction(amount, user, link, campaign_id): function auth_transaction (line 128) | def auth_transaction(amount, user, payment_method_id, link, campaign_id): function charge_transaction (line 156) | def charge_transaction(user, transaction_id, campaign_id): function void_transaction (line 186) | def void_transaction(user, transaction_id, campaign_id): function refund_transaction (line 204) | def refund_transaction(user, transaction_id, campaign_id, amount): FILE: r2/r2/lib/automoderator.py function replace_placeholders (line 94) | def replace_placeholders(string, data, matches): class AutoModeratorSyntaxError (line 176) | class AutoModeratorSyntaxError(ValueError): method __init__ (line 177) | def __init__(self, message, yaml): class AutoModeratorRuleTypeError (line 184) | class AutoModeratorRuleTypeError(AutoModeratorSyntaxError): class Ruleset (line 192) | class Ruleset(object): method __init__ (line 194) | def __init__(self, yaml_text="", timer=None): method __iter__ (line 293) | def __iter__(self): method __len__ (line 298) | def __len__(self): method removal_rules (line 302) | def removal_rules(self): method nonremoval_rules (line 309) | def nonremoval_rules(self): method apply_to_item (line 315) | def apply_to_item(self, item): class RuleComponent (line 357) | class RuleComponent(object): method __init__ (line 360) | def __init__(self, valid_types=None, valid_values=None, method validate (line 384) | def validate(self, value): class RuleTarget (line 399) | class RuleTarget(object): method __init__ (line 585) | def __init__(self, target_type, values, parent, approve_banned=True): method set_values (line 610) | def set_values(self, values): method parse_match_fields_key (line 673) | def parse_match_fields_key(self, key): method get_match_patterns (line 722) | def get_match_patterns(self, values): method needs_media_data (line 779) | def needs_media_data(self): method check_item (line 795) | def check_item(self, item, data): method check_nonpattern_conditions (line 809) | def check_nonpattern_conditions(self, item, data): method check_account_thresholds (line 868) | def check_account_thresholds(self, account, data): method check_match_patterns (line 929) | def check_match_patterns(self, item, data): method perform_actions (line 967) | def perform_actions(self, item, data): method get_field_value_from_item (line 1123) | def get_field_value_from_item(self, item, data, field): class Rule (line 1176) | class Rule(object): method __init__ (line 1207) | def __init__(self, values, yaml_source=None): method is_removal_rule (line 1284) | def is_removal_rule(self): method is_inapplicable_to_mods (line 1289) | def is_inapplicable_to_mods(self): method is_unrepeatable (line 1300) | def is_unrepeatable(self): method needs_media_data (line 1313) | def needs_media_data(self): method matches (line 1326) | def matches(self): method has_any_checks (line 1329) | def has_any_checks(self, targets_only=False): method has_any_actions (line 1339) | def has_any_actions(self, targets_only=False): method get_target_item (line 1349) | def get_target_item(self, item, data, key): method item_is_correct_type (line 1358) | def item_is_correct_type(self, item): method should_check_item (line 1370) | def should_check_item(self, item, data): method check_item (line 1404) | def check_item(self, item, data): method perform_actions (line 1418) | def perform_actions(self, item, data): method build_message (line 1487) | def build_message(self, text, item, data, disclaimer=False, permalink=... function run (line 1501) | def run(): FILE: r2/r2/lib/base.py function is_local_address (line 47) | def is_local_address(ip): function abort (line 51) | def abort(code_or_exception=None, detail="", headers=None, comment=None, class BaseController (line 71) | class BaseController(WSGIController): method __before__ (line 72) | def __before__(self): method __after__ (line 131) | def __after__(self): method __call__ (line 134) | def __call__(self, environ, start_response): method pre (line 158) | def pre(self): pass method post (line 159) | def post(self): pass method fix_cookie_header (line 161) | def fix_cookie_header(self): method _get_action_handler (line 185) | def _get_action_handler(self, name=None, method=None): method format_output_url (line 192) | def format_output_url(cls, url, **kw): method intermediate_redirect (line 222) | def intermediate_redirect(cls, form_path, sr_path=True, fullpath=None): method redirect (line 239) | def redirect(cls, dest, code=302, preserve_extension=True): class EmbedHandler (line 250) | class EmbedHandler(urllib2.BaseHandler, urllib2.HTTPHandler, method http_redirect (line 253) | def http_redirect(self, req, fp, code, msg, hdrs): function proxyurl (line 267) | def proxyurl(url): FILE: r2/r2/lib/baseplate_integration.py function make_server_span (line 39) | def make_server_span(span_name): function finish_server_span (line 44) | def finish_server_span(): function with_server_span (line 48) | def with_server_span(name): class R2BaseplateObserver (line 79) | class R2BaseplateObserver(BaseplateObserver): method on_server_span_created (line 80) | def on_server_span_created(self, context, server_span): class R2ServerSpanObserver (line 85) | class R2ServerSpanObserver(ServerSpanObserver): method on_child_span_created (line 86) | def on_child_span_created(self, span): class R2SpanObserver (line 91) | class R2SpanObserver(SpanObserver): method __init__ (line 92) | def __init__(self, span_name): method on_start (line 96) | def on_start(self): method on_finish (line 99) | def on_finish(self, exc_info): FILE: r2/r2/lib/butler.py function notify_mention (line 33) | def notify_mention(user, thing): function remove_mention_notification (line 46) | def remove_mention_notification(mention): function readd_mention_notification (line 54) | def readd_mention_notification(mention): function monitor_mentions (line 64) | def monitor_mentions(comment): function run (line 123) | def run(): FILE: r2/r2/lib/c/filters.c function PyObject (line 29) | PyObject *unicode_arg(PyObject *args) { function PyObject (line 42) | static PyObject * function PyObject (line 100) | static PyObject * function PyObject (line 151) | static PyObject * function print_unicode (line 206) | void print_unicode(Py_UNICODE *c, int len) { function whitespace (line 224) | int whitespace(char c) { function PyObject (line 229) | static PyObject * function Py_UNICODE (line 311) | Py_UNICODE *to_unicode(const char *c, int len) { function PyMODINIT_FUNC (line 327) | PyMODINIT_FUNC FILE: r2/r2/lib/cache.py class NoneResult (line 47) | class NoneResult(object): pass class CacheUtils (line 49) | class CacheUtils(object): method incr_multi (line 54) | def incr_multi(self, keys, delta=1, prefix=''): method add_multi (line 61) | def add_multi(self, keys, prefix='', time=0): method get_multi (line 65) | def get_multi(self, keys, prefix='', **kw): class CMemcache (line 69) | class CMemcache(CacheUtils): method __init__ (line 70) | def __init__(self, method get (line 101) | def get(self, key, default = None): method get_multi (line 108) | def get_multi(self, keys, prefix = ''): method set (line 121) | def set(self, key, val, time=0): method set_multi (line 130) | def set_multi(self, keys, prefix='', time=0): method add_multi (line 139) | def add_multi(self, keys, prefix='', time=0): method incr_multi (line 148) | def incr_multi(self, keys, prefix='', delta=1): method append (line 153) | def append(self, key, val, time=0): method incr (line 161) | def incr(self, key, delta=1, time=0): method add (line 166) | def add(self, key, val, time=0): method delete (line 177) | def delete(self, key, time=0): method delete_multi (line 181) | def delete_multi(self, keys, prefix=''): method __repr__ (line 186) | def __repr__(self): class Mcrouter (line 191) | class Mcrouter(CMemcache): method set (line 234) | def set(self, key, val, time=0): class HardCache (line 245) | class HardCache(CacheUtils): method __init__ (line 249) | def __init__(self, gc): method _split_key (line 252) | def _split_key(self, key): method set (line 260) | def set(self, key, val, time=0): method simple_get_multi (line 268) | def simple_get_multi(self, keys): method set_multi (line 284) | def set_multi(self, keys, prefix='', time=0): method get (line 289) | def get(self, key, default=None): method delete (line 295) | def delete(self, key, time=0): method add (line 301) | def add(self, key, value, time=0): method incr (line 305) | def incr(self, key, delta=1, time=0): class LocalCache (line 310) | class LocalCache(dict, CacheUtils): method __init__ (line 311) | def __init__(self, *a, **kw): method _check_key (line 314) | def _check_key(self, key): method get (line 320) | def get(self, key, default=None): method simple_get_multi (line 325) | def simple_get_multi(self, keys): method set (line 334) | def set(self, key, val, time = 0): method set_multi (line 339) | def set_multi(self, keys, prefix='', time=0): method add (line 343) | def add(self, key, val, time = 0): method delete (line 349) | def delete(self, key): method delete_multi (line 353) | def delete_multi(self, keys): method incr (line 358) | def incr(self, key, delta=1, time=0): method decr (line 362) | def decr(self, key, amt=1): method append (line 366) | def append(self, key, val, time = 0): method prepend (line 370) | def prepend(self, key, val, time = 0): method replace (line 374) | def replace(self, key, val, time = 0): method flush_all (line 378) | def flush_all(self): method reset (line 381) | def reset(self): method __repr__ (line 384) | def __repr__(self): class TransitionalCache (line 388) | class TransitionalCache(CacheUtils): method __init__ (line 411) | def __init__( method stats (line 420) | def stats(self): method read_chain (line 427) | def read_chain(self): method caches (line 434) | def caches(self): method transform_memcache_key (line 440) | def transform_memcache_key(self, args, kwargs): method make_get_fn (line 516) | def make_get_fn(fn_name): method make_set_fn (line 529) | def make_set_fn(fn_name): function cache_timer_decorator (line 558) | def cache_timer_decorator(fn_name): class CacheChain (line 588) | class CacheChain(CacheUtils, local): method __init__ (line 589) | def __init__(self, caches, cache_negative_results=False): method make_set_fn (line 594) | def make_set_fn(fn_name): method get (line 625) | def get(self, key, default = None, allow_local = True, stale=None): method get_multi (line 664) | def get_multi(self, keys, prefix='', allow_local = True, **kw): method simple_get_multi (line 669) | def simple_get_multi(self, keys, allow_local = True, stale=None, method __repr__ (line 725) | def __repr__(self): method debug (line 729) | def debug(self, key): method reset (line 735) | def reset(self): class MemcacheChain (line 739) | class MemcacheChain(CacheChain): class HardcacheChain (line 742) | class HardcacheChain(CacheChain): method add (line 743) | def add(self, key, val, time=0): method accrue (line 754) | def accrue(self, key, time=0, delta=1): method backend (line 772) | def backend(self): class StaleCacheChain (line 776) | class StaleCacheChain(CacheChain): method __init__ (line 782) | def __init__(self, localcache, stalecache, realcache): method get (line 791) | def get(self, key, default=None, stale = False, **kw): method simple_get_multi (line 825) | def simple_get_multi(self, keys, stale=False, stat_subname=None, **kw): method _getstale (line 867) | def _getstale(self, keys): method reset (line 872) | def reset(self): method __repr__ (line 880) | def __repr__(self): class Permacache (line 888) | class Permacache(object): method __init__ (line 898) | def __init__(self, cache_chain, column_family, lock_factory): method _setup_column_family (line 904) | def _setup_column_family(cls, column_family_name, client): method _backend_get (line 910) | def _backend_get(self, keys): method _backend_set (line 925) | def _backend_set(self, key, val): method _backend_set_multi (line 930) | def _backend_set_multi(self, keys, prefix=''): method _backend_delete (line 939) | def _backend_delete(self, key): method get (line 942) | def get(self, key, default=None, allow_local=True, stale=False): method set (line 952) | def set(self, key, val): method set_multi (line 956) | def set_multi(self, keys, prefix='', time=None): method pessimistically_set (line 961) | def pessimistically_set(self, key, value): method get_multi (line 970) | def get_multi(self, keys, prefix='', allow_local=True, stale=False): method simple_get_multi (line 975) | def simple_get_multi(self, keys, allow_local=True, stale=False): method delete (line 985) | def delete(self, key): method mutate (line 989) | def mutate(self, key, mutation_fn, default=None, willread=True): method __repr__ (line 1010) | def __repr__(self): function test_cache (line 1015) | def test_cache(cache, prefix=''): function test_multi (line 1061) | def test_multi(cache): class SelfEmptyingCache (line 1083) | class SelfEmptyingCache(LocalCache): method __init__ (line 1084) | def __init__(self, max_size=10*1000): method maybe_reset (line 1087) | def maybe_reset(self): method set (line 1091) | def set(self, key, val, time=0): method add (line 1095) | def add(self, key, val, time=0): function _make_hashable (line 1100) | def _make_hashable(s): function make_key_id (line 1114) | def make_key_id(*a, **kw): function test_stale (line 1121) | def test_stale(): FILE: r2/r2/lib/cache_poisoning.py function make_poisoning_report_mac (line 26) | def make_poisoning_report_mac( function cache_headers_valid (line 51) | def cache_headers_valid(policy_name, headers): FILE: r2/r2/lib/captcha.py class RandCaptcha (line 36) | class RandCaptcha(ImageCaptcha): method getLayers (line 40) | def getLayers(self, solution="blah"): function get_iden (line 49) | def get_iden(): function make_solution (line 52) | def make_solution(): function get_image (line 55) | def get_image(iden): function valid_solution (line 64) | def valid_solution(iden, solution): FILE: r2/r2/lib/comment_tree.py function write_comment_scores (line 37) | def write_comment_scores(link, comments): function add_comments (line 43) | def add_comments(comments): function calculate_comment_scores (line 73) | def calculate_comment_scores(link, sort, comments): function _calculate_qa_comment_scores (line 89) | def _calculate_qa_comment_scores(link, cid_tree, comments): function get_comment_scores (line 124) | def get_comment_scores(link, sort, comment_ids, timer): function messages_key (line 191) | def messages_key(user_id): function messages_lock_key (line 194) | def messages_lock_key(user_id): function add_message (line 197) | def add_message(message, update_recipient=True, update_modmail=True, function _add_message_nolock (line 215) | def _add_message_nolock(key, message): function add_message_nolock (line 258) | def add_message_nolock(user_id, message): function _conversation (line 261) | def _conversation(trees, parent): function conversation (line 280) | def conversation(user, parent): function user_messages (line 285) | def user_messages(user, update = False): function _load_messages (line 294) | def _load_messages(mlist): function user_messages_nocache (line 303) | def user_messages_nocache(user): function sr_messages_key (line 313) | def sr_messages_key(sr_id): function sr_messages_lock_key (line 316) | def sr_messages_lock_key(sr_id): function subreddit_messages (line 320) | def subreddit_messages(sr, update = False): function moderator_messages (line 328) | def moderator_messages(sr_ids): function subreddit_messages_nocache (line 348) | def subreddit_messages_nocache(sr): function add_sr_message_nolock (line 358) | def add_sr_message_nolock(sr_id, message): function sr_conversation (line 361) | def sr_conversation(sr, parent): function compute_message_trees (line 366) | def compute_message_trees(messages): function tree_sort_fn (line 396) | def tree_sort_fn(tree): function _populate (line 400) | def _populate(after_id = None, estimate=54301242): FILE: r2/r2/lib/configparse.py class ConfigValue (line 26) | class ConfigValue(object): method str (line 30) | def str(v, key=None): method int (line 34) | def int(v, key=None): method float (line 38) | def float(v, key=None): method bool (line 42) | def bool(v, key=None): method tuple (line 51) | def tuple(v, key=None): method set (line 55) | def set(v, key=None): method set_of (line 59) | def set_of(value_type, delim=','): method tuple_of (line 66) | def tuple_of(value_type, delim=','): method dict (line 73) | def dict(key_type, value_type, delim=',', kvdelim=':'): method choice (line 81) | def choice(**choices): method to_iter (line 90) | def to_iter(v, delim = ','): method timeinterval (line 94) | def timeinterval(v, key=None): method messages (line 104) | def messages(v, key=None): method baseplate (line 108) | def baseplate(baseplate_parser): class ConfigValueParser (line 114) | class ConfigValueParser(dict): method __init__ (line 115) | def __init__(self, raw_data): method add_spec (line 120) | def add_spec(self, spec): method _update_values (line 130) | def _update_values(self, keys): FILE: r2/r2/lib/contrib/ipaddress.py class AddressValueError (line 33) | class AddressValueError(ValueError): class NetmaskValueError (line 37) | class NetmaskValueError(ValueError): function ip_address (line 41) | def ip_address(address, version=None): function ip_network (line 81) | def ip_network(address, version=None, strict=True): function ip_interface (line 121) | def ip_interface(address, version=None): function v4_int_to_packed (line 165) | def v4_int_to_packed(address): function v6_int_to_packed (line 183) | def v6_int_to_packed(address): function _find_address_range (line 195) | def _find_address_range(addresses): function _get_prefix_length (line 213) | def _get_prefix_length(number1, number2, bits): function _count_righthand_zero_bits (line 230) | def _count_righthand_zero_bits(number, bits): function summarize_address_range (line 248) | def summarize_address_range(first, last): function _collapse_addresses_recursive (line 311) | def _collapse_addresses_recursive(addresses): function collapse_addresses (line 357) | def collapse_addresses(addresses): function get_mixed_type_key (line 414) | def get_mixed_type_key(obj): class _IPAddressBase (line 439) | class _IPAddressBase(object): method exploded (line 444) | def exploded(self): method compressed (line 449) | def compressed(self): method _ip_int_from_prefix (line 453) | def _ip_int_from_prefix(self, prefixlen=None): method _prefix_from_ip_int (line 467) | def _prefix_from_ip_int(self, ip_int, mask=32): method _ip_string_from_prefix (line 486) | def _ip_string_from_prefix(self, prefixlen=None): class _BaseAddress (line 501) | class _BaseAddress(_IPAddressBase): method __init__ (line 510) | def __init__(self, address): method __index__ (line 515) | def __index__(self): method __int__ (line 518) | def __int__(self): method __hex__ (line 521) | def __hex__(self): method __eq__ (line 524) | def __eq__(self, other): method __ne__ (line 531) | def __ne__(self, other): method __le__ (line 537) | def __le__(self, other): method __ge__ (line 543) | def __ge__(self, other): method __lt__ (line 549) | def __lt__(self, other): method __gt__ (line 560) | def __gt__(self, other): method __add__ (line 573) | def __add__(self, other): method __sub__ (line 578) | def __sub__(self, other): method __repr__ (line 583) | def __repr__(self): method __str__ (line 586) | def __str__(self): method __hash__ (line 589) | def __hash__(self): method _get_address_key (line 592) | def _get_address_key(self): method version (line 596) | def version(self): class _BaseNetwork (line 600) | class _BaseNetwork(_IPAddressBase): method __init__ (line 609) | def __init__(self, address): method __index__ (line 612) | def __index__(self): method __int__ (line 615) | def __int__(self): method __repr__ (line 618) | def __repr__(self): method hosts (line 621) | def hosts(self): method __iter__ (line 634) | def __iter__(self): method __getitem__ (line 641) | def __getitem__(self, n): method __lt__ (line 654) | def __lt__(self, other): method __gt__ (line 667) | def __gt__(self, other): method __le__ (line 680) | def __le__(self, other): method __ge__ (line 686) | def __ge__(self, other): method __eq__ (line 692) | def __eq__(self, other): method __ne__ (line 700) | def __ne__(self, other): method __str__ (line 706) | def __str__(self): method __hash__ (line 710) | def __hash__(self): method __contains__ (line 713) | def __contains__(self, other): method overlaps (line 726) | def overlaps(self, other): method broadcast_address (line 734) | def broadcast_address(self): method hostmask (line 743) | def hostmask(self): method network (line 752) | def network(self): method with_prefixlen (line 757) | def with_prefixlen(self): method with_netmask (line 761) | def with_netmask(self): method with_hostmask (line 765) | def with_hostmask(self): method num_addresses (line 769) | def num_addresses(self): method version (line 774) | def version(self): method prefixlen (line 778) | def prefixlen(self): method address_exclude (line 781) | def address_exclude(self, other): method compare_networks (line 863) | def compare_networks(self, other): method _get_networks_key (line 911) | def _get_networks_key(self): method subnets (line 921) | def subnets(self, prefixlen_diff=1, new_prefix=None): method masked (line 983) | def masked(self): method supernet (line 988) | def supernet(self, prefixlen_diff=1, new_prefix=None): class _BaseV4 (line 1032) | class _BaseV4(object): method __init__ (line 1045) | def __init__(self, address): method _explode_shorthand_ip_string (line 1049) | def _explode_shorthand_ip_string(self): method _ip_int_from_string (line 1052) | def _ip_int_from_string(self, ip_str): method _parse_octet (line 1077) | def _parse_octet(self, octet_str): method _string_from_ip_int (line 1100) | def _string_from_ip_int(self, ip_int): method max_prefixlen (line 1117) | def max_prefixlen(self): method version (line 1121) | def version(self): method is_reserved (line 1125) | def is_reserved(self): method is_private (line 1140) | def is_private(self): method is_multicast (line 1162) | def is_multicast(self): method is_unspecified (line 1177) | def is_unspecified(self): method is_loopback (line 1192) | def is_loopback(self): method is_link_local (line 1207) | def is_link_local(self): class IPv4Address (line 1221) | class IPv4Address(_BaseV4, _BaseAddress): method __init__ (line 1225) | def __init__(self, address): method packed (line 1263) | def packed(self): class IPv4Interface (line 1268) | class IPv4Interface(IPv4Address): method __init__ (line 1273) | def __init__(self, address): method __str__ (line 1292) | def __str__(self): method __eq__ (line 1296) | def __eq__(self, other): method __hash__ (line 1303) | def __hash__(self): method _is_valid_netmask (line 1306) | def _is_valid_netmask(self, netmask): method _is_hostmask (line 1332) | def _is_hostmask(self, ip_str): method prefixlen (line 1355) | def prefixlen(self): method ip (line 1359) | def ip(self): method with_prefixlen (line 1363) | def with_prefixlen(self): method with_netmask (line 1367) | def with_netmask(self): method with_hostmask (line 1371) | def with_hostmask(self): class IPv4Network (line 1376) | class IPv4Network(_BaseV4, _BaseNetwork): method __init__ (line 1392) | def __init__(self, address, strict=True): method packed (line 1499) | def packed(self): method __str__ (line 1503) | def __str__(self): method _is_valid_netmask (line 1507) | def _is_valid_netmask(self, netmask): method _is_hostmask (line 1533) | def _is_hostmask(self, ip_str): method with_prefixlen (line 1555) | def with_prefixlen(self): method with_netmask (line 1559) | def with_netmask(self): method with_hostmask (line 1563) | def with_hostmask(self): class _BaseV6 (line 1567) | class _BaseV6(object): method __init__ (line 1580) | def __init__(self, address): method _ip_int_from_string (line 1584) | def _ip_int_from_string(self, ip_str): method _parse_hextet (line 1663) | def _parse_hextet(self, hextet_str): method _compress_hextets (line 1686) | def _compress_hextets(self, hextets): method _string_from_ip_int (line 1733) | def _string_from_ip_int(self, ip_int=None): method _explode_shorthand_ip_string (line 1760) | def _explode_shorthand_ip_string(self): method max_prefixlen (line 1788) | def max_prefixlen(self): method packed (line 1792) | def packed(self): method version (line 1797) | def version(self): method is_multicast (line 1801) | def is_multicast(self): method is_reserved (line 1816) | def is_reserved(self): method is_link_local (line 1839) | def is_link_local(self): method is_site_local (line 1853) | def is_site_local(self): method is_private (line 1871) | def is_private(self): method ipv4_mapped (line 1886) | def ipv4_mapped(self): method teredo (line 1899) | def teredo(self): method sixtofour (line 1914) | def sixtofour(self): method is_unspecified (line 1927) | def is_unspecified(self): method is_loopback (line 1941) | def is_loopback(self): class IPv6Address (line 1958) | class IPv6Address(_BaseV6, _BaseAddress): method __init__ (line 1963) | def __init__(self, address): class IPv6Interface (line 2006) | class IPv6Interface(IPv6Address): method __init__ (line 2008) | def __init__(self, address): method __str__ (line 2023) | def __str__(self): method __eq__ (line 2027) | def __eq__(self, other): method __hash__ (line 2034) | def __hash__(self): method prefixlen (line 2038) | def prefixlen(self): method ip (line 2041) | def ip(self): method with_prefixlen (line 2045) | def with_prefixlen(self): method with_netmask (line 2049) | def with_netmask(self): method with_hostmask (line 2052) | def with_hostmask(self): class IPv6Network (line 2057) | class IPv6Network(_BaseV6, _BaseNetwork): method __init__ (line 2070) | def __init__(self, address, strict=True): method __str__ (line 2162) | def __str__(self): method _is_valid_netmask (line 2166) | def _is_valid_netmask(self, prefixlen): method with_netmask (line 2184) | def with_netmask(self): method with_prefixlen (line 2188) | def with_prefixlen(self): method with_netmask (line 2192) | def with_netmask(self): method with_hostmask (line 2196) | def with_hostmask(self): FILE: r2/r2/lib/contrib/rcssmin.py function _make_cssmin (line 80) | def _make_cssmin(python_only=False): function main (line 345) | def main(): FILE: r2/r2/lib/contrib/simpleflake.py function pad_bytes_to_64 (line 46) | def pad_bytes_to_64(string): function binary (line 50) | def binary(num, padding=True): function extract_bits (line 58) | def extract_bits(data, shift, length): function simpleflake (line 66) | def simpleflake(timestamp=None, random_bits=None, epoch=SIMPLEFLAKE_EPOCH): function parse_simpleflake (line 80) | def parse_simpleflake(flake): FILE: r2/r2/lib/cookies.py class Cookies (line 36) | class Cookies(dict): method add (line 37) | def add(self, name, value, *k, **kw): class Cookie (line 42) | class Cookie(object): method __init__ (line 43) | def __init__(self, value, expires=None, domain=None, method classify (line 56) | def classify(cookie_name): method __repr__ (line 80) | def __repr__(self): function have_secure_session_cookie (line 90) | def have_secure_session_cookie(): function change_user_cookie_security (line 95) | def change_user_cookie_security(secure, remember): function set_secure_session_cookie (line 125) | def set_secure_session_cookie(remember=False): function delete_secure_session_cookie (line 135) | def delete_secure_session_cookie(): function upgrade_cookie_security (line 143) | def upgrade_cookie_security(): FILE: r2/r2/lib/count.py function incr_counts (line 34) | def incr_counts(wrapped): function get_link_counts (line 37) | def get_link_counts(period = count_period): function get_sr_counts (line 42) | def get_sr_counts(): FILE: r2/r2/lib/csrf.py class CSRFPreventionException (line 24) | class CSRFPreventionException(Exception): function csrf_exempt (line 28) | def csrf_exempt(fn): function check_controller_csrf_prevention (line 34) | def check_controller_csrf_prevention(controller): FILE: r2/r2/lib/cssfilter.py function strip_vendor_prefix (line 390) | def strip_vendor_prefix(identifier): class ValidationError (line 397) | class ValidationError(object): method __init__ (line 398) | def __init__(self, line_number, error_code, message_params=None): method offending_line (line 405) | def offending_line(self): method message_key (line 409) | def message_key(self): class StylesheetValidator (line 413) | class StylesheetValidator(object): method __init__ (line 414) | def __init__(self, images): method validate_url (line 417) | def validate_url(self, url_node): method validate_function (line 430) | def validate_function(self, function_node): method validate_block (line 447) | def validate_block(self, block): method validate_component_values (line 450) | def validate_component_values(self, component_values): method validate_declaration (line 462) | def validate_declaration(self, declaration): method validate_declaration_list (line 468) | def validate_declaration_list(self, declarations): method validate_qualified_rule (line 474) | def validate_qualified_rule(self, rule): method validate_at_rule (line 480) | def validate_at_rule(self, rule): method validate_rule_list (line 496) | def validate_rule_list(self, rules): method validate_list (line 502) | def validate_list(self, nodes, validators_by_type, ignored_types=None): method check_for_evil_codepoints (line 531) | def check_for_evil_codepoints(self, source_lines): method parse_and_validate (line 546) | def parse_and_validate(self, stylesheet_source): function validate_css (line 571) | def validate_css(stylesheet, images): FILE: r2/r2/lib/db/alter_db.py function thing_tables (line 26) | def thing_tables(): function rel_tables (line 33) | def rel_tables(): function dtables (line 37) | def dtables(): function exec_all (line 44) | def exec_all(command, data=False, rel = False, print_only = False): FILE: r2/r2/lib/db/operators.py class BooleanOp (line 23) | class BooleanOp(object): method __init__ (line 24) | def __init__(self, *ops): method __repr__ (line 27) | def __repr__(self): class or_ (line 30) | class or_(BooleanOp): pass class and_ (line 31) | class and_(BooleanOp): pass class not_ (line 32) | class not_(BooleanOp): pass class op (line 34) | class op(object): method __init__ (line 35) | def __init__(self, lval, lval_name, rval): method __repr__ (line 40) | def __repr__(self): method __cmp__ (line 44) | def __cmp__(self, other): class eq (line 47) | class eq(op): pass class ne (line 48) | class ne(op): pass class lt (line 49) | class lt(op): pass class lte (line 50) | class lte(op): pass class gt (line 51) | class gt(op): pass class gte (line 52) | class gte(op): pass class in_ (line 53) | class in_(op): pass class Slot (line 55) | class Slot(object): method __init__ (line 56) | def __init__(self, lval): method __repr__ (line 63) | def __repr__(self): method __eq__ (line 66) | def __eq__(self, other): method __ne__ (line 69) | def __ne__(self, other): method __lt__ (line 72) | def __lt__(self, other): method __le__ (line 75) | def __le__(self, other): method __gt__ (line 78) | def __gt__(self, other): method __ge__ (line 81) | def __ge__(self, other): method in_ (line 84) | def in_(self, other): class Slots (line 87) | class Slots(object): method __getattr__ (line 88) | def __getattr__(self, attr): method __getitem__ (line 91) | def __getitem__(self, attr): function op_iter (line 94) | def op_iter(ops): class query_func (line 102) | class query_func(Slot): pass class lower (line 103) | class lower(query_func): pass class ip_network (line 104) | class ip_network(query_func): pass class base_url (line 105) | class base_url(query_func): pass class domain (line 106) | class domain(query_func): pass class year_func (line 107) | class year_func(query_func): pass class timeago (line 109) | class timeago(object): method __init__ (line 110) | def __init__(self, interval): method __repr__ (line 113) | def __repr__(self): class sort (line 116) | class sort(object): method __init__ (line 117) | def __init__(self, col): method __repr__ (line 120) | def __repr__(self): method __eq__ (line 123) | def __eq__(self, other): method __ne__ (line 126) | def __ne__(self, other): class asc (line 130) | class asc(sort): pass class desc (line 131) | class desc(sort):pass class shuffled (line 132) | class shuffled(desc): pass FILE: r2/r2/lib/db/queries.py function db_sort (line 88) | def db_sort(sort): function filter_identity (line 106) | def filter_identity(x): function filter_thing2 (line 109) | def filter_thing2(x): class CachedResults (line 115) | class CachedResults(object): method __init__ (line 118) | def __init__(self, query, filter): method get_query_iden (line 128) | def get_query_iden(cls, query): method sort (line 144) | def sort(self): method fetch (line 147) | def fetch(self, force=False, stale=False): method fetch_multi (line 152) | def fetch_multi(cls, crs, force=False, stale=False): method make_item_tuple (line 167) | def make_item_tuple(self, item): method can_insert (line 183) | def can_insert(self): method can_delete (line 204) | def can_delete(self): method _mutate (line 208) | def _mutate(self, fn, willread=True): method insert (line 217) | def insert(self, items): method _insert_tuples (line 222) | def _insert_tuples(self, tuples): method delete (line 257) | def delete(self, items): method _replace (line 268) | def _replace(self, tuples, lock=True): method update (line 281) | def update(self): method __repr__ (line 288) | def __repr__(self): method __iter__ (line 291) | def __iter__(self): class MergedCachedResults (line 297) | class MergedCachedResults(object): method __init__ (line 304) | def __init__(self, results): method __repr__ (line 324) | def __repr__(self): method __iter__ (line 327) | def __iter__(self): method update (line 331) | def update(self): function make_results (line 335) | def make_results(query, filter = filter_identity): function merge_results (line 338) | def merge_results(*results): function migrating_cached_query (line 343) | def migrating_cached_query(model, filter_fn=filter_identity): function get_deleted_links (line 362) | def get_deleted_links(user_id): function get_deleted_comments (line 370) | def get_deleted_comments(user_id): function get_deleted (line 378) | def get_deleted(user): function get_links (line 383) | def get_links(sr, sort, time): function _get_links (line 386) | def _get_links(sr_id, sort, time): function get_spam_links (line 400) | def get_spam_links(sr_id): function get_spam_comments (line 406) | def get_spam_comments(sr_id): function get_edited_comments (line 413) | def get_edited_comments(sr_id): function get_edited_links (line 418) | def get_edited_links(sr_id): function get_edited (line 423) | def get_edited(sr, user=None, include_links=True, include_comments=True): function moderated_srids (line 434) | def moderated_srids(sr, user): function get_spam (line 445) | def get_spam(sr, user=None, include_links=True, include_comments=True): function get_spam_filtered_links (line 456) | def get_spam_filtered_links(sr_id): function get_spam_filtered_comments (line 465) | def get_spam_filtered_comments(sr_id): function get_spam_filtered (line 472) | def get_spam_filtered(sr): function get_reported_links (line 477) | def get_reported_links(sr_id): function get_reported_comments (line 486) | def get_reported_comments(sr_id): function get_reported (line 496) | def get_reported(sr, user=None, include_links=True, include_comments=True): function get_unmoderated_links (line 507) | def get_unmoderated_links(sr_id): function get_modqueue (line 518) | def get_modqueue(sr, user=None, include_links=True, include_comments=True): function get_unmoderated (line 531) | def get_unmoderated(sr, user=None): function get_domain_links (line 536) | def get_domain_links(domain, sort, time): function user_query (line 546) | def user_query(kind, user_id, sort, time): function get_all_comments (line 555) | def get_all_comments(): function get_sr_comments (line 560) | def get_sr_comments(sr): function _get_sr_comments (line 563) | def _get_sr_comments(sr_id): function _get_comments (line 569) | def _get_comments(user_id, sort, time): function get_comments (line 572) | def get_comments(user, sort, time): function _get_submitted (line 575) | def _get_submitted(user_id, sort, time): function get_submitted (line 578) | def get_submitted(user, sort, time): function get_user_actions (line 582) | def get_user_actions(user, sort, time): function get_overview (line 602) | def get_overview(user, sort, time): function rel_query (line 606) | def rel_query(rel, thing_id, name, filters = []): function get_liked (line 624) | def get_liked(user): function get_disliked (line 628) | def get_disliked(user): function get_hidden_links (line 632) | def get_hidden_links(user_id): function get_hidden (line 635) | def get_hidden(user): function get_categorized_saved_links (line 639) | def get_categorized_saved_links(user_id, sr_id, category): function get_categorized_saved_comments (line 643) | def get_categorized_saved_comments(user_id, sr_id, category): function get_saved_links (line 647) | def get_saved_links(user_id, sr_id): function get_saved_comments (line 651) | def get_saved_comments(user_id, sr_id): function get_saved (line 654) | def get_saved(user, sr_id=None, category=None): function get_subreddit_messages (line 665) | def get_subreddit_messages(sr): function get_unread_subreddit_messages (line 669) | def get_unread_subreddit_messages(sr): function get_unread_subreddit_messages_multi (line 673) | def get_unread_subreddit_messages_multi(srs): function get_inbox_messages (line 681) | def get_inbox_messages(user): function get_unread_messages (line 685) | def get_unread_messages(user): function get_inbox_comments (line 691) | def get_inbox_comments(user): function get_unread_comments (line 695) | def get_unread_comments(user): function get_inbox_selfreply (line 700) | def get_inbox_selfreply(user): function get_unread_selfreply (line 704) | def get_unread_selfreply(user): function get_inbox_comment_mentions (line 710) | def get_inbox_comment_mentions(user): function get_unread_comment_mentions (line 715) | def get_unread_comment_mentions(user): function get_inbox (line 720) | def get_inbox(user): function get_sent (line 727) | def get_sent(user_id): function get_unread_inbox (line 732) | def get_unread_inbox(user): function _user_reported_query (line 738) | def _user_reported_query(user_id, thing_cls): function get_user_reported_links (line 746) | def get_user_reported_links(user_id): function get_user_reported_comments (line 750) | def get_user_reported_comments(user_id): function get_user_reported_messages (line 754) | def get_user_reported_messages(user_id): function get_user_reported (line 758) | def get_user_reported(user_id): function set_promote_status (line 764) | def set_promote_status(link, promote_status): function _promoted_link_query (line 805) | def _promoted_link_query(user_id, status): function get_unpaid_links (line 826) | def get_unpaid_links(user_id): function get_all_unpaid_links (line 831) | def get_all_unpaid_links(): function get_unapproved_links (line 836) | def get_unapproved_links(user_id): function get_all_unapproved_links (line 841) | def get_all_unapproved_links(): function get_rejected_links (line 846) | def get_rejected_links(user_id): function get_all_rejected_links (line 851) | def get_all_rejected_links(): function get_live_links (line 856) | def get_live_links(user_id): function get_all_live_links (line 861) | def get_all_live_links(): function get_accepted_links (line 866) | def get_accepted_links(user_id): function get_all_accepted_links (line 871) | def get_all_accepted_links(): function get_edited_live_links (line 876) | def get_edited_live_links(user_id): function get_all_edited_live_links (line 881) | def get_all_edited_live_links(): function get_payment_flagged_links (line 886) | def get_payment_flagged_links(): function set_payment_flagged_link (line 890) | def set_payment_flagged_link(link): function unset_payment_flagged_link (line 896) | def unset_payment_flagged_link(link): function get_underdelivered_campaigns (line 903) | def get_underdelivered_campaigns(): function set_underdelivered_campaigns (line 907) | def set_underdelivered_campaigns(campaigns): function unset_underdelivered_campaigns (line 914) | def unset_underdelivered_campaigns(campaigns): function get_promoted_links (line 922) | def get_promoted_links(user_id): function get_all_promoted_links (line 930) | def get_all_promoted_links(): function get_all_gilded_comments (line 938) | def get_all_gilded_comments(): function get_all_gilded_links (line 943) | def get_all_gilded_links(): function get_all_gilded (line 948) | def get_all_gilded(): function get_gilded_comments (line 953) | def get_gilded_comments(sr_id): function get_gilded_links (line 958) | def get_gilded_links(sr_id): function get_gilded (line 963) | def get_gilded(sr_ids): function get_gilded_user_comments (line 970) | def get_gilded_user_comments(user_id): function get_gilded_user_links (line 975) | def get_gilded_user_links(user_id): function get_gilded_users (line 980) | def get_gilded_users(user_ids): function get_user_gildings (line 987) | def get_user_gildings(user_id): function get_gilded_user (line 992) | def get_gilded_user(user): function add_queries (line 996) | def add_queries(queries, insert_items=None, delete_items=None): function all_queries (line 1026) | def all_queries(fn, obj, *param_lists): function new_link (line 1045) | def new_link(link): function add_to_commentstree_q (line 1067) | def add_to_commentstree_q(comment): function update_comment_notifications (line 1077) | def update_comment_notifications(comment, inbox_rels): function new_comment (line 1103) | def new_comment(comment, inbox_rels): function new_subreddit (line 1137) | def new_subreddit(sr): function new_message (line 1142) | def new_message(message, inbox_rels, add_to_sent=True, update_modmail=Tr... function set_unread (line 1194) | def set_unread(messages, user, unread, mutator=None): function update_unread_queries (line 1203) | def update_unread_queries(inbox_rels, insert=True, mutator=None): function set_sr_unread (line 1236) | def set_sr_unread(messages, sr, unread, mutator=None): function update_unread_sr_queries (line 1245) | def update_unread_sr_queries(inbox_rels, insert=True, mutator=None): function unread_handler (line 1265) | def unread_handler(things, user, unread): function unnotify (line 1304) | def unnotify(thing, possible_recipients=None): function renotify (line 1319) | def renotify(thing, possible_recipients=None): function notification_handler (line 1335) | def notification_handler(thing, notify_function, function _by_srid (line 1379) | def _by_srid(things, srs=True): function _by_author (line 1395) | def _by_author(things, authors=True): function _by_thing1_id (line 1409) | def _by_thing1_id(rels): function was_spam_filtered (line 1416) | def was_spam_filtered(thing): function delete (line 1424) | def delete(things): function edit (line 1479) | def edit(thing): function ban (line 1490) | def ban(things, filtered=True): function _common_del_ban (line 1546) | def _common_del_ban(things): function unban (line 1571) | def unban(things, insert=True): function new_report (line 1627) | def new_report(thing, report_rel): function clear_reports (line 1652) | def clear_reports(things, rels): function add_all_srs (line 1692) | def add_all_srs(): function update_user (line 1706) | def update_user(user): function add_all_users (line 1723) | def add_all_users(): function run_new_comments (line 1730) | def run_new_comments(limit=1000): function run_commentstree (line 1750) | def run_commentstree(qname="commentstree_q", limit=400): function _by_type (line 1768) | def _by_type(items): function get_stored_votes (line 1775) | def get_stored_votes(user, things): function get_likes (line 1794) | def get_likes(user, requested_items): function consume_mark_all_read (line 1855) | def consume_mark_all_read(): function consume_deleted_accounts (line 1867) | def consume_deleted_accounts(): FILE: r2/r2/lib/db/tdb_cassandra.py class CassandraException (line 85) | class CassandraException(Exception): class InvariantException (line 89) | class InvariantException(CassandraException): class ConfigurationException (line 93) | class ConfigurationException(CassandraException): class TdbException (line 98) | class TdbException(CassandraException): class NotFound (line 102) | class NotFound(CassandraException, NotFoundException): function will_write (line 107) | def will_write(fn): function get_manager (line 116) | def get_manager(seeds): class ThingMeta (line 121) | class ThingMeta(type): method __init__ (line 122) | def __init__(cls, name, bases, dct): method __repr__ (line 189) | def __repr__(cls): class ThingBase (line 193) | class ThingBase(object): method __init__ (line 275) | def __init__(self, _id = None, _committed = False, _partial = None, **... method _byID (line 300) | def _byID(cls, ids, return_dict=True, properties=None): method _fullname (line 392) | def _fullname(self): method _by_fullname (line 400) | def _by_fullname(cls, fnames, return_dict=True, ignore_missing=False): method _cache_prefix (line 428) | def _cache_prefix(cls): method _cache_key (line 431) | def _cache_key(self): method _cache_key_id (line 438) | def _cache_key_id(cls, t_id): method _wcl (line 442) | def _wcl(cls, wcl, default = None): method _rcl (line 449) | def _rcl(cls, rcl, default = None): method _get_column_validator (line 457) | def _get_column_validator(cls, colname): method _deserialize_column (line 462) | def _deserialize_column(cls, attr, val): method _serialize_column (line 486) | def _serialize_column(cls, attr, val): method _serialize_date (line 513) | def _serialize_date(cls, date): method _deserialize_date (line 517) | def _deserialize_date(cls, val): method _from_serialized_columns (line 531) | def _from_serialized_columns(cls, t_id, columns): method _from_columns (line 538) | def _from_columns(cls, t_id, columns): method _dirty (line 548) | def _dirty(self): method _commit (line 552) | def _commit(self, write_consistency_level = None): method _revert (line 637) | def _revert(self): method _destroy (line 645) | def _destroy(self): method __getattr__ (line 649) | def __getattr__(self, attr): method __setattr__ (line 671) | def __setattr__(self, attr, val): method __eq__ (line 688) | def __eq__(self, other): method __ne__ (line 697) | def __ne__(self, other): method _t (line 701) | def _t(self): method __getitem__ (line 719) | def __getitem__(self, key): method __setitem__ (line 722) | def __setitem__(self, key, value): method __delitem__ (line 725) | def __delitem__(self, key): method _get (line 736) | def _get(self, key, default = None): method _set_ttl (line 744) | def _set_ttl(self, key, ttl): method _on_create (line 749) | def _on_create(self): method _on_commit (line 755) | def _on_commit(self): method _all (line 760) | def _all(cls): method __repr__ (line 766) | def __repr__(self): method __del__ (line 782) | def __del__(self): class Thing (line 791) | class Thing(ThingBase): method _date (line 796) | def _date(self): class UuidThing (line 799) | class UuidThing(ThingBase): method __init__ (line 805) | def __init__(self, **kw): method _byID (line 809) | def _byID(cls, ids, **kw): method _cache_key_id (line 824) | def _cache_key_id(cls, t_id): function view_of (line 828) | def view_of(cls): class DenormalizedRelation (line 845) | class DenormalizedRelation(object): method value_for (line 871) | def value_for(cls, thing1, thing2, **kw): method create (line 877) | def create(cls, thing1, thing2s, **kw): method destroy (line 901) | def destroy(cls, thing1, thing2s): method fast_query (line 910) | def fast_query(cls, thing1, thing2s): class ColumnQuery (line 955) | class ColumnQuery(object): method __init__ (line 961) | def __init__(self, cls, rowkeys, column_start="", column_finish="", method combine (line 985) | def combine(queries): method default_column_to_obj (line 989) | def default_column_to_obj(columns): method default_obj_to_column (line 999) | def default_obj_to_column(objs): method _after (line 1011) | def _after(self, thing): method _after_id (line 1018) | def _after_id(self, column_name): method _reverse (line 1021) | def _reverse(self): method __iter__ (line 1025) | def __iter__(self, yield_column_names=False): method __repr__ (line 1094) | def __repr__(self): class MultiColumnQuery (line 1098) | class MultiColumnQuery(object): method __init__ (line 1099) | def __init__(self, queries, num, sort_key=None): method _after (line 1105) | def _after(self, thing): method _reverse (line 1109) | def _reverse(self): method __setattr__ (line 1113) | def __setattr__(self, attr, val): method __iter__ (line 1121) | def __iter__(self): class Query (line 1162) | class Query(object): method __init__ (line 1166) | def __init__(self, cls, after=None, properties=None, limit=100, method __copy__ (line 1175) | def __copy__(self): method _dump (line 1183) | def _dump(self): method __iter__ (line 1192) | def __iter__(self): class View (line 1215) | class View(ThingBase): method _rowkey (line 1228) | def _rowkey(cls, obj): method _obj_to_column (line 1235) | def _obj_to_column(cls, objs): method _column_to_obj (line 1248) | def _column_to_obj(cls, columns): method add_object (line 1260) | def add_object(cls, obj, **kw): method query (line 1267) | def query(cls, rowkeys, after=None, reverse=False, count=1000): method _values (line 1279) | def _values(self): method get_time_sorted_columns (line 1285) | def get_time_sorted_columns(cls, rowkey, limit=None): method _set_values (line 1294) | def _set_values(cls, row_key, col_values, method _remove (line 1329) | def _remove(cls, key, columns): class DenormalizedView (line 1333) | class DenormalizedView(View): method is_date_prop (line 1337) | def is_date_prop(cls, attr): method _thing_dumper (line 1344) | def _thing_dumper(cls, thing): method _thing_loader (line 1358) | def _thing_loader(cls, _id, dump): method _obj_to_column (line 1370) | def _obj_to_column(cls, objs): method _column_to_obj (line 1384) | def _column_to_obj(cls, columns): FILE: r2/r2/lib/db/tdb_lite.py class tdb_lite (line 26) | class tdb_lite(object): method __init__ (line 27) | def __init__(self, gc): method make_metadata (line 30) | def make_metadata(self, engine): method index_str (line 35) | def index_str(self, table, name, on, where = None): method create_table (line 43) | def create_table(self, table, index_commands=None): method py2db (line 53) | def py2db(self, val, return_kind=False): method db2py (line 72) | def db2py(self, val, kind): FILE: r2/r2/lib/db/tdb_sql.py class TransactionSet (line 53) | class TransactionSet(threading.local): method __init__ (line 70) | def __init__(self): method begin (line 74) | def begin(self): method add_engine (line 78) | def add_engine(self, engine): method commit (line 87) | def commit(self): method rollback (line 95) | def rollback(self): method _clear (line 103) | def _clear(self): function make_metadata (line 113) | def make_metadata(engine): function create_table (line 118) | def create_table(table, index_commands=None): function index_str (line 128) | def index_str(table, name, on, where = None, unique = False): function index_commands (line 141) | def index_commands(table, type): function get_type_table (line 175) | def get_type_table(metadata): function get_rel_type_table (line 181) | def get_rel_type_table(metadata): function get_thing_table (line 189) | def get_thing_table(metadata, name): function get_data_table (line 212) | def get_data_table(metadata, name): function get_rel_table (line 222) | def get_rel_table(metadata, name): function make_type_table (line 235) | def make_type_table(): function make_rel_type_table (line 242) | def make_rel_type_table(): class ConfigurationError (line 255) | class ConfigurationError(Exception): function check_type (line 258) | def check_type(table, name, insert_vals): function build_thing_tables (line 278) | def build_thing_tables(): function build_rel_tables (line 310) | def build_rel_tables(): function get_write_table (line 356) | def get_write_table(tables): function add_request_info (line 362) | def add_request_info(select): function get_table (line 383) | def get_table(kind, action, tables, avoid_master_reads = False): function get_thing_table (line 402) | def get_thing_table(type_id, action = 'read' ): function get_rel_table (line 407) | def get_rel_table(rel_type_id, action = 'read'): function make_thing (line 414) | def make_thing(type_id, ups, downs, date, deleted, spam, id=None): function set_thing_props (line 445) | def set_thing_props(type_id, thing_id, **props): function incr_thing_prop (line 460) | def incr_thing_prop(type_id, thing_id, prop, amount): class CreationError (line 471) | class CreationError(Exception): pass function make_relation (line 475) | def make_relation(rel_type_id, thing1_id, thing2_id, name, date=None): function set_rel_props (line 493) | def set_rel_props(rel_type_id, rel_id, **props): function py2db (line 506) | def py2db(val, return_kind=False): function db2py (line 525) | def db2py(val, kind): function update_data (line 541) | def update_data(table, thing_id, **vals): function create_data (line 561) | def create_data(table, thing_id, **vals): function incr_data_prop (line 574) | def incr_data_prop(table, type_id, thing_id, prop, amount): function fetch_query (line 582) | def fetch_query(table, id_col, thing_id): function get_data (line 602) | def get_data(table, thing_id): function set_thing_data (line 618) | def set_thing_data(type_id, thing_id, brand_new_thing, **vals): function incr_thing_data (line 626) | def incr_thing_data(type_id, thing_id, prop, amount): function get_thing_data (line 630) | def get_thing_data(type_id, thing_id): function get_thing (line 634) | def get_thing(type_id, thing_id): function set_rel_data (line 657) | def set_rel_data(rel_type_id, thing_id, brand_new_thing, **vals): function incr_rel_data (line 665) | def incr_rel_data(rel_type_id, thing_id, prop, amount): function get_rel_data (line 669) | def get_rel_data(rel_type_id, rel_id): function get_rel (line 673) | def get_rel(rel_type_id, rel_id): function del_rel (line 689) | def del_rel(rel_type_id, rel_id): function sa_op (line 700) | def sa_op(op): function translate_sort (line 732) | def translate_sort(table, column_name, lval = None, rewrite_name = True): function add_sort (line 754) | def add_sort(sort, t_table, select): function translate_thing_value (line 799) | def translate_thing_value(rval): function find_things (line 806) | def find_things(type_id, sort, limit, offset, constraints): function translate_data_value (line 839) | def translate_data_value(alias, op): function find_data (line 856) | def find_data(type_id, sort, limit, offset, constraints): function sort_thing_ids_by_data_value (line 926) | def sort_thing_ids_by_data_value(type_id, thing_ids, value_name, function find_rels (line 960) | def find_rels(ret_props, rel_type_id, sort, limit, offset, constraints): FILE: r2/r2/lib/db/thing.py class NotFound (line 40) | class NotFound(Exception): class SafeSetAttr (line 50) | class SafeSetAttr: method __init__ (line 51) | def __init__(self, cls): method __enter__ (line 54) | def __enter__(self): method __exit__ (line 57) | def __exit__(self, type, value, tb): class TdbTransactionContext (line 61) | class TdbTransactionContext(object): method __enter__ (line 62) | def __enter__(self): method __exit__ (line 65) | def __exit__(self, exc_type, exc_value, traceback): class DataThing (line 73) | class DataThing(object): method __init__ (line 85) | def __init__(self): method __setattr__ (line 94) | def __setattr__(self, attr, val, make_dirty=True): method __setstate__ (line 112) | def __setstate__(self, state): method __getattr__ (line 120) | def __getattr__(self, attr): method _cache_prefix (line 154) | def _cache_prefix(cls): method _cache_key (line 157) | def _cache_key(self): method get_things_from_db (line 162) | def get_things_from_db(cls, ids): method get_things_from_cache (line 167) | def get_things_from_cache(cls, ids, stale=False, allow_local=True): method write_things_to_cache (line 177) | def write_things_to_cache(cls, things_by_id): method get_read_modify_write_lock (line 193) | def get_read_modify_write_lock(self): method write_new_thing_to_db (line 204) | def write_new_thing_to_db(self): method write_props_to_db (line 208) | def write_props_to_db(self, props, data_props, brand_new_thing): method write_changes_to_db (line 212) | def write_changes_to_db(self, changes, brand_new_thing=False): method write_thing_to_cache (line 227) | def write_thing_to_cache(self, lock, brand_new_thing=False): method update_from_cache (line 241) | def update_from_cache(self, lock): method record_cache_write (line 274) | def record_cache_write(cls, event, delta=1): method _commit (line 277) | def _commit(self): method _incr (line 344) | def _incr(self, prop, amt=1): method _id36 (line 348) | def _id36(self): method _fullname_prefix (line 352) | def _fullname_prefix(cls): method _fullname_from_id36 (line 356) | def _fullname_from_id36(cls, id36): method _fullname (line 360) | def _fullname(self): method _byID (line 364) | def _byID(cls, ids, data=True, return_dict=True, stale=False, method _byID36 (line 416) | def _byID36(cls, id36s, return_dict = True, **kw): method _by_fullname (line 434) | def _by_fullname(cls, names, method _dirty (line 485) | def _dirty(self): method _query (line 489) | def _query(cls, *a, **kw): class ThingMeta (line 493) | class ThingMeta(type): method __init__ (line 494) | def __init__(cls, name, bases, dct): method __repr__ (line 511) | def __repr__(cls): class Thing (line 514) | class Thing(DataThing): method __init__ (line 522) | def __init__(self, ups = 0, downs = 0, date = None, deleted = False, method record_cache_write (line 547) | def record_cache_write(cls, event, delta=1): method __repr__ (line 552) | def __repr__(self): method get_things_from_db (line 557) | def get_things_from_db(cls, ids): method write_new_thing_to_db (line 588) | def write_new_thing_to_db(self): method write_props_to_db (line 602) | def write_props_to_db(self, props, data_props, brand_new_thing): method _incr (line 621) | def _incr(self, prop, amt=1): method _age (line 673) | def _age(self): method _hot (line 677) | def _hot(self): method _score (line 681) | def _score(self): method _controversy (line 685) | def _controversy(self): method _confidence (line 689) | def _confidence(self): method num_votes (line 693) | def num_votes(self): method is_distinguished (line 697) | def is_distinguished(self): method _query (line 707) | def _query(cls, *all_rules, **kw): method sort_ids_by_data_value (line 739) | def sort_ids_by_data_value(cls, thing_ids, value_name, method update_search_index (line 744) | def update_search_index(self, boost_only=False): class RelationMeta (line 754) | class RelationMeta(type): method __init__ (line 755) | def __init__(cls, name, bases, dct): method __repr__ (line 773) | def __repr__(cls): function Relation (line 776) | def Relation(type1, type2): class Query (line 1084) | class Query(object): method __init__ (line 1085) | def __init__(self, kind, *rules, **kw): method _setsort (line 1100) | def _setsort(self, sorts): method _getsort (line 1117) | def _getsort(self): method _reverse (line 1122) | def _reverse(self): method _list (line 1129) | def _list(self, data=True): method _dir (line 1132) | def _dir(self, thing, reverse): method _before (line 1166) | def _before(self, thing): method _after (line 1169) | def _after(self, thing): method _filter (line 1172) | def _filter(*a, **kw): method _cursor (line 1175) | def _cursor(*a, **kw): method _cache_key (line 1178) | def _cache_key(self): method _get_results (line 1192) | def _get_results(self): method get_from_cache (line 1196) | def get_from_cache(self, allow_local=True): method set_to_cache (line 1204) | def set_to_cache(self, things): method __iter__ (line 1208) | def __iter__(self): class Things (line 1236) | class Things(Query): method __init__ (line 1237) | def __init__(self, kind, *rules, **kw): method _filter (line 1241) | def _filter(self, *rules): method _cursor (line 1249) | def _cursor(self): function load_things (line 1269) | def load_things(rels, stale=False): class Relations (line 1287) | class Relations(Query): method __init__ (line 1288) | def __init__(self, kind, *rules, **kw): method _filter (line 1293) | def _filter(self, *rules): method _eager (line 1297) | def _eager(self, eager): method _make_rel (line 1302) | def _make_rel(self, rows): method _cursor (line 1309) | def _cursor(self): class RelationsPropsOnly (line 1321) | class RelationsPropsOnly(Relations): method __init__ (line 1322) | def __init__(self, kind, props, *rules, **kw): method _cursor (line 1326) | def _cursor(self): method _cache_key (line 1337) | def _cache_key(self): method _get_results (line 1352) | def _get_results(self): method get_from_cache (line 1356) | def get_from_cache(self, allow_local=True): method set_to_cache (line 1359) | def set_to_cache(self, rows): class MultiCursor (line 1363) | class MultiCursor(object): method __init__ (line 1364) | def __init__(self, *execute_params): method fetchone (line 1368) | def fetchone(self): method fetchall (line 1374) | def fetchall(self): class MergeCursor (line 1380) | class MergeCursor(MultiCursor): method _execute (line 1381) | def _execute(self, cursors, sorts): class MultiQuery (line 1437) | class MultiQuery(Query): method __init__ (line 1438) | def __init__(self, queries, *rules, **kw): method get_from_cache (line 1445) | def get_from_cache(self): method set_to_cache (line 1448) | def set_to_cache(self): method _cursor (line 1451) | def _cursor(self): method _reverse (line 1454) | def _reverse(self): method _setdata (line 1458) | def _setdata(self, data): method _getdata (line 1461) | def _getdata(self): method _setsort (line 1466) | def _setsort(self, sorts): method _getsort (line 1470) | def _getsort(self): method _filter (line 1476) | def _filter(self, *rules): method _getrules (line 1480) | def _getrules(self): method _setrules (line 1483) | def _setrules(self, rules): method _getlimit (line 1489) | def _getlimit(self): method _setlimit (line 1492) | def _setlimit(self, limit): class Merge (line 1499) | class Merge(MultiQuery): method _cursor (line 1500) | def _cursor(self): function MultiRelation (line 1509) | def MultiRelation(name, *relations): FILE: r2/r2/lib/db/userrel.py class UserRelManager (line 30) | class UserRelManager(object): method __init__ (line 33) | def __init__(self, name, relation, permission_class): method get (line 38) | def get(self, thing, user): method add (line 46) | def add(self, thing, user, permissions=None, **attrs): method remove (line 61) | def remove(self, thing, user): method mutate (line 68) | def mutate(self, thing, user, **attrs): method ids (line 79) | def ids(self, thing): method reverse_ids (line 88) | def reverse_ids(self, user): method by_thing (line 96) | def by_thing(self, thing): class MemoizedUserRelManager (line 109) | class MemoizedUserRelManager(UserRelManager): method __init__ (line 112) | def __init__(self, name, relation, permission_class, method _update_caches (line 128) | def _update_caches(self, thing, user): method _update_caches_on_success (line 134) | def _update_caches_on_success(self, method): function UserRel (line 147) | def UserRel(name, relation, disable_ids_fn=False, disable_reverse_ids_fn... function MigratingUserRel (line 186) | def MigratingUserRel(name, relation, disable_ids_fn=False, FILE: r2/r2/lib/einhorn.py class EinhornSyncWorker (line 57) | class EinhornSyncWorker(SyncWorker): method __init__ (line 58) | def __init__(self, cfg, app): method init_signals (line 70) | def init_signals(self): method start_graceful_shutdown (line 78) | def start_graceful_shutdown(self, signal_number, frame): function run_gunicorn_worker (line 84) | def run_gunicorn_worker(): FILE: r2/r2/lib/emailer.py function _system_email (line 45) | def _system_email(email, plaintext_body, kind, reply_to="", function _ads_email (line 64) | def _ads_email(body, from_name, kind): function _fraud_email (line 71) | def _fraud_email(body, kind): function _community_email (line 78) | def _community_email(body, kind): function verify_email (line 85) | def verify_email(user, dest=None): function password_email (line 106) | def password_email(user): function message_notification_email (line 141) | def message_notification_email(data): function generate_notification_email_unsubscribe_token (line 186) | def generate_notification_email_unsubscribe_token(user_id36, user_email=... function password_change_email (line 211) | def password_change_email(user): function email_change_email (line 221) | def email_change_email(user): function community_email (line 229) | def community_email(body, kind): function ads_email (line 233) | def ads_email(body, from_name=g.domain): function share (line 237) | def share(link, emails, from_name = "", reply_to = "", body = ""): function send_queued_mail (line 247) | def send_queued_mail(test = False): function opt_out (line 319) | def opt_out(msg_hash): function opt_in (line 327) | def opt_in(msg_hash): function _promo_email (line 336) | def _promo_email(thing, kind, body = "", **kw): function new_promo (line 350) | def new_promo(thing): function promo_total_budget (line 353) | def promo_total_budget(thing, total_budget_dollars, start_date): function accept_promo (line 357) | def accept_promo(thing): function reject_promo (line 360) | def reject_promo(thing, reason = ""): function edited_live_promo (line 363) | def edited_live_promo(thing): function queue_promo (line 366) | def queue_promo(thing, total_budget_dollars, trans_id): function live_promo (line 370) | def live_promo(thing): function finished_promo (line 373) | def finished_promo(thing): function refunded_promo (line 377) | def refunded_promo(thing): function void_payment (line 381) | def void_payment(thing, campaign, total_budget_dollars, reason): function fraud_alert (line 387) | def fraud_alert(body): function suspicious_payment (line 390) | def suspicious_payment(user, link): function send_html_email (line 399) | def send_html_email(to_addr, from_addr, subject, html, FILE: r2/r2/lib/embeds.py function get_inject_template (line 30) | def get_inject_template(omitscript=False): function edited_after (line 42) | def edited_after(thing, iso_timestamp, showedits): function prepare_embed_request (line 59) | def prepare_embed_request(): function set_up_comment_embed (line 80) | def set_up_comment_embed(sr, thing, showedits): function is_embed (line 110) | def is_embed(): FILE: r2/r2/lib/emr_helpers.py function get_live_clusters (line 35) | def get_live_clusters(emr_connection): function get_step_states (line 41) | def get_step_states(emr_connection, jobflowid): function get_step_state (line 62) | def get_step_state(emr_connection, jobflowid, step_name, update=False): function get_jobflow_id (line 80) | def get_jobflow_id(emr_connection, name): function terminate_jobflow (line 92) | def terminate_jobflow(emr_connection, jobflow_name): function modify_slave_count (line 98) | def modify_slave_count(emr_connection, jobflow_name, num_slaves=1): class EmrJob (line 119) | class EmrJob(object): method __init__ (line 120) | def __init__(self, emr_connection, name, steps=[], setup_steps=[], method run (line 148) | def run(self): method terminate (line 172) | def terminate(self): method modify_slave_count (line 175) | def modify_slave_count(self, num_slaves=1): class EmrException (line 179) | class EmrException(Exception): method __init__ (line 180) | def __init__(self, msg): method __str__ (line 183) | def __str__(self): FILE: r2/r2/lib/errors.py function add_error_codes (line 197) | def add_error_codes(new_codes): class RedditError (line 209) | class RedditError(Exception): method __init__ (line 214) | def __init__(self, name=None, msg_params=None, fields=None, code=None): method message (line 231) | def message(self): method __iter__ (line 234) | def __iter__(self): method __repr__ (line 238) | def __repr__(self): method __str__ (line 241) | def __str__(self): class ErrorSet (line 245) | class ErrorSet(object): method __init__ (line 246) | def __init__(self): method __contains__ (line 249) | def __contains__(self, pair): method get (line 254) | def get(self, name, default=None): method get_first (line 257) | def get_first(self, field_name, *error_names): method __getitem__ (line 265) | def __getitem__(self, name): method __repr__ (line 268) | def __repr__(self): method __iter__ (line 271) | def __iter__(self): method __len__ (line 275) | def __len__(self): method add (line 278) | def add(self, error_name, msg_params=None, field=None, code=None): method add_error (line 284) | def add_error(self, error): method remove (line 288) | def remove(self, pair): class ForbiddenError (line 295) | class ForbiddenError(HTTPForbidden): method __init__ (line 296) | def __init__(self, error_name): class BadRequestError (line 301) | class BadRequestError(HTTPBadRequest): method __init__ (line 302) | def __init__(self, error_name): function reddit_http_error (line 311) | def reddit_http_error(code=400, error_name='UNKNOWN_ERROR', **data): class UserRequiredException (line 326) | class UserRequiredException(RedditError): class VerifiedUserRequiredException (line 331) | class VerifiedUserRequiredException(RedditError): class MessageError (line 336) | class MessageError(Exception): pass FILE: r2/r2/lib/eventcollector.py function _make_http_date (line 57) | def _make_http_date(when=None): function parse_agent (line 67) | def parse_agent(ua): class EventQueue (line 83) | class EventQueue(object): method __init__ (line 84) | def __init__(self, queue=amqp): method save_event (line 87) | def save_event(self, event): method vote_event (line 103) | def vote_event(self, vote): method submit_event (line 161) | def submit_event(self, new_post, request=None, context=None): method comment_event (line 197) | def comment_event(self, new_comment, request=None, context=None): method cache_poisoning_event (line 243) | def cache_poisoning_event(self, poison_info, request=None, context=None): method muted_forbidden_event (line 304) | def muted_forbidden_event(self, details_text, subreddit=None, method timeout_forbidden_event (line 335) | def timeout_forbidden_event(self, action_name, details_text, method mod_event (line 431) | def mod_event(self, modaction, subreddit, mod, target=None, method report_event (line 468) | def report_event(self, reason=None, details_text=None, method quarantine_event (line 506) | def quarantine_event(self, event_type, subreddit, method modmail_event (line 552) | def modmail_event(self, message, request=None, context=None): method message_event (line 627) | def message_event(self, message, event_type="ss.send_message", method loid_event (line 692) | def loid_event(self, loid, action_name, request=None, context=None): method login_event (line 709) | def login_event(self, action_name, error_msg, method bucketing_event (line 758) | def bucketing_event( method page_bucketing_event (line 784) | def page_bucketing_event( class Event (line 811) | class Event(object): method __init__ (line 812) | def __init__(self, topic, event_type, method add (line 862) | def add(self, field, value, obfuscate=False): method add_text (line 874) | def add_text(self, key, value, obfuscate=False): method add_target_fields (line 879) | def add_target_fields(self, target): method add_subreddit_fields (line 930) | def add_subreddit_fields(self, subreddit): method get (line 937) | def get(self, field, obfuscated=False): method get_context_data (line 944) | def get_context_data(self, request, context): method get_sensitive_context_data (line 987) | def get_sensitive_context_data(self, request, context): method dump (line 1002) | def dump(self): class PublishableEvent (line 1017) | class PublishableEvent(object): method __init__ (line 1018) | def __init__(self, data, truncatable_field=None): method __len__ (line 1022) | def __len__(self): method truncate_data (line 1025) | def truncate_data(self, target_len): class EventPublisher (line 1051) | class EventPublisher(object): method __init__ (line 1059) | def __init__(self, url, signature_key, secret, user_agent, stats, method _make_signature (line 1073) | def _make_signature(self, payload): method _publish (line 1077) | def _publish(self, events): method _chunk_events (line 1104) | def _chunk_events(self, events): method publish (line 1145) | def publish(self, events): function _get_reason (line 1154) | def _get_reason(response): function process_events (line 1159) | def process_events(g, timeout=5.0, **kw): FILE: r2/r2/lib/export.py class ExportError (line 28) | class ExportError(Exception): method __init__ (line 29) | def __init__(self, module): function export (line 36) | def export(exported_entity): FILE: r2/r2/lib/filters.py function python_websafe (line 53) | def python_websafe(text): function python_websafe_json (line 56) | def python_websafe_json(text): function spaceCompress (line 62) | def spaceCompress(text): function spaceCompress (line 75) | def spaceCompress(content): class _Unsafe (line 94) | class _Unsafe(unicode): method cache_key (line 96) | def cache_key(self, style): function unsafe (line 100) | def unsafe(text=''): function websafe_json (line 103) | def websafe_json(text=""): function double_websafe (line 106) | def double_websafe(text=""): function conditional_websafe (line 110) | def conditional_websafe(text = ''): function mako_websafe (line 126) | def mako_websafe(text=''): function websafe (line 131) | def websafe(text=''): function jssafe (line 156) | def jssafe(text=u''): function scriptsafe_dumps (line 171) | def scriptsafe_dumps(obj, **kwargs): function markdown_souptest (line 192) | def markdown_souptest(text, nofollow=False, target=None, renderer='reddi... function safemarkdown (line 205) | def safemarkdown(text, nofollow=False, wrap=True, **kwargs): function wikimarkdown (line 217) | def wikimarkdown(text, include_toc=True, target=None): function generate_table_of_contents (line 270) | def generate_table_of_contents(soup, prefix): function keep_space (line 330) | def keep_space(text): function unkeep_space (line 337) | def unkeep_space(text): FILE: r2/r2/lib/generate_strings.py function generate_strings (line 30) | def generate_strings(): FILE: r2/r2/lib/geoip.py function _location_by_ips (line 44) | def _location_by_ips(ips): function _organization_by_ips (line 69) | def _organization_by_ips(ips): function location_by_ips (line 91) | def location_by_ips(ips): function organization_by_ips (line 107) | def organization_by_ips(ips): function get_request_location (line 123) | def get_request_location(request, context): FILE: r2/r2/lib/gzipper.py class GzipMiddleware (line 43) | class GzipMiddleware(object): method __init__ (line 58) | def __init__(self, app, compression_level, min_size): method _start_response (line 63) | def _start_response(self, status, response_headers, exc_info=None): method _write_not_implemented (line 70) | def _write_not_implemented(*args, **kwargs): method content_length (line 79) | def content_length(headers, app_iter): method should_gzip_response (line 102) | def should_gzip_response(self, headers, app_iter): method update_vary_header (line 129) | def update_vary_header(headers): method request_accepts_gzip (line 146) | def request_accepts_gzip(environ): method __call__ (line 150) | def __call__(self, environ, start_response): function make_gzip_middleware (line 188) | def make_gzip_middleware(app, global_conf=None, compress_level=9, min_si... FILE: r2/r2/lib/hadoop_decompress.py class HadoopStreamDecompressor (line 28) | class HadoopStreamDecompressor(object): method __init__ (line 42) | def __init__(self): method decompress (line 48) | def decompress(self, data): method _decompress_block (line 61) | def _decompress_block(self): method _decompress_subblock (line 81) | def _decompress_subblock(self): method flush (line 97) | def flush(self): method copy (line 102) | def copy(self): function hadoop_decompress (line 111) | def hadoop_decompress(src, dst, blocksize=snappy._STREAM_TO_STREAM_BLOCK... FILE: r2/r2/lib/hardcachebackend.py function expiration_from_time (line 35) | def expiration_from_time(time): class HardCacheBackend (line 40) | class HardCacheBackend(object): method __init__ (line 41) | def __init__(self, gc): method engine_by_category (line 91) | def engine_by_category(self, category, type="master"): method profile_start (line 102) | def profile_start(self, operation, category): method profile_stop (line 119) | def profile_stop(self, t): method set (line 141) | def set(self, category, ids, val, time): method add (line 163) | def add(self, category, ids, val, time=0): method incr (line 189) | def incr(self, category, ids, time=0, delta=1): method get (line 225) | def get(self, category, ids, force_write_table=False): method get_multi (line 252) | def get_multi(self, category, idses): method delete (line 277) | def delete(self, category, ids): method ids_by_category (line 285) | def ids_by_category(self, category, limit=1000): method clause_from_expiration (line 296) | def clause_from_expiration(self, engine, expiration): method expired (line 304) | def expired(self, engine, expiration_clause, limit=1000): method delete_if_expired (line 315) | def delete_if_expired(self, category, ids, expiration="now"): function delete_expired (line 325) | def delete_expired(expiration="now", limit=5000): FILE: r2/r2/lib/hooks.py function all_hooks (line 53) | def all_hooks(): class Hook (line 58) | class Hook(object): method __init__ (line 60) | def __init__(self): method register_handler (line 63) | def register_handler(self, handler): method call (line 67) | def call(self, **kwargs): method call_until_return (line 76) | def call_until_return(self, **kwargs): function get_hook (line 90) | def get_hook(name): class HookRegistrar (line 97) | class HookRegistrar(object): method __init__ (line 104) | def __init__(self): method on (line 108) | def on(self, name): method register_all (line 121) | def register_all(self): FILE: r2/r2/lib/inventory.py function update_prediction_data (line 62) | def update_prediction_data(): function _min_daily_pageviews_by_sr (line 77) | def _min_daily_pageviews_by_sr(ndays=NDAYS_TO_QUERY, end_date=None): function get_date_range (line 101) | def get_date_range(start, end): function get_campaigns_by_date (line 107) | def get_campaigns_by_date(srs, start, end, ignore=None): function get_predicted_pageviews (line 152) | def get_predicted_pageviews(srs, location=None): function make_target_name (line 198) | def make_target_name(target): function find_campaigns (line 204) | def find_campaigns(srs, start, end, ignore): function get_available_pageviews (line 224) | def get_available_pageviews(targets, start, end, location=None, datestr=... function get_oversold (line 320) | def get_oversold(target, start, end, daily_request, ignore=None, locatio... FILE: r2/r2/lib/inventory_optimization.py class SimpleCampaign (line 27) | class SimpleCampaign(object): method __init__ (line 28) | def __init__(self, name, target_names, impressions): method __repr__ (line 33) | def __repr__(self): class SimpleTarget (line 39) | class SimpleTarget(object): method __init__ (line 40) | def __init__(self, name, impressions): method __repr__ (line 44) | def __repr__(self): class System (line 49) | class System(object): method __init__ (line 56) | def __init__(self, campaigns, targets, priority_target_names): method __repr__ (line 60) | def __repr__(self): method combine_campaigns (line 67) | def combine_campaigns(self, campaigns): method reduce_campaigns (line 88) | def reduce_campaigns(self, campaigns, targets): method reduce_targets (line 112) | def reduce_targets(self, campaigns, targets): method simplify (line 169) | def simplify(self, campaigns, targets): method get_free_impressions (line 187) | def get_free_impressions(self): function campaign_to_simple_campaign (line 295) | def campaign_to_simple_campaign(campaign): function get_maximized_pageviews (line 302) | def get_maximized_pageviews(priority_sr_names, booked_by_target, function run_tests (line 314) | def run_tests(): FILE: r2/r2/lib/ip_events.py function ips_by_account_id (line 8) | def ips_by_account_id(account_id, limit=None): function account_ids_by_ip (line 29) | def account_ids_by_ip(ip, after=None, before=None, limit=1000): FILE: r2/r2/lib/js.py class Uglify (line 50) | class Uglify(object): method compile (line 51) | def compile(self, data, dest): class Source (line 64) | class Source(object): method get_source (line 66) | def get_source(self, **kwargs): method use (line 70) | def use(self, **kwargs): method dependencies (line 75) | def dependencies(self): method outputs (line 79) | def outputs(self): class FileSource (line 83) | class FileSource(Source): method __init__ (line 85) | def __init__(self, name): method __eq__ (line 88) | def __eq__(self, other): method get_source (line 91) | def get_source(self, use_built_statics=False): method url (line 105) | def url(self, absolute=False, mangle_name=False): method use (line 113) | def use(self, **kwargs): method dependencies (line 117) | def dependencies(self): class Module (line 123) | class Module(Source): method __init__ (line 125) | def __init__(self, name, *sources, **kwargs): method get_default_source (line 143) | def get_default_source(self, source): method get_flattened_sources (line 146) | def get_flattened_sources(self, flattened_sources): method get_source (line 159) | def get_source(self, use_built_statics=False): method extend (line 166) | def extend(self, module): method destination_path (line 170) | def destination_path(self): method build (line 174) | def build(self, minifier): method url (line 188) | def url(self, absolute=False, mangle_name=True): method use (line 195) | def use(self, **kwargs): method dependencies (line 203) | def dependencies(self): method outputs (line 210) | def outputs(self): class DataSource (line 214) | class DataSource(Source): method __init__ (line 216) | def __init__(self, wrap, data=None): method get_content (line 220) | def get_content(self, **kw): method get_source (line 223) | def get_source(self, use_built_statics=False): method use (line 228) | def use(self): method dependencies (line 235) | def dependencies(self): class PermissionsDataSource (line 239) | class PermissionsDataSource(DataSource): method __init__ (line 242) | def __init__(self, permission_sets): method _make_marked_json (line 246) | def _make_marked_json(cls, obj): method get_source (line 264) | def get_source(self, **kw): method dependencies (line 271) | def dependencies(self): class TemplateFileSource (line 278) | class TemplateFileSource(DataSource, FileSource): method __init__ (line 280) | def __init__(self, name, wrap="r.templates.set({content})"): method get_content (line 285) | def get_content(self, use_built_statics=False): class LocaleSpecificSource (line 302) | class LocaleSpecificSource(object): method get_localized_source (line 303) | def get_localized_source(self, lang): class StringsSource (line 307) | class StringsSource(LocaleSpecificSource): method __init__ (line 310) | def __init__(self, keys): method _check_formatting_specifiers (line 314) | def _check_formatting_specifiers(self, string): method get_localized_source (line 321) | def get_localized_source(self, lang): class PluralForms (line 343) | class PluralForms(LocaleSpecificSource): method get_localized_source (line 344) | def get_localized_source(self, lang): class LocalizedModule (line 350) | class LocalizedModule(Module): method __init__ (line 359) | def __init__(self, *args, **kwargs): method languagize_path (line 368) | def languagize_path(path, lang): method build (line 372) | def build(self, minifier): method use (line 399) | def use(self, **kwargs): method outputs (line 425) | def outputs(self): function src (line 741) | def src(*names, **kwargs): function use (line 758) | def use(*names, **kwargs): function load_plugin_modules (line 762) | def load_plugin_modules(plugins=None): function build_command (line 770) | def build_command(fn): function enumerate_modules (line 779) | def enumerate_modules(): function dependencies (line 785) | def dependencies(name): function enumerate_outputs (line 791) | def enumerate_outputs(*names): function build_module (line 803) | def build_module(name): FILE: r2/r2/lib/jsonresponse.py class JsonResponse (line 37) | class JsonResponse(object): method __init__ (line 46) | def __init__(self): method _clear (line 49) | def _clear(self): method send_failure (line 55) | def send_failure(self, error): method __call__ (line 60) | def __call__(self, *a, **kw): method __getattr__ (line 63) | def __getattr__(self, key): method make_response (line 66) | def make_response(self): method set_error (line 77) | def set_error(self, error_name, field_name): method has_error (line 80) | def has_error(self): method has_errors (line 83) | def has_errors(self, field_name, *errors, **kw): method process_rendered (line 93) | def process_rendered(self, res): method _things (line 96) | def _things(self, things, action, *a, **kw): method insert_things (line 114) | def insert_things(self, things, append = False, **kw): method replace_things (line 117) | def replace_things(self, things, keep_children = False, method _send_data (line 122) | def _send_data(self, **kw): method new_captcha (line 125) | def new_captcha(self): method ratelimit (line 128) | def ratelimit(self, seconds): class JQueryResponse (line 132) | class JQueryResponse(JsonResponse): method __init__ (line 144) | def __init__(self, top_node = None): method _clear (line 152) | def _clear(self): method process_rendered (line 161) | def process_rendered(self, res): method send_failure (line 167) | def send_failure(self, error): method __call__ (line 173) | def __call__(self, *a): method __getattr__ (line 176) | def __getattr__(self, key): method transform (line 180) | def transform(self, obj, op, args): method set_error (line 186) | def set_error(self, error_name, field_name): method has_error (line 192) | def has_error(self): method make_response (line 195) | def make_response(self): method _things (line 209) | def _things(self, things, action, *a, **kw): method insert_table_rows (line 214) | def insert_table_rows(self, rows, index = -1): method new_captcha (line 227) | def new_captcha(self): method get_input (line 232) | def get_input(self, name): method set_inputs (line 235) | def set_inputs(self, **kw): method focus_input (line 242) | def focus_input(self, name): method set_html (line 245) | def set_html(self, selector, value): method set_text (line 250) | def set_text(self, selector, value): method set (line 255) | def set(self, **kw): method refresh (line 261) | def refresh(self): FILE: r2/r2/lib/jsontemplates.py function make_typename (line 52) | def make_typename(typ): function make_fullname (line 55) | def make_fullname(typ, _id): class ObjectTemplate (line 59) | class ObjectTemplate(StringTemplate): method __init__ (line 60) | def __init__(self, d): method update (line 63) | def update(self, kw): method finalize (line 78) | def finalize(self, kw = {}): class JsonTemplate (line 82) | class JsonTemplate(Template): method __init__ (line 83) | def __init__(self): pass method render (line 85) | def render(self, thing = None, *a, **kw): class TakedownJsonTemplate (line 89) | class TakedownJsonTemplate(JsonTemplate): method render (line 90) | def render(self, thing = None, *a, **kw): class ThingTemplate (line 94) | class ThingTemplate(object): method render (line 96) | def render(cls, thing): method get_kind (line 125) | def get_kind(cls, item): method get_json (line 130) | def get_json(cls, item): method get_rendered (line 141) | def get_rendered(cls, item, render_style): class ThingJsonTemplate (line 149) | class ThingJsonTemplate(JsonTemplate): method data_attrs (line 158) | def data_attrs(cls, **kw): method kind (line 163) | def kind(self, wrapped): method rendered_data (line 171) | def rendered_data(self, thing): method raw_data (line 189) | def raw_data(self, thing): method thing_attr (line 203) | def thing_attr(self, thing, attr): method data (line 235) | def data(self, thing): method render (line 241) | def render(self, thing = None, action = None, *a, **kw): class SubredditJsonTemplate (line 245) | class SubredditJsonTemplate(ThingJsonTemplate): method raw_data (line 313) | def raw_data(self, thing): method thing_attr (line 329) | def thing_attr(self, thing, attr): class LabeledMultiDescriptionJsonTemplate (line 377) | class LabeledMultiDescriptionJsonTemplate(ThingJsonTemplate): method kind (line 383) | def kind(self, wrapped): method thing_attr (line 386) | def thing_attr(self, thing, attr): class LabeledMultiJsonTemplate (line 395) | class LabeledMultiJsonTemplate(LabeledMultiDescriptionJsonTemplate): method __init__ (line 413) | def __init__(self, expand_srs=False): method kind (line 417) | def kind(self, wrapped): method sr_props (line 421) | def sr_props(cls, thing, srs, expand=False): method thing_attr (line 429) | def thing_attr(self, thing, attr): function get_trimmed_sr_dicts (line 446) | def get_trimmed_sr_dicts(srs, user): class IdentityJsonTemplate (line 493) | class IdentityJsonTemplate(ThingJsonTemplate): method raw_data (line 517) | def raw_data(self, thing): method add_message_data (line 548) | def add_message_data(self, data, thing): method thing_attr (line 553) | def thing_attr(self, thing, attr): class AccountJsonTemplate (line 583) | class AccountJsonTemplate(IdentityJsonTemplate): method thing_attr (line 590) | def thing_attr(self, thing, attr): class PrefsJsonTemplate (line 599) | class PrefsJsonTemplate(ThingJsonTemplate): method __init__ (line 603) | def __init__(self, fields=None): method thing_attr (line 612) | def thing_attr(self, thing, attr): function get_mod_attributes (line 618) | def get_mod_attributes(item): function get_author_attributes (line 642) | def get_author_attributes(item): function get_distinguished_attributes (line 666) | def get_distinguished_attributes(item): function get_edited_attributes (line 673) | def get_edited_attributes(item): function get_report_reason_attributes (line 683) | def get_report_reason_attributes(item): function get_removal_reason_attributes (line 697) | def get_removal_reason_attributes(item): function get_media_embed_attributes (line 706) | def get_media_embed_attributes(item): function get_selftext_attributes (line 738) | def get_selftext_attributes(item): function generate_image_links (line 749) | def generate_image_links(preview_object, file_type=None, censor_nsfw=Fal... class LinkJsonTemplate (line 797) | class LinkJsonTemplate(ThingTemplate): method get_json (line 799) | def get_json(cls, item): method get_rendered (line 882) | def get_rendered(cls, item, render_style): class PromotedLinkJsonTemplate (line 890) | class PromotedLinkJsonTemplate(LinkJsonTemplate): method get_json (line 892) | def get_json(cls, item): class CommentJsonTemplate (line 911) | class CommentJsonTemplate(ThingTemplate): method get_parent_id (line 913) | def get_parent_id(cls, item): method get_link_name (line 922) | def get_link_name(cls, item): method render_child (line 927) | def render_child(cls, item): method get_json (line 935) | def get_json(cls, item): method get_rendered (line 989) | def get_rendered(cls, item, render_style): class MoreCommentJsonTemplate (line 1001) | class MoreCommentJsonTemplate(ThingTemplate): method get_kind (line 1003) | def get_kind(cls, item): method get_json (line 1007) | def get_json(cls, item): method get_rendered (line 1018) | def get_rendered(cls, item, render_style): class MessageJsonTemplate (line 1030) | class MessageJsonTemplate(ThingJsonTemplate): method thing_attr (line 1049) | def thing_attr(self, thing, attr): method raw_data (line 1082) | def raw_data(self, thing): method rendered_data (line 1089) | def rendered_data(self, wrapped): class RedditJsonTemplate (line 1101) | class RedditJsonTemplate(JsonTemplate): method render (line 1102) | def render(self, thing = None, *a, **kw): class PanestackJsonTemplate (line 1105) | class PanestackJsonTemplate(JsonTemplate): method render (line 1106) | def render(self, thing = None, *a, **kw): class NullJsonTemplate (line 1113) | class NullJsonTemplate(JsonTemplate): method render (line 1114) | def render(self, thing = None, *a, **kw): method get_def (line 1117) | def get_def(self, name): class ListingJsonTemplate (line 1120) | class ListingJsonTemplate(ThingJsonTemplate): method thing_attr (line 1128) | def thing_attr(self, thing, attr): method rendered_data (line 1141) | def rendered_data(self, thing): method kind (line 1144) | def kind(self, wrapped): class SearchListingJsonTemplate (line 1148) | class SearchListingJsonTemplate(ListingJsonTemplate): method raw_data (line 1149) | def raw_data(self, thing): class UserListingJsonTemplate (line 1164) | class UserListingJsonTemplate(ListingJsonTemplate): method raw_data (line 1165) | def raw_data(self, thing): method kind (line 1170) | def kind(self, wrapped): class UserListJsonTemplate (line 1173) | class UserListJsonTemplate(ThingJsonTemplate): method thing_attr (line 1178) | def thing_attr(self, thing, attr): method rendered_data (line 1187) | def rendered_data(self, thing): method kind (line 1190) | def kind(self, wrapped): class UserTableItemJsonTemplate (line 1194) | class UserTableItemJsonTemplate(ThingJsonTemplate): method thing_attr (line 1200) | def thing_attr(self, thing, attr): method render (line 1203) | def render(self, thing, *a, **kw): class RelTableItemJsonTemplate (line 1207) | class RelTableItemJsonTemplate(UserTableItemJsonTemplate): method thing_attr (line 1212) | def thing_attr(self, thing, attr): class FriendTableItemJsonTemplate (line 1228) | class FriendTableItemJsonTemplate(RelTableItemJsonTemplate): method inject_data (line 1229) | def inject_data(self, thing, d): method rendered_data (line 1234) | def rendered_data(self, thing): method raw_data (line 1238) | def raw_data(self, thing): class BannedTableItemJsonTemplate (line 1243) | class BannedTableItemJsonTemplate(RelTableItemJsonTemplate): class MutedTableItemJsonTemplate (line 1249) | class MutedTableItemJsonTemplate(RelTableItemJsonTemplate): class InvitedModTableItemJsonTemplate (line 1253) | class InvitedModTableItemJsonTemplate(RelTableItemJsonTemplate): method thing_attr (line 1258) | def thing_attr(self, thing, attr): class OrganicListingJsonTemplate (line 1266) | class OrganicListingJsonTemplate(ListingJsonTemplate): method kind (line 1267) | def kind(self, wrapped): class TrafficJsonTemplate (line 1270) | class TrafficJsonTemplate(JsonTemplate): method render (line 1271) | def render(self, thing, *a, **kw): class WikiJsonTemplate (line 1285) | class WikiJsonTemplate(JsonTemplate): method render (line 1286) | def render(self, thing, *a, **kw): class WikiPageListingJsonTemplate (line 1293) | class WikiPageListingJsonTemplate(ThingJsonTemplate): method kind (line 1294) | def kind(self, thing): method data (line 1297) | def data(self, thing): class WikiViewJsonTemplate (line 1301) | class WikiViewJsonTemplate(ThingJsonTemplate): method kind (line 1302) | def kind(self, thing): method data (line 1305) | def data(self, thing): class WikiSettingsJsonTemplate (line 1316) | class WikiSettingsJsonTemplate(ThingJsonTemplate): method kind (line 1317) | def kind(self, thing): method data (line 1320) | def data(self, thing): class WikiRevisionJsonTemplate (line 1326) | class WikiRevisionJsonTemplate(ThingJsonTemplate): method render (line 1327) | def render(self, thing, *a, **kw): class FlairListJsonTemplate (line 1340) | class FlairListJsonTemplate(JsonTemplate): method render (line 1341) | def render(self, thing, *a, **kw): class FlairCsvJsonTemplate (line 1360) | class FlairCsvJsonTemplate(JsonTemplate): method render (line 1361) | def render(self, thing, *a, **kw): class FlairSelectorJsonTemplate (line 1365) | class FlairSelectorJsonTemplate(JsonTemplate): method _template_dict (line 1366) | def _template_dict(self, flair): method render (line 1373) | def render(self, thing, *a, **kw): class StylesheetTemplate (line 1421) | class StylesheetTemplate(ThingJsonTemplate): method kind (line 1428) | def kind(self, wrapped): method images (line 1431) | def images(self): method thing_attr (line 1440) | def thing_attr(self, thing, attr): class SubredditSettingsTemplate (line 1447) | class SubredditSettingsTemplate(ThingJsonTemplate): method kind (line 1482) | def kind(self, wrapped): method thing_attr (line 1485) | def thing_attr(self, thing, attr): method raw_data (line 1493) | def raw_data(self, thing): class UploadedImageJsonTemplate (line 1505) | class UploadedImageJsonTemplate(JsonTemplate): method render (line 1506) | def render(self, thing, *a, **kw): class ModActionTemplate (line 1513) | class ModActionTemplate(ThingJsonTemplate): method thing_attr (line 1531) | def thing_attr(self, thing, attr): method kind (line 1560) | def kind(self, wrapped): class PolicyViewJsonTemplate (line 1564) | class PolicyViewJsonTemplate(ThingJsonTemplate): method kind (line 1572) | def kind(self, wrapped): class KarmaListJsonTemplate (line 1575) | class KarmaListJsonTemplate(ThingJsonTemplate): method data (line 1576) | def data(self, karmas): method kind (line 1586) | def kind(self, wrapped): function get_usertrophies (line 1590) | def get_usertrophies(user): class TrophyJsonTemplate (line 1599) | class TrophyJsonTemplate(ThingJsonTemplate): method thing_attr (line 1610) | def thing_attr(self, thing, attr): method kind (line 1621) | def kind(self, thing): class TrophyListJsonTemplate (line 1624) | class TrophyListJsonTemplate(ThingJsonTemplate): method data (line 1625) | def data(self, trophies): method kind (line 1629) | def kind(self, wrapped): class RulesJsonTemplate (line 1633) | class RulesJsonTemplate(JsonTemplate): method render (line 1634) | def render(self, thing, *a, **kw): FILE: r2/r2/lib/language.py function charset_name (line 9) | def charset_name(name, start, end): function symbology (line 171) | def symbology(s): function charset_summary (line 188) | def charset_summary(s, prefix=""): FILE: r2/r2/lib/lock.py class TimeoutExpired (line 42) | class TimeoutExpired(Exception): pass class MemcacheLock (line 44) | class MemcacheLock(object): method __init__ (line 49) | def __init__(self, stats, group, key, cache, method __enter__ (line 64) | def __enter__(self): method __exit__ (line 68) | def __exit__(self, type, value, tb): method acquire (line 71) | def acquire(self): method release (line 125) | def release(self): function make_lock_factory (line 140) | def make_lock_factory(cache, stats): FILE: r2/r2/lib/log.py function get_operational_exceptions (line 37) | def get_operational_exceptions(): class SanitizeStackLocalsProcessor (line 58) | class SanitizeStackLocalsProcessor(Processor): method filter_stacktrace (line 71) | def filter_stacktrace(self, data, **kwargs): class RavenErrorReporter (line 98) | class RavenErrorReporter(Reporter): method get_module_versions (line 100) | def get_module_versions(cls): method add_http_context (line 107) | def add_http_context(cls, client): method add_reddit_context (line 141) | def add_reddit_context(cls, client): method add_user_context (line 153) | def add_user_context(cls, client): method get_raven_client (line 166) | def get_raven_client(cls): method capture_exception (line 195) | def capture_exception(cls, exc_info=None): method report (line 235) | def report(self, exc_data): function write_error_summary (line 239) | def write_error_summary(error): class LoggingErrorReporter (line 246) | class LoggingErrorReporter(Reporter): method report (line 249) | def report(self, exc_data): FILE: r2/r2/lib/loid.py function isodate (line 22) | def isodate(d): function ensure_unquoted (line 30) | def ensure_unquoted(cookie_str): class LoId (line 49) | class LoId(object): method __init__ (line 59) | def __init__( method _trigger_event (line 86) | def _trigger_event(self, action): method _create (line 95) | def _create(cls, request, context): method load (line 115) | def load(cls, request, context, create=True): method save (line 148) | def save(self, **cookie_attrs): method to_dict (line 163) | def to_dict(self, prefix=None): FILE: r2/r2/lib/manager/db_manager.py function get_engine (line 37) | def get_engine(name, db_host='', db_user='', db_pass='', db_port='5432', class db_manager (line 72) | class db_manager: method __init__ (line 73) | def __init__(self): method add_thing (line 82) | def add_thing(self, name, thing_dbs, avoid_master=False, **kw): method add_relation (line 88) | def add_relation(self, name, type1, type2, relation_dbs, method setup_db (line 93) | def setup_db(self, db_name, g_override=None, **params): method things_iter (line 103) | def things_iter(self): method rels_iter (line 110) | def rels_iter(self): method mark_dead (line 116) | def mark_dead(self, engine, g_override=None): method test_engine (line 120) | def test_engine(self, engine, g_override=None): method get_engine (line 134) | def get_engine(self, name): method get_engines (line 137) | def get_engines(self, names): method get_read_table (line 140) | def get_read_table(self, tables): FILE: r2/r2/lib/manager/tp_manager.py class tp_manager (line 35) | class tp_manager: method __init__ (line 36) | def __init__(self, template_cls=mTemplate): method add_handler (line 41) | def add_handler(self, name, style, handler): method cache_template (line 49) | def cache_template(self, cls, style, template): method get_template (line 59) | def get_template(self, cls, style): method get (line 79) | def get(self, thing, style): FILE: r2/r2/lib/media.py function _image_to_str (line 80) | def _image_to_str(image): function str_to_image (line 86) | def str_to_image(s): function _image_entropy (line 92) | def _image_entropy(img): function _crop_image_vertically (line 101) | def _crop_image_vertically(img, target_height): function _square_image (line 124) | def _square_image(img): function _apply_exif_orientation (line 130) | def _apply_exif_orientation(image): function _prepare_image (line 172) | def _prepare_image(image): function _clean_url (line 192) | def _clean_url(url): function _initialize_request (line 199) | def _initialize_request(url, referer, gzip=False): function _fetch_url (line 215) | def _fetch_url(url, referer=None): function _fetch_image_size (line 230) | def _fetch_image_size(url, referer): function optimize_jpeg (line 257) | def optimize_jpeg(filename): function thumbnail_url (line 262) | def thumbnail_url(link): function _filename_from_content (line 273) | def _filename_from_content(contents): function upload_media (line 278) | def upload_media(image, file_type='.jpg', category='thumbs'): function upload_stylesheet (line 315) | def upload_stylesheet(content): function _scrape_media (line 320) | def _scrape_media(url, autoplay=False, maxwidth=600, force=False, function _get_scrape_url (line 396) | def _get_scrape_url(link): function _set_media (line 426) | def _set_media(link, force=False, **kwargs): function force_thumbnail (line 474) | def force_thumbnail(link, image_data, file_type=".jpg"): function force_mobile_ad_image (line 484) | def force_mobile_ad_image(link, image_data, file_type=".jpg"): function upload_icon (line 498) | def upload_icon(image_data, size): function allowed_media_preview_url (line 507) | def allowed_media_preview_url(url): function get_preview_image (line 517) | def get_preview_image(preview_object, include_censored=False): function _make_custom_media_embed (line 574) | def _make_custom_media_embed(media_object): function get_media_embed (line 583) | def get_media_embed(media_object): class MediaEmbed (line 602) | class MediaEmbed(object): method __init__ (line 610) | def __init__(self, height, width, content, scrolling=False, class Scraper (line 634) | class Scraper(object): method for_url (line 636) | def for_url(cls, url, autoplay=False, maxwidth=600, use_youtube_scrape... method scrape (line 653) | def scrape(self): method media_embed (line 659) | def media_embed(cls, media_object): class _ThumbnailOnlyScraper (line 664) | class _ThumbnailOnlyScraper(Scraper): method __init__ (line 665) | def __init__(self, url): method scrape (line 671) | def scrape(self): method _extract_image_urls (line 702) | def _extract_image_urls(self, soup): method _find_thumbnail_image (line 706) | def _find_thumbnail_image(self): class _EmbedlyScraper (line 777) | class _EmbedlyScraper(Scraper): method __init__ (line 784) | def __init__(self, url, autoplay=False, maxwidth=600): method _fetch_from_embedly (line 792) | def _fetch_from_embedly(self, secure): method _make_media_object (line 811) | def _make_media_object(self, oembed): method scrape (line 819) | def scrape(self): method validate_secure_oembed (line 856) | def validate_secure_oembed(self, oembed): method media_embed (line 873) | def media_embed(cls, media_object): class _YouTubeScraper (line 891) | class _YouTubeScraper(Scraper): method __init__ (line 895) | def __init__(self, url, maxwidth): method matches (line 900) | def matches(cls, url): method _fetch_from_youtube (line 903) | def _fetch_from_youtube(self): method _make_media_object (line 915) | def _make_media_object(self, oembed): method scrape (line 923) | def scrape(self): method media_embed (line 955) | def media_embed(cls, media_object): function _fetch_embedly_service_data (line 975) | def _fetch_embedly_service_data(): function _fetch_embedly_services (line 980) | def _fetch_embedly_services(): function run (line 997) | def run(): FILE: r2/r2/lib/memoize.py function memoize (line 31) | def memoize(iden, time = 0, stale=False, timeout=30): function test (line 72) | def test(x, y): FILE: r2/r2/lib/menus.py class MenuHandler (line 36) | class MenuHandler(StringHandler): method __getattr__ (line 42) | def __getattr__(self, attr): function menu_style (line 199) | def menu_style(type): class NavMenu (line 215) | class NavMenu(Styled): method __init__ (line 221) | def __init__(self, options, default=None, title='', type="dropdown", method find_selected (line 248) | def find_selected(self): method __iter__ (line 261) | def __iter__(self): method cachable_attrs (line 265) | def cachable_attrs(self): class NavButton (line 274) | class NavButton(Styled): method __init__ (line 282) | def __init__(self, title, dest, sr_path=True, aliases=None, method build (line 301) | def build(self, base_path=''): method is_selected (line 314) | def is_selected(self): method selected_title (line 329) | def selected_title(self): method cachable_attrs (line 334) | def cachable_attrs(self): class QueryButton (line 347) | class QueryButton(NavButton): method __init__ (line 348) | def __init__(self, title, dest, query_param, sr_path=True, aliases=None, method build (line 355) | def build(self, base_path=''): method is_selected (line 366) | def is_selected(self): class PostButton (line 372) | class PostButton(NavButton): method __init__ (line 375) | def __init__(self, title, dest, input_name, sr_path=True, aliases=None, method build (line 382) | def build(self, base_path=''): method cachable_attrs (line 386) | def cachable_attrs(self): method is_selected (line 399) | def is_selected(self): class ModeratorMailButton (line 403) | class ModeratorMailButton(NavButton): method is_selected (line 404) | def is_selected(self): class OffsiteButton (line 411) | class OffsiteButton(NavButton): method build (line 412) | def build(self, base_path=''): method cachable_attrs (line 416) | def cachable_attrs(self): class SubredditButton (line 424) | class SubredditButton(NavButton): method __init__ (line 435) | def __init__(self, sr, css_class='', data=None): method build (line 443) | def build(self, base_path=''): method is_selected (line 446) | def is_selected(self): method cachable_attrs (line 449) | def cachable_attrs(self): class NamedButton (line 459) | class NamedButton(NavButton): method __init__ (line 465) | def __init__(self, name, sr_path=True, aliases=None, class JsButton (line 477) | class JsButton(NavButton): method __init__ (line 483) | def __init__(self, title, tab_name=None, onclick='', css_class='', method build (line 491) | def build(self, base_path=''): method is_selected (line 497) | def is_selected(self): method cachable_attrs (line 500) | def cachable_attrs(self): class PageNameNav (line 513) | class PageNameNav(Styled): class SortMenu (line 520) | class SortMenu(NavMenu): method __init__ (line 531) | def __init__(self, default=None, title='', base_path='', separator='|', method make_buttons (line 541) | def make_buttons(self): method make_title (line 550) | def make_title(self, attr): method operator (line 566) | def operator(cls, sort): method sort (line 570) | def sort(cls, operator): class ProfileSortMenu (line 574) | class ProfileSortMenu(SortMenu): class CommentSortMenu (line 579) | class CommentSortMenu(SortMenu): method __init__ (line 590) | def __init__(self, *args, **kwargs): method visible_options (line 595) | def visible_options(cls): method make_title (line 598) | def make_title(self, attr): class SearchSortMenu (line 606) | class SearchSortMenu(SortMenu): method hidden_options (line 612) | def hidden_options(cls): method make_buttons (line 615) | def make_buttons(self): class SubredditSearchSortMenu (line 623) | class SubredditSearchSortMenu(SortMenu): class RecSortMenu (line 629) | class RecSortMenu(SortMenu): class KindMenu (line 635) | class KindMenu(SortMenu): method make_title (line 641) | def make_title(self, attr): class TimeMenu (line 647) | class TimeMenu(SortMenu): method operator (line 655) | def operator(self, time): class CommentsTimeMenu (line 660) | class CommentsTimeMenu(TimeMenu): class ProfileOverviewTimeMenu (line 665) | class ProfileOverviewTimeMenu(TimeMenu): class ControversyTimeMenu (line 670) | class ControversyTimeMenu(TimeMenu): class SubredditMenu (line 676) | class SubredditMenu(NavMenu): method find_selected (line 677) | def find_selected(self): class JsNavMenu (line 682) | class JsNavMenu(NavMenu): method find_selected (line 683) | def find_selected(self): class AdminReporterMenu (line 689) | class AdminReporterMenu(SortMenu): class AdminKindMenu (line 693) | class AdminKindMenu(KindMenu): class AdminTimeMenu (line 697) | class AdminTimeMenu(TimeMenu): FILE: r2/r2/lib/merge.py class ConflictException (line 33) | class ConflictException(Exception): method __init__ (line 34) | def __init__(self, new, your, original): function make_htmldiff (line 42) | def make_htmldiff(a, b, adesc, bdesc): function threewaymerge (line 55) | def threewaymerge(original, a, b): class test_globals (line 75) | class test_globals: FILE: r2/r2/lib/message_to_email.py function get_reply_to_address (line 41) | def get_reply_to_address(message): function parse_and_validate_reply_to_address (line 75) | def parse_and_validate_reply_to_address(address): function get_message_subject (line 105) | def get_message_subject(message): function get_email_ids (line 118) | def get_email_ids(message): function get_system_from_address (line 135) | def get_system_from_address(sr): function send_modmail_email (line 140) | def send_modmail_email(message): function send_blocked_muted_email (line 207) | def send_blocked_muted_email(sr, parent, sender_email, incoming_email_id): function queue_modmail_email (line 225) | def queue_modmail_email(message): function queue_blocked_muted_email (line 235) | def queue_blocked_muted_email(sr, parent, sender_email, incoming_email_id): function process_modmail_email (line 248) | def process_modmail_email(): FILE: r2/r2/lib/migrate/campaigns_to_things.py function fix_trans_id (line 27) | def fix_trans_id(): FILE: r2/r2/lib/migrate/migrate.py function add_allow_top_to_srs (line 28) | def add_allow_top_to_srs(): function subscribe_to_blog_and_annoucements (line 39) | def subscribe_to_blog_and_annoucements(filename): function recompute_unread (line 64) | def recompute_unread(min_date = None): function pushup_permacache (line 97) | def pushup_permacache(verbosity=1000): function port_cassaurls (line 188) | def port_cassaurls(after_id=None, estimate=15231317): function port_deleted_links (line 210) | def port_deleted_links(after_id=None): function convert_query_cache_to_json (line 229) | def convert_query_cache_to_json(): function populate_spam_filtered (line 244) | def populate_spam_filtered(): FILE: r2/r2/lib/migrate/mr_domains.py function join_links (line 61) | def join_links(): function time_listings (line 65) | def time_listings(times = ('all',)): function store_keys (line 102) | def store_keys(key, maxes): function write_permacache (line 153) | def write_permacache(fd = sys.stdin): FILE: r2/r2/lib/migrate/mr_permacache.py function join_links (line 110) | def join_links(): function link_listings (line 113) | def link_listings(): function join_comments (line 145) | def join_comments(): function comment_listings (line 148) | def comment_listings(): function rel_listings (line 158) | def rel_listings(names, thing2_cls = Link): function linkvote_listings (line 168) | def linkvote_listings(): function savehide_listings (line 172) | def savehide_listings(): function insert_to_query (line 176) | def insert_to_query(q, items): function store_keys (line 179) | def store_keys(key, maxes): function top1k_writefiles (line 216) | def top1k_writefiles(dirname): function top1k_writepermacache (line 259) | def top1k_writepermacache(fd = sys.stdin): function write_permacache_from_dir (line 264) | def write_permacache_from_dir(dirname): function write_permacache_from_file (line 294) | def write_permacache_from_file(fname): FILE: r2/r2/lib/migrate/vote_details_ip_backfill.py function backfill_vote_details (line 13) | def backfill_vote_details(cls): function main (line 52) | def main(): FILE: r2/r2/lib/mr_tools/mr_tools.py function join_things (line 29) | def join_things(fields, deleted=False, spam=True): class Mapper (line 86) | class Mapper(object): method __init__ (line 87) | def __init__(self): method process (line 90) | def process(self, values): method __call__ (line 93) | def __call__(self, line): function mr_map_parallel (line 98) | def mr_map_parallel(processor, fd = stdin, function test (line 116) | def test(): class UpperMapper (line 124) | class UpperMapper(Mapper): method process (line 125) | def process(self, values): function test_parallel (line 128) | def test_parallel(): FILE: r2/r2/lib/mr_top.py function join_things (line 55) | def join_things(thing_type): function _get_cutoffs (line 59) | def _get_cutoffs(intervals): function time_listings (line 70) | def time_listings(intervals, thing_type): function store_keys (line 116) | def store_keys(key, maxes): function write_permacache (line 143) | def write_permacache(fd = sys.stdin): function reduce_listings (line 148) | def reduce_listings(fd=sys.stdin): FILE: r2/r2/lib/newsletter.py class NewsletterError (line 37) | class NewsletterError(Exception): class EmailUnacceptableError (line 41) | class EmailUnacceptableError(NewsletterError): function add_subscriber (line 45) | def add_subscriber(email, source=""): FILE: r2/r2/lib/normalized_hot.py function get_hot_tuples (line 38) | def get_hot_tuples(sr_ids, ageweight=None): function get_hot_factor (line 63) | def get_hot_factor(qdata, now, ageweight): function normalized_hot (line 82) | def normalized_hot(sr_ids, obey_age_limit=True, ageweight=None): FILE: r2/r2/lib/nymph.py function optimize_png (line 43) | def optimize_png(filename): function _extract_css_info (line 48) | def _extract_css_info(match): class SpritableImage (line 61) | class SpritableImage(object): method __init__ (line 62) | def __init__(self, image, should_stretch=False): method width (line 68) | def width(self): method height (line 72) | def height(self): method stretch_to_width (line 75) | def stretch_to_width(self, width): class SpriteBin (line 79) | class SpriteBin(object): method __init__ (line 80) | def __init__(self, bounding_box): method has_space_for (line 87) | def has_space_for(self, image): method add_image (line 91) | def add_image(self, image): function _load_spritable_images (line 96) | def _load_spritable_images(css_filename): function _generate_sprite (line 120) | def _generate_sprite(images, sprite_path): function _rewrite_css (line 168) | def _rewrite_css(css_filename, sprite_path, images, sprite_size): function spritify (line 202) | def spritify(css_filename, sprite_path): FILE: r2/r2/lib/organic.py function cached_organic_links (line 34) | def cached_organic_links(*sr_ids): function organic_links (line 59) | def organic_links(user): FILE: r2/r2/lib/pages/admin_pages.py function admin_menu (line 39) | def admin_menu(**kwargs): class AdminSidebar (line 50) | class AdminSidebar(Templated): method __init__ (line 51) | def __init__(self, user): class SponsorSidebar (line 56) | class SponsorSidebar(Templated): method __init__ (line 57) | def __init__(self, user): class Details (line 62) | class Details(Templated): method __init__ (line 63) | def __init__(self, link, *a, **kw): class AdminPage (line 68) | class AdminPage(Reddit): method __init__ (line 74) | def __init__(self, nav_menus = None, *a, **kw): class AdminProfileMenu (line 77) | class AdminProfileMenu(NavMenu): method __init__ (line 78) | def __init__(self, path): class AdminLinkMenu (line 83) | class AdminLinkMenu(NavMenu): method __init__ (line 84) | def __init__(self, link): class AdminNotesSidebar (line 88) | class AdminNotesSidebar(Templated): method __init__ (line 103) | def __init__(self, system, subject): class AdminLinkInfoBar (line 116) | class AdminLinkInfoBar(LinkInfoBar): class AdminDetailsBar (line 120) | class AdminDetailsBar(Templated): FILE: r2/r2/lib/pages/pages.py function get_captcha (line 180) | def get_captcha(): function responsive (line 184) | def responsive(res, space_compress=None): class Robots (line 208) | class Robots(Templated): method __init__ (line 210) | def __init__(self, **context): class CrossDomain (line 214) | class CrossDomain(Templated): class Reddit (line 218) | class Reddit(Templated): method __init__ (line 255) | def __init__(self, space_compress=None, nav_menus=None, loginbox=True, method get_subreddit_stylesheet_url (line 457) | def get_subreddit_stylesheet_url(sr): method wiki_actions_menu (line 470) | def wiki_actions_menu(self, moderator=False): method sr_admin_menu (line 507) | def sr_admin_menu(self): method rightbox (line 634) | def rightbox(self): method render (line 879) | def render(self, *a, **kw): method corner_buttons (line 893) | def corner_buttons(self): method build_toolbars (line 923) | def build_toolbars(self): method __repr__ (line 983) | def __repr__(self): method content_stack (line 987) | def content_stack(panes, css_class = None): method content (line 991) | def content(self): method build_popup_panes (line 1006) | def build_popup_panes(self): method is_gold_page (line 1020) | def is_gold_page(self): method page_classes (line 1023) | def page_classes(self): class DebugFooter (line 1069) | class DebugFooter(Templated): method __init__ (line 1070) | def __init__(self): class AccountActivityBox (line 1078) | class AccountActivityBox(Templated): method __init__ (line 1079) | def __init__(self): class RedditFooter (line 1083) | class RedditFooter(CachedTemplate): method cachable_attrs (line 1084) | def cachable_attrs(self): method __init__ (line 1088) | def __init__(self): class ClickGadget (line 1135) | class ClickGadget(Templated): method __init__ (line 1136) | def __init__(self, links, *a, **kw): method make_content (line 1143) | def make_content(self): class LoginFormWide (line 1153) | class LoginFormWide(CachedTemplate): class SubredditInfoBar (line 1159) | class SubredditInfoBar(CachedTemplate): method __init__ (line 1165) | def __init__(self, site = None): method creator_text (line 1205) | def creator_text(self): class SponsorshipBox (line 1214) | class SponsorshipBox(Templated): class HelpLink (line 1218) | class HelpLink(Templated): method __init__ (line 1219) | def __init__(self, url, label, access_required=False, data_attrs={}): class SideContentBox (line 1225) | class SideContentBox(Templated): method __init__ (line 1226) | def __init__(self, title, content, helplink=None, _id=None, extra_clas... class SideBox (line 1233) | class SideBox(CachedTemplate): method __init__ (line 1237) | def __init__(self, title, link=None, css_class='', subtitles = [], class PrefsPage (line 1248) | class PrefsPage(Reddit): method __init__ (line 1253) | def __init__(self, show_sidebar = False, title=None, *a, **kw): method build_toolbars (line 1259) | def build_toolbars(self): class PrefOptions (line 1281) | class PrefOptions(Templated): method __init__ (line 1283) | def __init__(self, done=False, error_style_override=None, generic_erro... class PrefFeeds (line 1301) | class PrefFeeds(Templated): class PrefSecurity (line 1304) | class PrefSecurity(Templated): class PrefUpdate (line 1310) | class PrefUpdate(Templated): method __init__ (line 1312) | def __init__(self, email=True, password=True, verify=False, dest=None,... class PrefApps (line 1321) | class PrefApps(Templated): method __init__ (line 1324) | def __init__(self, my_apps, developed_apps): method render_developed_app (line 1329) | def render_developed_app(self, app, collapsed): method render_editable_developer (line 1335) | def render_editable_developer(self, app, dev): class PrefDeactivate (line 1342) | class PrefDeactivate(Templated): method __init__ (line 1344) | def __init__(self): class MessagePage (line 1352) | class MessagePage(Reddit): method __init__ (line 1354) | def __init__(self, *a, **kw): method content (line 1374) | def content(self): method build_toolbars (line 1380) | def build_toolbars(self): class MessageCompose (line 1409) | class MessageCompose(Templated): method __init__ (line 1411) | def __init__(self, to='', subject='', message='', captcha=None, class ModeratorMessageCompose (line 1423) | class ModeratorMessageCompose(MessageCompose): method __init__ (line 1424) | def __init__(self, mod_srs, only_as_subreddit=False, **kw): class BoringPage (line 1430) | class BoringPage(Reddit): method __init__ (line 1438) | def __init__(self, pagename, css_class=None, **context): method build_toolbars (line 1448) | def build_toolbars(self): class HelpPage (line 1454) | class HelpPage(BoringPage): method build_toolbars (line 1455) | def build_toolbars(self): class FormPage (line 1458) | class FormPage(BoringPage): method __init__ (line 1462) | def __init__(self, pagename, show_sidebar = False, *a, **kw): class LoginPage (line 1466) | class LoginPage(BoringPage): method __init__ (line 1471) | def __init__(self, **context): method content (line 1496) | def content(self): method login_template (line 1504) | def login_template(cls, **kw): class RegisterPage (line 1507) | class RegisterPage(LoginPage): method login_template (line 1510) | def login_template(cls, **kw): class Login (line 1514) | class Login(Templated): method __init__ (line 1516) | def __init__(self, user_reg = '', user_login = '', dest='', is_popup=F... class Register (line 1522) | class Register(Login): class RegistrationInfo (line 1526) | class RegistrationInfo(Templated): method __init__ (line 1527) | def __init__(self): method get_registration_info_html (line 1533) | def get_registration_info_html(cls): class OAuth2AuthorizationPage (line 1542) | class OAuth2AuthorizationPage(BoringPage): method __init__ (line 1545) | def __init__(self, client, redirect_uri, scope, state, duration, class OAuth2Authorization (line 1565) | class OAuth2Authorization(Templated): class SearchPage (line 1568) | class SearchPage(BoringPage): method __init__ (line 1573) | def __init__(self, pagename, prev_search, method content (line 1605) | def content(self): class MenuLink (line 1615) | class MenuLink(Templated): class TakedownPage (line 1619) | class TakedownPage(BoringPage): method __init__ (line 1620) | def __init__(self, link): method render (line 1624) | def render(self, *a, **kw): class TakedownPane (line 1629) | class TakedownPane(Templated): method __init__ (line 1630) | def __init__(self, link, *a, **kw): class CommentVisitsBox (line 1637) | class CommentVisitsBox(Templated): method __init__ (line 1638) | def __init__(self, visits, *a, **kw): class LinkInfoPage (line 1642) | class LinkInfoPage(Reddit): method __init__ (line 1657) | def __init__(self, link = None, comment = None, disable_comments=False, method _build_og_data (line 1763) | def _build_og_data(self, link_title, meta_description): method _build_og_image (line 1790) | def _build_og_image(self): method _build_og_description (line 1833) | def _build_og_description(self, meta_description): method _build_twitter_card_data (line 1842) | def _build_twitter_card_data(self, link_title, meta_description): method build_toolbars (line 1863) | def build_toolbars(self): method content (line 1893) | def content(self): method build_popup_panes (line 1915) | def build_popup_panes(self): method rightbox (line 1924) | def rightbox(self): method page_classes (line 1952) | def page_classes(self): class LinkCommentSep (line 1979) | class LinkCommentSep(Templated): class CommentPane (line 1982) | class CommentPane(Templated): method cache_key (line 1983) | def cache_key(self): method __init__ (line 2018) | def __init__(self, article, sort, comment, context, num, **kw): method listing_iter (line 2181) | def listing_iter(self, l): method render (line 2187) | def render(self, *a, **kw): class ThingUpdater (line 2190) | class ThingUpdater(Templated): class LinkInfoBar (line 2194) | class LinkInfoBar(Templated): method __init__ (line 2196) | def __init__(self, a = None): class EditReddit (line 2201) | class EditReddit(Reddit): method __init__ (line 2205) | def __init__(self, *a, **kw): method build_toolbars (line 2220) | def build_toolbars(self): class SubredditsPage (line 2224) | class SubredditsPage(Reddit): method __init__ (line 2232) | def __init__(self, prev_search = '', method build_toolbars (line 2248) | def build_toolbars(self): method content (line 2271) | def content(self): method rightbox (line 2276) | def rightbox(self): class MySubredditsPage (line 2287) | class MySubredditsPage(SubredditsPage): method content (line 2290) | def content(self): function votes_visible (line 2294) | def votes_visible(user): class ProfilePage (line 2305) | class ProfilePage(Reddit): method __init__ (line 2316) | def __init__(self, user, *a, **kw): method build_toolbars (line 2320) | def build_toolbars(self): method page_classes (line 2349) | def page_classes(self): method rightbox (line 2367) | def rightbox(self): class TrophyCase (line 2422) | class TrophyCase(Templated): method __init__ (line 2423) | def __init__(self, user): class SidebarMultiList (line 2437) | class SidebarMultiList(Templated): method __init__ (line 2438) | def __init__(self, multis): class SidebarModList (line 2444) | class SidebarModList(Templated): method __init__ (line 2445) | def __init__(self, subreddits): class ProfileBar (line 2452) | class ProfileBar(Templated): method __init__ (line 2454) | def __init__(self, user): class ServerSecondsBar (line 2522) | class ServerSecondsBar(Templated): method make_message (line 2532) | def make_message(self, seconds, my_message, their_message): method __init__ (line 2545) | def __init__(self, user): class MenuArea (line 2582) | class MenuArea(Templated): method __init__ (line 2584) | def __init__(self, menus = []): class InfoBar (line 2588) | class InfoBar(Templated): method __init__ (line 2590) | def __init__(self, message='', extra_class=''): class RedditInfoBar (line 2594) | class RedditInfoBar(InfoBar): method __init__ (line 2595) | def __init__(self, message='', extra_class='', show_icon=False): class WelcomeBar (line 2603) | class WelcomeBar(InfoBar): method __init__ (line 2604) | def __init__(self): class NewsletterBar (line 2613) | class NewsletterBar(InfoBar): class ClientInfoBar (line 2616) | class ClientInfoBar(InfoBar): method __init__ (line 2618) | def __init__(self, client, *args, **kwargs): class LocationBar (line 2624) | class LocationBar(Templated): pass class MobileWebRedirectBar (line 2626) | class MobileWebRedirectBar(Templated): class SidebarMessage (line 2629) | class SidebarMessage(Templated): method __init__ (line 2631) | def __init__(self, message, extra_class=None): class RedditError (line 2634) | class RedditError(BoringPage): method __init__ (line 2638) | def __init__(self, title, message, image=None, sr_description=None, class ErrorPage (line 2652) | class ErrorPage(Templated): method __init__ (line 2654) | def __init__(self, title, message, image=None, explanation=None, **kwa... class InterstitialPage (line 2669) | class InterstitialPage(BoringPage): method __init__ (line 2672) | def __init__(self, title, content=None): method page_classes (line 2683) | def page_classes(self): class Interstitial (line 2690) | class Interstitial(Templated): method __init__ (line 2693) | def __init__(self, image=None, title=None, message=None, sr_name=None, class AdminInterstitial (line 2706) | class AdminInterstitial(Interstitial): class BannedInterstitial (line 2711) | class BannedInterstitial(Interstitial): class BannedUserInterstitial (line 2716) | class BannedUserInterstitial(BannedInterstitial): class UserBlockedInterstitial (line 2721) | class UserBlockedInterstitial(BannedInterstitial): class InTimeoutInterstitial (line 2726) | class InTimeoutInterstitial(BannedInterstitial): method __init__ (line 2728) | def __init__(self, timeout_days_remaining=0, hide_message=False): class PrivateInterstitial (line 2734) | class PrivateInterstitial(Interstitial): class GoldOnlyInterstitial (line 2739) | class GoldOnlyInterstitial(Interstitial): class QuarantineInterstitial (line 2744) | class QuarantineInterstitial(Interstitial): method __init__ (line 2747) | def __init__(self, sr_name, logged_in, email_verified): class Over18Interstitial (line 2757) | class Over18Interstitial(Interstitial): class LockedInterstitial (line 2762) | class LockedInterstitial(Interstitial): class ArchivedInterstitial (line 2767) | class ArchivedInterstitial(Interstitial): method __init__ (line 2769) | def __init__(self): class DeletedUserInterstitial (line 2777) | class DeletedUserInterstitial(Interstitial): class Popup (line 2782) | class Popup(Templated): method __init__ (line 2784) | def __init__(self, popup_id=None, content=None, **kwargs): class SubredditTopBar (line 2793) | class SubredditTopBar(CachedTemplate): method __init__ (line 2797) | def __init__(self): method my_reddits (line 2815) | def my_reddits(self): method pop_reddits (line 2821) | def pop_reddits(self): method my_reddits_dropdown (line 2829) | def my_reddits_dropdown(self): method subscribed_reddits (line 2841) | def subscribed_reddits(self): method popular_reddits (line 2851) | def popular_reddits(self, exclude_mine=False): method special_reddits (line 2860) | def special_reddits(self): method sr_bar (line 2878) | def sr_bar (self): class MultiInfoBar (line 2898) | class MultiInfoBar(Templated): method __init__ (line 2899) | def __init__(self, multi, srs, user): class SubscriptionBox (line 2929) | class SubscriptionBox(Templated): method __init__ (line 2932) | def __init__(self, srs, multi_text=None): method reddits (line 2964) | def reddits(self): class ModSRInfoBar (line 2968) | class ModSRInfoBar(Templated): class FilteredInfoBar (line 2972) | class FilteredInfoBar(Templated): method __init__ (line 2973) | def __init__(self): class AllInfoBar (line 2980) | class AllInfoBar(Templated): method __init__ (line 2981) | def __init__(self, site, user): class CreateSubreddit (line 3004) | class CreateSubreddit(Templated): method __init__ (line 3006) | def __init__(self, site = None, name = '', captcha=None): class SubredditStylesheetBase (line 3026) | class SubredditStylesheetBase(Templated): method __init__ (line 3028) | def __init__(self, stylesheet_contents, **kwargs): class SubredditStylesheet (line 3039) | class SubredditStylesheet(SubredditStylesheetBase): method __init__ (line 3041) | def __init__(self, site=None, stylesheet_contents=''): method find_preview_comments (line 3050) | def find_preview_comments(sr): method find_preview_links (line 3060) | def find_preview_links(sr): method rendered_link (line 3073) | def rendered_link(links, media, compress, stickied=False): method rendered_comment (line 3085) | def rendered_comment(comments, gilded=False): class SubredditStylesheetSource (line 3093) | class SubredditStylesheetSource(SubredditStylesheetBase): class AutoModeratorConfig (line 3098) | class AutoModeratorConfig(Templated): method __init__ (line 3100) | def __init__(self, automoderator_config): class RawCode (line 3104) | class RawCode(Templated): method __init__ (line 3106) | def __init__(self, code): class CssError (line 3110) | class CssError(Templated): method __init__ (line 3112) | def __init__(self, error): method message (line 3117) | def message(self): class UploadedImage (line 3120) | class UploadedImage(Templated): method __init__ (line 3122) | def __init__(self,status,img_src, name="", errors = {}, form_id = ""): method render (line 3127) | def render(self, *a, **kw): class Thanks (line 3130) | class Thanks(Templated): method __init__ (line 3132) | def __init__(self, secret=None): class GoldThanks (line 3142) | class GoldThanks(Templated): class Gold (line 3146) | class Gold(Templated): method __init__ (line 3147) | def __init__(self, goldtype, period, months, signed, class Creddits (line 3166) | class Creddits(Templated): class GoldPayment (line 3170) | class GoldPayment(Templated): method __init__ (line 3171) | def __init__(self, goldtype, period, months, signed, class GoldSubscription (line 3317) | class GoldSubscription(Templated): method __init__ (line 3318) | def __init__(self, user): class CreditGild (line 3352) | class CreditGild(Templated): class GoldGiftCodeEmail (line 3356) | class GoldGiftCodeEmail(Templated): class Gilding (line 3362) | class Gilding(Templated): class ReportForm (line 3366) | class ReportForm(CachedTemplate): method __init__ (line 3367) | def __init__(self, thing=None, **kw): class SubredditReportForm (line 3392) | class SubredditReportForm(CachedTemplate): method __init__ (line 3393) | def __init__(self, thing=None, filter_by_kind=True, **kw): class ReportFormTemplates (line 3415) | class ReportFormTemplates(Templated): method __init__ (line 3416) | def __init__(self): class FraudForm (line 3423) | class FraudForm(Templated): class Password (line 3427) | class Password(Templated): method __init__ (line 3429) | def __init__(self, success=False): class PasswordReset (line 3432) | class PasswordReset(Templated): class MessageNotificationEmail (line 3438) | class MessageNotificationEmail(Templated): class MessageNotificationEmailsUnsubscribe (line 3442) | class MessageNotificationEmailsUnsubscribe(Templated): class PasswordChangeEmail (line 3447) | class PasswordChangeEmail(Templated): class EmailChangeEmail (line 3451) | class EmailChangeEmail(Templated): class VerifyEmail (line 3455) | class VerifyEmail(Templated): class Promo_Email (line 3458) | class Promo_Email(Templated): method __init__ (line 3459) | def __init__(self, *args, **kwargs): class SuspiciousPaymentEmail (line 3468) | class SuspiciousPaymentEmail(Templated): method __init__ (line 3469) | def __init__(self, user, link): class ResetPassword (line 3473) | class ResetPassword(Templated): class Captcha (line 3480) | class Captcha(Templated): method __init__ (line 3482) | def __init__(self, error=None): class PermalinkMessage (line 3487) | class PermalinkMessage(Templated): method __init__ (line 3490) | def __init__(self, comments_url): class PaneStack (line 3493) | class PaneStack(Templated): method __init__ (line 3496) | def __init__(self, panes=[], div_id = None, css_class=None, div=False, method append (line 3507) | def append(self, item): method push (line 3511) | def push(self, item): method insert (line 3515) | def insert(self, *a): class HtmlPaneStack (line 3520) | class HtmlPaneStack(PaneStack): class SearchForm (line 3525) | class SearchForm(Templated): method __init__ (line 3528) | def __init__(self, prev_search='', search_params={}, site=None, class SearchBar (line 3551) | class SearchBar(Templated): method __init__ (line 3557) | def __init__(self, header=None, prev_search='', search_params={}, class SubredditFacets (line 3580) | class SubredditFacets(Templated): method __init__ (line 3581) | def __init__(self, prev_search='', facets={}, sort=None, recent=None): class NewLink (line 3587) | class NewLink(Templated): method __init__ (line 3589) | def __init__(self, captcha=None, url='', title='', text='', selftext='', class Share (line 3632) | class Share(Templated): class Mail_Opt (line 3635) | class Mail_Opt(Templated): class OptOut (line 3638) | class OptOut(Templated): class OptIn (line 3641) | class OptIn(Templated): class Button (line 3645) | class Button(Wrapped): method __init__ (line 3648) | def __init__(self, link, **kw): method add_props (line 3656) | def add_props(cls, user, wrapped): method render (line 3666) | def render(self, *a, **kw): class ButtonLite (line 3670) | class ButtonLite(Button): method render (line 3671) | def render(self, *a, **kw): class ButtonDemoPanel (line 3674) | class ButtonDemoPanel(Templated): class ContactUs (line 3678) | class ContactUs(Templated): class WidgetDemoPanel (line 3682) | class WidgetDemoPanel(Templated): class UserAwards (line 3687) | class UserAwards(Templated): method __init__ (line 3689) | def __init__(self): class AdminAwards (line 3713) | class AdminAwards(Templated): method __init__ (line 3715) | def __init__(self): class AdminAwardGive (line 3720) | class AdminAwardGive(Templated): method __init__ (line 3722) | def __init__(self, award, recipient='', desc='', url='', hours=''): class AdminAwardWinners (line 3736) | class AdminAwardWinners(Templated): method __init__ (line 3738) | def __init__(self, award): class AdminCreddits (line 3743) | class AdminCreddits(Templated): method __init__ (line 3745) | def __init__(self, recipient): class AdminGold (line 3750) | class AdminGold(Templated): method __init__ (line 3752) | def __init__(self, recipient): class Ads (line 3757) | class Ads(Templated): method __init__ (line 3758) | def __init__(self): class ReadNext (line 3764) | class ReadNext(Templated): method __init__ (line 3765) | def __init__(self, sr, links): class Embed (line 3771) | class Embed(Templated): method __init__ (line 3773) | def __init__(self,content = ''): function wrapped_flair (line 3777) | def wrapped_flair(user, subreddit, force_show_flair): class WrappedUser (line 3791) | class WrappedUser(CachedTemplate): method __init__ (line 3795) | def __init__(self, user, attribs = [], context_thing = None, gray = Fa... class UserTableItem (line 3897) | class UserTableItem(Templated): method executed_message (line 3903) | def executed_message(self): method __init__ (line 3906) | def __init__(self, user, editable=True, **kw): method __repr__ (line 3916) | def __repr__(self): class RelTableItem (line 3919) | class RelTableItem(UserTableItem): method __init__ (line 3920) | def __init__(self, rel, **kw): method _fullname (line 3926) | def _fullname(self): method container_name (line 3931) | def container_name(self): class FriendTableItem (line 3934) | class FriendTableItem(RelTableItem): method cells (line 3939) | def cells(self): method container_name (line 3945) | def container_name(self): class EnemyTableItem (line 3948) | class EnemyTableItem(RelTableItem): method container_name (line 3954) | def container_name(self): class BannedTableItem (line 3957) | class BannedTableItem(RelTableItem): method executed_message (line 3962) | def executed_message(self): class MutedTableItem (line 3966) | class MutedTableItem(RelTableItem): method executed_message (line 3971) | def executed_message(self): class WikiBannedTableItem (line 3975) | class WikiBannedTableItem(BannedTableItem): class ContributorTableItem (line 3978) | class ContributorTableItem(RelTableItem): class WikiMayContributeTableItem (line 3981) | class WikiMayContributeTableItem(RelTableItem): class InvitedModTableItem (line 3984) | class InvitedModTableItem(RelTableItem): method executed_message (line 3989) | def executed_message(self): method is_editable (line 3992) | def is_editable(self, user): method __init__ (line 3999) | def __init__(self, rel, editable=True, **kw): class ModTableItem (line 4008) | class ModTableItem(InvitedModTableItem): method executed_message (line 4012) | def executed_message(self): method is_editable (line 4015) | def is_editable(self, user): class ModToolsPage (line 4023) | class ModToolsPage(Reddit): method __init__ (line 4026) | def __init__(self, **kwargs): class Rules (line 4033) | class Rules(Templated): method __init__ (line 4035) | def __init__(self, title, kind_labels): class FlairPane (line 4045) | class FlairPane(Templated): method __init__ (line 4046) | def __init__(self, num, after, reverse, name, user): class FlairList (line 4069) | class FlairList(Templated): method __init__ (line 4072) | def __init__(self, num, after, reverse, name, user): method flair (line 4077) | def flair(self): class FlairListRow (line 4131) | class FlairListRow(Templated): method __init__ (line 4132) | def __init__(self, user): method from_rel (line 4139) | def from_rel(cls, rel): class FlairNextLink (line 4146) | class FlairNextLink(Templated): method __init__ (line 4147) | def __init__(self, after, previous=False, needs_border=False): class FlairCsv (line 4151) | class FlairCsv(Templated): class LineResult (line 4152) | class LineResult: method __init__ (line 4153) | def __init__(self): method error (line 4159) | def error(self, field, desc): method warn (line 4162) | def warn(self, field, desc): method __init__ (line 4165) | def __init__(self): method add_line (line 4168) | def add_line(self): class FlairTemplateList (line 4172) | class FlairTemplateList(Templated): method __init__ (line 4173) | def __init__(self, flair_type): method templates (line 4177) | def templates(self): class FlairTemplateEditor (line 4183) | class FlairTemplateEditor(Templated): method __init__ (line 4184) | def __init__(self, flair_template, flair_type): method render (line 4195) | def render(self, *a, **kw): class FlairTemplateSample (line 4201) | class FlairTemplateSample(Templated): method __init__ (line 4203) | def __init__(self, flair_template, flair_type): class FlairPrefs (line 4214) | class FlairPrefs(CachedTemplate): method __init__ (line 4215) | def __init__(self): class FlairSelectorLinkSample (line 4231) | class FlairSelectorLinkSample(CachedTemplate): method __init__ (line 4232) | def __init__(self, link, site, flair_template): class FlairSelector (line 4246) | class FlairSelector(CachedTemplate): method __init__ (line 4248) | def __init__(self, user, site, link=None): method render (line 4301) | def render(self, *a, **kw): method _get_templates (line 4304) | def _get_templates(self, site, flair_type, text, css_class): class DetailsPage (line 4318) | class DetailsPage(LinkInfoPage): method __init__ (line 4321) | def __init__(self, thing, *args, **kwargs): method rightbox (line 4349) | def rightbox(self): class PromotePage (line 4359) | class PromotePage(Reddit): method get_menu (line 4366) | def get_menu(cls): method __init__ (line 4388) | def __init__(self, nav_menus=None, *a, **kw): class PromoteLinkBase (line 4402) | class PromoteLinkBase(Templated): method __init__ (line 4407) | def __init__(self, **kw): method get_locations (line 4411) | def get_locations(self): method get_collections (line 4458) | def get_collections(self): method get_mobile_versions (line 4461) | def get_mobile_versions(self): class PromoteLinkNew (line 4466) | class PromoteLinkNew(PromoteLinkBase): method __init__ (line 4467) | def __init__(self, images=None, *a, **kw): class PromoteLinkEdit (line 4473) | class PromoteLinkEdit(PromoteLinkBase): method __init__ (line 4474) | def __init__(self, link, listing, *a, **kw): method setup (line 4478) | def setup(self, link, listing): class RenderableCampaign (line 4574) | class RenderableCampaign(Templated): method __init__ (line 4575) | def __init__(self, link, campaign, transaction, is_pending, is_live, method from_campaigns (line 4661) | def from_campaigns(cls, link, campaigns, method render_html (line 4695) | def render_html(self): class RefundPage (line 4699) | class RefundPage(Reddit): method __init__ (line 4700) | def __init__(self, link, campaign): class PromotePost (line 4718) | class PromotePost(PromoteLinkBase): method __init__ (line 4719) | def __init__(self): class SponsorLookupUser (line 4723) | class SponsorLookupUser(PromoteLinkBase): method __init__ (line 4724) | def __init__(self, id_user=None, email=None, email_users=None): method __init__ (line 4732) | def __init__(self, id_user=None, email=None, email_users=None): class SponsorLookupUser (line 4731) | class SponsorLookupUser(PromoteLinkBase): method __init__ (line 4724) | def __init__(self, id_user=None, email=None, email_users=None): method __init__ (line 4732) | def __init__(self, id_user=None, email=None, email_users=None): class TabbedPane (line 4737) | class TabbedPane(Templated): method __init__ (line 4738) | def __init__(self, tabs, linkable=False): class LinkChild (line 4751) | class LinkChild(object): method __init__ (line 4752) | def __init__(self, link, load=False, expand=False, nofollow=False, method content (line 4760) | def content(self): function make_link_child (line 4763) | def make_link_child(item, show_media_preview=False): class MediaChild (line 4856) | class MediaChild(LinkChild): method __init__ (line 4860) | def __init__(self, link, content, **kw): method content (line 4864) | def content(self): class MediaEmbed (line 4869) | class MediaEmbed(Templated): method __init__ (line 4872) | def __init__(self, *args, **kwargs): class MediaPreview (line 4883) | class MediaPreview(Templated): method __init__ (line 4886) | def __init__(self, media_object, id36, url, **kwargs): class SelfTextChild (line 4894) | class SelfTextChild(LinkChild): method content (line 4897) | def content(self): class UserText (line 4904) | class UserText(CachedTemplate): method __init__ (line 4907) | def __init__(self, class MediaEmbedBody (line 4970) | class MediaEmbedBody(CachedTemplate): method render (line 4972) | def render(self, *a, **kw): class PaymentForm (line 4977) | class PaymentForm(Templated): method __init__ (line 4982) | def __init__(self, link, campaign, **kw): class Bookings (line 4995) | class Bookings(object): method __init__ (line 4996) | def __init__(self): method __add__ (line 5000) | def __add__(self, other): method __radd__ (line 5010) | def __radd__(self, other): method __repr__ (line 5013) | def __repr__(self): class PromoteInventory (line 5025) | class PromoteInventory(PromoteLinkBase): method __init__ (line 5026) | def __init__(self, start, end, target): method as_csv (line 5046) | def as_csv(self): method setup (line 5062) | def setup(self): class PromoteReport (line 5148) | class PromoteReport(PromoteLinkBase): method __init__ (line 5149) | def __init__(self, links, link_text, owner_name, bad_links, start, end, method as_csv (line 5170) | def as_csv(self): method get_traffic (line 5219) | def get_traffic(self, campaigns, start, end): method make_report (line 5284) | def make_report(self): class RawString (line 5383) | class RawString(Templated): method __init__ (line 5384) | def __init__(self, s): method render (line 5387) | def render(self, *a, **kw): class TryCompact (line 5391) | class TryCompact(Reddit): method __init__ (line 5392) | def __init__(self, dest, **kw): class AccountActivityPage (line 5405) | class AccountActivityPage(BoringPage): method __init__ (line 5406) | def __init__(self): method content (line 5409) | def content(self): class UserIPHistory (line 5412) | class UserIPHistory(Templated): method __init__ (line 5413) | def __init__(self): class ApiHelp (line 5425) | class ApiHelp(Templated): method __init__ (line 5426) | def __init__(self, api_docs, *a, **kw): class AwardReceived (line 5431) | class AwardReceived(Templated): class ConfirmAwardClaim (line 5434) | class ConfirmAwardClaim(Templated): class TimeSeriesChart (line 5437) | class TimeSeriesChart(Templated): method __init__ (line 5438) | def __init__(self, id, title, interval, columns, rows, class InterestBar (line 5453) | class InterestBar(Templated): method __init__ (line 5454) | def __init__(self, has_subscribed): class Goldvertisement (line 5458) | class Goldvertisement(Templated): method __init__ (line 5459) | def __init__(self): class LinkCommentsSettings (line 5498) | class LinkCommentsSettings(Templated): method __init__ (line 5499) | def __init__(self, link, sort, suggested_sort): class ModeratorPermissions (line 5524) | class ModeratorPermissions(Templated): method __init__ (line 5525) | def __init__(self, user, permissions_type, permissions, method items (line 5532) | def items(self): class ListingChooser (line 5535) | class ListingChooser(Templated): method __init__ (line 5536) | def __init__(self): method add_item (line 5583) | def add_item(self, section, name, path=None, site=None, description=None, method add_samples (line 5594) | def add_samples(self): method find_selected (line 5602) | def find_selected(self): class PolicyView (line 5615) | class PolicyView(Templated): class PolicyPage (line 5619) | class PolicyPage(BoringPage): method __init__ (line 5623) | def __init__(self, pagename=None, content=None, **kw): method build_toolbars (line 5628) | def build_toolbars(self): class GoogleTagManagerJail (line 5641) | class GoogleTagManagerJail(Templated): class GoogleTagManager (line 5645) | class GoogleTagManager(Templated): class Newsletter (line 5649) | class Newsletter(BoringPage): method __init__ (line 5652) | def __init__(self, pagename=None, content=None, **kw): class SubscribeButton (line 5657) | class SubscribeButton(Templated): method __init__ (line 5658) | def __init__(self, sr, bubble_class=None): class QuarantineOptoutButton (line 5666) | class QuarantineOptoutButton(Templated): method __init__ (line 5667) | def __init__(self, sr, bubble_class=None): class SubredditSelector (line 5675) | class SubredditSelector(Templated): method __init__ (line 5676) | def __init__(self, default_sr=None, extra_subreddits=None, required=Fa... method subreddit_names (line 5707) | def subreddit_names(self): class ListingSuggestions (line 5716) | class ListingSuggestions(Templated): method __init__ (line 5717) | def __init__(self): class UnreadMessagesSuggestions (line 5744) | class UnreadMessagesSuggestions(Templated): class ExploreItem (line 5749) | class ExploreItem(Templated): method __init__ (line 5752) | def __init__(self, item_type, rec_src, sr, link, comment=None): method is_over18 (line 5771) | def is_over18(self): class ExploreItemListing (line 5775) | class ExploreItemListing(Templated): method __init__ (line 5776) | def __init__(self, recs, settings): class TrendingSubredditsBar (line 5791) | class TrendingSubredditsBar(Templated): method __init__ (line 5792) | def __init__(self, subreddit_names, comment_url, comment_count): class GeotargetNotice (line 5801) | class GeotargetNotice(Templated): method __init__ (line 5802) | def __init__(self, city_target=False): class ShareClose (line 5817) | class ShareClose(Templated): FILE: r2/r2/lib/pages/things.py class PrintableButtons (line 42) | class PrintableButtons(Styled): method __init__ (line 45) | def __init__(self, style, thing, class BanButtons (line 80) | class BanButtons(PrintableButtons): method __init__ (line 81) | def __init__(self, thing, class LinkButtons (line 85) | class LinkButtons(PrintableButtons): method __init__ (line 86) | def __init__(self, thing, comments = True, delete = True, report = True): class CommentButtons (line 194) | class CommentButtons(PrintableButtons): method __init__ (line 195) | def __init__(self, thing, delete = True, report = True): class MessageButtons (line 268) | class MessageButtons(PrintableButtons): method __init__ (line 269) | def __init__(self, thing, delete = False, report = True): function make_wrapper (line 334) | def make_wrapper(parent_wrapper = Wrapped, **params): function default_thing_wrapper (line 344) | def default_thing_wrapper(**params): function wrap_links (line 359) | def wrap_links(links, wrapper = default_thing_wrapper(), function hot_links_by_url_listing (line 370) | def hot_links_by_url_listing(url, sr=None, num=None, **kw): function wrap_things (line 381) | def wrap_things(*things): FILE: r2/r2/lib/pages/trafficpages.py class TrafficPage (line 56) | class TrafficPage(Reddit): method __init__ (line 62) | def __init__(self, content): method build_toolbars (line 65) | def build_toolbars(self): class SitewideTrafficPage (line 76) | class SitewideTrafficPage(TrafficPage): method __init__ (line 81) | def __init__(self): class LanguageTrafficPage (line 85) | class LanguageTrafficPage(TrafficPage): method __init__ (line 88) | def __init__(self, langcode): class AdvertTrafficPage (line 97) | class AdvertTrafficPage(TrafficPage): method __init__ (line 100) | def __init__(self, code): class RedditTraffic (line 108) | class RedditTraffic(Templated): method __init__ (line 113) | def __init__(self, place): method make_tables (line 124) | def make_tables(self): method get_dow_summary (line 191) | def get_dow_summary(self): method get_data_for_interval (line 200) | def get_data_for_interval(self, interval, columns): function make_subreddit_traffic_report (line 211) | def make_subreddit_traffic_report(subreddits=None, num=None): class SitewideTraffic (line 240) | class SitewideTraffic(RedditTraffic): method __init__ (line 242) | def __init__(self): method get_dow_summary (line 246) | def get_dow_summary(self): method get_data_for_interval (line 249) | def get_data_for_interval(self, interval, columns): class LanguageTrafficSummary (line 253) | class LanguageTrafficSummary(Templated): method __init__ (line 256) | def __init__(self): class AdvertTrafficSummary (line 267) | class AdvertTrafficSummary(RedditTraffic): method __init__ (line 270) | def __init__(self): method make_tables (line 273) | def make_tables(self): method split_codename (line 307) | def split_codename(codename): method get_things (line 315) | def get_things(codes): method get_sr_name (line 323) | def get_sr_name(name): method get_ad_name (line 331) | def get_ad_name(code, things=None): method get_ad_url (line 368) | def get_ad_url(code, things): class LanguageTraffic (line 376) | class LanguageTraffic(RedditTraffic): method __init__ (line 377) | def __init__(self, langcode): method get_data_for_interval (line 382) | def get_data_for_interval(self, interval, columns): method get_language_name (line 386) | def get_language_name(language_code, locale=None): class AdvertTraffic (line 398) | class AdvertTraffic(RedditTraffic): method __init__ (line 399) | def __init__(self, code): method get_data_for_interval (line 404) | def get_data_for_interval(self, interval, columns): class SubredditTraffic (line 420) | class SubredditTraffic(RedditTraffic): method __init__ (line 421) | def __init__(self): method make_period_link (line 432) | def make_period_link(interval, date): method get_dow_summary (line 451) | def get_dow_summary(self): method get_data_for_interval (line 454) | def get_data_for_interval(self, interval, columns): function _clickthrough_rate (line 471) | def _clickthrough_rate(impressions, clicks): function _is_promo_preliminary (line 479) | def _is_promo_preliminary(end_date): function get_promo_traffic (line 490) | def get_promo_traffic(thing, start, end): function get_billable_traffic (line 513) | def get_billable_traffic(campaign): function is_early_campaign (line 519) | def is_early_campaign(campaign): function is_launched_campaign (line 524) | def is_launched_campaign(campaign): class PromotedLinkTraffic (line 530) | class PromotedLinkTraffic(Templated): method __init__ (line 531) | def __init__(self, thing, campaign, before, after): method make_campaign_table_row (line 553) | def make_campaign_table_row(cls, id, start, end, target, location, method make_campaign_table (line 592) | def make_campaign_table(self): method check_dates (line 672) | def check_dates(self, thing): method get_hourly_traffic (line 720) | def get_hourly_traffic(cls, thing, start, end): method make_hourly_table (line 738) | def make_hourly_table(self, thing): method as_csv (line 758) | def as_csv(cls, thing): class SubredditTrafficReport (line 781) | class SubredditTrafficReport(Templated): method __init__ (line 782) | def __init__(self): method as_csv (line 805) | def as_csv(self): FILE: r2/r2/lib/pages/wiki.py class WikiView (line 36) | class WikiView(Templated): method __init__ (line 37) | def __init__(self, content, edit_by, edit_date, may_revise=False, class WikiPageNotFound (line 60) | class WikiPageNotFound(Templated): method __init__ (line 61) | def __init__(self, page): class WikiPageListing (line 66) | class WikiPageListing(Templated): method __init__ (line 67) | def __init__(self, pages, linear_pages, page=None): class WikiEditPage (line 74) | class WikiEditPage(Templated): method __init__ (line 75) | def __init__(self, page_content='', previous='', page=None): class WikiPageSettings (line 82) | class WikiPageSettings(Templated): method __init__ (line 83) | def __init__(self, settings, mayedit, show_editors=True, class WikiPageRevisions (line 94) | class WikiPageRevisions(Templated): method __init__ (line 95) | def __init__(self, revisions, page=None): class WikiPageDiscussions (line 100) | class WikiPageDiscussions(Templated): method __init__ (line 101) | def __init__(self, listing, page=None): class WikiBasePage (line 106) | class WikiBasePage(Reddit): method __init__ (line 109) | def __init__(self, content, page=None, may_revise=False, method content (line 152) | def content(self): class WikiPageView (line 155) | class WikiPageView(WikiBasePage): method __init__ (line 156) | def __init__(self, content, page, diff=None, renderer='wiki', **context): class WikiNotFound (line 165) | class WikiNotFound(WikiBasePage): method __init__ (line 166) | def __init__(self, page, **context): class WikiCreate (line 172) | class WikiCreate(WikiBasePage): method __init__ (line 173) | def __init__(self, page, **context): class WikiEdit (line 179) | class WikiEdit(WikiBasePage): method __init__ (line 180) | def __init__(self, content, previous, page, **context): class WikiSettings (line 185) | class WikiSettings(WikiBasePage): method __init__ (line 186) | def __init__(self, settings, mayedit, page, restricted, **context): class WikiRevisions (line 193) | class WikiRevisions(WikiBasePage): method __init__ (line 194) | def __init__(self, revisions, page, **context): class WikiRecent (line 199) | class WikiRecent(WikiBasePage): method __init__ (line 200) | def __init__(self, revisions, **context): class WikiListing (line 205) | class WikiListing(WikiBasePage): method __init__ (line 206) | def __init__(self, pages, linear_pages, **context): class WikiDiscussions (line 212) | class WikiDiscussions(WikiBasePage): method __init__ (line 213) | def __init__(self, listing, page, **context): FILE: r2/r2/lib/permissions.py class PermissionSet (line 26) | class PermissionSet(dict): method __init__ (line 31) | def __init__(self, *args, **kwargs): method loads (line 35) | def loads(cls, encoded, validate=False): method dumps (line 46) | def dumps(self): method is_superuser (line 51) | def is_superuser(self): method is_valid (line 54) | def is_valid(self): method get (line 62) | def get(self, key, default=None): method __getitem__ (line 67) | def __getitem__(self, key): class ModeratorPermissionSet (line 73) | class ModeratorPermissionSet(PermissionSet): method loads (line 103) | def loads(cls, encoded, **kwargs): FILE: r2/r2/lib/plugin.py class Plugin (line 29) | class Plugin(object): method __init__ (line 38) | def __init__(self, entry_point): method name (line 42) | def name(self): method path (line 46) | def path(self): method template_dir (line 51) | def template_dir(self): method static_dir (line 56) | def static_dir(self): method on_load (line 59) | def on_load(self, g): method add_js (line 62) | def add_js(self, module_registry=None): method declare_queues (line 73) | def declare_queues(self, queues): method add_routes (line 76) | def add_routes(self, mc): method load_controllers (line 79) | def load_controllers(self): method get_documented_controllers (line 82) | def get_documented_controllers(self): class PluginLoader (line 86) | class PluginLoader(object): method __init__ (line 87) | def __init__(self, working_set=None, plugin_names=None): method __len__ (line 118) | def __len__(self): method __iter__ (line 121) | def __iter__(self): method __reversed__ (line 124) | def __reversed__(self): method __getitem__ (line 127) | def __getitem__(self, key): method available_plugins (line 130) | def available_plugins(self, name=None): method declare_queues (line 133) | def declare_queues(self, queues): method load_plugins (line 137) | def load_plugins(self, config): method load_controllers (line 151) | def load_controllers(self): method get_documented_controllers (line 160) | def get_documented_controllers(self): FILE: r2/r2/lib/profiler.py function profile (line 28) | def profile(fn): FILE: r2/r2/lib/promote.py function _mark_promos_updated (line 82) | def _mark_promos_updated(): function health_check (line 86) | def health_check(): function cost_per_mille (line 91) | def cost_per_mille(spend, impressions): function cost_per_click (line 99) | def cost_per_click(spend, clicks): function promo_keep_fn (line 107) | def promo_keep_fn(item): function _base_host (line 115) | def _base_host(is_mobile_web=False): function promo_traffic_url (line 124) | def promo_traffic_url(l): # old traffic url function promotraffic_url (line 127) | def promotraffic_url(l): # new traffic url function promo_edit_url (line 130) | def promo_edit_url(l): function view_live_url (line 133) | def view_live_url(link, campaign, srname): function payment_url (line 140) | def payment_url(action, link_id36, campaign_id36): function pay_url (line 144) | def pay_url(l, campaign): function refund_url (line 147) | def refund_url(l, campaign): function is_awaiting_fraud_review (line 152) | def is_awaiting_fraud_review(link): function is_promo (line 155) | def is_promo(link): function is_accepted (line 159) | def is_accepted(link): function is_unpaid (line 165) | def is_unpaid(link): function is_unapproved (line 168) | def is_unapproved(link): function is_rejected (line 171) | def is_rejected(link): function is_promoted (line 174) | def is_promoted(link): function is_edited_live (line 177) | def is_edited_live(link): function is_finished (line 180) | def is_finished(link): function is_live_on_sr (line 183) | def is_live_on_sr(link, sr): function is_pending (line 186) | def is_pending(campaign): function update_query (line 190) | def update_query(base_url, query_updates, unset=False): function update_served (line 202) | def update_served(items): function is_valid_click_url (line 216) | def is_valid_click_url(link, click_url, click_hash): function get_click_url_hmac (line 222) | def get_click_url_hmac(link, click_url): function add_trackers (line 229) | def add_trackers(items, sr, adserver_click_urls=None): function update_promote_status (line 286) | def update_promote_status(link, status): function new_promotion (line 291) | def new_promotion(is_self, title, content, author, ip): function get_transactions (line 324) | def get_transactions(link, campaigns): function new_campaign (line 343) | def new_campaign(link, dates, target, frequency_cap, function free_campaign (line 366) | def free_campaign(link, campaign, user): function edit_campaign (line 370) | def edit_campaign(link, campaign, dates, target, frequency_cap, function terminate_campaign (line 447) | def terminate_campaign(link, campaign): function delete_campaign (line 481) | def delete_campaign(link, campaign): function toggle_pause_campaign (line 489) | def toggle_pause_campaign(link, campaign, should_pause): function void_campaign (line 500) | def void_campaign(link, campaign, reason): function auth_campaign (line 523) | def auth_campaign(link, campaign, user, pay_id=None, freebie=False): function promo_datetime_now (line 588) | def promo_datetime_now(offset=None): function get_date_limits (line 598) | def get_date_limits(link, is_sponsor=False): function accept_promotion (line 648) | def accept_promotion(link): function flag_payment (line 676) | def flag_payment(link, reason): function review_fraud (line 691) | def review_fraud(link, is_fraud): function reject_promotion (line 702) | def reject_promotion(link, reason=None, notify_why=True): function unapprove_promotion (line 719) | def unapprove_promotion(link): function edited_live_promotion (line 731) | def edited_live_promotion(link): function authed_or_not_needed (line 736) | def authed_or_not_needed(campaign): function charged_or_not_needed (line 742) | def charged_or_not_needed(campaign): function is_served_promo (line 749) | def is_served_promo(date, link, campaign): function is_accepted_promo (line 754) | def is_accepted_promo(date, link, campaign): function is_scheduled_promo (line 760) | def is_scheduled_promo(date, link, campaign): function is_live_promo (line 765) | def is_live_promo(link, campaign): function is_complete_promo (line 770) | def is_complete_promo(link, campaign): function _is_geotargeted_promo (line 775) | def _is_geotargeted_promo(link): function is_geotargeted_promo (line 782) | def is_geotargeted_promo(link): function get_promos (line 793) | def get_promos(date, sr_names=None, link=None): function get_accepted_promos (line 803) | def get_accepted_promos(offset=0): function get_scheduled_promos (line 810) | def get_scheduled_promos(offset=0): function get_served_promos (line 817) | def get_served_promos(offset=0): function charge_campaign (line 824) | def charge_campaign(link, campaign): function charge_pending (line 856) | def charge_pending(offset=1): function live_campaigns_by_link (line 861) | def live_campaigns_by_link(link, sr=None): function promote_link (line 872) | def promote_link(link, campaign): function make_daily_promotions (line 884) | def make_daily_promotions(): function finalize_completed_campaigns (line 910) | def finalize_completed_campaigns(daysago=1): function get_refund_amount (line 964) | def get_refund_amount(camp, billable): function refund_campaign (line 973) | def refund_campaign(link, camp, refund_amount, billable_amount, function all_live_promo_srnames (line 1008) | def all_live_promo_srnames(): function get_nsfw_collections_srnames (line 1017) | def get_nsfw_collections_srnames(): function is_site_over18 (line 1027) | def is_site_over18(site): function srnames_from_site (line 1034) | def srnames_from_site(user, site, include_subscriptions=True): function keywords_from_context (line 1074) | def keywords_from_context( function _get_live_promotions (line 1114) | def _get_live_promotions(sanitized_names): function get_live_promotions (line 1130) | def get_live_promotions(sr_names): function lottery_promoted_links (line 1147) | def lottery_promoted_links(sr_names, n=10): function get_total_run (line 1162) | def get_total_run(thing): function get_traffic_dates (line 1201) | def get_traffic_dates(thing): function get_billable_impressions (line 1209) | def get_billable_impressions(campaign): function get_billable_amount (line 1221) | def get_billable_amount(camp, impressions): function get_spent_amount (line 1234) | def get_spent_amount(campaign): function successful_payment (line 1248) | def successful_payment(link, campaign, ip, address): function new_payment_method (line 1267) | def new_payment_method(user, ip, address, link): function failed_payment_method (line 1272) | def failed_payment_method(user, link): function Run (line 1277) | def Run(verbose=True): FILE: r2/r2/lib/providers/__init__.py function select_provider (line 23) | def select_provider(config_parser, working_set, type, name): FILE: r2/r2/lib/providers/auth/__init__.py class AuthenticationProvider (line 24) | class AuthenticationProvider(object): method is_logout_allowed (line 39) | def is_logout_allowed(self): method get_authenticated_account (line 50) | def get_authenticated_account(self): FILE: r2/r2/lib/providers/auth/cookie.py class CookieAuthenticationProvider (line 33) | class CookieAuthenticationProvider(AuthenticationProvider): method is_logout_allowed (line 44) | def is_logout_allowed(self): method get_authenticated_account (line 47) | def get_authenticated_account(self): FILE: r2/r2/lib/providers/auth/http.py class HttpAuthenticationProvider (line 36) | class HttpAuthenticationProvider(AuthenticationProvider): method is_logout_allowed (line 54) | def is_logout_allowed(self): method get_authenticated_account (line 57) | def get_authenticated_account(self): FILE: r2/r2/lib/providers/cdn/__init__.py class CdnProvider (line 23) | class CdnProvider(object): method get_client_ip (line 28) | def get_client_ip(self, environ): method get_client_location (line 44) | def get_client_location(self, environ): method purge_content (line 55) | def purge_content(self, url): FILE: r2/r2/lib/providers/cdn/cloudflare.py class CloudFlareCdnProvider (line 32) | class CloudFlareCdnProvider(CdnProvider): method _do_content_purge (line 37) | def _do_content_purge(self, url): method get_client_ip (line 58) | def get_client_ip(self, environ): method get_client_location (line 73) | def get_client_location(self, environ): method purge_content (line 76) | def purge_content(self, url): FILE: r2/r2/lib/providers/cdn/fastly.py class FastlyCdnProvider (line 31) | class FastlyCdnProvider(CdnProvider): method get_client_ip (line 34) | def get_client_ip(self, environ): method get_client_location (line 49) | def get_client_location(self, environ): method purge_content (line 52) | def purge_content(self, url): FILE: r2/r2/lib/providers/cdn/null.py class NullCdnProvider (line 26) | class NullCdnProvider(CdnProvider): method get_client_ip (line 31) | def get_client_ip(self, environ): method get_client_location (line 34) | def get_client_location(self, environ): FILE: r2/r2/lib/providers/email/__init__.py class EmailProvider (line 23) | class EmailProvider(object): method send_email (line 27) | def send_email(self, to_address, from_address, subject, text, reply_to, class EmailSendError (line 55) | class EmailSendError(Exception): pass FILE: r2/r2/lib/providers/email/mailgun.py class MailgunEmailProvider (line 37) | class MailgunEmailProvider(EmailProvider): method send_email (line 47) | def send_email(self, to_address, from_address, subject, text, reply_to, FILE: r2/r2/lib/providers/email/null.py class NullEmailProvider (line 26) | class NullEmailProvider(EmailProvider): method send_email (line 31) | def send_email(self, to_address, from_address, subject, text, reply_to, FILE: r2/r2/lib/providers/image_resizing/__init__.py class ImageResizingProvider (line 23) | class ImageResizingProvider(object): method resize_image (line 27) | def resize_image(self, image, width=None, censor_nsfw=False, max_ratio... method purge_url (line 54) | def purge_url(self, url): class NotLargeEnough (line 65) | class NotLargeEnough(Exception): pass FILE: r2/r2/lib/providers/image_resizing/imgix.py class ImgixImageResizingProvider (line 35) | class ImgixImageResizingProvider(ImageResizingProvider): method resize_image (line 43) | def resize_image(self, image, width=None, censor_nsfw=False, max_ratio... method _sign_url (line 75) | def _sign_url(self, url, token): method purge_url (line 101) | def purge_url(self, url): FILE: r2/r2/lib/providers/image_resizing/no_op.py class NoOpImageResizingProvider (line 25) | class NoOpImageResizingProvider(ImageResizingProvider): method resize_image (line 31) | def resize_image(self, image, width=None, censor_nsfw=False, max_ratio... FILE: r2/r2/lib/providers/image_resizing/unsplashit.py class UnsplashitImageResizingProvider (line 25) | class UnsplashitImageResizingProvider(ImageResizingProvider): method resize_image (line 31) | def resize_image(self, image, width=None, censor_nsfw=False, max_ratio... FILE: r2/r2/lib/providers/media/__init__.py class MediaProvider (line 23) | class MediaProvider(object): method make_inaccessible (line 31) | def make_inaccessible(self, url): method put (line 41) | def put(self, category, name, contents, headers=None): method purge (line 58) | def purge(self, url): FILE: r2/r2/lib/providers/media/filesystem.py class FileSystemMediaProvider (line 33) | class FileSystemMediaProvider(MediaProvider): method make_inaccessible (line 54) | def make_inaccessible(self, url): method put (line 65) | def put(self, category, name, contents, headers=None): method purge (line 75) | def purge(self, url): FILE: r2/r2/lib/providers/media/s3.py class S3MediaProvider (line 38) | class S3MediaProvider(MediaProvider): method _get_bucket (line 78) | def _get_bucket(self, bucket_name, validate=False): method _get_bucket_key_from_url (line 85) | def _get_bucket_key_from_url(self, url): method make_inaccessible (line 96) | def make_inaccessible(self, url): method put (line 114) | def put(self, category, name, contents, headers=None): method purge (line 154) | def purge(self, url): FILE: r2/r2/lib/providers/search/__init__.py class SearchProvider (line 24) | class SearchProvider(object): method InvalidQuery (line 28) | def InvalidQuery(self): method SearchException (line 31) | def SearchException(self): method Query (line 34) | def Query(self): method SubredditSearchQuery (line 37) | def SubredditSearchQuery(self): method sorts (line 40) | def sorts(self): method run_changed (line 43) | def run_changed(self): FILE: r2/r2/lib/providers/search/cloudsearch.py class CloudSearchUploader (line 70) | class CloudSearchUploader(object): method __init__ (line 74) | def __init__(self, doc_api, fullnames=None, version_offset=_VERSION_OF... method desired_fullnames (line 80) | def desired_fullnames(cls, items): method _version_tenths (line 90) | def _version_tenths(self): method _version_seconds (line 99) | def _version_seconds(self): method add_xml (line 104) | def add_xml(self, thing, version): method delete_xml (line 114) | def delete_xml(self, thing, version=None): method delete_ids (line 123) | def delete_ids(self, ids): method xml_from_things (line 135) | def xml_from_things(self): method should_index (line 165) | def should_index(self, thing): method batch_lookups (line 168) | def batch_lookups(self): method fields (line 179) | def fields(self, thing): method inject (line 182) | def inject(self, quiet=False): method send_documents (line 218) | def send_documents(self, docs): class LinkUploader (line 248) | class LinkUploader(CloudSearchUploader): method __init__ (line 251) | def __init__(self, doc_api, fullnames=None, version_offset=_VERSION_OF... method fields (line 256) | def fields(self, thing): method batch_lookups (line 262) | def batch_lookups(self): method should_index (line 287) | def should_index(self, thing): class SubredditUploader (line 291) | class SubredditUploader(CloudSearchUploader): method fields (line 295) | def fields(self, thing): method should_index (line 298) | def should_index(self, thing): function chunk_xml (line 302) | def chunk_xml(xml, depth=0): function _run_changed (line 327) | def _run_changed(msgs, chan): function run_changed (line 356) | def run_changed(drain=False, min_size=500, limit=1000, sleep_time=10, function _progress_key (line 369) | def _progress_key(item): function rebuild_link_index (line 373) | def rebuild_link_index(start_at=None, sleeptime=1, cls=Link, function test_run_link (line 415) | def test_run_link(start_link, count=1000): function test_run_srs (line 425) | def test_run_srs(*sr_names): function basic_query (line 438) | def basic_query(query=None, bq=None, faceting=None, size=1000, function _encode_query (line 503) | def _encode_query(query, bq, faceting, size, start, rank, rank_expressions, class CloudSearchQuery (line 533) | class CloudSearchQuery(object): method __init__ (line 541) | def __init__(self, query, sr=None, sort=None, syntax=None, raw_sort=None, method run (line 580) | def run(self, _update=False): method _parse (line 585) | def _parse(self): method _run (line 601) | def _run(self, _update=False): method preprocess_query (line 615) | def preprocess_query(self, query): method customize_query (line 618) | def customize_query(self, bq=u''): method create_boolean_query (line 622) | def create_boolean_query(cls, queries): method __repr__ (line 630) | def __repr__(self): method _run_cached (line 644) | def _run_cached(cls, query, bq, sort="relevance", rank_expressions=None, class LinkSearchQuery (line 704) | class LinkSearchQuery(CloudSearchQuery): method customize_query (line 731) | def customize_query(self, bq=u''): method _restrict_recent (line 747) | def _restrict_recent(recent): method _restrict_sr (line 753) | def _restrict_sr(sr): class CloudSearchSubredditSearchQuery (line 786) | class CloudSearchSubredditSearchQuery(CloudSearchQuery): method preprocess_query (line 795) | def preprocess_query(self, query): method customize_query (line 802) | def customize_query(self, bq=u''): class CloudSearchProvider (line 811) | class CloudSearchProvider(SearchProvider): method run_changed (line 820) | def run_changed(self, drain=False, min_size=int(getattr(g, 'SOLR_MIN_B... FILE: r2/r2/lib/providers/search/common.py class InvalidQuery (line 35) | class InvalidQuery(Exception): class SearchError (line 39) | class SearchError(Exception): class SearchHTTPError (line 43) | class SearchHTTPError(httplib.HTTPException): function safe_xml_str (line 47) | def safe_xml_str(s, use_encoding="utf-8"): function safe_get (line 65) | def safe_get(get_fn, ids, return_dict=True, **kw): function field (line 84) | def field(name=None, cloudsearch_type=str, lucene_type=SAME_AS_CLOUDSEAR... class FieldsMeta (line 114) | class FieldsMeta(type): method __init__ (line 115) | def __init__(cls, name, bases, attrs): class FieldsBase (line 124) | class FieldsBase(object): method fields (line 127) | def fields(self): method all_fields (line 138) | def all_fields(cls): method cloudsearch_fields (line 142) | def cloudsearch_fields(cls, type_=None, types=FIELD_TYPES): method lucene_fields (line 147) | def lucene_fields(cls, type_=None, types=FIELD_TYPES): method cloudsearch_fieldnames (line 152) | def cloudsearch_fieldnames(cls, type_=None, types=FIELD_TYPES): method lucene_fieldnames (line 157) | def lucene_fieldnames(cls, type_=None, types=FIELD_TYPES): class LinkFields (line 161) | class LinkFields(FieldsBase): method __init__ (line 162) | def __init__(self, link, author, sr): method ups (line 168) | def ups(self): method downs (line 172) | def downs(self): method num_comments (line 176) | def num_comments(self): method fullname (line 180) | def fullname(self): method subreddit (line 184) | def subreddit(self): method reddit (line 188) | def reddit(self): method title (line 192) | def title(self): method sr_id (line 196) | def sr_id(self): method timestamp (line 200) | def timestamp(self): method over18 (line 204) | def over18(self): method nsfw (line 209) | def nsfw(self): method is_self (line 213) | def is_self(self): method self_ (line 217) | def self_(self): method author_fullname (line 221) | def author_fullname(self): method author_field (line 225) | def author_field(self): method type_id (line 229) | def type_id(self): method site (line 233) | def site(self): method selftext (line 244) | def selftext(self): method url (line 251) | def url(self): method flair_css_class (line 258) | def flair_css_class(self): method flair_text (line 262) | def flair_text(self): method flair (line 266) | def flair(self): class SubredditFields (line 270) | class SubredditFields(FieldsBase): method __init__ (line 271) | def __init__(self, sr): method name (line 275) | def name(self): method title (line 279) | def title(self): method type_ (line 283) | def type_(self): method language (line 287) | def language(self): method header_title (line 291) | def header_title(self): method description (line 295) | def description(self): method sidebar (line 299) | def sidebar(self): method over18 (line 303) | def over18(self): method link_type (line 307) | def link_type(self): method activity (line 311) | def activity(self): method subscribers (line 315) | def subscribers(self): method type_id (line 319) | def type_id(self): class Results (line 323) | class Results(object): method __init__ (line 324) | def __init__(self, docs, hits, facets): method __repr__ (line 330) | def __repr__(self): method subreddit_facets (line 337) | def subreddit_facets(self): FILE: r2/r2/lib/providers/search/solr.py function basic_query (line 77) | def basic_query(query=None, bq=None, faceting=None, size=1000, class SolrSearchQuery (line 136) | class SolrSearchQuery(object): method __init__ (line 142) | def __init__(self, query, sr=None, sort=None, syntax=None, raw_sort=None, method run (line 179) | def run(self, after=None, reverse=False, num=1000, _update=False): method _run (line 190) | def _run(self, start=0, num=1000, _update=False): method customize_query (line 201) | def customize_query(self, q): method __repr__ (line 204) | def __repr__(self): method _run_cached (line 217) | def _run_cached(cls, query, bq, sort="score", faceting=None, start=0, class LinkSearchQuery (line 291) | class LinkSearchQuery(SolrSearchQuery): method customize_query (line 312) | def customize_query(self, bq): method create_boolean_query (line 323) | def create_boolean_query(cls, queries): method _restrict_recent (line 332) | def _restrict_recent(recent): method _get_sr_restriction (line 338) | def _get_sr_restriction(sr): class SolrSubredditSearchQuery (line 367) | class SolrSubredditSearchQuery(SolrSearchQuery): function _encode_query (line 376) | def _encode_query(query, faceting, size, start, rank, return_fields): class SolrSearchUploader (line 414) | class SolrSearchUploader(object): method __init__ (line 416) | def __init__(self, solr_host=None, solr_port=None, fullnames=None): method desired_fullnames (line 422) | def desired_fullnames(cls, items): method add_xml (line 433) | def add_xml(self, thing): method delete_xml (line 445) | def delete_xml(self, thing): method delete_ids (line 453) | def delete_ids(self, ids): method batch_lookups (line 466) | def batch_lookups(self): method xml_from_things (line 477) | def xml_from_things(self): method inject (line 520) | def inject(self, quiet=False): method send_documents (line 560) | def send_documents(self, docs): function chunk_xml (line 594) | def chunk_xml(xml, depth=0): function _run_changed (line 620) | def _run_changed(msgs, chan): class SolrLinkUploader (line 649) | class SolrLinkUploader(SolrSearchUploader): method __init__ (line 652) | def __init__(self, solr_host=None, solr_port=None, fullnames=None): method fields (line 657) | def fields(self, thing): method batch_lookups (line 663) | def batch_lookups(self): method should_index (line 688) | def should_index(self, thing): class SolrSubredditUploader (line 692) | class SolrSubredditUploader(SolrSearchUploader): method fields (line 695) | def fields(self, thing): method should_index (line 698) | def should_index(self, thing): function _progress_key (line 702) | def _progress_key(item): function _rebuild_link_index (line 706) | def _rebuild_link_index(start_at=None, sleeptime=1, cls=Link, function test_run_link (line 747) | def test_run_link(start_link, count=1000): function test_run_srs (line 757) | def test_run_srs(*sr_names): function _translate_raw_sort (line 764) | def _translate_raw_sort(sort): class SolrSearchProvider (line 773) | class SolrSearchProvider(SearchProvider): method run_changed (line 825) | def run_changed(self, drain=False, min_size=int(getattr(g, 'solr_min_b... method rebuild_link_index (line 835) | def rebuild_link_index(self, start_at=None, sleeptime=1, cls=Link, FILE: r2/r2/lib/providers/support/__init__.py class TicketProvider (line 23) | class TicketProvider(object): method build_ticket_url_from_id (line 28) | def build_ticket_url_from_id(self, ticket_id): method create (line 38) | def create(self): method get (line 47) | def get(self, ticket_id): method update (line 56) | def update(self): FILE: r2/r2/lib/providers/support/zendesk.py class ZenDeskProvider (line 32) | class ZenDeskProvider(TicketProvider): method build_ticket_url_from_id (line 35) | def build_ticket_url_from_id(self, ticket_id): method create (line 41) | def create(self, method get_ticket_id_from_url (line 94) | def get_ticket_id_from_url(self, ticket_url): method get (line 103) | def get(self, ticket_id): method update (line 129) | def update(self, ticket, status=None, FILE: r2/r2/lib/ratelimit.py class TimeSlice (line 44) | class TimeSlice(collections.namedtuple("TimeSlice", ["beginning", "end"])): method remaining (line 47) | def remaining(self): class RatelimitError (line 51) | class RatelimitError(Exception): method __init__ (line 52) | def __init__(self, e): method __str__ (line 55) | def __str__(self): function _make_ratelimit_cache_key (line 59) | def _make_ratelimit_cache_key(key_prefix, time_slice): function get_timeslice (line 71) | def get_timeslice(slice_seconds): function record_usage (line 87) | def record_usage(key_prefix, time_slice): function record_usage_multi (line 114) | def record_usage_multi(prefix_slices): function get_usage (line 162) | def get_usage(key_prefix, time_slice): function get_usage_multi (line 175) | def get_usage_multi(prefix_slices): class RateLimit (line 193) | class RateLimit(object): method _record_event (line 239) | def _record_event(self, event_type_template): method timeslice (line 246) | def timeslice(self): method _check (line 249) | def _check(self, usage): method check (line 256) | def check(self): method check_multi (line 261) | def check_multi(ratelimits): method get_usage (line 266) | def get_usage(self): method record_usage (line 270) | def record_usage(self): method record_multi (line 276) | def record_multi(ratelimits): class LiveConfigRateLimit (line 285) | class LiveConfigRateLimit(RateLimit): method seconds (line 295) | def seconds(self): method limit (line 299) | def limit(self): class SimpleRateLimit (line 303) | class SimpleRateLimit(RateLimit): method __init__ (line 311) | def __init__(self, name, seconds, limit): method _record_event (line 316) | def _record_event(self, event_type_template): method record_and_check (line 320) | def record_and_check(self): FILE: r2/r2/lib/recommender.py function get_recommendations (line 58) | def get_recommendations(srs, function get_recommended_content_for_user (line 99) | def get_recommended_content_for_user(account, function get_recommended_content (line 123) | def get_recommended_content(prefs, src, settings): function get_hot_items (line 199) | def get_hot_items(srs, item_type, src): function get_rising_items (line 210) | def get_rising_items(omit_sr_ids, count=4): function get_comment_items (line 224) | def get_comment_items(srs, src, count=4): function get_discovery_srid36s (line 248) | def get_discovery_srid36s(): function random_sample (line 254) | def random_sample(items, count): function is_visible (line 260) | def is_visible(sr): class SRRecommendation (line 269) | class SRRecommendation(tdb_cassandra.View): method for_srs (line 282) | def for_srs(cls, srid36, to_omit, count, source, match_set=True): method _merge_roundrobin (line 310) | def _merge_roundrobin(cls, rows): method _merge_and_sort_by_count (line 324) | def _merge_and_sort_by_count(cls, rows): FILE: r2/r2/lib/require.py class RequirementException (line 23) | class RequirementException(Exception): function require (line 26) | def require(val): function require_split (line 37) | def require_split(s, length, sep=None): FILE: r2/r2/lib/rising.py function calc_rising (line 33) | def calc_rising(): function set_rising (line 52) | def set_rising(): function get_all_rising (line 56) | def get_all_rising(): function get_rising (line 60) | def get_rising(sr): function get_rising_tuples (line 65) | def get_rising_tuples(sr_ids): function normalized_rising (line 84) | def normalized_rising(sr_ids): FILE: r2/r2/lib/s3_helpers.py function _to_path (line 43) | def _to_path(bucket, key): function _from_path (line 49) | def _from_path(path): function parse_s3_path (line 76) | def parse_s3_path(path): function format_expires (line 80) | def format_expires(expires): function get_text_from_s3 (line 84) | def get_text_from_s3(s3_connection, path): function mv_file_s3 (line 94) | def mv_file_s3(s3_connection, src_path, dst_path): function s3_key_exists (line 106) | def s3_key_exists(s3_connection, path): function copy_to_s3 (line 113) | def copy_to_s3(s3_connection, local_path, dst_path, verbose=False): function get_connection (line 137) | def get_connection(): function get_key (line 141) | def get_key(bucket_name, key, connection=None): function get_keys (line 147) | def get_keys(bucket_name, meta=False, connection=None, **kwargs): function delete_keys (line 159) | def delete_keys(bucket_name, prefix, connection=None): function _get_v4_credential (line 166) | def _get_v4_credential(aws_access_key_id, date, service_name, region_name): function _get_upload_policy (line 174) | def _get_upload_policy( function _sign (line 234) | def _sign(secret, msg): function _derive_v4_signature_key (line 238) | def _derive_v4_signature_key(secret, date, region_name, service_name): function _get_upload_signature (line 245) | def _get_upload_signature( function get_post_args (line 261) | def get_post_args( FILE: r2/r2/lib/signing.py class SigningResult (line 62) | class SigningResult(object): method __init__ (line 68) | def __init__( method __repr__ (line 86) | def __repr__(self): method add_error (line 92) | def add_error(self, error, field=None, details=None): method add_ignore (line 108) | def add_ignore(self, ignored_error): method has_errors (line 116) | def has_errors(self): method is_valid (line 129) | def is_valid(self): method update (line 137) | def update(self, other): function current_epoch (line 168) | def current_epoch(): function valid_epoch (line 172) | def valid_epoch(platform, epoch, max_age=5 * 60): function epoch_wrap (line 179) | def epoch_wrap(epoch, payload): function versioned_hmac (line 183) | def versioned_hmac(secret, body, global_version=GLOBAL_TOKEN_VERSION): function get_secret_token (line 197) | def get_secret_token(platform, version, global_version=GLOBAL_TOKEN_VERS... function is_invalid_token (line 218) | def is_invalid_token(platform, version): function valid_post_signature (line 223) | def valid_post_signature(request, signature_header=SIGNATURE_BODY_HEADER): function valid_ua_signature (line 232) | def valid_ua_signature( function valid_signature (line 249) | def valid_signature(payload, signature, field=None): function sign_v1_message (line 341) | def sign_v1_message(body, platform, version, epoch=None): FILE: r2/r2/lib/sitemaps/data.py function _read_subreddit_etl_from_s3 (line 36) | def _read_subreddit_etl_from_s3(s3path): function find_all_subreddits (line 70) | def find_all_subreddits(s3path): FILE: r2/r2/lib/sitemaps/generate.py function _absolute_url (line 76) | def _absolute_url(path): function _stringify_xml (line 80) | def _stringify_xml(root_element): function _subreddit_links (line 89) | def _subreddit_links(subreddits): function _subreddit_sitemap (line 95) | def _subreddit_sitemap(subreddits): function subreddit_sitemaps (line 104) | def subreddit_sitemaps(subreddits): function sitemap_index (line 114) | def sitemap_index(count): FILE: r2/r2/lib/sitemaps/store.py function zip_string (line 61) | def zip_string(string): function upload_sitemap (line 68) | def upload_sitemap(key, sitemap): function store_subreddit_sitemap (line 72) | def store_subreddit_sitemap(bucket, index, sitemap): function store_sitemap_index (line 80) | def store_sitemap_index(bucket, count): function store_sitemaps_in_s3 (line 88) | def store_sitemaps_in_s3(subreddits): FILE: r2/r2/lib/sitemaps/watcher.py function watcher (line 25) | def watcher(): function _subreddit_sitemap_key (line 31) | def _subreddit_sitemap_key(): function _datetime_from_timestamp (line 37) | def _datetime_from_timestamp(timestamp): function _before_last_sitemap (line 41) | def _before_last_sitemap(timestamp): function _process_message (line 51) | def _process_message(): function _current_timestamp (line 83) | def _current_timestamp(): function _create_test_message (line 87) | def _create_test_message(): FILE: r2/r2/lib/souptest.py function souptest_sniff_node (line 78) | def souptest_sniff_node(node): function souptest_fragment (line 122) | def souptest_fragment(fragment): class SoupError (line 178) | class SoupError(Exception): class SoupReprError (line 183) | class SoupReprError(SoupError): method __init__ (line 187) | def __init__(self, obj): method __str__ (line 190) | def __str__(self): class SoupSyntaxError (line 194) | class SoupSyntaxError(SoupReprError): class SoupUnsupportedNodeError (line 199) | class SoupUnsupportedNodeError(SoupReprError): class SoupUnexpectedCommentError (line 204) | class SoupUnexpectedCommentError(SoupReprError): class SoupUnexpectedCDataSectionError (line 209) | class SoupUnexpectedCDataSectionError(SoupReprError): class SoupUnsupportedSchemeError (line 214) | class SoupUnsupportedSchemeError(SoupReprError): class SoupUnsupportedAttrError (line 219) | class SoupUnsupportedAttrError(SoupReprError): class SoupUnsupportedTagError (line 224) | class SoupUnsupportedTagError(SoupReprError): class SoupDetectedCrasherError (line 229) | class SoupDetectedCrasherError(SoupReprError): class SoupUnsupportedEntityError (line 233) | class SoupUnsupportedEntityError(SoupReprError): method __init__ (line 239) | def __init__(self, obj, entity=None): FILE: r2/r2/lib/sr_pops.py function set_downs (line 27) | def set_downs(): function run (line 38) | def run(): FILE: r2/r2/lib/static.py function locate_static_file (line 32) | def locate_static_file(name): function static_mtime (line 43) | def static_mtime(name): function generate_static_name (line 49) | def generate_static_name(name, base=None): function update_static_names (line 66) | def update_static_names(names_file, files): FILE: r2/r2/lib/stats.py class TimingStatBuffer (line 39) | class TimingStatBuffer: method __init__ (line 49) | def __init__(self): method record (line 56) | def record(self, key, start, end, publish=True): method flush (line 65) | def flush(self): method start_logging (line 79) | def start_logging(self): method end_logging (line 82) | def end_logging(self): class CountingStatBuffer (line 88) | class CountingStatBuffer: method __init__ (line 91) | def __init__(self): method record (line 94) | def record(self, key, delta): method flush (line 97) | def flush(self): class StringCountBuffer (line 104) | class StringCountBuffer: method __init__ (line 107) | def __init__(self): method _encode_string (line 112) | def _encode_string(string): method record (line 120) | def record(self, key, value, count=1): method flush (line 123) | def flush(self): class StatsdConnection (line 132) | class StatsdConnection: method __init__ (line 133) | def __init__(self, addr, compress=True): method _make_socket (line 142) | def _make_socket(cls): method _parse_addr (line 146) | def _parse_addr(addr): method _compress (line 151) | def _compress(lines): method send (line 165) | def send(self, data): class StatsdClient (line 175) | class StatsdClient: method __init__ (line 179) | def __init__(self, addr=None, sample_rate=1.0): method connect (line 186) | def connect(self, addr): method disconnect (line 189) | def disconnect(self): method flush (line 192) | def flush(self): function _get_stat_name (line 199) | def _get_stat_name(*name_parts): class Counter (line 207) | class Counter: method __init__ (line 208) | def __init__(self, client, name): method _send (line 212) | def _send(self, subname, delta): method increment (line 216) | def increment(self, subname=None, delta=1): method decrement (line 219) | def decrement(self, subname=None, delta=1): method __add__ (line 222) | def __add__(self, delta): method __sub__ (line 226) | def __sub__(self, delta): class Timer (line 231) | class Timer: method __init__ (line 234) | def __init__(self, client, name, publish=True): method __enter__ (line 243) | def __enter__(self): method __exit__ (line 247) | def __exit__(self, type, value, tb): method flush (line 250) | def flush(self): method elapsed_seconds (line 255) | def elapsed_seconds(self): method send (line 262) | def send(self, subname, start, end): method start (line 267) | def start(self): method intermediate (line 270) | def intermediate(self, subname): method stop (line 278) | def stop(self, subname='total'): class Stats (line 288) | class Stats: method __init__ (line 295) | def __init__(self, addr, sample_rate): method get_timer (line 298) | def get_timer(self, name, publish=True): method quick_time (line 302) | def quick_time(self, *args, **kwargs): method transact (line 305) | def transact(self, action, start, end): method get_counter (line 309) | def get_counter(self, name): method action_count (line 312) | def action_count(self, counter_name, name, delta=1): method action_event_count (line 318) | def action_event_count(self, event_name, state=None, delta=1, true_nam... method simple_event (line 326) | def simple_event(self, event_name, delta=1): method simple_timing (line 332) | def simple_timing(self, event_name, ms): method event_count (line 335) | def event_count(self, event_name, name, sample_rate=None): method cache_count_multi (line 343) | def cache_count_multi(self, data, sample_rate=None): method amqp_processor (line 351) | def amqp_processor(self, queue_name): method flush (line 373) | def flush(self): method start_logging_timings (line 376) | def start_logging_timings(self): method end_logging_timings (line 379) | def end_logging_timings(self): method cf_key_iter (line 382) | def cf_key_iter(self, operation, column_families, suffix): method cassandra_timing (line 390) | def cassandra_timing(self, operation, column_families, success, method cassandra_counter (line 396) | def cassandra_counter(self, operation, column_families, suffix, delta): method pg_before_cursor_execute (line 400) | def pg_before_cursor_execute(self, conn, cursor, statement, parameters, method pg_after_cursor_execute (line 416) | def pg_after_cursor_execute(self, conn, cursor, statement, parameters, method pg_event (line 430) | def pg_event(self, db_server, db_name, start, end): method count_string (line 436) | def count_string(self, key, value, count=1): class CacheStats (line 440) | class CacheStats: method __init__ (line 441) | def __init__(self, parent, cache_name): method cache_hit (line 451) | def cache_hit(self, delta=1, subname=None): method cache_miss (line 464) | def cache_miss(self, delta=1, subname=None): class StaleCacheStats (line 478) | class StaleCacheStats(CacheStats): method __init__ (line 479) | def __init__(self, parent, cache_name): method stale_hit (line 488) | def stale_hit(self, delta=1, subname=None): method stale_miss (line 501) | def stale_miss(self, delta=1, subname=None): class StatsCollectingConnectionPool (line 515) | class StatsCollectingConnectionPool(pool.ConnectionPool): method __init__ (line 516) | def __init__(self, keyspace, stats=None, *args, **kwargs): method _get_new_wrapper (line 520) | def _get_new_wrapper(self, server): FILE: r2/r2/lib/strings.py class StringHandler (line 179) | class StringHandler(object): method __init__ (line 184) | def __init__(self, **sdict): method get (line 187) | def get(self, attr, default=None): method __getitem__ (line 193) | def __getitem__(self, attr): method __getattr__ (line 199) | def __getattr__(self, attr): method __iter__ (line 208) | def __iter__(self): method keys (line 211) | def keys(self): function P_ (line 217) | def P_(x, y): class PluralManager (line 224) | class PluralManager(object): method __init__ (line 233) | def __init__(self, plurals): method __getattr__ (line 238) | def __getattr__(self, attr): class Score (line 281) | class Score(object): method number_only (line 291) | def number_only(x): method points (line 295) | def points(x): method safepoints (line 300) | def safepoints(x): method _people (line 304) | def _people(x, label, prepend=''): method subscribers (line 310) | def subscribers(x): method readers (line 314) | def readers(x): method somethings (line 318) | def somethings(x, word): method users_here_now (line 324) | def users_here_now(x, prepend=''): method none (line 328) | def none(x): function fallback_trans (line 332) | def fallback_trans(x): function get_funny_translated_string (line 347) | def get_funny_translated_string(category, num=1): FILE: r2/r2/lib/subreddit_search.py class SubredditsByPartialName (line 30) | class SubredditsByPartialName(tdb_cassandra.View): function load_all_reddits (line 36) | def load_all_reddits(): function search_reddits (line 57) | def search_reddits(query, include_over_18=True): function popular_searches (line 68) | def popular_searches(include_over_18=True): FILE: r2/r2/lib/support_tickets.py class SupportTicketError (line 25) | class SupportTicketError(Exception): class SupportTickerNotFoundError (line 28) | class SupportTickerNotFoundError(SupportTicketError): function create_support_ticket (line 31) | def create_support_ticket(subject, function get_support_ticket (line 58) | def get_support_ticket(ticket_id): function get_support_ticket_url (line 61) | def get_support_ticket_url(ticket_id): function update_support_ticket (line 64) | def update_support_ticket(ticket=None, ticket_id=None, FILE: r2/r2/lib/system_messages.py function notify_user_added (line 71) | def notify_user_added(rel_type, author, user, target): function send_mod_removal_message (line 113) | def send_mod_removal_message(subreddit, mod, user): function send_ban_message (line 135) | def send_ban_message(subreddit, mod, user, note=None, days=None, new=True): FILE: r2/r2/lib/takedowns.py function post_takedown_notice_to_external_site (line 28) | def post_takedown_notice_to_external_site(title, FILE: r2/r2/lib/template_helpers.py function static (line 66) | def static(path, absolute=False, mangle_name=True): function make_url_protocol_relative (line 123) | def make_url_protocol_relative(url): function make_url_https (line 131) | def make_url_https(url): function header_url (line 139) | def header_url(url, absolute=False): function js_config (line 148) | def js_config(extra_config=None): class JSPreload (line 305) | class JSPreload(js.DataSource): method __init__ (line 306) | def __init__(self, data=None): method set (line 311) | def set(self, url, data): method set_wrapped (line 314) | def set_wrapped(self, url, wrapped): method use (line 320) | def use(self): function class_dict (line 329) | def class_dict(): function comment_label (line 340) | def comment_label(num_comments=None): function replace_render (line 353) | def replace_render(listing, item, render_func): function get_domain (line 434) | def get_domain(cname=False, subreddit=True, no_www=False): function add_sr (line 475) | def add_sr( function join_urls (line 527) | def join_urls(*urls): function style_line (line 541) | def style_line(button_width = None, bgcolor = "", bordercolor = ""): function choose_width (line 553) | def choose_width(link, width): function add_attr (line 565) | def add_attr(attrs, kind, label=None, link=None, cssclass=None, symbol=N... function add_admin_distinguish (line 627) | def add_admin_distinguish(distinguish_attribs_list): function add_moderator_distinguish (line 631) | def add_moderator_distinguish(distinguish_attribs_list, subreddit): function add_friend_distinguish (line 638) | def add_friend_distinguish(distinguish_attribs_list, note=None): function add_cakeday_distinguish (line 646) | def add_cakeday_distinguish(distinguish_attribs_list, user): function add_special_distinguish (line 653) | def add_special_distinguish(distinguish_attribs_list, user): function add_submitter_distinguish (line 661) | def add_submitter_distinguish(distinguish_attribs_list, link, subreddit): function search_url (line 666) | def search_url(query, subreddit, restrict_sr="off", sort=None, recent=No... function format_number (line 683) | def format_number(number, locale=None): function format_percent (line 690) | def format_percent(ratio, locale=None): function html_datetime (line 697) | def html_datetime(date): function js_timestamp (line 704) | def js_timestamp(date): function simplified_timesince (line 708) | def simplified_timesince(date, include_tense=True): function display_link_karma (line 719) | def display_link_karma(karma): function display_comment_karma (line 725) | def display_comment_karma(karma): function format_html (line 731) | def format_html(format_string, *args, **kwargs): function _ws (line 751) | def _ws(text, keep_spaces=False): function _wsf (line 759) | def _wsf(format, keep_spaces=True, *args, **kwargs): function get_linkflair_css_classes (line 774) | def get_linkflair_css_classes(thing, prefix="linkflair-", on_class="has-... function update_query (line 787) | def update_query(base_url, **kw): FILE: r2/r2/lib/totp.py function make_hotp (line 35) | def make_hotp(secret, counter): function make_totp (line 53) | def make_totp(secret, skew=0, timestamp=None): function generate_secret (line 60) | def generate_secret(): FILE: r2/r2/lib/tracking.py function _pad_message (line 40) | def _pad_message(text): function _unpad_message (line 55) | def _unpad_message(text): function _make_cipher (line 71) | def _make_cipher(initialization_vector, secret): function encrypt (line 77) | def encrypt(plaintext): function _make_salt (line 92) | def _make_salt(): function _encrypt (line 102) | def _encrypt(salt, plaintext, secret): function decrypt (line 112) | def decrypt(encrypted): function _decrypt (line 122) | def _decrypt(encrypted, secret): function get_site (line 131) | def get_site(): function get_srpath (line 136) | def get_srpath(): function _get_encrypted_user_slug (line 154) | def _get_encrypted_user_slug(): function get_pageview_pixel_url (line 167) | def get_pageview_pixel_url(): function get_impression_pixel_url (line 172) | def get_impression_pixel_url(codename): FILE: r2/r2/lib/traffic/emr_traffic.py class TrafficBase (line 43) | class TrafficBase(EmrJob): method __init__ (line 60) | def __init__(self, emr_connection, jobflow_name, steps=None, **kw): method _bootstrap_actions (line 73) | def _bootstrap_actions(cls): method _setup_steps (line 81) | def _setup_steps(self): class PigProcessHour (line 85) | class PigProcessHour(PigStep): method __init__ (line 89) | def __init__(self, log_path, output_path): class PigAggregate (line 98) | class PigAggregate(PigStep): method __init__ (line 102) | def __init__(self, input_path, output_path): class PigCoalesce (line 111) | class PigCoalesce(PigStep): method __init__ (line 115) | def __init__(self, input_path, output_path): function _add_step (line 124) | def _add_step(emr_connection, step, jobflow_name, **jobflow_kw): function _wait_for_step (line 155) | def _wait_for_step(emr_connection, step, jobflowid, sleeptime): function run_traffic_step (line 169) | def run_traffic_step(emr_connection, step, jobflow_name, function extract_hour (line 198) | def extract_hour(emr_connection, jobflow_name, log_path, output_path, function aggregate_interval (line 204) | def aggregate_interval(emr_connection, jobflow_name, input_path, output_... function coalesce_interval (line 210) | def coalesce_interval(emr_connection, jobflow_name, input_path, output_p... FILE: r2/r2/lib/traffic/traffic.py function _get_processed_path (line 76) | def _get_processed_path(basedir, interval, category_cls, filename): function get_aggregate (line 81) | def get_aggregate(interval, category_cls): function report_interval (line 123) | def report_interval(interval, background=True): function _name_to_kw (line 132) | def _name_to_kw(category_cls, name): function _report_interval (line 170) | def _report_interval(interval): function process_pixel_log (line 232) | def process_pixel_log(log_path, fast=False): function aggregate_month (line 288) | def aggregate_month(month_date): function process_month_hours (line 297) | def process_month_hours(month_date, start_hour=0, days=None): function report_entire_month (line 326) | def report_entire_month(month_date, start_hour=0, start_day=1): function verify_month_outputs (line 350) | def verify_month_outputs(month_date): function verify_month_inputs (line 385) | def verify_month_inputs(month_date): function process_hour (line 404) | def process_hour(hour_date): FILE: r2/r2/lib/translation.py function _get_translator (line 49) | def _get_translator(lang, graceful_fail=False, **kwargs): function set_lang (line 67) | def set_lang(lang, graceful_fail=False, fallback_lang=None, **kwargs): function load_data (line 89) | def load_data(lang_path, domain, extension='data'): function iter_langs (line 96) | def iter_langs(base_path=I18N_PATH): function get_active_langs (line 106) | def get_active_langs(config, path=I18N_PATH, default_lang='en'): function get_catalog (line 139) | def get_catalog(lang): function validate_plural_forms (line 146) | def validate_plural_forms(plural_forms_str): function extract_javascript_msgids (line 162) | def extract_javascript_msgids(source): FILE: r2/r2/lib/trending.py function get_trending_subreddits (line 34) | def get_trending_subreddits(): function update_trending_subreddits (line 38) | def update_trending_subreddits(): function _get_newest_link (line 62) | def _get_newest_link(sr): FILE: r2/r2/lib/unicode.py function _force_unicode (line 24) | def _force_unicode(text): function _force_utf8 (line 40) | def _force_utf8(text): FILE: r2/r2/lib/utils/feature_utils.py function is_tracking_link_enabled (line 30) | def is_tracking_link_enabled(link=None, element_name=None): FILE: r2/r2/lib/utils/http_utils.py function read_http_date (line 31) | def read_http_date(date_str): function http_date_str (line 46) | def http_date_str(date): function get_requests_resp_json (line 51) | def get_requests_resp_json(resp): FILE: r2/r2/lib/utils/reddit_agent_parser.py function register_detector (line 33) | def register_detector(cls): class RedditDetectorBase (line 39) | class RedditDetectorBase(DetectorBase): method __init__ (line 43) | def __init__(self): method getVersion (line 53) | def getVersion(self, agent, word): method detect (line 64) | def detect(self, agent, result): class RedditBrowser (line 88) | class RedditBrowser(RedditDetectorBase, Browser): class RedditIsFunDetector (line 96) | class RedditIsFunDetector(RedditBrowser): class RedditAndroidDetector (line 106) | class RedditAndroidDetector(RedditBrowser): class RedditIOSDetector (line 114) | class RedditIOSDetector(RedditBrowser): class AlienBlueDetector (line 126) | class AlienBlueDetector(RedditBrowser): class RelayForRedditDetector (line 136) | class RelayForRedditDetector(RedditBrowser): class RedditSyncDetector (line 144) | class RedditSyncDetector(RedditBrowser): class NarwhalForRedditDetector (line 154) | class NarwhalForRedditDetector(RedditBrowser): class McRedditDetector (line 162) | class McRedditDetector(RedditBrowser): class ReaditDetector (line 170) | class ReaditDetector(RedditBrowser): class BaconReaderDetector (line 177) | class BaconReaderDetector(RedditBrowser): function detect (line 187) | def detect(*args, **kw): class Agent (line 191) | class Agent(object): method __init__ (line 208) | def __init__(self, **kw): method parse (line 214) | def parse(cls, ua): method determine_mobile_browser (line 235) | def determine_mobile_browser(self): method to_dict (line 261) | def to_dict(self): FILE: r2/r2/lib/utils/utils.py function randstr (line 65) | def randstr(length, class Storage (line 71) | class Storage(dict): method __getattr__ (line 91) | def __getattr__(self, key): method __setattr__ (line 97) | def __setattr__(self, key, value): method __delattr__ (line 100) | def __delattr__(self, key): method __repr__ (line 106) | def __repr__(self): class Enum (line 112) | class Enum(Storage): method __init__ (line 113) | def __init__(self, *a): method __contains__ (line 116) | def __contains__(self, item): class class_property (line 123) | class class_property(object): method __init__ (line 128) | def __init__(self, function): method __get__ (line 130) | def __get__(self, instance, cls): class Results (line 134) | class Results(): method __init__ (line 135) | def __init__(self, sa_ResultProxy, build_fn, do_batch=False): method rowcount (line 141) | def rowcount(self): method _fetch (line 144) | def _fetch(self, res): method fetchall (line 150) | def fetchall(self): method fetchmany (line 153) | def fetchmany(self, n): method fetchone (line 160) | def fetchone(self): function strip_www (line 179) | def strip_www(domain): function is_subdomain (line 188) | def is_subdomain(subdomain, base): function is_language_subdomain (line 197) | def is_language_subdomain(subdomain): function base_url (line 201) | def base_url(url): function domain (line 210) | def domain(url): function extract_subdomain (line 223) | def extract_subdomain(host=None, base_domain=None): function path_component (line 247) | def path_component(s): function get_title (line 255) | def get_title(url): function extract_title (line 290) | def extract_title(data): function sanitize_url (line 337) | def sanitize_url(url, require_scheme=False, valid_schemes=VALID_SCHEMES): function trunc_string (line 407) | def trunc_string(text, max_length, suffix='...'): function trunc_time (line 423) | def trunc_time(time, mins, hours=None): function long_datetime (line 436) | def long_datetime(datetime): function median (line 439) | def median(l): function query_string (line 445) | def query_string(dict): function paranoid_urlparser_method (line 470) | def paranoid_urlparser_method(check): class UrlParser (line 480) | class UrlParser(object): method __init__ (line 504) | def __init__(self, url): method __eq__ (line 513) | def __eq__(self, other): method update_query (line 541) | def update_query(self, **updates): method query_dict (line 550) | def query_dict(self): method path_extension (line 568) | def path_extension(self): method has_image_extension (line 581) | def has_image_extension(self): method has_static_image_extension (line 586) | def has_static_image_extension(self): method set_extension (line 591) | def set_extension(self, extension): method canonicalize (line 607) | def canonicalize(self): method switch_subdomain_by_extension (line 615) | def switch_subdomain_by_extension(self, extension=None): method unparse (line 644) | def unparse(self): method _unparse (line 657) | def _unparse(self): method path_has_subreddit (line 672) | def path_has_subreddit(self): method get_subreddit (line 679) | def get_subreddit(self): method perform_paranoid_check (line 705) | def perform_paranoid_check(self, check, *args, **kwargs): method is_web_safe_url (line 723) | def is_web_safe_url(self): method is_reddit_url (line 763) | def is_reddit_url(self, subreddit=None): method path_add_subreddit (line 786) | def path_add_subreddit(self, subreddit): method netloc (line 797) | def netloc(self): method __repr__ (line 808) | def __repr__(self): method domain_permutations (line 811) | def domain_permutations(self, fragments=False, subdomains=True): method base_url (line 837) | def base_url(cls, url): function coerce_url_to_protocol (line 850) | def coerce_url_to_protocol(url, protocol='http'): function url_is_embeddable_image (line 857) | def url_is_embeddable_image(url): function url_to_thing (line 869) | def url_to_thing(url): function pload (line 928) | def pload(fname, default = None): function psave (line 939) | def psave(fname, d): function unicode_safe (line 945) | def unicode_safe(res): function decompose_fullname (line 954) | def decompose_fullname(fullname): function cols (line 972) | def cols(lst, ncols): function fetch_things (line 983) | def fetch_things(t_class,since,until,batch_fn=None, function fetch_things2 (line 1020) | def fetch_things2(query, chunk_size = 100, batch_fn = None, chunks = Fal... function exponential_retrier (line 1053) | def exponential_retrier(func_to_retry, function fetch_things_with_retry (line 1093) | def fetch_things_with_retry(query, function fix_if_broken (line 1141) | def fix_if_broken(thing, delete = True, fudge_links = False): function find_recent_broken_things (line 1182) | def find_recent_broken_things(from_time = None, to_time = None, function timeit (line 1206) | def timeit(func): function lineno (line 1211) | def lineno(): function IteratorFilter (line 1216) | def IteratorFilter(iterator, fn): function UniqueIterator (line 1221) | def UniqueIterator(iterator, key = lambda x: x): function safe_eval_str (line 1237) | def safe_eval_str(unsafe_str): function title_to_url (line 1243) | def title_to_url(title, max_length = 50): function unicode_title_to_ascii (line 1261) | def unicode_title_to_ascii(title, max_length=50): function dbg (line 1267) | def dbg(s): function trace (line 1271) | def trace(fn): function common_subdomain (line 1279) | def common_subdomain(domain1, domain2): function url_links_builder (line 1298) | def url_links_builder(url, exclude=None, num=None, after=None, reverse=N... class TimeoutFunctionException (line 1337) | class TimeoutFunctionException(Exception): class TimeoutFunction (line 1340) | class TimeoutFunction: method __init__ (line 1343) | def __init__(self, function, timeout): method handle_timeout (line 1347) | def handle_timeout(self, signum, frame): method __call__ (line 1350) | def __call__(self, *args, **kwargs): function to_date (line 1362) | def to_date(d): function to_datetime (line 1367) | def to_datetime(d): function in_chunks (line 1372) | def in_chunks(it, size=25): function progress (line 1386) | def progress(it, verbosity=100, key=repr, estimate=None, persec=True): class Hell (line 1520) | class Hell(object): method __str__ (line 1521) | def __str__(self): class Bomb (line 1524) | class Bomb(object): method __getattr__ (line 1526) | def __getattr__(cls, key): method __setattr__ (line 1530) | def __setattr__(cls, key, val): method __repr__ (line 1534) | def __repr__(cls): class SimpleSillyStub (line 1538) | class SimpleSillyStub(object): method __nonzero__ (line 1540) | def __nonzero__(self): method __getattr__ (line 1543) | def __getattr__(self, name): method stub (line 1546) | def stub(self, *args, **kwargs): function strordict_fullname (line 1552) | def strordict_fullname(item, key='fullname'): function thread_dump (line 1571) | def thread_dump(*a): function constant_time_compare (line 1587) | def constant_time_compare(actual, expected): function extract_urls_from_markdown (line 1606) | def extract_urls_from_markdown(md): function extract_user_mentions (line 1618) | def extract_user_mentions(text): function summarize_markdown (line 1645) | def summarize_markdown(md): function blockquote_text (line 1652) | def blockquote_text(text): function find_containing_network (line 1657) | def find_containing_network(ip_ranges, address): function is_throttled (line 1666) | def is_throttled(address): function parse_http_basic (line 1671) | def parse_http_basic(authorization_header): function simple_traceback (line 1685) | def simple_traceback(limit): function weighted_lottery (line 1701) | def weighted_lottery(weights, _random=random.random): class GoldPrice (line 1730) | class GoldPrice(object): method __init__ (line 1736) | def __init__(self, decimal): method __mul__ (line 1739) | def __mul__(self, other): method __div__ (line 1742) | def __div__(self, other): method __str__ (line 1745) | def __str__(self): method __repr__ (line 1748) | def __repr__(self): method pennies (line 1752) | def pennies(self): function config_gold_price (line 1756) | def config_gold_price(v, key=None, data=None): function canonicalize_email (line 1760) | def canonicalize_email(email): function precise_format_timedelta (line 1785) | def precise_format_timedelta(delta, locale, threshold=.85, decimals=2): function parse_ini_file (line 1807) | def parse_ini_file(config_file): function fuzz_activity (line 1815) | def fuzz_activity(count): function shuffle_slice (line 1823) | def shuffle_slice(x, start, stop=None): function partition (line 1839) | def partition(pred, iterable): function roundrobin (line 1846) | def roundrobin(*iterables): function lowercase_keys_recursively (line 1860) | def lowercase_keys_recursively(subject): function sampled (line 1871) | def sampled(live_config_var): function squelch_exceptions (line 1898) | def squelch_exceptions(fn): function epoch_timestamp (line 1924) | def epoch_timestamp(dt): function to_epoch_milliseconds (line 1933) | def to_epoch_milliseconds(dt): function from_epoch_milliseconds (line 1942) | def from_epoch_milliseconds(ms): function rate_limiter (line 1953) | def rate_limiter(max_per_second): function rate_limited_generator (line 1971) | def rate_limited_generator(rate_limit_per_second, iterable): FILE: r2/r2/lib/validator/preferences.py function set_prefs (line 97) | def set_prefs(user, prefs): function filter_prefs (line 112) | def filter_prefs(prefs, user): FILE: r2/r2/lib/validator/validator.py function can_view_link_comments (line 68) | def can_view_link_comments(article): class Validator (line 73) | class Validator(object): method __init__ (line 76) | def __init__(self, param=None, default=None, post=True, get=True, url=... method set_error (line 89) | def set_error(self, error, msg_params={}, field=False, code=None): method param_docs (line 100) | def param_docs(self): method __call__ (line 106) | def __call__(self, url): function build_arg_list (line 141) | def build_arg_list(fn, env): function _make_validated_kw (line 160) | def _make_validated_kw(fn, simple_vals, param_vals, env): function set_api_docs (line 168) | def set_api_docs(fn, simple_vals, param_vals, extra_vals=None): function _validators_handle_csrf (line 184) | def _validators_handle_csrf(simple_vals, param_vals): function validate (line 190) | def validate(*simple_vals, **param_vals): function api_validate (line 219) | def api_validate(response_type=None, add_api_type_doc=False): function noresponse (line 277) | def noresponse(self, self_method, responder, simple_vals, param_vals, *a... function textresponse (line 282) | def textresponse(self, self_method, responder, simple_vals, param_vals, ... function json_validate (line 286) | def json_validate(self, self_method, responder, simple_vals, param_vals,... function _validatedForm (line 295) | def _validatedForm(self, self_method, responder, simple_vals, param_vals, function validatedForm (line 321) | def validatedForm(self, self_method, responder, simple_vals, param_vals, function validatedMultipartForm (line 327) | def validatedMultipartForm(self, self_method, responder, simple_vals, function valid_jsonp_callback (line 344) | def valid_jsonp_callback(callback): class nop (line 349) | class nop(Validator): method run (line 350) | def run(self, x): class VLang (line 353) | class VLang(Validator): method validate_lang (line 355) | def validate_lang(lang, strict=False): method run (line 363) | def run(self, lang): method param_docs (line 366) | def param_docs(self): class VRequired (line 372) | class VRequired(Validator): method __init__ (line 373) | def __init__(self, param, error, *a, **kw): method error (line 377) | def error(self, e = None): method run (line 382) | def run(self, item): class VThing (line 388) | class VThing(Validator): method __init__ (line 389) | def __init__(self, param, thingclass, redirect = True, *a, **kw): method run (line 394) | def run(self, thing_id): method param_docs (line 409) | def param_docs(self): class VLink (line 414) | class VLink(VThing): method __init__ (line 415) | def __init__(self, param, redirect = True, *a, **kw): class VPromoCampaign (line 418) | class VPromoCampaign(VThing): method __init__ (line 419) | def __init__(self, param, redirect = True, *a, **kw): class VCommentByID (line 422) | class VCommentByID(VThing): method __init__ (line 423) | def __init__(self, param, redirect = True, *a, **kw): class VAward (line 427) | class VAward(VThing): method __init__ (line 428) | def __init__(self, param, redirect = True, *a, **kw): class VAwardByCodename (line 431) | class VAwardByCodename(Validator): method run (line 432) | def run(self, codename, required_fullname=None): class VTrophy (line 446) | class VTrophy(VThing): method __init__ (line 447) | def __init__(self, param, redirect = True, *a, **kw): class VMessage (line 450) | class VMessage(Validator): method run (line 451) | def run(self, message_id): class VCommentID (line 460) | class VCommentID(Validator): method run (line 461) | def run(self, cid): class VMessageID (line 469) | class VMessageID(Validator): method run (line 470) | def run(self, cid): class VCount (line 481) | class VCount(Validator): method run (line 482) | def run(self, count): method param_docs (line 490) | def param_docs(self): class VLimit (line 496) | class VLimit(Validator): method __init__ (line 497) | def __init__(self, param, default=25, max_limit=100, **kw): method run (line 502) | def run(self, limit): method param_docs (line 517) | def param_docs(self): class VCssMeasure (line 524) | class VCssMeasure(Validator): method run (line 526) | def run(self, value): class VLength (line 530) | class VLength(Validator): method __init__ (line 533) | def __init__(self, param, max_length, method run (line 546) | def run(self, text, text2 = ''): method param_docs (line 558) | def param_docs(self): class VUploadLength (line 564) | class VUploadLength(VLength): method run (line 565) | def run(self, upload, text2=''): method param_docs (line 572) | def param_docs(self): class VPrintable (line 579) | class VPrintable(VLength): method run (line 580) | def run(self, text, text2 = ''): method param_docs (line 595) | def param_docs(self): class VTitle (line 602) | class VTitle(VLength): method __init__ (line 603) | def __init__(self, param, max_length = 300, **kw): method param_docs (line 606) | def param_docs(self): class VMarkdown (line 612) | class VMarkdown(Validator): method __init__ (line 613) | def __init__(self, param, renderer='reddit'): method run (line 617) | def run(self, text, text2=''): method param_docs (line 648) | def param_docs(self): class VMarkdownLength (line 654) | class VMarkdownLength(VMarkdown): method __init__ (line 655) | def __init__(self, param, renderer='reddit', max_length=10000, method run (line 662) | def run(self, text, text2=''): class VSavedCategory (line 673) | class VSavedCategory(Validator): method run (line 676) | def run(self, name): method param_docs (line 686) | def param_docs(self): class VSubredditName (line 692) | class VSubredditName(VRequired): method __init__ (line 693) | def __init__(self, item, allow_language_srs=False, *a, **kw): method run (line 697) | def run(self, name): method param_docs (line 710) | def param_docs(self): class VAvailableSubredditName (line 716) | class VAvailableSubredditName(VSubredditName): method run (line 717) | def run(self, name): class VSRByName (line 727) | class VSRByName(Validator): method __init__ (line 728) | def __init__(self, sr_name, required=True, return_srname=False): method run (line 733) | def run(self, sr_name): method param_docs (line 748) | def param_docs(self): class VSRByNames (line 754) | class VSRByNames(Validator): method __init__ (line 761) | def __init__(self, sr_names_csv, required=True): method run (line 765) | def run(self, sr_names_csv): method param_docs (line 774) | def param_docs(self): class VSubredditTitle (line 780) | class VSubredditTitle(Validator): method run (line 781) | def run(self, title): class VSubredditDesc (line 789) | class VSubredditDesc(Validator): method run (line 790) | def run(self, description): class VAvailableSubredditRuleName (line 796) | class VAvailableSubredditRuleName(Validator): method __init__ (line 797) | def __init__(self, short_name, updating=False): method run (line 801) | def run(self, short_name): class VSubredditRule (line 820) | class VSubredditRule(Validator): method run (line 821) | def run(self, short_name): class VAccountByName (line 838) | class VAccountByName(VRequired): method __init__ (line 839) | def __init__(self, param, error = errors.USER_DOESNT_EXIST, *a, **kw): method run (line 842) | def run(self, name): method param_docs (line 849) | def param_docs(self): class VFriendOfMine (line 853) | class VFriendOfMine(VAccountByName): method run (line 854) | def run(self, name): function fullname_regex (line 867) | def fullname_regex(thing_cls = None, multiple = False): class VByName (line 878) | class VByName(Validator): method __init__ (line 881) | def __init__(self, param, thing_cls=None, multiple=False, limit=None, method run (line 897) | def run(self, items): method param_docs (line 932) | def param_docs(self): class VByNameIfAuthor (line 944) | class VByNameIfAuthor(VByName): method run (line 945) | def run(self, fullname): method param_docs (line 952) | def param_docs(self): class VCaptcha (line 957) | class VCaptcha(Validator): method run (line 960) | def run(self, iden, solution): method param_docs (line 967) | def param_docs(self): class VUser (line 974) | class VUser(Validator): method run (line 975) | def run(self): class VNotInTimeout (line 980) | class VNotInTimeout(Validator): method run (line 981) | def run(self, target_fullname=None, fatal=True, action_name=None, class VVerifyPassword (line 999) | class VVerifyPassword(Validator): method __init__ (line 1000) | def __init__(self, param, fatal=True, *a, **kw): method run (line 1004) | def run(self, password): method param_docs (line 1014) | def param_docs(self): class VModhash (line 1020) | class VModhash(Validator): method __init__ (line 1024) | def __init__(self, param=None, fatal=True, *a, **kw): method run (line 1028) | def run(self, modhash): method param_docs (line 1051) | def param_docs(self): class VModhashIfLoggedIn (line 1057) | class VModhashIfLoggedIn(Validator): method __init__ (line 1061) | def __init__(self, param=None, fatal=True, *a, **kw): method run (line 1065) | def run(self, modhash): method param_docs (line 1069) | def param_docs(self): class VAdmin (line 1075) | class VAdmin(Validator): method run (line 1076) | def run(self): function make_or_admin_secret_cls (line 1080) | def make_or_admin_secret_cls(base_cls): class VVerifiedUser (line 1100) | class VVerifiedUser(VUser): method run (line 1101) | def run(self): class VGold (line 1106) | class VGold(VUser): method run (line 1108) | def run(self): class VSponsorAdmin (line 1113) | class VSponsorAdmin(VVerifiedUser): method user_test (line 1117) | def user_test(self, thing): method run (line 1120) | def run(self, link_id = None): class VSponsor (line 1128) | class VSponsor(VUser): method user_test (line 1135) | def user_test(self, thing): method run (line 1138) | def run(self, link_id=None, campaign_id=None): class VVerifiedSponsor (line 1169) | class VVerifiedSponsor(VSponsor): method run (line 1170) | def run(self, *args, **kwargs): class VEmployee (line 1176) | class VEmployee(VVerifiedUser): method run (line 1178) | def run(self): class VSrModerator (line 1184) | class VSrModerator(Validator): method __init__ (line 1185) | def __init__(self, fatal=True, perms=(), *a, **kw): method run (line 1191) | def run(self): class VCanDistinguish (line 1200) | class VCanDistinguish(VByName): method run (line 1201) | def run(self, thing_name, how): method param_docs (line 1231) | def param_docs(self): class VSrCanAlter (line 1234) | class VSrCanAlter(VByName): method run (line 1235) | def run(self, thing_name): class VSrCanBan (line 1262) | class VSrCanBan(VByName): method run (line 1263) | def run(self, thing_name): class VSrSpecial (line 1279) | class VSrSpecial(VByName): method run (line 1280) | def run(self, thing_name): class VSubmitParent (line 1294) | class VSubmitParent(VByName): method run (line 1295) | def run(self, fullname, fullname2): method param_docs (line 1356) | def param_docs(self): class VSubmitSR (line 1361) | class VSubmitSR(Validator): method __init__ (line 1362) | def __init__(self, srname_param, linktype_param=None, promotion=False): method run (line 1372) | def run(self, sr_name, link_type = None): method param_docs (line 1405) | def param_docs(self): class VSubscribeSR (line 1410) | class VSubscribeSR(VByName): method __init__ (line 1411) | def __init__(self, srid_param, srname_param): method run (line 1414) | def run(self, sr_id, sr_name): method param_docs (line 1428) | def param_docs(self): class VGTMContainerId (line 1436) | class VGTMContainerId(Validator): method run (line 1437) | def run(self, value): class VCollection (line 1447) | class VCollection(Validator): method run (line 1448) | def run(self, name): class VPromoTarget (line 1455) | class VPromoTarget(Validator): method run (line 1458) | def run(self, targeting, sr_name, collection_name): class VOSVersion (line 1481) | class VOSVersion(Validator): method __init__ (line 1482) | def __init__(self, param, os, *a, **kw): method assign_error (line 1486) | def assign_error(self): method run (line 1489) | def run(self, version_range): class VPassword (line 1535) | class VPassword(Validator): method run (line 1536) | def run(self, password): method param_docs (line 1543) | def param_docs(self): class VPasswordChange (line 1549) | class VPasswordChange(VPassword): method run (line 1550) | def run(self, password, verify): method param_docs (line 1561) | def param_docs(self): function chkuser (line 1572) | def chkuser(x): class VUname (line 1584) | class VUname(VRequired): method __init__ (line 1585) | def __init__(self, item, *a, **kw): method run (line 1587) | def run(self, user_name): method param_docs (line 1612) | def param_docs(self): class VLoggedOut (line 1617) | class VLoggedOut(Validator): method run (line 1618) | def run(self): class AuthenticationFailed (line 1623) | class AuthenticationFailed(Exception): class LoginRatelimit (line 1627) | class LoginRatelimit(object): method __init__ (line 1628) | def __init__(self, category, key): method __str__ (line 1632) | def __str__(self): method __hash__ (line 1635) | def __hash__(self): class VThrottledLogin (line 1639) | class VThrottledLogin(VRequired): method __init__ (line 1640) | def __init__(self, params): method get_ratelimits (line 1645) | def get_ratelimits(self, account): method run (line 1678) | def run(self, username, password): method param_docs (line 1744) | def param_docs(self): class VSanitizedUrl (line 1751) | class VSanitizedUrl(Validator): method run (line 1752) | def run(self, url): method param_docs (line 1755) | def param_docs(self): class VUrl (line 1759) | class VUrl(VRequired): method __init__ (line 1760) | def __init__(self, item, allow_self=True, require_scheme=False, method run (line 1767) | def run(self, url): method param_docs (line 1789) | def param_docs(self): class VRedirectUri (line 1793) | class VRedirectUri(VUrl): method __init__ (line 1794) | def __init__(self, item, valid_schemes=None, *a, **kw): method param_docs (line 1798) | def param_docs(self): class VShamedDomain (line 1806) | class VShamedDomain(Validator): method run (line 1807) | def run(self, url): class VExistingUname (line 1817) | class VExistingUname(VRequired): method __init__ (line 1818) | def __init__(self, item, allow_deleted=False, *a, **kw): method run (line 1822) | def run(self, name): method param_docs (line 1849) | def param_docs(self): class VMessageRecipient (line 1854) | class VMessageRecipient(VExistingUname): method run (line 1855) | def run(self, name): class VUserWithEmail (line 1891) | class VUserWithEmail(VExistingUname): method run (line 1892) | def run(self, name): class VBoolean (line 1899) | class VBoolean(Validator): method run (line 1900) | def run(self, val): method param_docs (line 1909) | def param_docs(self): class VNumber (line 1914) | class VNumber(Validator): method __init__ (line 1915) | def __init__(self, param, min=None, max=None, coerce = True, method cast (line 1925) | def cast(self, val): method _set_error (line 1928) | def _set_error(self): method run (line 1939) | def run(self, val): class VInt (line 1958) | class VInt(VNumber): method cast (line 1959) | def cast(self, val): method param_docs (line 1962) | def param_docs(self): class VFloat (line 1978) | class VFloat(VNumber): method cast (line 1979) | def cast(self, val): class VDecimal (line 1983) | class VDecimal(VNumber): method cast (line 1984) | def cast(self, val): class VCssName (line 1988) | class VCssName(Validator): method run (line 1996) | def run(self, name): method param_docs (line 2004) | def param_docs(self): class VColor (line 2009) | class VColor(Validator): method run (line 2013) | def run(self, color): method param_docs (line 2021) | def param_docs(self): class VMenu (line 2027) | class VMenu(Validator): method __init__ (line 2028) | def __init__(self, param, menu_cls, remember = True, **kw): method run (line 2034) | def run(self, sort, where): method param_docs (line 2058) | def param_docs(self): class VRatelimit (line 2065) | class VRatelimit(Validator): method __init__ (line 2066) | def __init__(self, rate_user=False, rate_ip=False, prefix='rate_', method run (line 2077) | def run(self): method ratelimit (line 2126) | def ratelimit(cls, rate_user=False, rate_ip=False, prefix="rate_", method _record_event (line 2148) | def _record_event(cls, name, event): class VRatelimitImproved (line 2152) | class VRatelimitImproved(Validator): class RateLimit (line 2158) | class RateLimit(ratelimit.RateLimit): method __init__ (line 2171) | def __init__(self, method key (line 2181) | def key(self): method __init__ (line 2184) | def __init__(self, user_limit=None, ip_limit=None, error=errors.RATELI... method run (line 2203) | def run(self): method _check_usage (line 2219) | def _check_usage(self, rate_limit): method ratelimit (line 2239) | def ratelimit(cls, user_limit=None, ip_limit=None): class VShareRatelimit (line 2248) | class VShareRatelimit(VRatelimitImproved): method __init__ (line 2261) | def __init__(self): method ratelimit (line 2266) | def ratelimit(cls): class VCommentIDs (line 2271) | class VCommentIDs(Validator): method run (line 2272) | def run(self, id_str): method param_docs (line 2281) | def param_docs(self): class VOneTimeToken (line 2287) | class VOneTimeToken(Validator): method __init__ (line 2288) | def __init__(self, model, param, *args, **kwargs): method run (line 2292) | def run(self, key): class VOneOf (line 2301) | class VOneOf(Validator): method __init__ (line 2302) | def __init__(self, param, options = (), *a, **kw): method run (line 2306) | def run(self, val): method param_docs (line 2313) | def param_docs(self): class VList (line 2320) | class VList(Validator): method __init__ (line 2321) | def __init__(self, param, separator=",", choices=None, method run (line 2328) | def run(self, items): method param_docs (line 2347) | def param_docs(self): class VFrequencyCap (line 2361) | class VFrequencyCap(Validator): method run (line 2362) | def run(self, frequency_capped='false', frequency_cap=None): class VPriority (line 2380) | class VPriority(Validator): method run (line 2381) | def run(self, val): class VLocation (line 2391) | class VLocation(Validator): method run (line 2394) | def run(self, country, region, metro): class VImageType (line 2432) | class VImageType(Validator): method run (line 2433) | def run(self, img_type): method param_docs (line 2438) | def param_docs(self): class ValidEmail (line 2444) | class ValidEmail(Validator): method run (line 2447) | def run(self, email): class ValidEmails (line 2461) | class ValidEmails(Validator): method __init__ (line 2470) | def __init__(self, param, num = 20, **kw): method run (line 2474) | def run(self, emails0): class ValidEmailsOrExistingUnames (line 2501) | class ValidEmailsOrExistingUnames(Validator): method __init__ (line 2507) | def __init__(self, param, num=20, **kw): method run (line 2511) | def run(self, items): class VCnameDomain (line 2566) | class VCnameDomain(Validator): method run (line 2569) | def run(self, domain): method param_docs (line 2582) | def param_docs(self): class VDate (line 2587) | class VDate(Validator): method __init__ (line 2596) | def __init__(self, param, format="%m/%d/%Y", required=True): method run (line 2601) | def run(self, datestr): class VDestination (line 2612) | class VDestination(Validator): method __init__ (line 2613) | def __init__(self, param = 'dest', default = "", **kw): method run (line 2616) | def run(self, dest): method param_docs (line 2629) | def param_docs(self): class ValidAddress (line 2634) | class ValidAddress(Validator): method set_error (line 2635) | def set_error(self, msg, field): method run (line 2639) | def run(self, firstName, lastName, company, address, class ValidCard (line 2682) | class ValidCard(Validator): method set_error (line 2684) | def set_error(self, msg, field): method run (line 2688) | def run(self, cardNumber, expirationDate, cardCode): class VTarget (line 2723) | class VTarget(Validator): method run (line 2725) | def run(self, name): method param_docs (line 2729) | def param_docs(self): class VFlairAccount (line 2733) | class VFlairAccount(VRequired): method __init__ (line 2734) | def __init__(self, item, *a, **kw): method _lookup (line 2737) | def _lookup(self, name, allow_deleted): method run (line 2743) | def run(self, name): method param_docs (line 2751) | def param_docs(self): class VFlairLink (line 2754) | class VFlairLink(VRequired): method __init__ (line 2755) | def __init__(self, item, *a, **kw): method run (line 2758) | def run(self, name): method param_docs (line 2766) | def param_docs(self): class VFlairCss (line 2769) | class VFlairCss(VCssName): method __init__ (line 2770) | def __init__(self, param, max_css_classes=10, **kw): method run (line 2774) | def run(self, css): class VFlairText (line 2790) | class VFlairText(VLength): method __init__ (line 2791) | def __init__(self, param, max_length=64, **kw): class VFlairTemplateByID (line 2794) | class VFlairTemplateByID(VRequired): method __init__ (line 2795) | def __init__(self, param, **kw): method run (line 2798) | def run(self, flair_template_id): class VOneTimePassword (line 2805) | class VOneTimePassword(Validator): method __init__ (line 2809) | def __init__(self, param, required): method validate_otp (line 2814) | def validate_otp(cls, secret, password): method run (line 2836) | def run(self, password): class VOAuth2ClientID (line 2867) | class VOAuth2ClientID(VRequired): method __init__ (line 2870) | def __init__(self, param=None, *a, **kw): method run (line 2873) | def run(self, client_id): method param_docs (line 2882) | def param_docs(self): class VOAuth2ClientDeveloper (line 2885) | class VOAuth2ClientDeveloper(VOAuth2ClientID): method run (line 2888) | def run(self, client_id): class VOAuth2Scope (line 2894) | class VOAuth2Scope(VRequired): method __init__ (line 2896) | def __init__(self, param=None, *a, **kw): method run (line 2899) | def run(self, scope): class VOAuth2RefreshToken (line 2908) | class VOAuth2RefreshToken(Validator): method __init__ (line 2909) | def __init__(self, param, *a, **kw): method run (line 2912) | def run(self, refresh_token_id): class VPermissions (line 2926) | class VPermissions(Validator): method __init__ (line 2932) | def __init__(self, type_param, permissions_param, *a, **kw): method run (line 2935) | def run(self, type, permissions): class VJSON (line 2948) | class VJSON(Validator): method run (line 2949) | def run(self, json_str): method param_docs (line 2958) | def param_docs(self): class VValidatedJSON (line 2964) | class VValidatedJSON(VJSON): class ArrayOf (line 2966) | class ArrayOf(object): method __init__ (line 2968) | def __init__(self, spec): method run (line 2971) | def run(self, data): method spec_docs (line 2980) | def spec_docs(self): class Object (line 2995) | class Object(object): method __init__ (line 2997) | def __init__(self, spec): method run (line 3000) | def run(self, data, ignore_missing=False): method spec_docs (line 3015) | def spec_docs(self): class PartialObject (line 3036) | class PartialObject(Object): method run (line 3037) | def run(self, data): method __init__ (line 3041) | def __init__(self, param, spec, **kw): method run (line 3045) | def run(self, json_str): method docs_model (line 3054) | def docs_model(self): method param_docs (line 3063) | def param_docs(self): class VMultiPath (line 3072) | class VMultiPath(Validator): method __init__ (line 3075) | def __init__(self, param, kinds=None, required=True, **kw): method normalize (line 3081) | def normalize(self, path): method run (line 3087) | def run(self, path): method param_docs (line 3126) | def param_docs(self): class VMultiByPath (line 3132) | class VMultiByPath(Validator): method __init__ (line 3135) | def __init__(self, param, require_view=True, require_edit=False, kinds... method run (line 3141) | def run(self, path): method param_docs (line 3164) | def param_docs(self): class VSubredditList (line 3171) | class VSubredditList(Validator): method __init__ (line 3173) | def __init__(self, param, limit=20, allow_language_srs=True): method run (line 3178) | def run(self, subreddits): method param_docs (line 3206) | def param_docs(self): class VResultTypes (line 3212) | class VResultTypes(Validator): method __init__ (line 3217) | def __init__(self, param): method run (line 3222) | def run(self, result_types): method param_docs (line 3239) | def param_docs(self): class VSigned (line 3248) | class VSigned(Validator): method run (line 3260) | def run(self): function need_provider_captcha (line 3282) | def need_provider_captcha(): FILE: r2/r2/lib/validator/wiki.py function this_may_revise (line 46) | def this_may_revise(page=None): function this_may_view (line 55) | def this_may_view(page): function may_revise (line 61) | def may_revise(sr, user, page=None): function may_view (line 141) | def may_view(sr, user, page): function normalize_page (line 167) | def normalize_page(page): class AbortWikiError (line 186) | class AbortWikiError(Exception): class VWikiModerator (line 191) | class VWikiModerator(VSrModerator): method __init__ (line 192) | def __init__(self, fatal=False, *a, **kw): method run (line 195) | def run(self, page): class VWikiPageName (line 201) | class VWikiPageName(Validator): method __init__ (line 202) | def __init__(self, param, error_on_name_normalized=False, *a, **kw): method run (line 206) | def run(self, page): class VWikiPage (line 230) | class VWikiPage(VWikiPageName): method __init__ (line 231) | def __init__(self, param, required=True, restricted=True, modonly=False, method run (line 239) | def run(self, page): method validpage (line 255) | def validpage(self, page): method validversion (line 272) | def validversion(self, version, pageid=None): method param_docs (line 288) | def param_docs(self, param=None): class VWikiPageAndVersion (line 291) | class VWikiPageAndVersion(VWikiPage): method run (line 292) | def run(self, page, *versions): method param_docs (line 304) | def param_docs(self): class VWikiPageRevise (line 309) | class VWikiPageRevise(VWikiPage): method __init__ (line 310) | def __init__(self, param, required=False, *k, **kw): method may_not_create (line 313) | def may_not_create(self, page): method run (line 336) | def run(self, page, previous=None): method param_docs (line 360) | def param_docs(self): FILE: r2/r2/lib/voting.py function prequeued_vote_key (line 39) | def prequeued_vote_key(user, item): function update_vote_lookups (line 43) | def update_vote_lookups(user, thing, direction): function cast_vote (line 56) | def cast_vote(user, thing, direction, **data): function update_user_liked (line 105) | def update_user_liked(vote): function consume_link_vote_queue (line 124) | def consume_link_vote_queue(qname="vote_link_q"): function add_to_author_query_q (line 187) | def add_to_author_query_q(link): function consume_author_query_queue (line 196) | def consume_author_query_queue(qname="author_query_q", limit=1000): function add_to_subreddit_query_q (line 233) | def add_to_subreddit_query_q(link): function consume_subreddit_query_queue (line 242) | def consume_subreddit_query_queue(qname="subreddit_query_q", limit=1000): function add_to_domain_query_q (line 278) | def add_to_domain_query_q(link): function consume_domain_query_queue (line 292) | def consume_domain_query_queue(qname="domain_query_q", limit=1000): function consume_comment_vote_queue (line 330) | def consume_comment_vote_queue(qname="vote_comment_q"): FILE: r2/r2/lib/websockets.py function send_broadcast (line 39) | def send_broadcast(namespace, type, payload): function make_url (line 55) | def make_url(namespace, max_age): FILE: r2/r2/lib/zookeeper.py function connect_to_zookeeper (line 37) | def connect_to_zookeeper(hostlist, credentials): class LiveConfig (line 58) | class LiveConfig(object): method __init__ (line 66) | def __init__(self, client, key): method __getitem__ (line 76) | def __getitem__(self, key): method get (line 79) | def get(self, key, default=None): method iteritems (line 82) | def iteritems(self): method __repr__ (line 85) | def __repr__(self): class LiveList (line 89) | class LiveList(object): method __init__ (line 91) | def __init__(self, client, root, map_fn=None, reduce_fn=lambda L: L, method _nodepath (line 109) | def _nodepath(self, item): method _normalize_children (line 113) | def _normalize_children(self, children, reduce): method add (line 122) | def add(self, item): method remove (line 126) | def remove(self, item): method get (line 134) | def get(self, reduce=True): method __iter__ (line 138) | def __iter__(self): method __len__ (line 143) | def __len__(self): method __repr__ (line 148) | def __repr__(self): class ReducedLiveList (line 153) | class ReducedLiveList(object): method __init__ (line 163) | def __init__(self, client, root, reduced_data_node, map_fn=None, method update (line 188) | def update(self): method add (line 194) | def add(self, item): method remove (line 198) | def remove(self, item): method get (line 202) | def get(self, reduce=True): method __iter__ (line 208) | def __iter__(self): method __len__ (line 211) | def __len__(self): method __repr__ (line 214) | def __repr__(self): class IPNetworkLiveList (line 218) | class IPNetworkLiveList(ReducedLiveList): method __init__ (line 219) | def __init__(self, client, root, reduced_data_node): FILE: r2/r2/models/account.py class AccountExists (line 59) | class AccountExists(Exception): class Account (line 63) | class Account(Thing): method _cache_prefix (line 166) | def _cache_prefix(cls): method preferences (line 169) | def preferences(self): method __eq__ (line 172) | def __eq__(self, other): method __ne__ (line 178) | def __ne__(self, other): method has_interacted_with (line 181) | def has_interacted_with(self, sr): method karma (line 189) | def karma(self, kind, sr = None): method incr_karma (line 224) | def incr_karma(self, kind, sr, amt): method link_karma (line 244) | def link_karma(self): method comment_karma (line 248) | def comment_karma(self): method all_karmas (line 251) | def all_karmas(self, include_old=True): method update_last_visit (line 296) | def update_last_visit(self, current_time): method make_cookie (line 316) | def make_cookie(self, timestr=None): method make_admin_cookie (line 322) | def make_admin_cookie(self, first_login=None, last_request=None): method make_otp_cookie (line 329) | def make_otp_cookie(self, timestamp=None): method needs_captcha (line 336) | def needs_captcha(self): method can_create_subreddit (line 354) | def can_create_subreddit(self): method _by_name_cache (line 372) | def _by_name_cache(cls, name, allow_deleted=False): method _by_name (line 388) | def _by_name(cls, name, allow_deleted = False, _update = False): method _names_to_ids (line 397) | def _names_to_ids(cls, names, ignore_missing=False, allow_deleted=False, method _by_name_multiple (line 409) | def _by_name_multiple(cls, name): method friends (line 416) | def friends(self): method enemies (line 420) | def enemies(self): method is_moderator_somewhere (line 424) | def is_moderator_somewhere(self): method is_mutable (line 431) | def is_mutable(self, subreddit): method friend_rels_cache (line 442) | def friend_rels_cache(self): method friend_rels (line 450) | def friend_rels(self, _update = False): method add_friend_note (line 471) | def add_friend_note(self, friend, note): method _get_friend_ids_by (line 477) | def _get_friend_ids_by(self, data_value_name, limit): method get_recently_submitted_friend_ids (line 489) | def get_recently_submitted_friend_ids(self, limit=100): method get_recently_commented_friend_ids (line 493) | def get_recently_commented_friend_ids(self, limit=100): method delete (line 496) | def delete(self, delete_message=None): method _banned (line 520) | def _banned(self): method _banned (line 524) | def _banned(self, value): method subreddits (line 552) | def subreddits(self): method special_distinguish (line 556) | def special_distinguish(self): method set_email (line 563) | def set_email(self, email): method canonical_email (line 569) | def canonical_email(self): method system_user (line 573) | def system_user(cls): method automoderator_user (line 580) | def automoderator_user(cls): method use_subreddit_style (line 586) | def use_subreddit_style(self, sr): method set_subreddit_style (line 598) | def set_subreddit_style(self, sr, use_style): method flair_enabled_in_sr (line 603) | def flair_enabled_in_sr(self, sr_id): method flair_text (line 606) | def flair_text(self, sr_id, obey_disabled=False): method flair_css_class (line 611) | def flair_css_class(self, sr_id, obey_disabled=False): method can_flair_in_sr (line 616) | def can_flair_in_sr(self, user, sr): method set_flair (line 622) | def set_flair(self, subreddit, text=None, css_class=None, set_by=None, method get_trophy_id (line 641) | def get_trophy_id(self, uid): method set_trophy_id (line 649) | def set_trophy_id(self, uid, trophy_id): method employee (line 659) | def employee(self): method has_gold_subscription (line 671) | def has_gold_subscription(self): method has_paypal_subscription (line 675) | def has_paypal_subscription(self): method has_stripe_subscription (line 680) | def has_stripe_subscription(self): method gold_will_autorenew (line 685) | def gold_will_autorenew(self): method timeout_expiration (line 690) | def timeout_expiration(self): method days_remaining_in_timeout (line 702) | def days_remaining_in_timeout(self): method incr_admin_takedown_strikes (line 719) | def incr_admin_takedown_strikes(self, amt=1): method get_style_override (line 722) | def get_style_override(self): method has_been_atoed (line 749) | def has_been_atoed(self): class FakeAccount (line 755) | class FakeAccount(Account): method __eq__ (line 759) | def __eq__(self, other): function valid_admin_cookie (line 762) | def valid_admin_cookie(cookie): function valid_otp_cookie (line 793) | def valid_otp_cookie(cookie): function valid_feed (line 818) | def valid_feed(name, feedhash, path): function make_feedhash (line 830) | def make_feedhash(user, path): function make_feedurl (line 835) | def make_feedurl(user, path, ext = "rss"): function valid_password (line 842) | def valid_password(a, password, compare_password=None): function bcrypt_password (line 892) | def bcrypt_password(password): function passhash (line 896) | def passhash(username, password, salt = ''): function change_password (line 902) | def change_password(user, newpassword): function register (line 909) | def register(name, password, registration_ip): class Friend (line 933) | class Friend(Relation(Account, Account)): method _cache_prefix (line 937) | def _cache_prefix(cls): class DeletedUser (line 944) | class DeletedUser(FakeAccount): method name (line 946) | def name(self): method _deleted (line 950) | def _deleted(self): method _fullname (line 953) | def _fullname(self): method _id (line 956) | def _id(self): method __setattr__ (line 959) | def __setattr__(self, attr, val): class BlockedSubredditsByAccount (line 966) | class BlockedSubredditsByAccount(tdb_cassandra.DenormalizedRelation): method value_for (line 975) | def value_for(cls, thing1, thing2): method block (line 979) | def block(cls, user, sr): method unblock (line 983) | def unblock(cls, user, sr): method is_blocked (line 987) | def is_blocked(cls, user, sr): function deleted_account_cleanup (line 996) | def deleted_account_cleanup(data): class AccountsByCanonicalEmail (line 1079) | class AccountsByCanonicalEmail(tdb_cassandra.View): method update_email (line 1089) | def update_email(cls, account, old, new): method get_accounts (line 1102) | def get_accounts(cls, email_address): class SubredditParticipationByAccount (line 1110) | class SubredditParticipationByAccount(tdb_cassandra.DenormalizedRelation): method value_for (line 1120) | def value_for(cls, thing1, thing2): method mark_participated (line 1124) | def mark_participated(cls, account, subreddit): class QuarantinedSubredditOptInsByAccount (line 1128) | class QuarantinedSubredditOptInsByAccount(tdb_cassandra.DenormalizedRela... method value_for (line 1141) | def value_for(cls, thing1, thing2): method opt_in (line 1145) | def opt_in(cls, account, subreddit): method opt_out (line 1150) | def opt_out(cls, account, subreddit): method is_opted_in (line 1156) | def is_opted_in(cls, user, subreddit): FILE: r2/r2/models/admin_notes.py class AdminNotesBySystem (line 33) | class AdminNotesBySystem(tdb_cassandra.View): method add (line 44) | def add(cls, system_name, subject, note, author, when=None): method in_display_order (line 53) | def in_display_order(cls, system_name, subject): method _rowkey (line 68) | def _rowkey(cls, system_name, subject): FILE: r2/r2/models/admintools.py class AdminTools (line 55) | class AdminTools(object): method spam (line 57) | def spam(self, things, auto=True, moderator_banned=False, method unspam (line 119) | def unspam(self, things, moderator_unbanned=True, unbanner=None, method report (line 163) | def report(self, thing): method author_spammer (line 166) | def author_spammer(self, things, spam): method set_last_sr_ban (line 184) | def set_last_sr_ban(self, things): method adjust_gold_expiration (line 199) | def adjust_gold_expiration(self, account, days=0, months=0, years=0): method engolden (line 219) | def engolden(self, account): method degolden (line 234) | def degolden(self, account): method admin_list (line 239) | def admin_list(self): method create_award_claim_code (line 242) | def create_award_claim_code(self, unique_award_id, award_codename, function cancel_subscription (line 260) | def cancel_subscription(subscr_id): function all_gold_users (line 272) | def all_gold_users(): function accountid_from_subscription (line 277) | def accountid_from_subscription(subscr_id): function update_gold_users (line 290) | def update_gold_users(): function is_banned_domain (line 338) | def is_banned_domain(dom): function is_shamed_domain (line 341) | def is_shamed_domain(dom): function bans_for_domain_parts (line 344) | def bans_for_domain_parts(dom): function apply_updates (line 348) | def apply_updates(user, timer): function ip_span (line 352) | def ip_span(ip): function wiki_template (line 357) | def wiki_template(template_slug, sr=None): function send_welcome_message (line 374) | def send_welcome_message(user): function send_system_message (line 388) | def send_system_message(user, subject, body, system_user=None, FILE: r2/r2/models/automoderator.py class PerformedRulesByThing (line 31) | class PerformedRulesByThing(tdb_cassandra.View): method _rowkey (line 45) | def _rowkey(cls, thing): method mark_performed (line 49) | def mark_performed(cls, thing, rule): method get_already_performed (line 54) | def get_already_performed(cls, thing): FILE: r2/r2/models/award.py class Award (line 31) | class Award(Thing): method _cache_prefix (line 39) | def _cache_prefix(cls): method _all_awards_cache (line 44) | def _all_awards_cache(cls): method _all_awards (line 48) | def _all_awards(cls, _update=False): method _new (line 56) | def _new(cls, codename, title, awardtype, imgurl, api_ok): method _by_codename (line 63) | def _by_codename(cls, codename): method give_if_needed (line 74) | def give_if_needed(cls, codename, user, method take_away (line 98) | def take_away(cls, codename, user): class FakeTrophy (line 127) | class FakeTrophy(object): method __init__ (line 128) | def __init__(self, recipient, award, description=None, url=None): class Trophy (line 138) | class Trophy(Relation(Account, Award)): method _cache_prefix (line 143) | def _cache_prefix(cls): method _new (line 147) | def _new(cls, recipient, award, description=None, url=None): method update_caches (line 164) | def update_caches(self): method by_account_cache (line 170) | def by_account_cache(cls, account_id): method by_account (line 177) | def by_account(cls, account, _update=False): method by_award_cache (line 185) | def by_award_cache(cls, award_id): method by_award (line 192) | def by_award(cls, award, _update=False): method claim (line 199) | def claim(cls, user, uid, award, description, url): method trophy_url (line 214) | def trophy_url(self): FILE: r2/r2/models/bans.py class UserTempBan (line 31) | class UserTempBan(object): method schedule (line 33) | def schedule(cls, victim, duration): method unschedule (line 42) | def unschedule(cls, victim): method search (line 50) | def search(cls, subjects): method cancel_colkey (line 61) | def cancel_colkey(cls, name): class TempTimeout (line 65) | class TempTimeout(UserTempBan): method cancel_rowkey (line 67) | def cancel_rowkey(cls): method schedule_rowkey (line 71) | def schedule_rowkey(cls): FILE: r2/r2/models/bidding.py class Sessionized (line 62) | class Sessionized(object): method __init__ (line 71) | def __init__(self, *a, **kw): method _new (line 81) | def _new(cls, *a, **kw): method _commit (line 90) | def _commit(self): method _delete (line 97) | def _delete(self): method query (line 105) | def query(cls, **kw): method _disambiguate_args (line 115) | def _disambiguate_args(cls, filter_fn, *a, **kw): method _make_storable (line 150) | def _make_storable(self, val): method _lookup (line 159) | def _lookup(cls, multiple, *a, **kw): method lookup (line 186) | def lookup(cls, *a, **kw): method one (line 194) | def one(cls, *a, **kw): method add (line 201) | def add(cls, key, *a): method delete (line 208) | def delete(cls, key, *a): method get (line 215) | def get(cls, key): class CustomerID (line 221) | class CustomerID(Sessionized, Base): method __repr__ (line 228) | def __repr__(self): method set (line 232) | def set(cls, user, _id): method get_id (line 241) | def get_id(cls, user): class PayID (line 247) | class PayID(Sessionized, Base): method __repr__ (line 255) | def __repr__(self): method get_ids (line 259) | def get_ids(cls, key): class Bid (line 262) | class Bid(Sessionized, Base): method _new (line 293) | def _new(cls, trans_id, user, pay_id, thing_id, bid, campaign = 0): method set_status (line 309) | def set_status(self, status): method auth (line 314) | def auth(self): method is_auth (line 317) | def is_auth(self): method void (line 320) | def void(self): method is_void (line 323) | def is_void(self): method charged (line 326) | def charged(self): method is_charged (line 331) | def is_charged(self): method refund (line 338) | def refund(self, amount): method is_refund (line 345) | def is_refund(self): method charge_amount (line 349) | def charge_amount(self): class PromotionWeights (line 353) | class PromotionWeights(Sessionized, Base): method filter_sr_name (line 377) | def filter_sr_name(cls, sr_name): method reschedule (line 382) | def reschedule(cls, link, campaign): method add (line 387) | def add(cls, link, campaign): method delete (line 413) | def delete(cls, link, campaign): method _filter_query (line 420) | def _filter_query(cls, query, start, end=None, link=None, method get_campaign_ids (line 443) | def get_campaign_ids(cls, start, end=None, link=None, author_id=None, method get_link_names (line 450) | def get_link_names(cls, start, end=None, link=None, author_id=None, FILE: r2/r2/models/builder.py class InconsistentCommentTreeError (line 84) | class InconsistentCommentTreeError(Exception): class Builder (line 88) | class Builder(object): method __init__ (line 89) | def __init__(self, wrap=Wrapped, prewrap_fn=None, keep_fn=None, stale=... method keep_item (line 97) | def keep_item(self, item): method wrap_items (line 103) | def wrap_items(self, items): method get_items (line 324) | def get_items(self): method convert_items (line 327) | def convert_items(self, items): method valid_after (line 340) | def valid_after(self, after): method item_iter (line 351) | def item_iter(self, a): method must_skip (line 355) | def must_skip(self, item): method _is_controversial (line 375) | def _is_controversial(self, wrapped): class QueryBuilder (line 393) | class QueryBuilder(Builder): method __init__ (line 394) | def __init__(self, query, skip=False, num=None, sr_detail=None, count=0, method __repr__ (line 405) | def __repr__(self): method item_iter (line 408) | def item_iter(self, a): method init_query (line 413) | def init_query(self): method fetch_more (line 424) | def fetch_more(self, last_item, num_have): method get_items (line 446) | def get_items(self): class IDBuilder (line 537) | class IDBuilder(QueryBuilder): method thing_lookup (line 538) | def thing_lookup(self, names): method init_query (line 542) | def init_query(self): method _get_after (line 552) | def _get_after(l, after, reverse): method fetch_more (line 568) | def fetch_more(self, last_item, num_have): class ActionBuilder (line 588) | class ActionBuilder(IDBuilder): method init_query (line 589) | def init_query(self): method thing_lookup (line 599) | def thing_lookup(self, names): class CampaignBuilder (line 608) | class CampaignBuilder(IDBuilder): method _get_after (line 611) | def _get_after(promo_tuples, after, reverse): method thing_lookup (line 630) | def thing_lookup(self, tuples): method wrap_items (line 640) | def wrap_items(self, items): method valid_after (line 656) | def valid_after(self, after): class ModActionBuilder (line 667) | class ModActionBuilder(QueryBuilder): method wrap_items (line 668) | def wrap_items(self, items): class SimpleBuilder (line 684) | class SimpleBuilder(IDBuilder): method thing_lookup (line 685) | def thing_lookup(self, names): method init_query (line 688) | def init_query(self): method get_items (line 704) | def get_items(self): class SearchBuilder (line 711) | class SearchBuilder(IDBuilder): method __init__ (line 712) | def __init__(self, query, skip_deleted_authors=True, **kw): method init_query (line 716) | def init_query(self): method keep_item (line 732) | def keep_item(self, item): class WikiRevisionBuilder (line 771) | class WikiRevisionBuilder(QueryBuilder): method __init__ (line 774) | def __init__(self, revisions, user=None, sr=None, page=None, **kw): method wrap_items (line 780) | def wrap_items(self, items): method must_skip (line 799) | def must_skip(self, item): method keep_item (line 802) | def keep_item(self, item): class WikiRecentRevisionBuilder (line 807) | class WikiRecentRevisionBuilder(WikiRevisionBuilder): method must_skip (line 810) | def must_skip(self, item): class CommentOrdererBase (line 825) | class CommentOrdererBase(object): method __init__ (line 826) | def __init__(self, link, sort, max_comments, max_depth, timer): method get_comment_order (line 834) | def get_comment_order(self): method modify_comment_tree (line 926) | def modify_comment_tree(self, comment_tree): method get_initial_candidates (line 930) | def get_initial_candidates(self, comment_tree): method get_initial_comment_list (line 934) | def get_initial_comment_list(self, comment_tree): method update_candidates (line 939) | def update_candidates(self, candidates, sorter, to_add=None): class CommentOrderer (line 958) | class CommentOrderer(CommentOrdererBase): method get_initial_candidates (line 959) | def get_initial_candidates(self, comment_tree): method get_initial_comment_list (line 969) | def get_initial_comment_list(self, comment_tree): method cache_key (line 989) | def cache_key(self): method write_cache (line 998) | def write_cache(cls, link, sort, timer): method should_read_cache (line 1013) | def should_read_cache(self): method read_cache (line 1024) | def read_cache(self): method _get_comment_order (line 1072) | def _get_comment_order(self): method get_comment_order (line 1075) | def get_comment_order(self): class QACommentOrderer (line 1110) | class QACommentOrderer(CommentOrderer): method _get_comment_order (line 1111) | def _get_comment_order(self): function get_active_sort_orders_for_link (line 1188) | def get_active_sort_orders_for_link(link): function write_comment_orders (line 1204) | def write_comment_orders(link): class PermalinkCommentOrderer (line 1232) | class PermalinkCommentOrderer(CommentOrdererBase): method __init__ (line 1233) | def __init__(self, link, sort, max_comments, max_depth, timer, comment, method get_path_to_comment (line 1241) | def get_path_to_comment(cls, comment, context, comment_tree): method modify_comment_tree (line 1266) | def modify_comment_tree(self, comment_tree): method get_initial_candidates (line 1283) | def get_initial_candidates(self, comment_tree): class ChildrenCommentOrderer (line 1296) | class ChildrenCommentOrderer(CommentOrdererBase): method __init__ (line 1297) | def __init__(self, link, sort, max_comments, max_depth, timer, children): method get_initial_candidates (line 1302) | def get_initial_candidates(self, comment_tree): function make_child_listing (line 1329) | def make_child_listing(): function add_to_child_listing (line 1336) | def add_to_child_listing(parent, child_thing): class CommentBuilder (line 1345) | class CommentBuilder(Builder): method __init__ (line 1347) | def __init__(self, link, sort, comment=None, children=None, context=None, method get_items (line 1377) | def get_items(self): method _get_comments (line 1382) | def _get_comments(self): method load_comment_order (line 1392) | def load_comment_order(self): method keep_item (line 1438) | def keep_item(self, item): method _make_wrapped_tree (line 1444) | def _make_wrapped_tree(self): method make_wrapped_items (line 1538) | def make_wrapped_items(self, comment_tuples): method uncollapse_special_comments (line 1557) | def uncollapse_special_comments(self, wrapped_by_id): method item_iter (line 1617) | def item_iter(self, a): class MessageBuilder (line 1625) | class MessageBuilder(Builder): method __init__ (line 1626) | def __init__(self, skip=True, num=None, parent=None, after=None, method get_tree (line 1636) | def get_tree(self): method valid_after (line 1639) | def valid_after(self, after): method _viewable_message (line 1643) | def _viewable_message(self, m): method _apply_pagination (line 1656) | def _apply_pagination(self, tree): method should_collapse (line 1693) | def should_collapse(cls, message): method get_items (line 1704) | def get_items(self): method item_iter (line 1803) | def item_iter(self, builder_items): class ModeratorMessageBuilder (line 1816) | class ModeratorMessageBuilder(MessageBuilder): method __init__ (line 1817) | def __init__(self, user, **kw): method get_tree (line 1821) | def get_tree(self): class MultiredditMessageBuilder (line 1829) | class MultiredditMessageBuilder(MessageBuilder): method __init__ (line 1830) | def __init__(self, sr, **kw): method get_tree (line 1834) | def get_tree(self): class TopCommentBuilder (line 1841) | class TopCommentBuilder(CommentBuilder): method __init__ (line 1844) | def __init__(self, link, sort, num=None, wrap=Wrapped): method get_items (line 1848) | def get_items(self): class SrMessageBuilder (line 1853) | class SrMessageBuilder(MessageBuilder): method __init__ (line 1854) | def __init__(self, sr, **kw): method get_tree (line 1858) | def get_tree(self): class UserMessageBuilder (line 1864) | class UserMessageBuilder(MessageBuilder): method __init__ (line 1865) | def __init__(self, user, **kw): method _viewable_message (line 1869) | def _viewable_message(self, message): method get_tree (line 1885) | def get_tree(self): method valid_after (line 1890) | def valid_after(self, after): class UserListBuilder (line 1896) | class UserListBuilder(QueryBuilder): method thing_lookup (line 1897) | def thing_lookup(self, rels): method must_skip (line 1903) | def must_skip(self, item): method valid_after (line 1906) | def valid_after(self, after): method wrap_items (line 1910) | def wrap_items(self, rels): class SavedBuilder (line 1913) | class SavedBuilder(IDBuilder): method wrap_items (line 1914) | def wrap_items(self, items): class FlairListBuilder (line 1925) | class FlairListBuilder(UserListBuilder): method init_query (line 1926) | def init_query(self): FILE: r2/r2/models/comment_tree.py class CommentTreePermacache (line 67) | class CommentTreePermacache(object): method _permacache_key (line 69) | def _permacache_key(cls, link): method _mutation_context (line 73) | def _mutation_context(cls, link): method prepare_new_storage (line 79) | def prepare_new_storage(cls, link): method _load_tree (line 90) | def _load_tree(cls, link): method _write_tree (line 96) | def _write_tree(cls, link, tree, lock): method get_tree_pieces (line 102) | def get_tree_pieces(cls, link, timer): method add_comments (line 114) | def add_comments(cls, link, comments): method rebuild (line 150) | def rebuild(cls, link, comments): class CommentTree (line 162) | class CommentTree: method __init__ (line 163) | def __init__(self, link, cids, tree, depth, parents, num_children): method by_link (line 172) | def by_link(cls, link, timer=None): method on_new_link (line 182) | def on_new_link(cls, link): method add_comments (line 186) | def add_comments(cls, link, comments): method rebuild (line 190) | def rebuild(cls, link): FILE: r2/r2/models/flair.py class Flair (line 38) | class Flair(Relation(Subreddit, Account)): method _cache_prefix (line 42) | def _cache_prefix(cls): class FlairTemplate (line 56) | class FlairTemplate(tdb_cassandra.Thing): method _new (line 69) | def _new(cls, text='', css_class='', text_editable=False): method _commit (line 78) | def _commit(self, *a, **kw): method covers (line 84) | def covers(self, other_template): class FlairTemplateBySubredditIndex (line 108) | class FlairTemplateBySubredditIndex(tdb_cassandra.Thing): method _new (line 128) | def _new(cls, sr_id, flair_type=USER_FLAIR): method by_sr (line 134) | def by_sr(cls, sr_id, create=False): method create_template (line 143) | def create_template(cls, sr_id, text='', css_class='', text_editable=F... method get_template_ids (line 156) | def get_template_ids(cls, sr_id, flair_type=USER_FLAIR): method get_template (line 163) | def get_template(cls, sr_id, ft_id, flair_type=None): method clear (line 174) | def clear(cls, sr_id, flair_type=USER_FLAIR): method _index_keys (line 187) | def _index_keys(self, flair_type): method _make_index_key (line 195) | def _make_index_key(cls, position, flair_type): method iter_template_ids (line 198) | def iter_template_ids(self, flair_type): method insert (line 202) | def insert(self, ft_id, position=None, flair_type=USER_FLAIR): method delete_by_id (line 221) | def delete_by_id(self, ft_id, flair_type=None): method _delete_by_id (line 232) | def _delete_by_id(self, ft_id, flair_type): FILE: r2/r2/models/gold.py class GoldRevenueGoalByDate (line 98) | class GoldRevenueGoalByDate(object): method _colkey (line 115) | def _colkey(date): method set (line 119) | def set(cls, date, goal): method get (line 123) | def get(cls, date): class GildedCommentsByAccount (line 138) | class GildedCommentsByAccount(tdb_cassandra.DenormalizedRelation): method value_for (line 144) | def value_for(cls, thing1, thing2): method gild (line 148) | def gild(cls, user, thing): class GildedLinksByAccount (line 152) | class GildedLinksByAccount(tdb_cassandra.DenormalizedRelation): method value_for (line 158) | def value_for(cls, thing1, thing2): method gild (line 162) | def gild(cls, user, thing): class GildingsByThing (line 168) | class GildingsByThing(tdb_cassandra.View): method get_gilder_ids (line 176) | def get_gilder_ids(cls, thing): method create (line 181) | def create(cls, user, things): method delete (line 186) | def delete(cls, user, things): class GildingsByDay (line 193) | class GildingsByDay(tdb_cassandra.View): method _rowkey (line 203) | def _rowkey(date): method get_gildings (line 207) | def get_gildings(cls, date): method create (line 222) | def create(cls, user, things): method delete (line 234) | def delete(cls, user, things): function create_unclaimed_gold (line 239) | def create_unclaimed_gold (trans_id, payer_email, paying_id, function create_claimed_gold (line 270) | def create_claimed_gold (trans_id, payer_email, paying_id, function create_gift_gold (line 285) | def create_gift_gold(giver_id, recipient_id, days, date, function create_gold_code (line 302) | def create_gold_code(trans_id, payer_email, paying_id, pennies, days, da... function account_by_payingid (line 328) | def account_by_payingid(paying_id): function claim_gold (line 343) | def claim_gold(secret, account_id): function check_by_email (line 378) | def check_by_email(email): function has_prev_subscr_payments (line 387) | def has_prev_subscr_payments(subscr_id): function retrieve_gold_transaction (line 392) | def retrieve_gold_transaction(transaction_id): function update_gold_transaction (line 399) | def update_gold_transaction(transaction_id, status): function transactions_by_user (line 404) | def transactions_by_user(user): function gold_payments_by_user (line 410) | def gold_payments_by_user(user): function gold_received_by_user (line 420) | def gold_received_by_user(user): function days_to_pennies (line 427) | def days_to_pennies(days): function append_random_bottlecap_phrase (line 436) | def append_random_bottlecap_phrase(message): function gold_revenue_multi (line 459) | def gold_revenue_multi(dates): function gold_revenue_volatile (line 472) | def gold_revenue_volatile(date): function gold_revenue_steady (line 477) | def gold_revenue_steady(date): function gold_goal_on (line 482) | def gold_goal_on(date): function account_from_stripe_customer_id (line 492) | def account_from_stripe_customer_id(stripe_customer_id): function _get_subscription_details (line 499) | def _get_subscription_details(stripe_customer_id): function get_subscription_details (line 519) | def get_subscription_details(user): function paypal_subscription_url (line 526) | def paypal_subscription_url(): function get_discounted_price (line 530) | def get_discounted_price(gold_price): function make_gold_message (line 536) | def make_gold_message(thing, user_gilded): function creddits_lock (line 606) | def creddits_lock(user): function calculate_server_seconds (line 616) | def calculate_server_seconds(pennies, date): function get_current_value_of_month (line 628) | def get_current_value_of_month(): class StylesheetsEverywhere (line 635) | class StylesheetsEverywhere(WikiPageIniItem): method _get_wiki_config (line 637) | def _get_wiki_config(cls): method __init__ (line 640) | def __init__(self, id, tagline, thumbnail_url, preview_url, is_enabled... FILE: r2/r2/models/ip.py class IPsByAccount (line 21) | class IPsByAccount(tdb_cassandra.View): method set (line 32) | def set(cls, account_id, ip, date=None): method get (line 38) | def get(cls, class AccountsByIP (line 81) | class AccountsByIP(tdb_cassandra.View): method set (line 92) | def set(cls, ip, account_id, date=None): method get (line 98) | def get(cls, function set_account_ip (line 135) | def set_account_ip(account_id, ip, date=None): FILE: r2/r2/models/keyvalue.py class KeyValueStore (line 32) | class KeyValueStore(object): method get (line 46) | def get(cls, key, default=NoDefault): method set (line 56) | def set(cls, key, data): class NamedGlobals (line 60) | class NamedGlobals(KeyValueStore): FILE: r2/r2/models/last_modified.py class LastModified (line 32) | class LastModified(tdb_cassandra.View): method touch (line 41) | def touch(cls, fullname, names): method get (line 49) | def get(cls, fullname, name, touch_if_not_set=False): method get_multi (line 62) | def get_multi(cls, fullnames, name): FILE: r2/r2/models/link.py class LinkExists (line 102) | class LinkExists(Exception): pass class Link (line 105) | class Link(Thing, Printable): method _cache_prefix (line 154) | def _cache_prefix(cls): method __init__ (line 157) | def __init__(self, *a, **kw): method affects_karma_type (line 161) | def affects_karma_type(self): method body (line 168) | def body(self): method has_thumbnail (line 175) | def has_thumbnail(self): method is_nsfw (line 179) | def is_nsfw(self): method is_embeddable (line 183) | def is_embeddable(self): method _by_url (line 187) | def _by_url(cls, url, sr): method already_submitted_link (line 200) | def already_submitted_link(self, url, title): method resubmit_link (line 208) | def resubmit_link(cls, url, title): method _submit (line 214) | def _submit(cls, is_self, title, content, author, sr, ip, method set_content (line 290) | def set_content(self, is_self, content): method _save (line 313) | def _save(self, user, category=None): method _unsave (line 316) | def _unsave(self, user): method _hide (line 319) | def _hide(self, user): method _unhide (line 322) | def _unhide(self, user): method _commit (line 325) | def _commit(self): method link_domain (line 336) | def link_domain(self): method num_comments (line 343) | def num_comments(self): method keep_item (line 347) | def keep_item(self, wrapped): method wrapped_cache_key (line 401) | def wrapped_cache_key(wrapped, style): method make_permalink (line 437) | def make_permalink(self, sr, force_domain=False): method make_canonical_link (line 463) | def make_canonical_link(self, sr, subdomain='www'): method make_permalink_slow (line 468) | def make_permalink_slow(self, force_domain=False): method markdown_link_slow (line 472) | def markdown_link_slow(self): method tracking_link (line 479) | def tracking_link(cls, method _gild (line 534) | def _gild(self, user): method _should_expunge_selftext (line 554) | def _should_expunge_selftext(link): method update_nofollow (line 568) | def update_nofollow(cls, user, wrapped): method add_props (line 584) | def add_props(cls, user, wrapped): method get_default_context (line 954) | def get_default_context(cls): method post_hint (line 958) | def post_hint(self): method subreddit_slow (line 997) | def subreddit_slow(self): method author_slow (line 1003) | def author_slow(self): method responder_ids (line 1010) | def responder_ids(self): method archived_slow (line 1019) | def archived_slow(self): method is_archived (line 1023) | def is_archived(self, sr): method can_view_promo (line 1026) | def can_view_promo(self, user): method can_comment_slow (line 1039) | def can_comment_slow(self, user): method sort_if_suggested (line 1050) | def sort_if_suggested(self, sr=None): method can_flair_slow (line 1066) | def can_flair_slow(self, user): method set_flair (line 1074) | def set_flair(self, text=None, css_class=None, set_by=None): method set_sticky_comment (line 1084) | def set_sticky_comment(self, comment, set_by=None): method remove_sticky_comment (line 1113) | def remove_sticky_comment(self, comment=None, set_by=None): method _utf8_encode (line 1143) | def _utf8_encode(cls, value): method set_media_object (line 1162) | def set_media_object(self, value): method set_secure_media_object (line 1165) | def set_secure_media_object(self, value): method set_preview_object (line 1168) | def set_preview_object(self, value): method is_stickyable (line 1171) | def is_stickyable(self): method is_stickied_slow (line 1178) | def is_stickied_slow(self): method is_stickied (line 1181) | def is_stickied(self, subreddit): class LinksByUrlAndSubreddit (line 1191) | class LinksByUrlAndSubreddit(tdb_cassandra.View): method make_canonical_url (line 1201) | def make_canonical_url(cls, url): method make_sr_rowkey (line 1217) | def make_sr_rowkey(cls, canonical_url, sr_id): method make_all_rowkey (line 1221) | def make_all_rowkey(cls, canonical_url): method add_link (line 1225) | def add_link(cls, link): method remove_link (line 1234) | def remove_link(cls, link): method get_link_ids (line 1243) | def get_link_ids(cls, url, sr=None, limit=1000): class PromotedLink (line 1264) | class PromotedLink(Link): method add_props (line 1272) | def add_props(cls, user, wrapped): class ReadNextLink (line 1294) | class ReadNextLink(Link): class SearchResultLink (line 1298) | class SearchResultLink(Link): method add_props (line 1302) | def add_props(cls, user, wrapped): class LegacySearchResultLink (line 1311) | class LegacySearchResultLink(Link): method add_props (line 1315) | def add_props(cls, user, wrapped): class Comment (line 1325) | class Comment(Thing, Printable): method _cache_prefix (line 1344) | def _cache_prefix(cls): method _markdown (line 1347) | def _markdown(self): method affects_karma_type (line 1351) | def affects_karma_type(self): method _new (line 1355) | def _new(cls, author, link, parent, body, ip): method _save (line 1446) | def _save(self, user, category=None): method _unsave (line 1449) | def _unsave(self, user): method link_slow (line 1453) | def link_slow(self): method subreddit_slow (line 1462) | def subreddit_slow(self): method author_slow (line 1468) | def author_slow(self): method archived_slow (line 1475) | def archived_slow(self): method is_archived (line 1479) | def is_archived(self, sr): method is_stickyable (line 1483) | def is_stickyable(self): method keep_item (line 1489) | def keep_item(self, wrapped): method wrapped_cache_key (line 1513) | def wrapped_cache_key(wrapped, style): method make_permalink (line 1521) | def make_permalink(self, link, sr=None, context=None, anchor=False, method make_permalink_slow (line 1530) | def make_permalink_slow(self, context=None, anchor=False, method _gild (line 1537) | def _gild(self, user): method _qa (line 1556) | def _qa(self, children, responder_ids): method update_nofollow (line 1582) | def update_nofollow(cls, user, wrapped): method add_props (line 1598) | def add_props(cls, user, wrapped): method update_search_index (line 1886) | def update_search_index(self, boost_only=False): class CommentScoresByLink (line 1891) | class CommentScoresByLink(tdb_cassandra.View): method _rowkey (line 1906) | def _rowkey(cls, link, sort): method set_scores (line 1911) | def set_scores(cls, link, sort, scores_by_comment): method get_scores (line 1916) | def get_scores(cls, link, sort): class MoreMessages (line 1924) | class MoreMessages(Printable): method __init__ (line 1931) | def __init__(self, parent, child): method wrapped_cache_key (line 1936) | def wrapped_cache_key(item, style): method _fullname (line 1940) | def _fullname(self): method _id36 (line 1944) | def _id36(self): method _id (line 1948) | def _id(self): method subject (line 1952) | def subject(self): method childlisting (line 1956) | def childlisting(self): method to (line 1960) | def to(self): method author (line 1964) | def author(self): method user_is_recipient (line 1968) | def user_is_recipient(self): method sr_id (line 1972) | def sr_id(self): method subreddit (line 1976) | def subreddit(self): method accent_color (line 1980) | def accent_color(self): class MoreComments (line 1984) | class MoreComments(Printable): method wrapped_cache_key (line 1989) | def wrapped_cache_key(item, style): method __init__ (line 1992) | def __init__(self, link, depth, parent_id=None): method _fullname (line 2005) | def _fullname(self): method _id36 (line 2009) | def _id36(self): class MoreRecursion (line 2013) | class MoreRecursion(MoreComments): class MoreChildren (line 2017) | class MoreChildren(MoreComments): method __init__ (line 2018) | def __init__(self, link, sort_operator, depth, parent_id=None): class Message (line 2024) | class Message(Thing, Printable): method _cache_prefix (line 2047) | def _cache_prefix(cls): method _new (line 2051) | def _new(cls, author, to, subject, body, ip, parent=None, sr=None, method permalink (line 2199) | def permalink(self): method make_permalink (line 2202) | def make_permalink(self, force_domain=False): method make_permalink_slow (line 2212) | def make_permalink_slow(self, context=None, anchor=False, force_domain... method can_view_slow (line 2215) | def can_view_slow(self): method get_muted_user_in_conversation (line 2229) | def get_muted_user_in_conversation(self): method add_props (line 2252) | def add_props(cls, user, wrapped): method subreddit_slow (line 2490) | def subreddit_slow(self): method author_slow (line 2496) | def author_slow(self): method recipient_slow (line 2503) | def recipient_slow(self): method wrapped_cache_key (line 2508) | def wrapped_cache_key(wrapped, style): method keep_item (line 2513) | def keep_item(self, wrapped): class _SaveHideByAccount (line 2523) | class _SaveHideByAccount(tdb_cassandra.DenormalizedRelation): method value_for (line 2525) | def value_for(cls, thing1, thing2): method _cached_queries (line 2529) | def _cached_queries(cls, user, thing): method _savehide (line 2533) | def _savehide(cls, user, things, **kw): method destroy (line 2547) | def destroy(cls, user, things, **kw): method _unsavehide (line 2555) | def _unsavehide(cls, user, things, **kw): class _ThingSavesByAccount (line 2564) | class _ThingSavesByAccount(_SaveHideByAccount): method value_for (line 2569) | def value_for(cls, thing1, thing2, category=None): method _remove_from_category_listings (line 2573) | def _remove_from_category_listings(cls, user, things, category): method _save (line 2584) | def _save(cls, user, things, category=None): method _unsave (line 2590) | def _unsave(cls, user, things): method _unsavehide (line 2596) | def _unsavehide(cls, user, things, categories=None): method _cached_queries_category (line 2606) | def _cached_queries_category(cls, user, thing, class LinkSavesByAccount (line 2618) | class LinkSavesByAccount(_ThingSavesByAccount): method _cached_queries (line 2624) | def _cached_queries(cls, user, thing, **kw): class CommentSavesByAccount (line 2633) | class CommentSavesByAccount(_ThingSavesByAccount): method _cached_queries (line 2639) | def _cached_queries(cls, user, thing, **kw): class _ThingHidesByAccount (line 2648) | class _ThingHidesByAccount(_SaveHideByAccount): method _hide (line 2650) | def _hide(cls, user, things): method _unhide (line 2654) | def _unhide(cls, user, things): class LinkHidesByAccount (line 2658) | class LinkHidesByAccount(_ThingHidesByAccount): method _cached_queries (line 2664) | def _cached_queries(cls, user, thing): class LinkVisitsByAccount (line 2668) | class LinkVisitsByAccount(_SaveHideByAccount): method _visit (line 2676) | def _visit(cls, user, things): method _unvisit (line 2680) | def _unvisit(cls, user, things): class _ThingSavesBySubreddit (line 2683) | class _ThingSavesBySubreddit(tdb_cassandra.View): method _rowkey (line 2685) | def _rowkey(cls, user, thing): method _column (line 2689) | def _column(cls, user, thing): method get_saved_values (line 2693) | def get_saved_values(cls, user): method get_saved_subreddits (line 2704) | def get_saved_subreddits(cls, user): method create (line 2710) | def create(cls, user, things, **kw): method _check_empty (line 2717) | def _check_empty(cls, user, sr_id): method destroy (line 2721) | def destroy(cls, user, things, **kw): class _ThingSavesByCategory (line 2728) | class _ThingSavesByCategory(_ThingSavesBySubreddit): method create (line 2730) | def create(cls, user, things, category=None): method _get_query_fn (line 2739) | def _get_query_fn(): method _check_empty (line 2743) | def _check_empty(cls, user, category): method get_saved_categories (line 2750) | def get_saved_categories(cls, user): method destroy (line 2754) | def destroy(cls, user, things, categories=None): class LinkSavesByCategory (line 2763) | class LinkSavesByCategory(_ThingSavesByCategory): method _get_query_fn (line 2767) | def _get_query_fn(cls): class LinkSavesBySubreddit (line 2772) | class LinkSavesBySubreddit(_ThingSavesBySubreddit): method _check_empty (line 2776) | def _check_empty(cls, user, sr_id): class CommentSavesBySubreddit (line 2784) | class CommentSavesBySubreddit(_ThingSavesBySubreddit): method _check_empty (line 2788) | def _check_empty(cls, user, sr_id): class CommentSavesByCategory (line 2795) | class CommentSavesByCategory(_ThingSavesByCategory): method _get_query_fn (line 2799) | def _get_query_fn(cls): class LinksByImage (line 2803) | class LinksByImage(tdb_cassandra.View): method _rowkey (line 2815) | def _rowkey(cls, image_uid): method add_link (line 2819) | def add_link(cls, image_uid, link): method remove_link (line 2825) | def remove_link(cls, image_uid, link): method get_link_id36s (line 2832) | def get_link_id36s(cls, image_uid): class Inbox (line 2857) | class Inbox(MultiRelation('inbox', _CommentInbox, _MessageInbox)): method _add (line 2859) | def _add(cls, to, obj, name, orangered=True): method possible_recipients (line 2881) | def possible_recipients(cls, obj): method get_rels (line 2920) | def get_rels(cls, user, things): method set_unread (line 2951) | def set_unread(cls, inbox_rels, unread=True): class ModeratorInbox (line 2978) | class ModeratorInbox(Relation(Subreddit, Message)): method _cache_prefix (line 2985) | def _cache_prefix(cls): method _add (line 2989) | def _add(cls, sr, obj): method get_rels (line 2995) | def get_rels(cls, sr, messages): method set_unread (line 3008) | def set_unread(cls, inbox_rels, unread=True): class CommentsByAccount (line 3016) | class CommentsByAccount(tdb_cassandra.DenormalizedRelation): method value_for (line 3022) | def value_for(cls, thing1, thing2): method add_comment (line 3026) | def add_comment(cls, account, comment): class LinksByAccount (line 3030) | class LinksByAccount(tdb_cassandra.DenormalizedRelation): method value_for (line 3036) | def value_for(cls, thing1, thing2): method add_link (line 3040) | def add_link(cls, account, link): class MessagesByAccount (line 3044) | class MessagesByAccount(tdb_cassandra.DenormalizedRelation): method value_for (line 3050) | def value_for(cls, thing1, thing2): method add_message (line 3054) | def add_message(cls, account, message): class CommentVisitsByUser (line 3058) | class CommentVisitsByUser(tdb_cassandra.View): method _rowkey (line 3071) | def _rowkey(cls, user, link): method get_previous_visits (line 3075) | def get_previous_visits(cls, user, link): method add_visit (line 3087) | def add_visit(cls, user, link, visit_time): method get_and_update (line 3093) | def get_and_update(cls, user, link, visit_time): FILE: r2/r2/models/listing.py class Listing (line 43) | class Listing(object): method __init__ (line 47) | def __init__(self, builder, nextprev = True, next_link = True, method max_score (line 59) | def max_score(self): method max_num (line 64) | def max_num(self): method get_items (line 67) | def get_items(self, *a, **kw): method listing (line 78) | def listing(self, next_suggestions=None): method __iter__ (line 108) | def __iter__(self): class TableListing (line 111) | class TableListing(Listing): pass class ModActionListing (line 113) | class ModActionListing(TableListing): pass class WikiRevisionListing (line 115) | class WikiRevisionListing(TableListing): pass class UserListing (line 117) | class UserListing(TableListing): method __init__ (line 127) | def __init__(self, method container_name (line 140) | def container_name(self): class FriendListing (line 143) | class FriendListing(UserListing): method _class (line 147) | def _class(self): method headers (line 151) | def headers(self): method form_title (line 156) | def form_title(self): method container_name (line 160) | def container_name(self): class EnemyListing (line 164) | class EnemyListing(UserListing): method title (line 169) | def title(self): method container_name (line 173) | def container_name(self): class BannedListing (line 176) | class BannedListing(UserListing): method __init__ (line 179) | def __init__(self, builder, show_jump_to=False, show_not_found=False, method populate_from_tempbans (line 187) | def populate_from_tempbans(cls, item, tempbans=None): method form_title (line 196) | def form_title(self): method title (line 200) | def title(self): method get_items (line 204) | def get_items(self, *a, **kw): class MutedListing (line 214) | class MutedListing(UserListing): method populate_from_muted (line 218) | def populate_from_muted(cls, item, muted=None): method form_title (line 227) | def form_title(self): method title (line 231) | def title(self): method get_items (line 235) | def get_items(self, *a, **kw): class WikiBannedListing (line 245) | class WikiBannedListing(BannedListing): method form_title (line 249) | def form_title(self): method title (line 253) | def title(self): class ContributorListing (line 257) | class ContributorListing(UserListing): method title (line 261) | def title(self): method form_title (line 266) | def form_title(self): class WikiMayContributeListing (line 269) | class WikiMayContributeListing(ContributorListing): method title (line 273) | def title(self): method form_title (line 278) | def form_title(self): class InvitedModListing (line 281) | class InvitedModListing(UserListing): method permissions_form (line 287) | def permissions_form(self): method title (line 299) | def title(self): class ModListing (line 303) | class ModListing(InvitedModListing): method has_add_form (line 308) | def has_add_form(self): method can_remove_self (line 312) | def can_remove_self(self): method has_invite (line 316) | def has_invite(self): method title (line 320) | def title(self): class LinkListing (line 323) | class LinkListing(Listing): method __init__ (line 324) | def __init__(self, *a, **kw): method listing (line 329) | def listing(self, *args, **kwargs): class SearchListing (line 336) | class SearchListing(LinkListing): method __init__ (line 337) | def __init__(self, *a, **kw): method listing (line 342) | def listing(self, legacy_render_class=False, *args, **kwargs): class ReadNextListing (line 355) | class ReadNextListing(Listing): class NestedListing (line 359) | class NestedListing(Listing): method __init__ (line 360) | def __init__(self, *a, **kw): method listing (line 366) | def listing(self): class SpotlightListing (line 380) | class SpotlightListing(Listing): method __init__ (line 384) | def __init__(self, *a, **kw): method get_items (line 399) | def get_items(self): method listing (line 408) | def listing(self): FILE: r2/r2/models/mail_queue.py function mail_queue (line 40) | def mail_queue(metadata): function sent_mail_table (line 82) | def sent_mail_table(metadata, name = 'sent_mail'): function opt_out (line 117) | def opt_out(metadata): class EmailHandler (line 129) | class EmailHandler(object): method __init__ (line 130) | def __init__(self, force = False): method __repr__ (line 158) | def __repr__(self): method has_opted_out (line 161) | def has_opted_out(self, email): method opt_out (line 168) | def opt_out(self, msg_hash): method opt_in (line 187) | def opt_in(self, msg_hash): method get_recipient (line 204) | def get_recipient(self, msg_hash): method add_to_queue (line 211) | def add_to_queue(self, user, emails, from_name, fr_addr, kind, method from_queue (line 240) | def from_queue(self, max_date, batch_limit = 50, kind = None): method clear_queue (line 284) | def clear_queue(self, max_date, kind = None): class Email (line 292) | class Email(object): method __init__ (line 353) | def __init__(self, user, thing, email, from_name, date, ip, method from_name (line 375) | def from_name(self): method get_unsent (line 386) | def get_unsent(cls, max_date, batch_limit = 50, kind = None): method should_queue (line 391) | def should_queue(self): method set_sent (line 397) | def set_sent(self, date = None, rejected = False): method to_MIMEText (line 419) | def to_MIMEText(self): function has_opted_out (line 451) | def has_opted_out(email): function opt_count (line 459) | def opt_count(): FILE: r2/r2/models/media_cache.py class MediaByURL (line 43) | class MediaByURL(tdb_cassandra.View): method _rowkey (line 70) | def _rowkey(cls, url, **kwargs): method add_placeholder (line 88) | def add_placeholder(cls, url, **kwargs): method add (line 97) | def add(cls, url, media, **kwargs): method add_error (line 133) | def add_error(cls, url, error, **kwargs): method get (line 143) | def get(cls, url, max_cache_age=None, **kwargs): method media (line 159) | def media(self): FILE: r2/r2/models/modaction.py class ModAction (line 37) | class ModAction(tdb_cassandra.UuidThing): method create (line 211) | def create(cls, sr, mod, action, details=None, target=None, descriptio... method _on_create (line 243) | def _on_create(self): method get_actions (line 255) | def get_actions(cls, srs, mod=None, action=None, after=None, reverse=F... method details_text (line 288) | def details_text(self): method add_props (line 299) | def add_props(cls, user, wrapped): class ModActionBySR (line 387) | class ModActionBySR(tdb_cassandra.View): method _rowkey (line 396) | def _rowkey(cls, ma): class ModActionBySRMod (line 399) | class ModActionBySRMod(tdb_cassandra.View): method _rowkey (line 408) | def _rowkey(cls, ma): class ModActionBySRActionMod (line 411) | class ModActionBySRActionMod(tdb_cassandra.View): method _rowkey (line 420) | def _rowkey(cls, ma): class ModActionBySRAction (line 423) | class ModActionBySRAction(tdb_cassandra.View): method _rowkey (line 432) | def _rowkey(cls, ma): FILE: r2/r2/models/printable.py class Printable (line 30) | class Printable(object): method update_nofollow (line 60) | def update_nofollow(cls, user, wrapped): method add_props (line 64) | def add_props(cls, user, wrapped): method permalink (line 85) | def permalink(self, *a, **kw): method keep_item (line 88) | def keep_item(self, wrapped): method wrapped_cache_key (line 92) | def wrapped_cache_key(wrapped, style): FILE: r2/r2/models/promo.py class PriorityLevel (line 46) | class PriorityLevel(object): method __repr__ (line 53) | def __repr__(self): method text (line 57) | def text(self): method description (line 61) | def description(self): class HighPriority (line 65) | class HighPriority(PriorityLevel): class MediumPriority (line 70) | class MediumPriority(PriorityLevel): class RemnantPriority (line 76) | class RemnantPriority(PriorityLevel): class HousePriority (line 83) | class HousePriority(PriorityLevel): class AuctionPriority (line 90) | class AuctionPriority(PriorityLevel): function PROMOTE_DEFAULT_PRIORITY (line 104) | def PROMOTE_DEFAULT_PRIORITY(context=None): class Location (line 111) | class Location(object): method __init__ (line 113) | def __init__(self, country, region=None, metro=None): method __repr__ (line 118) | def __repr__(self): method to_code (line 122) | def to_code(self): method from_code (line 127) | def from_code(cls, code): method contains (line 131) | def contains(self, other): method __eq__ (line 156) | def __eq__(self, other): method __ne__ (line 164) | def __ne__(self, other): function calc_impressions (line 168) | def calc_impressions(total_budget_pennies, cpm_pennies): class Collection (line 175) | class Collection(object): method __init__ (line 176) | def __init__(self, name, sr_names, over_18=False, description=None, method by_name (line 185) | def by_name(cls, name): method get_all (line 189) | def get_all(cls): method __repr__ (line 202) | def __repr__(self): class CollectionStorage (line 206) | class CollectionStorage(tdb_cassandra.View): method _from_columns (line 220) | def _from_columns(cls, name, columns): method _to_columns (line 229) | def _to_columns(cls, description, srs, over_18, is_spotlight): method set (line 239) | def set(cls, name, description, srs, over_18=False, is_spotlight=False): method _set_attributes (line 245) | def _set_attributes(cls, name, attributes): method set_over_18 (line 256) | def set_over_18(cls, name, over_18): method set_is_spotlight (line 260) | def set_is_spotlight(cls, name, is_spotlight): method get_collection (line 264) | def get_collection(cls, name): method get_all (line 277) | def get_all(cls): method delete (line 284) | def delete(cls, name): class Target (line 289) | class Target(object): method __init__ (line 291) | def __init__(self, target): method over_18 (line 305) | def over_18(self): method subreddit_names (line 313) | def subreddit_names(self): method subreddits_slow (line 320) | def subreddits_slow(self): method __eq__ (line 329) | def __eq__(self, other): method __ne__ (line 335) | def __ne__(self, other): method pretty_name (line 339) | def pretty_name(self): method __repr__ (line 347) | def __repr__(self): class PromoCampaign (line 351) | class PromoCampaign(Thing): method _cache_prefix (line 395) | def _cache_prefix(cls): method __getattr__ (line 398) | def __getattr__(self, attr): method __setattr__ (line 421) | def __setattr__(self, attr, val, make_dirty=True): method __getstate__ (line 427) | def __getstate__(self): method is_auction (line 444) | def is_auction(self): method priority_name_from_priority (line 450) | def priority_name_from_priority(self, priority): method location_code_from_location (line 456) | def location_code_from_location(cls, location): method unpack_target (line 460) | def unpack_target(cls, target): method create (line 469) | def create(cls, link, target, start_date, end_date, method _by_link (line 498) | def _by_link(cls, link_id): method _by_user (line 506) | def _by_user(cls, account_id): method ndays (line 514) | def ndays(self): method impressions (line 518) | def impressions(self): method priority (line 525) | def priority(self): method priority (line 529) | def priority(self, priority): method location (line 533) | def location(self): method location (line 540) | def location(self, location): method target (line 544) | def target(self): method target (line 560) | def target(self, target): method _mobile_target_getter (line 566) | def _mobile_target_getter(self, target): method _mobile_target_setter (line 572) | def _mobile_target_setter(self, target_names): method mobile_os (line 579) | def mobile_os(self): method mobile_os (line 583) | def mobile_os(self, mobile_os_names): method ios_devices (line 587) | def ios_devices(self): method ios_devices (line 591) | def ios_devices(self, ios_device_names): method android_devices (line 595) | def android_devices(self): method android_devices (line 599) | def android_devices(self, android_device_names): method ios_version_range (line 603) | def ios_version_range(self): method ios_version_range (line 607) | def ios_version_range(self, ios_version_names): method android_version_range (line 611) | def android_version_range(self): method android_version_range (line 615) | def android_version_range(self, android_version_names): method location_str (line 619) | def location_str(self): method is_paid (line 636) | def is_paid(self): method is_freebie (line 639) | def is_freebie(self): method is_live_now (line 642) | def is_live_now(self): method is_house (line 647) | def is_house(self): method total_budget_dollars (line 651) | def total_budget_dollars(self): method bid_dollars (line 655) | def bid_dollars(self): method delete (line 658) | def delete(self): function backfill_campaign_targets (line 663) | def backfill_campaign_targets(): class PromotionLog (line 673) | class PromotionLog(tdb_cassandra.View): method _rowkey (line 679) | def _rowkey(cls, link): method add (line 683) | def add(cls, link, text): method get (line 693) | def get(cls, link): class PromotionPrices (line 703) | class PromotionPrices(tdb_cassandra.View): method _rowkey_and_column_from_target (line 733) | def _rowkey_and_column_from_target(cls, target): method _rowkey_and_column_from_location (line 750) | def _rowkey_and_column_from_location(cls, location): method set_target_price (line 765) | def set_target_price(cls, target, cpm): method set_location_price (line 770) | def set_location_price(cls, location, cpm): method lookup_target_price (line 775) | def lookup_target_price(cls, target, default): method lookup_location_price (line 781) | def lookup_location_price(cls, location, default): method _lookup_price (line 787) | def _lookup_price(cls, rowkey, column_name): method get_price (line 796) | def get_price(cls, user, target, location): method get_price_dict (line 828) | def get_price_dict(cls, user): FILE: r2/r2/models/promo_metrics.py class PromoMetrics (line 31) | class PromoMetrics(tdb_cassandra.View): method get (line 57) | def get(cls, metric_name, sr_names=None): method set (line 66) | def set(cls, metric_name, values_by_sr): class LocationPromoMetrics (line 70) | class LocationPromoMetrics(tdb_cassandra.View): method _rowkey (line 79) | def _rowkey(cls, location): method _column_name (line 84) | def _column_name(cls, sr): method get (line 88) | def get(cls, srs, locations): method set (line 112) | def set(cls, metrics): FILE: r2/r2/models/query_cache.py class ThingTupleComparator (line 57) | class ThingTupleComparator(object): method __init__ (line 66) | def __init__(self, sorts): method __call__ (line 69) | def __call__(self, t1, t2): class _CachedQueryBase (line 80) | class _CachedQueryBase(object): method __init__ (line 81) | def __init__(self, sort): method fetch (line 87) | def fetch(self, force=False): method _fetch (line 101) | def _fetch(self): method _sort_data (line 104) | def _sort_data(self): method __iter__ (line 108) | def __iter__(self): class CachedQuery (line 115) | class CachedQuery(_CachedQueryBase): method __init__ (line 132) | def __init__(self, model, key, sort, filter_fn, is_precomputed): method _make_item_tuple (line 140) | def _make_item_tuple(self, item): method _fetch (line 158) | def _fetch(self): method _fetch_multi (line 162) | def _fetch_multi(self, queries): method _cols_from_things (line 195) | def _cols_from_things(self, things): method _insert (line 202) | def _insert(self, mutator, things): method _replace (line 209) | def _replace(self, mutator, things, ttl): method _delete (line 213) | def _delete(self, mutator, things): method _prune (line 220) | def _prune(self, mutator): method _prune_multi (line 270) | def _prune_multi(cls, queries): method __hash__ (line 278) | def __hash__(self): method __eq__ (line 281) | def __eq__(self, other): method __ne__ (line 284) | def __ne__(self, other): method __repr__ (line 287) | def __repr__(self): class MergedCachedQuery (line 292) | class MergedCachedQuery(_CachedQueryBase): method __init__ (line 300) | def __init__(self, queries): method _fetch (line 310) | def _fetch(self): class CachedQueryMutator (line 315) | class CachedQueryMutator(object): method __init__ (line 323) | def __init__(self): method __enter__ (line 327) | def __enter__(self): method __exit__ (line 330) | def __exit__(self, type, value, traceback): method insert (line 333) | def insert(self, query, things): method replace (line 354) | def replace(self, query, things, ttl=None): method delete (line 369) | def delete(self, query, things): method send (line 378) | def send(self): function filter_identity (line 392) | def filter_identity(x): function filter_thing2 (line 402) | def filter_thing2(x): function filter_thing (line 412) | def filter_thing(x): function _is_query_precomputed (line 422) | def _is_query_precomputed(query): class FakeQuery (line 449) | class FakeQuery(object): method __init__ (line 452) | def __init__(self, sort, precomputed=False): function cached_query (line 457) | def cached_query(model, filter_fn=filter_identity): function merged_cached_query (line 507) | def merged_cached_query(fn): class _BaseQueryCache (line 520) | class _BaseQueryCache(object): method get (line 542) | def get(cls, keys): method index_mangle_keys (line 568) | def index_mangle_keys(cls, keys): method insert (line 587) | def insert(cls, mutator, key, columns, ttl=None): method replace (line 600) | def replace(cls, mutator, key, columns, ttl): method remove (line 609) | def remove(cls, mutator, key, columns): method remove_if_unchanged (line 615) | def remove_if_unchanged(cls, mutator, key, columns, timestamps): method remove_older_than (line 629) | def remove_older_than(cls, mutator, key, removal_timestamp): class UserQueryCache (line 644) | class UserQueryCache(_BaseQueryCache): class SubredditQueryCache (line 649) | class SubredditQueryCache(_BaseQueryCache): FILE: r2/r2/models/recommend.py class AccountSRPrefs (line 48) | class AccountSRPrefs(object): method __init__ (line 60) | def __init__(self): method for_user (line 66) | def for_user(cls, account): class AccountSRFeedback (line 87) | class AccountSRFeedback(tdb_cassandra.DenormalizedRelation): method for_user (line 97) | def for_user(cls, account): method record_feedback (line 112) | def record_feedback(cls, account, srs, action): method record_views (line 128) | def record_views(cls, account, srs): class ExploreSettings (line 132) | class ExploreSettings(tdb_cassandra.Thing): method for_user (line 138) | def for_user(cls, account): method record_settings (line 146) | def record_settings(cls, class DefaultExploreSettings (line 171) | class DefaultExploreSettings(object): method __init__ (line 173) | def __init__(self): FILE: r2/r2/models/report.py class Report (line 48) | class Report(MultiRelation('report', *REPORT_RELS)): method new (line 52) | def new(cls, user, thing, reason=None): method for_thing (line 97) | def for_thing(cls, thing): method accept (line 104) | def accept(cls, things, correct = True): method get_reports (line 133) | def get_reports(cls, wrapped, max_user_reasons=20): method get_reasons (line 183) | def get_reasons(cls, wrapped): FILE: r2/r2/models/rules.py class SubredditRules (line 48) | class SubredditRules(tdb_cassandra.View): method get_rule_blob (line 61) | def get_rule_blob(self, short_name, description, priority, kind, method create (line 79) | def create(self, subreddit, short_name, description, kind=None, method remove_rule (line 95) | def remove_rule(self, subreddit, short_name): method update (line 113) | def update(self, subreddit, old_short_name, short_name, description, method reorder (line 142) | def reorder(self, subreddit, short_name, priority): method get_rule (line 183) | def get_rule(self, subreddit, short_name): method get_rules (line 197) | def get_rules(self, subreddit, kind=None): FILE: r2/r2/models/subreddit.py function get_links_sr_ids (line 90) | def get_links_sr_ids(sr_ids, sort, time): function get_user_location (line 100) | def get_user_location(): class BaseSite (line 119) | class BaseSite(object): method __getattr__ (line 128) | def __getattr__(self, name): method path (line 134) | def path(self): method user_path (line 138) | def user_path(self): method analytics_name (line 142) | def analytics_name(self): method allows_referrers (line 146) | def allows_referrers(self): method is_moderator_with_perms (line 149) | def is_moderator_with_perms(self, user, *perms): method is_limited_moderator (line 154) | def is_limited_moderator(self, user): method is_unlimited_moderator (line 158) | def is_unlimited_moderator(self, user): method get_links (line 162) | def get_links(self, sort, time): method get_spam (line 166) | def get_spam(self, include_links=True, include_comments=True): method get_reported (line 171) | def get_reported(self, include_links=True, include_comments=True): method get_modqueue (line 177) | def get_modqueue(self, include_links=True, include_comments=True): method get_unmoderated (line 183) | def get_unmoderated(self): method get_edited (line 187) | def get_edited(self, include_links=True, include_comments=True): method get_all_comments (line 193) | def get_all_comments(self): method get_gilded (line 197) | def get_gilded(self): method get_modactions (line 202) | def get_modactions(cls, srs, mod=None, action=None): method get_live_promos (line 207) | def get_live_promos(self): class SubredditExists (line 211) | class SubredditExists(Exception): pass class Subreddit (line 214) | class Subreddit(Thing, Printable, BaseSite): method _cache_prefix (line 355) | def _cache_prefix(cls): method __setattr__ (line 358) | def __setattr__(self, attr, val, make_dirty=True): method _new (line 366) | def _new(cls, name, title, author_id, ip, lang = g.lang, type = 'public', method is_valid_name (line 392) | def is_valid_name(cls, name, allow_language_srs=False, allow_time_srs=... method _by_name (line 416) | def _by_name(cls, names, stale=False, _update = False): method _by_domain_cache (line 504) | def _by_domain_cache(cls, name): method _by_domain (line 512) | def _by_domain(cls, domain, _update = False): method allowed_types (line 521) | def allowed_types(self): method allows_referrers (line 527) | def allows_referrers(self): method author_slow (line 532) | def author_slow(self): method add_moderator (line 538) | def add_moderator(self, user, **kwargs): method remove_moderator (line 548) | def remove_moderator(self, user, **kwargs): method moderators (line 562) | def moderators(self): method moderators_with_perms (line 565) | def moderators_with_perms(self): method moderator_invites_with_perms (line 570) | def moderator_invites_with_perms(self): method fetch_stylesheet_source (line 575) | def fetch_stylesheet_source(self): method prev_stylesheet (line 582) | def prev_stylesheet(self): method wikibanned (line 589) | def wikibanned(self): method wikicontributor (line 593) | def wikicontributor(self): method _should_wiki (line 597) | def _should_wiki(self): method subscribers (line 601) | def subscribers(self): method wiki_use_subreddit_karma (line 605) | def wiki_use_subreddit_karma(self): method hide_subscribers (line 609) | def hide_subscribers(self): method hide_contributors (line 613) | def hide_contributors(self): method hide_num_users_info (line 617) | def hide_num_users_info(self): method _related_multipath (line 621) | def _related_multipath(self): method related_subreddits (line 625) | def related_subreddits(self): method allow_ads (line 633) | def allow_ads(self): method discoverable (line 637) | def discoverable(self): method community_rules (line 641) | def community_rules(self): method related_subreddits (line 645) | def related_subreddits(self, related_subreddits): method record_visitor_activity (line 672) | def record_visitor_activity(self, context, visitor_id): method count_activity (line 697) | def count_activity(self): method spammy (line 718) | def spammy(self): method is_contributor (line 721) | def is_contributor(self, user): method can_comment (line 727) | def can_comment(self, user): method wiki_can_submit (line 750) | def wiki_can_submit(self, user): method can_submit (line 753) | def can_submit(self, user, promotion=False): method can_submit_link (line 774) | def can_submit_link(self, user): method can_submit_text (line 779) | def can_submit_text(self, user): method can_ban (line 784) | def can_ban(self, user): method can_mute (line 789) | def can_mute(self, muter, user): method can_distinguish (line 795) | def can_distinguish(self,user): method can_change_stylesheet (line 800) | def can_change_stylesheet(self, user): method parse_css (line 807) | def parse_css(self, content, verify=True): method change_css (line 836) | def change_css(self, content, parsed, prev=None, reason=None, author=N... method is_special (line 866) | def is_special(self, user): method should_ratelimit (line 872) | def should_ratelimit(self, user, kind): method can_view (line 888) | def can_view(self, user): method can_view_in_modlist (line 897) | def can_view_in_modlist(self, user): method is_allowed_to_view (line 905) | def is_allowed_to_view(self, user): method is_exposed (line 921) | def is_exposed(self, user): method is_embeddable (line 939) | def is_embeddable(self): method can_demod (line 943) | def can_demod(self, bully, victim): method load_subreddits (line 956) | def load_subreddits(cls, links, return_dict = True, stale=False): method keep_for_rising (line 972) | def keep_for_rising(self, sr_id): method get_sr_user_relations (line 977) | def get_sr_user_relations(cls, user, srs): method add_props (line 1027) | def add_props(cls, user, wrapped): method wrapped_cache_key (line 1075) | def wrapped_cache_key(wrapped, style): method default_subreddits (line 1080) | def default_subreddits(cls, ids=True): method featured_subreddits (line 1094) | def featured_subreddits(cls): method random_reddits_cached (line 1106) | def random_reddits_cached(cls, user_name, sr_ids, limit): method random_reddits (line 1117) | def random_reddits(cls, user_name, sr_ids, limit): method random_reddit (line 1146) | def random_reddit(cls, over18=False, user=None): method update_popular_subreddits (line 1164) | def update_popular_subreddits(cls, limit=5000): method random_subscription (line 1192) | def random_subscription(cls, user): method user_subreddits (line 1202) | def user_subreddits(cls, user, ids=True, limit=DEFAULT_LIMIT): method special_reddits (line 1240) | def special_reddits(cls, user, query_param): method subscribe_defaults (line 1245) | def subscribe_defaults(cls, user): method keep_item (line 1252) | def keep_item(self, wrapped): method __eq__ (line 1259) | def __eq__(self, other): method __ne__ (line 1268) | def __ne__(self, other): method get_all_mod_ids (line 1272) | def get_all_mod_ids(srs): method update_moderator_permissions (line 1286) | def update_moderator_permissions(self, user, **kwargs): method add_rel_note (line 1298) | def add_rel_note(self, type, user, note): method get_live_promos (line 1305) | def get_live_promos(self): method schedule_unban (line 1309) | def schedule_unban(self, kind, victim, banner, duration): method unschedule_unban (line 1318) | def unschedule_unban(self, victim, type): method get_tempbans (line 1321) | def get_tempbans(self, type=None, names=None): method get_muted_items (line 1324) | def get_muted_items(self, names=None): method add_gilding_seconds (line 1327) | def add_gilding_seconds(self): method allow_gilding (line 1333) | def allow_gilding(self): method get_promote_srid (line 1337) | def get_promote_srid(cls): method is_subscriber (line 1343) | def is_subscriber(self, user): method add_subscriber (line 1349) | def add_subscriber(self, user): method subscribe_multiple (line 1356) | def subscribe_multiple(cls, user, srs): method remove_subscriber (line 1363) | def remove_subscriber(self, user): method subscribed_ids_by_user (line 1369) | def subscribed_ids_by_user(cls, user): method reverse_subscriber_ids (line 1373) | def reverse_subscriber_ids(cls, user): method get_rgb (line 1377) | def get_rgb(self, fade=0.8): method set_sticky (line 1383) | def set_sticky(self, link, log_user=None, num=None): method remove_sticky (line 1426) | def remove_sticky(self, link, log_user=None): method has_max_stickies (line 1444) | def has_max_stickies(self): class SubscribedSubredditsByAccount (line 1450) | class SubscribedSubredditsByAccount(tdb_cassandra.DenormalizedRelation): method value_for (line 1462) | def value_for(cls, user, sr): method get_all_sr_ids (line 1466) | def get_all_sr_ids(cls, user): class SubscriptionsByDay (line 1477) | class SubscriptionsByDay(tdb_cassandra.View): method create (line 1486) | def create(cls, srs, user): method get_all_counts (line 1498) | def get_all_counts(cls, date): method write_counts (line 1521) | def write_counts(cls, days_ago=1): class FakeSubreddit (line 1554) | class FakeSubreddit(BaseSite): method __init__ (line 1560) | def __init__(self): method keep_for_rising (line 1563) | def keep_for_rising(self, sr_id): method _should_wiki (line 1567) | def _should_wiki(self): method allow_gilding (line 1571) | def allow_gilding(self): method allow_ads (line 1575) | def allow_ads(self): method is_moderator (line 1578) | def is_moderator(self, user): method can_view (line 1582) | def can_view(self, user): method can_comment (line 1585) | def can_comment(self, user): method can_submit (line 1588) | def can_submit(self, user, promotion=False): method can_change_stylesheet (line 1591) | def can_change_stylesheet(self, user): method is_banned (line 1594) | def is_banned(self, user): method is_muted (line 1597) | def is_muted(self, user): method get_all_comments (line 1600) | def get_all_comments(self): method get_gilded (line 1604) | def get_gilded(self): method spammy (line 1607) | def spammy(self): class FriendsSR (line 1610) | class FriendsSR(FakeSubreddit): method get_links (line 1618) | def get_links(self, sort, time): method get_all_comments (line 1638) | def get_all_comments(self): method get_gilded (line 1659) | def get_gilded(self): class AllSR (line 1670) | class AllSR(FakeSubreddit): method keep_for_rising (line 1675) | def keep_for_rising(self, sr_id): method get_links (line 1678) | def get_links(self, sort, time): method get_all_comments (line 1693) | def get_all_comments(self): method get_gilded (line 1697) | def get_gilded(self): method get_reported (line 1701) | def get_reported(self, include_links=True, include_comments=True): class AllMinus (line 1714) | class AllMinus(AllSR): method __init__ (line 1718) | def __init__(self, srs): method keep_for_rising (line 1723) | def keep_for_rising(self, sr_id): method title (line 1727) | def title(self): method path (line 1732) | def path(self): method get_links (line 1735) | def get_links(self, sort, time): class Filtered (line 1744) | class Filtered(object): method path (line 1748) | def path(self): method title (line 1752) | def title(self): method name (line 1756) | def name(self): method multi_path (line 1760) | def multi_path(self): method _get_filtered_subreddits (line 1763) | def _get_filtered_subreddits(self): class AllFiltered (line 1772) | class AllFiltered(Filtered, AllMinus): method __init__ (line 1776) | def __init__(self): class _DefaultSR (line 1781) | class _DefaultSR(FakeSubreddit): method _get_sr_ids (line 1788) | def _get_sr_ids(self): method keep_for_rising (line 1794) | def keep_for_rising(self, sr_id): method is_moderator (line 1797) | def is_moderator(self, user): method get_links (line 1800) | def get_links(self, sort, time): method title (line 1805) | def title(self): class DefaultSR (line 1809) | class DefaultSR(_DefaultSR): method _base (line 1811) | def _base(self): method wiki_can_submit (line 1817) | def wiki_can_submit(self, user): method wiki_use_subreddit_karma (line 1821) | def wiki_use_subreddit_karma(self): method _should_wiki (line 1825) | def _should_wiki(self): method wikimode (line 1829) | def wikimode(self): method wiki_edit_karma (line 1833) | def wiki_edit_karma(self): method wiki_edit_age (line 1837) | def wiki_edit_age(self): method is_wikicontributor (line 1840) | def is_wikicontributor(self, user): method is_wikibanned (line 1843) | def is_wikibanned(self, user): method is_wikicreate (line 1846) | def is_wikicreate(self, user): method _fullname (line 1850) | def _fullname(self): method _id36 (line 1854) | def _id36(self): method type (line 1858) | def type(self): method header (line 1862) | def header(self): method header_title (line 1866) | def header_title(self): method header_size (line 1870) | def header_size(self): method stylesheet_url (line 1874) | def stylesheet_url(self): method stylesheet_url_http (line 1878) | def stylesheet_url_http(self): method stylesheet_url_https (line 1882) | def stylesheet_url_https(self): method get_all_comments (line 1885) | def get_all_comments(self): method get_gilded (line 1891) | def get_gilded(self): method get_live_promos (line 1895) | def get_live_promos(self): class MultiReddit (line 1903) | class MultiReddit(FakeSubreddit): method __init__ (line 1917) | def __init__(self, path=None, srs=None): method srs (line 1924) | def srs(self): method sr_ids (line 1928) | def sr_ids(self): method kept_sr_ids (line 1932) | def kept_sr_ids(self): method banned_sr_ids (line 1936) | def banned_sr_ids(self): method allows_referrers (line 1940) | def allows_referrers(self): method keep_for_rising (line 1943) | def keep_for_rising(self, sr_id): method is_moderator (line 1946) | def is_moderator(self, user): method srs_with_perms (line 1959) | def srs_with_perms(self, user, *perms): method title (line 1964) | def title(self): method path (line 1968) | def path(self): method over_18 (line 1972) | def over_18(self): method ageweight (line 1976) | def ageweight(self): method get_links (line 1979) | def get_links(self, sort, time): method get_all_comments (line 1982) | def get_all_comments(self): method get_gilded (line 1987) | def get_gilded(self): method get_live_promos (line 1991) | def get_live_promos(self): class TooManySubredditsError (line 1998) | class TooManySubredditsError(Exception): class BaseLocalizedSubreddits (line 2002) | class BaseLocalizedSubreddits(tdb_cassandra.View): method _rowkey (line 2015) | def _rowkey(cls, location): method lookup (line 2019) | def lookup(cls, keys, update=False): method set_srs (line 2043) | def set_srs(cls, location, srs): method set_global_srs (line 2062) | def set_global_srs(cls, srs): method get_srids (line 2067) | def get_srids(cls, location): method get_global_defaults (line 2077) | def get_global_defaults(cls): method get_localized_srs (line 2081) | def get_localized_srs(cls, location): class LocalizedDefaultSubreddits (line 2095) | class LocalizedDefaultSubreddits(BaseLocalizedSubreddits): method get_defaults (line 2101) | def get_defaults(cls, location): class LocalizedFeaturedSubreddits (line 2105) | class LocalizedFeaturedSubreddits(BaseLocalizedSubreddits): method get_featured (line 2111) | def get_featured(cls, location): class LabeledMulti (line 2115) | class LabeledMulti(tdb_cassandra.Thing, MultiReddit): method __init__ (line 2149) | def __init__(self, _id=None, *args, **kwargs): method _byID (line 2155) | def _byID(cls, ids, return_dict=True, properties=None, load_subreddits... method _load (line 2180) | def _load(cls, things, load_subreddits=True, load_linked_multis=True): method linked_multi (line 2220) | def linked_multi(self): method sr_ids (line 2224) | def sr_ids(self): method srs (line 2228) | def srs(self): method owner (line 2245) | def owner(self): method sr_columns (line 2249) | def sr_columns(self): method kind (line 2271) | def kind(self): method sr_props (line 2275) | def sr_props(self): method path (line 2279) | def path(self): method user_path (line 2294) | def user_path(self): method name (line 2301) | def name(self): method analytics_name (line 2305) | def analytics_name(self): method allows_referrers (line 2311) | def allows_referrers(self): method title (line 2317) | def title(self): method is_public (line 2322) | def is_public(self): method is_hidden (line 2325) | def is_hidden(self): method can_view (line 2328) | def can_view(self, user): method can_edit (line 2344) | def can_edit(self, user): method icon_url (line 2359) | def icon_url(self): method set_icon_by_name (line 2367) | def set_icon_by_name(self, name): method by_owner (line 2382) | def by_owner(cls, owner, kinds=None, load_subreddits=True): method create (line 2394) | def create(cls, path, owner): method copy (line 2402) | def copy(cls, path, multi, owner, symlink=False): method slugify (line 2423) | def slugify(cls, owner, display_name, type_="m"): method sr_props_to_columns (line 2442) | def sr_props_to_columns(cls, sr_props): method columns_to_sr_props (line 2453) | def columns_to_sr_props(cls, columns): method _on_create (line 2461) | def _on_create(self): method unlink (line 2465) | def unlink(self): method add_srs (line 2477) | def add_srs(self, sr_props): method del_srs (line 2494) | def del_srs(self, sr_ids): method clear_srs (line 2507) | def clear_srs(self): method delete (line 2510) | def delete(self): class LabeledMultiByOwner (line 2520) | class LabeledMultiByOwner(tdb_cassandra.View): method _rowkey (line 2524) | def _rowkey(cls, lm): class RandomReddit (line 2528) | class RandomReddit(FakeSubreddit): class RandomNSFWReddit (line 2532) | class RandomNSFWReddit(FakeSubreddit): class RandomSubscriptionReddit (line 2536) | class RandomSubscriptionReddit(FakeSubreddit): class ModContribSR (line 2540) | class ModContribSR(MultiReddit): method __init__ (line 2549) | def __init__(self): method sr_ids (line 2554) | def sr_ids(self): method srs (line 2561) | def srs(self): method allows_referrers (line 2565) | def allows_referrers(self): class ModSR (line 2569) | class ModSR(ModContribSR): method is_moderator (line 2575) | def is_moderator(self, user): class ModMinus (line 2579) | class ModMinus(ModSR): method __init__ (line 2582) | def __init__(self, exclude_srs): method sr_ids (line 2588) | def sr_ids(self): method name (line 2593) | def name(self): method title (line 2598) | def title(self): method path (line 2602) | def path(self): class ModFiltered (line 2606) | class ModFiltered(Filtered, ModMinus): method __init__ (line 2610) | def __init__(self): class ContribSR (line 2614) | class ContribSR(ModContribSR): class DomainSR (line 2621) | class DomainSR(FakeSubreddit): method path (line 2623) | def path(self): method __init__ (line 2626) | def __init__(self, domain): method get_links (line 2643) | def get_links(self, sort, time): method allow_gilding (line 2648) | def allow_gilding(self): class SearchResultSubreddit (line 2652) | class SearchResultSubreddit(Subreddit): method add_props (line 2656) | def add_props(cls, user, wrapped): class SRMember (line 2711) | class SRMember(Relation(Subreddit, Account)): method _cache_prefix (line 2718) | def _cache_prefix(cls): method _rel_cache_prefix (line 2722) | def _rel_cache_prefix(cls): method has_permission (line 2725) | def has_permission(self, perm): method get_permissions (line 2730) | def get_permissions(self): method update_permissions (line 2736) | def update_permissions(self, **kwargs): method set_permissions (line 2756) | def set_permissions(self, perm_set): method is_superuser (line 2760) | def is_superuser(self): class FakeSRMember (line 2764) | class FakeSRMember: method __init__ (line 2766) | def __init__(self, permission_class): method has_permission (line 2769) | def has_permission(self, perm): method get_permissions (line 2772) | def get_permissions(self): method is_superuser (line 2775) | def is_superuser(self): function add_legacy_subscriber (line 2792) | def add_legacy_subscriber(srs, user): function remove_legacy_subscriber (line 2802) | def remove_legacy_subscriber(sr, user): class SubredditTempBan (line 2809) | class SubredditTempBan(object): method __init__ (line 2810) | def __init__(self, sr, kind, victim, banner, duration): method schedule (line 2820) | def schedule(cls, sr, kind, victim, banner, duration): method cancel_colkey (line 2837) | def cancel_colkey(cls, name): method cancel_rowkey (line 2841) | def cancel_rowkey(cls, name, type): method schedule_rowkey (line 2845) | def schedule_rowkey(cls): method search (line 2849) | def search(cls, srname, bantype, subjects): method unschedule (line 2862) | def unschedule(cls, srname, victim_name, bantype): function on_subreddit_unban (line 2871) | def on_subreddit_unban(data): class MutedAccountsBySubreddit (line 2892) | class MutedAccountsBySubreddit(object): method mute (line 2894) | def mute(cls, sr, user, muter, parent_message=None): method cancel_colkey (line 2938) | def cancel_colkey(cls, user): method cancel_rowkey (line 2942) | def cancel_rowkey(cls, subreddit): method schedule_rowkey (line 2946) | def schedule_rowkey(cls): method search (line 2950) | def search(cls, subreddit, subjects): method unmute (line 2961) | def unmute(cls, sr, user, automatic=False): function unmute_hook (line 2976) | def unmute_hook(data): class SubredditsActiveForFrontPage (line 2986) | class SubredditsActiveForFrontPage(tdb_cassandra.View): method mark_new_post (line 3016) | def mark_new_post(cls, subreddit): method filter_inactive_ids (line 3020) | def filter_inactive_ids(cls, subreddit_ids): FILE: r2/r2/models/token.py function generate_token (line 39) | def generate_token(size): class Token (line 43) | class Token(tdb_cassandra.Thing): method _new (line 56) | def _new(cls, **kwargs): method _generate_unique_token (line 65) | def _generate_unique_token(cls): method get_token (line 77) | def get_token(cls, _id): class ConsumableToken (line 86) | class ConsumableToken(Token): method get_token (line 92) | def get_token(cls, _id): method consume (line 99) | def consume(self): class OAuth2Scope (line 104) | class OAuth2Scope: class InsufficientScopeError (line 272) | class InsufficientScopeError(StandardError): method __init__ (line 275) | def __init__(self, scope_str=None, subreddits=None, scopes=None): method _parse_scope_str (line 287) | def _parse_scope_str(self, scope_str): method __str__ (line 297) | def __str__(self): method has_access (line 304) | def has_access(self, subreddit, required_scopes): method has_any_scope (line 311) | def has_any_scope(self, required_scopes): method is_valid (line 317) | def is_valid(self): method details (line 320) | def details(self): method merge_scopes (line 328) | def merge_scopes(cls, scopes): function extra_oauth2_scope (line 353) | def extra_oauth2_scope(*scopes): class OAuth2Client (line 378) | class OAuth2Client(Token): method _new (line 408) | def _new(cls, **kwargs): method _developer_ids (line 414) | def _developer_ids(self): method _max_reqs (line 423) | def _max_reqs(self): method _developers (line 427) | def _developers(self): method _developer_colname (line 433) | def _developer_colname(self, account): method has_developer (line 441) | def has_developer(self, account): method add_developer (line 449) | def add_developer(self, account, force=False): method remove_developer (line 462) | def remove_developer(self, account): method _by_developer (line 482) | def _by_developer(cls, account): method _by_user (line 498) | def _by_user(cls, account): method _by_user_grouped (line 518) | def _by_user_grouped(cls, account): method revoke (line 539) | def revoke(self, account): method is_confidential (line 549) | def is_confidential(self): method is_first_party (line 552) | def is_first_party(self): class OAuth2ClientsByDeveloper (line 556) | class OAuth2ClientsByDeveloper(tdb_cassandra.View): class OAuth2AuthorizationCode (line 565) | class OAuth2AuthorizationCode(ConsumableToken): method _new (line 580) | def _new(cls, client_id, redirect_uri, user_id, scope, refreshable): method use_token (line 589) | def use_token(cls, _id, client_id, redirect_uri): class OAuth2AccessToken (line 599) | class OAuth2AccessToken(Token): method _new (line 612) | def _new(cls, client_id, user_id, scope, refresh_token=None, device_id... method _by_user_view (line 628) | def _by_user_view(cls): method _on_create (line 631) | def _on_create(self): method check_valid (line 640) | def check_valid(self): method revoke (line 669) | def revoke(self): method revoke_all_by_user (line 688) | def revoke_all_by_user(cls, account): method _by_user (line 695) | def _by_user(cls, account): class OAuth2AccessTokensByUser (line 706) | class OAuth2AccessTokensByUser(tdb_cassandra.View): class OAuth2RefreshToken (line 716) | class OAuth2RefreshToken(OAuth2AccessToken): method _on_create (line 722) | def _on_create(self): method _by_user_view (line 730) | def _by_user_view(cls): method revoke (line 733) | def revoke(self): class OAuth2RefreshTokensByUser (line 741) | class OAuth2RefreshTokensByUser(tdb_cassandra.View): class EmailVerificationToken (line 751) | class EmailVerificationToken(ConsumableToken): method _new (line 758) | def _new(cls, user): method valid_for_user (line 762) | def valid_for_user(self, user): class PasswordResetToken (line 766) | class PasswordResetToken(ConsumableToken): method _new (line 773) | def _new(cls, user): method valid_for_user (line 778) | def valid_for_user(self, user): class AwardClaimToken (line 783) | class AwardClaimToken(ConsumableToken): method _new (line 795) | def _new(cls, uid, award, description, url): method post_url (line 819) | def post_url(self): method confirm_url (line 823) | def confirm_url(self): FILE: r2/r2/models/traffic.py function memoize_traffic (line 62) | def memoize_traffic(**memoize_kwargs): class PeekableIterator (line 79) | class PeekableIterator(object): method __init__ (line 82) | def __init__(self, iterable): method peek (line 86) | def peek(self): method next (line 95) | def next(self): function zip_timeseries (line 102) | def zip_timeseries(*series, **kwargs): function decrement_month (line 146) | def decrement_month(date): function fill_gaps_generator (line 156) | def fill_gaps_generator(time_points, query, *columns): function fill_gaps (line 176) | def fill_gaps(*args, **kwargs): function get_time_points (line 187) | def get_time_points(interval, start_time=None, stop_time=None): function points_for_interval (line 231) | def points_for_interval(interval): function make_history_query (line 238) | def make_history_query(cls, interval): function top_last_month (line 254) | def top_last_month(cls, key, ids=None, num=None): class CoerceToLong (line 280) | class CoerceToLong(TypeDecorator): method process_result_value (line 286) | def process_result_value(self, value, dialect): function sum (line 292) | def sum(column): function totals (line 306) | def totals(cls, interval): function total_by_codename (line 325) | def total_by_codename(cls, codenames): function promotion_history (line 336) | def promotion_history(cls, count_column, codename, start, stop): function campaign_history (line 358) | def campaign_history(cls, codenames, start, stop): function get_traffic_last_modified (line 372) | def get_traffic_last_modified(): function get_missing_traffic (line 384) | def get_missing_traffic(start, end): class SitewidePageviews (line 396) | class SitewidePageviews(Base): method history (line 408) | def history(cls, interval): class PageviewsBySubreddit (line 413) | class PageviewsBySubreddit(Base): method history (line 426) | def history(cls, interval, subreddit): method top_last_month (line 433) | def top_last_month(cls, num=None): method last_month (line 438) | def last_month(cls, srs): class PageviewsBySubredditAndPath (line 443) | class PageviewsBySubredditAndPath(Base): class PageviewsByLanguage (line 462) | class PageviewsByLanguage(Base): method history (line 475) | def history(cls, interval, lang): method top_last_month (line 482) | def top_last_month(cls): class ClickthroughsByCodename (line 486) | class ClickthroughsByCodename(Base): method history (line 499) | def history(cls, interval, codename): method promotion_history (line 506) | def promotion_history(cls, codename, start, stop): method historical_totals (line 511) | def historical_totals(cls, interval): method total_by_codename (line 516) | def total_by_codename(cls, codenames): class TargetedClickthroughsByCodename (line 520) | class TargetedClickthroughsByCodename(Base): method promotion_history (line 534) | def promotion_history(cls, codename, start, stop): method total_by_codename (line 539) | def total_by_codename(cls, codenames): method campaign_history (line 543) | def campaign_history(cls, codenames, start, stop): class AdImpressionsByCodename (line 547) | class AdImpressionsByCodename(Base): method history (line 560) | def history(cls, interval, codename): method promotion_history (line 567) | def promotion_history(cls, codename, start, stop): method historical_totals (line 572) | def historical_totals(cls, interval): method top_last_month (line 577) | def top_last_month(cls): method recent_codenames (line 582) | def recent_codenames(cls, fullname): method total_by_codename (line 597) | def total_by_codename(cls, codename): class TargetedImpressionsByCodename (line 601) | class TargetedImpressionsByCodename(Base): method promotion_history (line 615) | def promotion_history(cls, codename, start, stop): method total_by_codename (line 620) | def total_by_codename(cls, codenames): method campaign_history (line 624) | def campaign_history(cls, codenames, start, stop): class SubscriptionsBySubreddit (line 628) | class SubscriptionsBySubreddit(Base): method history (line 646) | def history(cls, interval, subreddit): FILE: r2/r2/models/trylater.py class TryLater (line 71) | class TryLater(tdb_cassandra.View): method process_ready_items (line 78) | def process_ready_items(cls, rowkey, ready_fn): method cleanup (line 117) | def cleanup(cls, rowkey, ready_items, ready_timestamps, unripe_timesta... method run (line 139) | def run(cls): method search (line 158) | def search(cls, rowkey, when): method schedule (line 167) | def schedule(cls, system, data, delay=None): method unschedule (line 183) | def unschedule(cls, rowkey, column_keys): class TryLaterBySubject (line 188) | class TryLaterBySubject(tdb_cassandra.View): method schedule (line 200) | def schedule(cls, system, subject, data, delay, trylater_rowkey=None): method search (line 214) | def search(cls, rowkey, subjects=None): method unschedule (line 225) | def unschedule(cls, rowkey, colkey, schedule_rowkey): FILE: r2/r2/models/vote.py class Vote (line 44) | class Vote(object): method __init__ (line 54) | def __init__(self, user, thing, direction, date, data=None, effects=None, method __eq__ (line 80) | def __eq__(self, other): method __ne__ (line 85) | def __ne__(self, other): method serialize_direction (line 89) | def serialize_direction(cls, direction): method deserialize_direction (line 97) | def deserialize_direction(cls, direction): method _id (line 107) | def _id(self): method affected_thing_attr (line 111) | def affected_thing_attr(self): method is_upvote (line 122) | def is_upvote(self): method is_downvote (line 126) | def is_downvote(self): method is_self_vote (line 130) | def is_self_vote(self): method is_automatic_initial_vote (line 135) | def is_automatic_initial_vote(self): method delay (line 140) | def delay(self): method apply_effects (line 147) | def apply_effects(self): method commit (line 171) | def commit(self): class VoteEffects (line 190) | class VoteEffects(object): method __init__ (line 192) | def __init__(self, vote, effects=None): method add_note (line 220) | def add_note(self, code, message=None): method notes (line 224) | def notes(self): method determine_affects_score (line 235) | def determine_affects_score(self, vote): method determine_affects_karma (line 255) | def determine_affects_karma(self, vote): method determine_other_effects (line 286) | def determine_other_effects(self, vote): method serializable_data (line 296) | def serializable_data(self): class VotesByAccount (line 312) | class VotesByAccount(tdb_cassandra.DenormalizedRelation): method rel (line 317) | def rel(cls, thing_cls): method write_vote (line 327) | def write_vote(cls, vote): method value_for (line 332) | def value_for(cls, thing1, thing2, vote): class LinkVotesByAccount (line 336) | class LinkVotesByAccount(VotesByAccount): class CommentVotesByAccount (line 344) | class CommentVotesByAccount(VotesByAccount): class VoteDetailsByThing (line 352) | class VoteDetailsByThing(tdb_cassandra.View): method create (line 359) | def create(cls, user, thing, vote): method get_vote (line 388) | def get_vote(cls, user, thing): method convert_old_details (line 396) | def convert_old_details(old_data): method get_details (line 417) | def get_details(cls, thing, voters=None): class VoteDetailsByLink (line 462) | class VoteDetailsByLink(VoteDetailsByThing): class VoteDetailsByComment (line 467) | class VoteDetailsByComment(VoteDetailsByThing): class VoterIPByThing (line 471) | class VoterIPByThing(tdb_cassandra.View): method create (line 479) | def create(cls, vote, ip): class VoteNote (line 483) | class VoteNote(tdb_cassandra.View): method _rowkey (line 490) | def _rowkey(cls, vote): method set (line 494) | def set(cls, vote, note): method get (line 500) | def get(cls, vote): FILE: r2/r2/models/wiki.py function wiki_id (line 96) | def wiki_id(sr, page): class ContentLengthError (line 99) | class ContentLengthError(Exception): method __init__ (line 100) | def __init__(self, max_length): class WikiPageExists (line 104) | class WikiPageExists(Exception): class WikiBadRevision (line 107) | class WikiBadRevision(Exception): class WikiPageEditors (line 110) | class WikiPageEditors(tdb_cassandra.View): class WikiRevision (line 115) | class WikiRevision(tdb_cassandra.UuidThing, Printable): method get_author (line 127) | def get_author(self): method get_authors (line 132) | def get_authors(cls, revisions): method get_printable_authors (line 138) | def get_printable_authors(cls, revisions): method add_props (line 145) | def add_props(cls, user, wrapped): method get (line 158) | def get(cls, revid, pageid): method toggle_hide (line 164) | def toggle_hide(self): method create (line 170) | def create(cls, pageid, content, author=None, reason=None): method _on_commit (line 182) | def _on_commit(self): method get_recent (line 187) | def get_recent(cls, sr, count=100): method is_hidden (line 191) | def is_hidden(self): method info (line 195) | def info(self, sep=PAGE_ID_SEP): method page (line 204) | def page(self): method sr (line 208) | def sr(self): class WikiPage (line 212) | class WikiPage(tdb_cassandra.Thing): method get_author (line 228) | def get_author(self): method id_for (line 234) | def id_for(cls, sr, name): method get_multiple (line 241) | def get_multiple(cls, pages): method get (line 250) | def get(cls, sr, name): method create (line 254) | def create(cls, sr, name): method restricted (line 274) | def restricted(self): method is_impossible (line 278) | def is_impossible(cls, page): method is_restricted (line 282) | def is_restricted(cls, page): method is_special (line 286) | def is_special(cls, page): method get_special_view_permlevel (line 290) | def get_special_view_permlevel(cls, page): method is_automatically_created (line 294) | def is_automatically_created(cls, page): method special (line 298) | def special(self): method add_to_listing (line 301) | def add_to_listing(self): method _on_create (line 304) | def _on_create(self): method _on_commit (line 307) | def _on_commit(self): method remove_editor (line 310) | def remove_editor(self, user): method add_editor (line 313) | def add_editor(self, user): method get_pages (line 317) | def get_pages(cls, sr, after=None, filter_check=None): method get_listing (line 331) | def get_listing(cls, sr, filter_check=None): method get_editor_accounts (line 363) | def get_editor_accounts(self): method get_editors (line 371) | def get_editors(self, properties=None): method has_editor (line 377) | def has_editor(self, editor): method revise (line 380) | def revise(self, content, previous = None, author=None, force=False, r... method change_permlevel (line 414) | def change_permlevel(self, permlevel, force=False): method get_revisions (line 423) | def get_revisions(self, after=None, count=100): class WikiRevisionHistoryByPage (line 428) | class WikiRevisionHistoryByPage(tdb_cassandra.View): method _rowkey (line 436) | def _rowkey(cls, wikirevision): method _obj_to_column (line 440) | def _obj_to_column(cls, wikirevision): class WikiPagesBySR (line 444) | class WikiPagesBySR(tdb_cassandra.DenormalizedView): method _rowkey (line 451) | def _rowkey(cls, wp): class WikiRevisionsRecentBySR (line 454) | class WikiRevisionsRecentBySR(tdb_cassandra.DenormalizedView): method _rowkey (line 463) | def _rowkey(cls, wr): class ImagesByWikiPage (line 467) | class ImagesByWikiPage(tdb_cassandra.View): method add_image (line 478) | def add_image(cls, sr, page_name, image_name, url): method get_images (line 483) | def get_images(cls, sr, page_name): method get_image_count (line 491) | def get_image_count(cls, sr, page_name): method delete_image (line 497) | def delete_image(cls, sr, page_name, image_name): class WikiPageIniItem (line 502) | class WikiPageIniItem(object): method get_all (line 506) | def get_all(cls, return_dict=False): FILE: r2/r2/public/static/button/button-embed.js function $q (line 10) | function $q(s) { function getQueryParams (line 14) | function getQueryParams() { function pointLabel (line 26) | function pointLabel(x) { function submitUrl (line 31) | function submitUrl() { function parseSubmission (line 47) | function parseSubmission(response) { function loadSubmission (line 60) | function loadSubmission() { function safeColor (line 67) | function safeColor(colorString) { function applyParams (line 75) | function applyParams() { function init (line 90) | function init() { FILE: r2/r2/public/static/js/cache-poisoning-detection.js function generateCanary (line 21) | function generateCanary() { function randString (line 25) | function randString(stringLen) { FILE: r2/r2/public/static/js/compact.js function show_edit_usertext (line 111) | function show_edit_usertext(form) { function fetch_more (line 126) | function fetch_more() { FILE: r2/r2/public/static/js/custom-event.js function CustomEvent (line 6) | function CustomEvent(eventName, options) { FILE: r2/r2/public/static/js/embed.js function absolute (line 63) | function absolute(url) { function getEmbedOptions (line 71) | function getEmbedOptions(data) { function serializeOptions (line 88) | function serializeOptions(options) { function initFrame (line 92) | function initFrame(popup, options) { FILE: r2/r2/public/static/js/embed/comment-embed.js function isComment (line 7) | function isComment(anchor) { function getCommentPathname (line 11) | function getCommentPathname(anchor) { function getCommentUrl (line 15) | function getCommentUrl(links, host) { function getEmbedUrl (line 27) | function getEmbedUrl(commentUrl, el) { FILE: r2/r2/public/static/js/embed/embed.js function checkHeight (line 14) | function checkHeight() { function clipComments (line 24) | function clipComments() { function createPayloadFactory (line 51) | function createPayloadFactory(location) { function trackLink (line 108) | function trackLink(e) { function trackAction (line 141) | function trackAction(e) { FILE: r2/r2/public/static/js/errors.js function CustomErrorPrototype (line 11) | function CustomErrorPrototype() {} function _getStack (line 17) | function _getStack(err) { function ApiError (line 24) | function ApiError(displayName, displayMessage, field, source) { FILE: r2/r2/public/static/js/events.js function postData (line 4) | function postData(eventInfo) { function calculateHash (line 14) | function calculateHash(key, data) { FILE: r2/r2/public/static/js/expando.js function isPluginExpandoButton (line 2) | function isPluginExpandoButton(elem) { function initExpando (line 246) | function initExpando($thing, autoexpanded) { FILE: r2/r2/public/static/js/expando/nsfwflow.js function showNsfwFlow (line 239) | function showNsfwFlow(e) { function hideNsfwFlow (line 273) | function hideNsfwFlow(e) { function destroyNsfwFlow (line 278) | function destroyNsfwFlow() { FILE: r2/r2/public/static/js/flair.js function showSaveButton (line 2) | function showSaveButton(field) { function onEdit (line 7) | function onEdit() { function onDelete (line 13) | function onDelete(e) { function onFocus (line 18) | function onFocus() { function onSubmit (line 22) | function onSubmit(e) { function toggleFlairSelector (line 28) | function toggleFlairSelector() { function getFlairAttrs (line 34) | function getFlairAttrs($el) { function selectFlairInSelector (line 41) | function selectFlairInSelector(e) { function removeFlairInSelector (line 68) | function removeFlairInSelector(e) { function postFlairSelection (line 78) | function postFlairSelection(e) { function openFlairSelector (line 85) | function openFlairSelector(e) { FILE: r2/r2/public/static/js/frames.js function receiveMessage (line 17) | function receiveMessage(e) { function _addEventListener (line 50) | function _addEventListener(type, handler, useCapture) { function _removeEventListener (line 58) | function _removeEventListener(type, handler, useCapture) { function compileOriginRegExp (line 67) | function compileOriginRegExp(origins) { function compileNamespaceRegExp (line 71) | function compileNamespaceRegExp(namespaces) { function isWildcard (line 75) | function isWildcard(origin) { FILE: r2/r2/public/static/js/gate-popup.js function GatePopup (line 6) | function GatePopup(options) { FILE: r2/r2/public/static/js/gold.js function _getRelevantFields (line 337) | function _getRelevantFields() { function _getFieldValue (line 363) | function _getFieldValue(field) { function _updateUrlState (line 381) | function _updateUrlState() { function _updateGoldType (line 411) | function _updateGoldType() { function _setTabFocus (line 431) | function _setTabFocus(tab) { function _handleSubmit (line 445) | function _handleSubmit(e) { function init (line 468) | function init() { FILE: r2/r2/public/static/js/hooks.js function Hook (line 11) | function Hook(name) { FILE: r2/r2/public/static/js/https-tester.js function makeLoadHandler (line 3) | function makeLoadHandler(testImgType, loadState, config) { function setUpHTTPSTestImage (line 10) | function setUpHTTPSTestImage(type, url, config) { function sendHTTPSCompatResults (line 17) | function sendHTTPSCompatResults(config) { FILE: r2/r2/public/static/js/image-upload.js function Plugin (line 260) | function Plugin(option /* ,args... */) { FILE: r2/r2/public/static/js/jquery.reddit.js function acquire_ajax_lock (line 114) | function acquire_ajax_lock(op) { function release_ajax_lock (line 122) | function release_ajax_lock(op) { function handleResponse (line 126) | function handleResponse(action) { FILE: r2/r2/public/static/js/lib/bootstrap.modal.js function Plugin (line 233) | function Plugin(option, _relatedTarget) { FILE: r2/r2/public/static/js/lib/bootstrap.tooltip.js function complete (line 291) | function complete() { function Plugin (line 443) | function Plugin(option) { FILE: r2/r2/public/static/js/lib/bootstrap.transition.js function transitionEnd (line 16) | function transitionEnd() { FILE: r2/r2/public/static/js/lib/es5-sham.js function doesGetOwnPropertyDescriptorWork (line 77) | function doesGetOwnPropertyDescriptorWork(object) { function Empty (line 225) | function Empty() {} function Type (line 238) | function Type() {} // An empty constructor. function doesDefinePropertyWork (line 282) | function doesDefinePropertyWork(object) { FILE: r2/r2/public/static/js/lib/es5-shim.js function Empty (line 82) | function Empty() {} function Date (line 831) | function Date(Y, M, D, h, m, s, ms) { function dayFromMonth (line 881) | function dayFromMonth(year, month) { function toUTC (line 892) | function toUTC(t) { function multiply (line 993) | function multiply(n, c) { function divide (line 1002) | function divide(n) { function numToString (line 1011) | function numToString() { function pow (line 1027) | function pow(x, n, acc) { function log (line 1031) | function log(x) { function toInteger (line 1349) | function toInteger(n) { function isPrimitive (line 1359) | function isPrimitive(input) { function toPrimitive (line 1370) | function toPrimitive(input) { FILE: r2/r2/public/static/js/lib/event-tracker.js function now (line 16) | function now() { function uuid (line 27) | function uuid(){ function EventTracker (line 55) | function EventTracker(clientKey, clientSecret, postData, eventsUrl, appN... FILE: r2/r2/public/static/js/lib/highlight.pack.js function escape (line 32) | function escape(value) { function findCode (line 36) | function findCode(pre) { function blockText (line 45) | function blockText(block, ignoreNewLines) { function blockLanguage (line 57) | function blockLanguage(block) { function nodeStream (line 69) | function nodeStream(node) { function mergeStreams (line 96) | function mergeStreams(stream1, stream2, value) { function compileLanguage (line 159) | function compileLanguage(language) { function highlight (line 252) | function highlight(language_name, value) { function highlightAuto (line 429) | function highlightAuto(text) { function fixMarkup (line 462) | function fixMarkup(value, tabReplace, useBR) { function highlightBlock (line 478) | function highlightBlock(block, tabReplace, useBR) { function initHighlighting (line 516) | function initHighlighting() { function initHighlightingOnLoad (line 528) | function initHighlightingOnLoad() { FILE: r2/r2/public/static/js/lib/html5shiv.js function m (line 1) | function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a} function i (line 1) | function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b} function p (line 1) | function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=... function t (line 1) | function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.cr... function q (line 2) | function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a... FILE: r2/r2/public/static/js/lib/jed.js function pluralFormsCoerced (line 68) | function pluralFormsCoerced( pluralFormFunc, n ) { FILE: r2/r2/public/static/js/lib/jquery-1.11.1.js function isArraylike (line 570) | function isArraylike( obj ) { function Sizzle (line 773) | function Sizzle( selector, context, results, seed ) { function createCache (line 888) | function createCache() { function markFunction (line 906) | function markFunction( fn ) { function assert (line 915) | function assert( fn ) { function addHandle (line 937) | function addHandle( attrs, handler ) { function siblingCheck (line 952) | function siblingCheck( a, b ) { function createInputPseudo (line 979) | function createInputPseudo( type ) { function createButtonPseudo (line 990) | function createButtonPseudo( type ) { function createPositionalPseudo (line 1001) | function createPositionalPseudo( fn ) { function testContext (line 1024) | function testContext( context ) { function setFilters (line 2021) | function setFilters() {} function toSelector (line 2092) | function toSelector( tokens ) { function addCombinator (line 2102) | function addCombinator( matcher, combinator, base ) { function elementMatcher (line 2155) | function elementMatcher( matchers ) { function multipleContexts (line 2169) | function multipleContexts( selector, contexts, results ) { function condense (line 2178) | function condense( unmatched, map, filter, context, xml ) { function setMatcher (line 2199) | function setMatcher( preFilter, selector, matcher, postFilter, postFinde... function matcherFromTokens (line 2292) | function matcherFromTokens( tokens ) { function matcherFromGroupMatchers (line 2347) | function matcherFromGroupMatchers( elementMatchers, setMatchers ) { function winnow (line 2643) | function winnow( elements, qualifier, not ) { function sibling (line 2973) | function sibling( cur, dir ) { function createOptions (line 3056) | function createOptions( options ) { function detach (line 3456) | function detach() { function completed (line 3470) | function completed() { function dataAttr (line 3633) | function dataAttr( elem, key, data ) { function isEmptyDataObject (line 3665) | function isEmptyDataObject( obj ) { function internalData (line 3681) | function internalData( elem, name, data, pvt /* Internal Use Only */ ) { function internalRemoveData (line 3770) | function internalRemoveData( elem, name, pvt ) { function returnTrue (line 4255) | function returnTrue() { function returnFalse (line 4259) | function returnFalse() { function safeActiveElement (line 4263) | function safeActiveElement() { function createSafeFragment (line 5272) | function createSafeFragment( document ) { function getAll (line 5324) | function getAll( context, tag ) { function fixDefaultChecked (line 5347) | function fixDefaultChecked( elem ) { function manipulationTarget (line 5355) | function manipulationTarget( elem, content ) { function disableScript (line 5365) | function disableScript( elem ) { function restoreScript (line 5369) | function restoreScript( elem ) { function setGlobalEval (line 5380) | function setGlobalEval( elems, refElements ) { function cloneCopyEvent (line 5388) | function cloneCopyEvent( src, dest ) { function fixCloneNodeIssues (line 5416) | function fixCloneNodeIssues( src, dest ) { function actualDisplay (line 6007) | function actualDisplay( name, doc ) { function defaultDisplay (line 6029) | function defaultDisplay( nodeName ) { function addGetHookIf (line 6221) | function addGetHookIf( conditionFn, hookFn ) { function computeStyleTests (line 6315) | function computeStyleTests() { function vendorPropName (line 6433) | function vendorPropName( style, name ) { function showHide (line 6455) | function showHide( elements, show ) { function setPositiveNumber (line 6506) | function setPositiveNumber( elem, value, subtract ) { function augmentWidthOrHeight (line 6514) | function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { function getWidthOrHeight (line 6553) | function getWidthOrHeight( elem, name, extra ) { function Tween (line 6892) | function Tween( elem, options, prop, end, easing ) { function createFxNow (line 7061) | function createFxNow() { function genFx (line 7069) | function genFx( type, includeWidth ) { function createTween (line 7089) | function createTween( value, prop, animation ) { function defaultPrefilter (line 7103) | function defaultPrefilter( elem, props, opts ) { function propFilter (line 7245) | function propFilter( props, specialEasing ) { function Animation (line 7282) | function Animation( elem, properties, options ) { function addToPrefiltersOrTransports (line 8596) | function addToPrefiltersOrTransports( structure ) { function inspectPrefiltersOrTransports (line 8628) | function inspectPrefiltersOrTransports( structure, options, originalOpti... function ajaxExtend (line 8655) | function ajaxExtend( target, src ) { function ajaxHandleResponses (line 8675) | function ajaxHandleResponses( s, jqXHR, responses ) { function ajaxConvert (line 8730) | function ajaxConvert( s, response, jqXHR, isSuccess ) { function done (line 9189) | function done( status, nativeStatusText, responses, headers ) { function buildParams (line 9441) | function buildParams( prefix, obj, traditional, add ) { function createStandardXHR (line 9713) | function createStandardXHR() { function createActiveXHR (line 9719) | function createActiveXHR() { function getWindow (line 10014) | function getWindow( elem ) { FILE: r2/r2/public/static/js/lib/jquery-2.1.1.js function isArraylike (line 534) | function isArraylike( obj ) { function Sizzle (line 737) | function Sizzle( selector, context, results, seed ) { function createCache (line 852) | function createCache() { function markFunction (line 870) | function markFunction( fn ) { function assert (line 879) | function assert( fn ) { function addHandle (line 901) | function addHandle( attrs, handler ) { function siblingCheck (line 916) | function siblingCheck( a, b ) { function createInputPseudo (line 943) | function createInputPseudo( type ) { function createButtonPseudo (line 954) | function createButtonPseudo( type ) { function createPositionalPseudo (line 965) | function createPositionalPseudo( fn ) { function testContext (line 988) | function testContext( context ) { function setFilters (line 1985) | function setFilters() {} function toSelector (line 2056) | function toSelector( tokens ) { function addCombinator (line 2066) | function addCombinator( matcher, combinator, base ) { function elementMatcher (line 2119) | function elementMatcher( matchers ) { function multipleContexts (line 2133) | function multipleContexts( selector, contexts, results ) { function condense (line 2142) | function condense( unmatched, map, filter, context, xml ) { function setMatcher (line 2163) | function setMatcher( preFilter, selector, matcher, postFilter, postFinde... function matcherFromTokens (line 2256) | function matcherFromTokens( tokens ) { function matcherFromGroupMatchers (line 2311) | function matcherFromGroupMatchers( elementMatchers, setMatchers ) { function winnow (line 2607) | function winnow( elements, qualifier, not ) { function sibling (line 2932) | function sibling( cur, dir ) { function createOptions (line 3010) | function createOptions( options ) { function completed (line 3404) | function completed() { function Data (line 3509) | function Data() { function dataAttr (line 3701) | function dataAttr( elem, key, data ) { function returnTrue (line 4040) | function returnTrue() { function returnFalse (line 4044) | function returnFalse() { function safeActiveElement (line 4048) | function safeActiveElement() { function manipulationTarget (line 4920) | function manipulationTarget( elem, content ) { function disableScript (line 4930) | function disableScript( elem ) { function restoreScript (line 4934) | function restoreScript( elem ) { function setGlobalEval (line 4947) | function setGlobalEval( elems, refElements ) { function cloneCopyEvent (line 4958) | function cloneCopyEvent( src, dest ) { function getAll (line 4992) | function getAll( context, tag ) { function fixInput (line 5003) | function fixInput( src, dest ) { function actualDisplay (line 5460) | function actualDisplay( name, doc ) { function defaultDisplay (line 5482) | function defaultDisplay( nodeName ) { function curCSS (line 5522) | function curCSS( elem, name, computed ) { function addGetHookIf (line 5570) | function addGetHookIf( conditionFn, hookFn ) { function computePixelPositionAndBoxSizingReliable (line 5610) | function computePixelPositionAndBoxSizingReliable() { function vendorPropName (line 5712) | function vendorPropName( style, name ) { function setPositiveNumber (line 5734) | function setPositiveNumber( elem, value, subtract ) { function augmentWidthOrHeight (line 5742) | function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { function getWidthOrHeight (line 5781) | function getWidthOrHeight( elem, name, extra ) { function showHide (line 5825) | function showHide( elements, show ) { function Tween (line 6124) | function Tween( elem, options, prop, end, easing ) { function createFxNow (line 6293) | function createFxNow() { function genFx (line 6301) | function genFx( type, includeWidth ) { function createTween (line 6321) | function createTween( value, prop, animation ) { function defaultPrefilter (line 6335) | function defaultPrefilter( elem, props, opts ) { function propFilter (line 6469) | function propFilter( props, specialEasing ) { function Animation (line 6506) | function Animation( elem, properties, options ) { function addToPrefiltersOrTransports (line 7573) | function addToPrefiltersOrTransports( structure ) { function inspectPrefiltersOrTransports (line 7605) | function inspectPrefiltersOrTransports( structure, options, originalOpti... function ajaxExtend (line 7632) | function ajaxExtend( target, src ) { function ajaxHandleResponses (line 7652) | function ajaxHandleResponses( s, jqXHR, responses ) { function ajaxConvert (line 7708) | function ajaxConvert( s, response, jqXHR, isSuccess ) { function done (line 8165) | function done( status, nativeStatusText, responses, headers ) { function buildParams (line 8417) | function buildParams( prefix, obj, traditional, add ) { function getWindow (line 8900) | function getWindow( elem ) { FILE: r2/r2/public/static/js/lib/jquery.flot.js function clamp (line 32) | function clamp(min,value,max){return valuemax?max:value} function Canvas (line 67) | function Canvas(cls, container) { function Plot (line 508) | function Plot(placeholder, data_, options_, plugins) { function floorInBase (line 3164) | function floorInBase(n, base) { FILE: r2/r2/public/static/js/lib/jquery.flot.time.js function floorInBase (line 11) | function floorInBase(n, base) { function formatDate (line 17) | function formatDate(d, fmt, monthNames, dayNames) { function makeUtcWrapper (line 83) | function makeUtcWrapper(d) { function dateGenerator (line 108) | function dateGenerator(ts, opts) { function init (line 150) | function init(plot) { FILE: r2/r2/public/static/js/lib/jquery.url.js function parseUri (line 30) | function parseUri( url, strictMode ) function getAttrName (line 74) | function getAttrName( elm ) FILE: r2/r2/public/static/js/lib/json2.js function f (line 170) | function f(n) { function quote (line 211) | function quote(string) { function str (line 227) | function str(key, holder) { function walk (line 408) | function walk(holder, key) { FILE: r2/r2/public/static/js/lib/less-1.4.2.js function require (line 14) | function require(arg) { function save (line 119) | function save() { temp = chunks[j], memo = i, current = i; } function restore (line 120) | function restore() { chunks[j] = temp, i = memo, current = i; } function sync (line 122) | function sync() { function isWhitespace (line 128) | function isWhitespace(c) { function $ (line 136) | function $(tok) { function skipWhitespace (line 180) | function skipWhitespace(length) { function expect (line 197) | function expect(arg, msg) { function error (line 207) | function error(msg, type) { function peek (line 216) | function peek(tok) { function getInput (line 228) | function getInput(e, env) { function getLocation (line 236) | function getLocation(index, input) { function getDebugInfo (line 245) | function getDebugInfo(index, inputStream, env) { function LessError (line 257) | function LessError(e, env) { function hue (line 1655) | function hue(h) { function hsla (line 2124) | function hsla(color) { function scaled (line 2128) | function scaled(n, size) { function number (line 2136) | function number(n) { function clamp (line 2149) | function clamp(val) { function initRunningMode (line 5332) | function initRunningMode(){ function loadStyles (line 5423) | function loadStyles() { function loadStyleSheets (line 5447) | function loadStyleSheets(callback, reload) { function pathDiff (line 5453) | function pathDiff(url, baseUrl) { function extractUrlParts (line 5477) | function extractUrlParts(url, baseUrl) { function loadStyleSheet (line 5531) | function loadStyleSheet(sheet, callback, reload, remaining) { function extractId (line 5610) | function extractId(href) { function createCSS (line 5618) | function createCSS(styles, sheet, lastModified) { function xhr (line 5676) | function xhr(url, type, callback, errback) { function getXMLHttpRequest (line 5713) | function getXMLHttpRequest() { function removeNode (line 5726) | function removeNode(node) { function log (line 5730) | function log(str) { function error (line 5734) | function error(e, rootHref) { FILE: r2/r2/public/static/js/lib/modernizr.js function setCss (line 100) | function setCss( str ) { function setCssAll (line 104) | function setCssAll( str1, str2 ) { function is (line 108) | function is( obj, type ) { function contains (line 112) | function contains( str, substr ) { function testProps (line 116) | function testProps( props, prefixed ) { function testDOMProps (line 126) | function testDOMProps( props, obj, elem ) { function testPropsAll (line 143) | function testPropsAll( prop, prefixed, elem ) { FILE: r2/r2/public/static/js/lib/react-with-addons-0.11.2.js function s (line 4) | function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&re... function isPresto (line 77) | function isPresto() { function isKeypressCommand (line 115) | function isKeypressCommand(nativeEvent) { function prefixKey (line 426) | function prefixKey(prefix, key) { function CallbackQueue (line 638) | function CallbackQueue() { function shouldUseChangeEvent (line 770) | function shouldUseChangeEvent(elem) { function manualDispatchChangeEvent (line 785) | function manualDispatchChangeEvent(nativeEvent) { function runEventInBatch (line 807) | function runEventInBatch(event) { function startWatchingForChangeEventIE8 (line 812) | function startWatchingForChangeEventIE8(target, targetID) { function stopWatchingForChangeEventIE8 (line 818) | function stopWatchingForChangeEventIE8() { function getTargetIDForChangeEvent (line 827) | function getTargetIDForChangeEvent( function handleEventsForChangeEventIE8 (line 835) | function handleEventsForChangeEventIE8( function startWatchingForValueChange (line 882) | function startWatchingForValueChange(target, targetID) { function stopWatchingForValueChange (line 899) | function stopWatchingForValueChange() { function handlePropertyChange (line 918) | function handlePropertyChange(nativeEvent) { function getTargetIDForInputEvent (line 934) | function getTargetIDForInputEvent( function handleEventsForInputEventIE (line 946) | function handleEventsForInputEventIE( function getTargetIDForInputEventIE (line 972) | function getTargetIDForInputEventIE( function shouldUseClickEvent (line 1000) | function shouldUseClickEvent(elem) { function getTargetIDForClickEvent (line 1010) | function getTargetIDForClickEvent( function getCompositionEventType (line 1236) | function getCompositionEventType(topLevelType) { function isFallbackStart (line 1255) | function isFallbackStart(topLevelType, nativeEvent) { function isFallbackEnd (line 1269) | function isFallbackEnd(topLevelType, nativeEvent) { function FallbackCompositionState (line 1294) | function FallbackCompositionState(root) { function insertChildAt (line 1437) | function insertChildAt(parentNode, childNode, index) { function shouldIgnoreValue (line 1901) | function shouldIgnoreValue(name, value) { function getNodeName (line 2113) | function getNodeName(markup) { function validateInstanceHandle (line 2673) | function validateInstanceHandle() { function recomputePluginOrdering (line 2935) | function recomputePluginOrdering() { function publishEventForPlugin (line 2987) | function publishEventForPlugin(dispatchConfig, PluginModule, eventName) { function publishRegistrationName (line 3028) | function publishRegistrationName(registrationName, PluginModule, eventNa... function isEndish (line 3230) | function isEndish(topLevelType) { function isMoveish (line 3236) | function isMoveish(topLevelType) { function isStartish (line 3240) | function isStartish(topLevelType) { function forEachEventDispatch (line 3271) | function forEachEventDispatch(event, cb) { function executeDispatch (line 3296) | function executeDispatch(event, listener, domID) { function executeDispatchesInOrder (line 3306) | function executeDispatchesInOrder(event, executeDispatch) { function executeDispatchesInOrderStopAtTrueImpl (line 3319) | function executeDispatchesInOrderStopAtTrueImpl(event) { function executeDispatchesInOrderStopAtTrue (line 3346) | function executeDispatchesInOrderStopAtTrue(event) { function executeDirectDispatch (line 3362) | function executeDirectDispatch(event) { function hasDispatches (line 3384) | function hasDispatches(event) { function listenerAtPhase (line 3441) | function listenerAtPhase(id, event, propagationPhase) { function accumulateDirectionalDispatches (line 3453) | function accumulateDirectionalDispatches(domID, upwards, event) { function accumulateTwoPhaseDispatchesSingle (line 3474) | function accumulateTwoPhaseDispatchesSingle(event) { function accumulateDispatches (line 3490) | function accumulateDispatches(id, ignoredDirection, event) { function accumulateDirectDispatchesSingle (line 3506) | function accumulateDirectDispatchesSingle(event) { function accumulateTwoPhaseDispatches (line 3512) | function accumulateTwoPhaseDispatches(events) { function accumulateEnterLeaveDispatches (line 3516) | function accumulateEnterLeaveDispatches(leave, enter, fromID, toID) { function accumulateDirectDispatches (line 3527) | function accumulateDirectDispatches(events) { function _assertSingleLink (line 3879) | function _assertSingleLink(input) { function _assertValueLink (line 3886) | function _assertValueLink(input) { function _assertCheckedLink (line 3895) | function _assertCheckedLink(input) { function _handleLinkedValueChange (line 3908) | function _handleLinkedValueChange(e) { function _handleLinkedCheckChange (line 3916) | function _handleLinkedCheckChange(e) { function remove (line 4031) | function remove(event) { function createDescriptor (line 4291) | function createDescriptor(type, props, children) { function getListeningForDocument (line 4583) | function getListeningForDocument(mountAt) { function ForEachBookKeeping (line 5050) | function ForEachBookKeeping(forEachFunction, forEachContext) { function forEachSingleChild (line 5056) | function forEachSingleChild(traverseContext, child, name, i) { function forEachChildren (line 5072) | function forEachChildren(children, forEachFunc, forEachContext) { function MapBookKeeping (line 5092) | function MapBookKeeping(mapResult, mapFunction, mapContext) { function mapSingleChildIntoContext (line 5099) | function mapSingleChildIntoContext(traverseContext, child, name, i) { function mapChildren (line 5133) | function mapChildren(children, func, context) { function forEachSingleChildDummy (line 5145) | function forEachSingleChildDummy(traverseContext, child, name, i) { function countChildren (line 5156) | function countChildren(children, context) { function getDeclarationErrorAddendum (line 6187) | function getDeclarationErrorAddendum(component) { function validateTypeDef (line 6196) | function validateTypeDef(Constructor, typeDef, location) { function validateMethodOverride (line 6211) | function validateMethodOverride(proto, name) { function validateLifeCycleOnReplaceState (line 6241) | function validateLifeCycleOnReplaceState(instance) { function mixSpecIntoComponent (line 6264) | function mixSpecIntoComponent(Constructor, spec) { function mixStaticSpecIntoComponent (line 6350) | function mixStaticSpecIntoComponent(Constructor, statics) { function mergeObjectsWithNoDuplicateKeys (line 6387) | function mergeObjectsWithNoDuplicateKeys(one, two) { function createMergedResultFunction (line 6413) | function createMergedResultFunction(one, two) { function createChainedFunction (line 6434) | function createChainedFunction(one, two) { function createDOMComponentClass (line 7380) | function createDOMComponentClass(omitClose, tag) { function assertValidProps (line 7672) | function assertValidProps(props) { function putListener (line 7688) | function putListener(id, registrationName, listener, transaction) { function ReactDOMComponent (line 7709) | function ReactDOMComponent(tag, omitClose) { function selectValueType (line 8618) | function selectValueType(props, propName, componentName) { function updateOptions (line 8646) | function updateOptions(component, propValue) { function isCollapsed (line 8796) | function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) { function getIEOffsets (line 8814) | function getIEOffsets(node) { function getModernOffsets (line 8837) | function getModernOffsets(node) { function setIEOffsets (line 8894) | function setIEOffsets(node, offsets) { function setModernOffsets (line 8928) | function setModernOffsets(node, offsets) { function ReactDefaultBatchingStrategyTransaction (line 9166) | function ReactDefaultBatchingStrategyTransaction() { function inject (line 9255) | function inject() { function roundFloat (line 9361) | function roundFloat(val) { function addValue (line 9365) | function addValue(obj, key, val) { function getTotalTime (line 9631) | function getTotalTime(measurements) { function getDOMSummary (line 9644) | function getDOMSummary(measurements) { function getExclusiveSummary (line 9663) | function getExclusiveSummary(measurements) { function getInclusiveSummary (line 9711) | function getInclusiveSummary(measurements, onlyClean) { function getUnchangedComponents (line 9766) | function getUnchangedComponents(measurement) { function defineWarningProperty (line 9834) | function defineWarningProperty(object, key) { function defineMutationMembrane (line 9870) | function defineMutationMembrane(prototype) { function proxyStaticMethods (line 9888) | function proxyStaticMethods(target, source) { function getCurrentOwnerDisplayName (line 10108) | function getCurrentOwnerDisplayName() { function validateExplicitKey (line 10123) | function validateExplicitKey(component, parentType) { function validatePropertyKey (line 10146) | function validatePropertyKey(name, component, parentType) { function warnAndMonitorForKeyUse (line 10167) | function warnAndMonitorForKeyUse(warningID, message, component, parentTy... function monitorUseOfObjectMap (line 10207) | function monitorUseOfObjectMap() { function validateChildKeys (line 10226) | function validateChildKeys(component, parentType) { function checkPropTypes (line 10254) | function checkPropTypes(componentName, propTypes, props, location) { function getEmptyComponent (line 10375) | function getEmptyComponent() { function registerNullComponentID (line 10388) | function registerNullComponentID(id) { function deregisterNullComponentID (line 10396) | function deregisterNullComponentID(id) { function isNullComponentID (line 10404) | function isNullComponentID(id) { function runEventQueueInBatch (line 10480) | function runEventQueueInBatch(events) { function findParent (line 10554) | function findParent(node) { function TopLevelCallbackBookKeeping (line 10566) | function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) { function handleTopLevelImpl (line 10583) | function handleTopLevelImpl(bookKeeping) { function scrollValueMonitor (line 10610) | function scrollValueMonitor(cb) { function isInDocument (line 10779) | function isInDocument(node) { function getReactRootIDString (line 10936) | function getReactRootIDString(index) { function isBoundary (line 10948) | function isBoundary(id, index) { function isValidID (line 10959) | function isValidID(id) { function isAncestorIDOf (line 10973) | function isAncestorIDOf(ancestorID, descendantID) { function getParentID (line 10987) | function getParentID(id) { function getNextDescendantID (line 11000) | function getNextDescendantID(ancestorID, destinationID) { function getFirstCommonAncestorID (line 11039) | function getFirstCommonAncestorID(oneID, twoID) { function traverseParentPath (line 11076) | function traverseParentPath(start, stop, cb, arg, skipFirst, skipLast) { function ReactLink (line 11286) | function ReactLink(value, requestChange) { function createLinkTypeChecker (line 11299) | function createLinkTypeChecker(linkType) { function getReactRootID (line 11431) | function getReactRootID(container) { function getID (line 11446) | function getID(node) { function internalGetID (line 11468) | function internalGetID(node) { function setID (line 11481) | function setID(node, id) { function getNode (line 11497) | function getNode(id) { function isValid (line 11514) | function isValid(node, id) { function purgeID (line 11536) | function purgeID(id) { function findDeepestCachedAncestorImpl (line 11541) | function findDeepestCachedAncestorImpl(ancestorID) { function findDeepestCachedAncestor (line 11555) | function findDeepestCachedAncestor(targetID) { function enqueueMarkup (line 12117) | function enqueueMarkup(parentID, markup, toIndex) { function enqueueMove (line 12138) | function enqueueMove(parentID, fromIndex, toIndex) { function enqueueRemove (line 12158) | function enqueueRemove(parentID, fromIndex) { function enqueueTextContent (line 12178) | function enqueueTextContent(parentID, textContent) { function processQueue (line 12196) | function processQueue() { function clearQueue (line 12211) | function clearQueue() { function _noMeasure (line 12767) | function _noMeasure(objName, fnName, func) { function createTransferStrategy (line 12806) | function createTransferStrategy(mergeStrategy) { function transferInto (line 12859) | function transferInto(props, newProps) { function createChainableTypeChecker (line 13095) | function createChainableTypeChecker(validate) { function createPrimitiveTypeChecker (line 13117) | function createPrimitiveTypeChecker(expectedType) { function createAnyTypeChecker (line 13137) | function createAnyTypeChecker() { function createArrayOfTypeChecker (line 13141) | function createArrayOfTypeChecker(typeChecker) { function createComponentTypeChecker (line 13162) | function createComponentTypeChecker() { function createInstanceTypeChecker (line 13175) | function createInstanceTypeChecker(expectedClass) { function createEnumTypeChecker (line 13189) | function createEnumTypeChecker(expectedValues) { function createObjectOfTypeChecker (line 13208) | function createObjectOfTypeChecker(typeChecker) { function createUnionTypeChecker (line 13231) | function createUnionTypeChecker(arrayOfTypeCheckers) { function createRenderableTypeChecker (line 13249) | function createRenderableTypeChecker() { function createShapeTypeChecker (line 13262) | function createShapeTypeChecker(shapeTypes) { function isRenderable (line 13287) | function isRenderable(propValue) { function getPropType (line 13316) | function getPropType(propValue) { function getPreciseType (line 13332) | function getPreciseType(propValue) { function ReactPutListenerQueue (line 13372) | function ReactPutListenerQueue() { function ReactReconcileTransaction (line 13537) | function ReactReconcileTransaction() { function renderComponentToString (line 13665) | function renderComponentToString(component) { function renderComponentToStaticMarkup (line 13697) | function renderComponentToStaticMarkup(component) { function ReactServerRenderingTransaction (line 13789) | function ReactServerRenderingTransaction(renderToStaticMarkup) { function createStateKeySetter (line 13898) | function createStateKeySetter(component, key) { function Event (line 13990) | function Event(suffix) {} function makeSimulator (line 14259) | function makeSimulator(eventType) { function buildSimulators (line 14287) | function buildSimulators() { function makeNativeSimulator (line 14330) | function makeNativeSimulator(eventType) { function getValueForKey (line 14534) | function getValueForKey(key) { function detectEvents (line 14631) | function detectEvents() { function addEventListener (line 14668) | function addEventListener(node, eventName, eventListener) { function removeEventListener (line 14672) | function removeEventListener(node, eventName, eventListener) { function ensureInjected (line 14928) | function ensureInjected() { function ReactUpdatesFlushTransaction (line 14966) | function ReactUpdatesFlushTransaction() { function batchedUpdates (line 15004) | function batchedUpdates(callback, a, b) { function mountDepthComparator (line 15016) | function mountDepthComparator(c1, c2) { function runBatchedUpdates (line 15020) | function runBatchedUpdates(transaction) { function enqueueUpdate (line 15079) | function enqueueUpdate(component, callback) { function getSelection (line 15382) | function getSelection(node) { function constructSelectEvent (line 15414) | function constructSelectEvent(nativeEvent) { function SyntheticClipboardEvent (line 16022) | function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeE... function SyntheticCompositionEvent (line 16069) | function SyntheticCompositionEvent( function SyntheticDragEvent (line 16122) | function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent) { function SyntheticEvent (line 16195) | function SyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent) { function SyntheticFocusEvent (line 16334) | function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent) { function SyntheticInputEvent (line 16381) | function SyntheticInputEvent( function SyntheticKeyboardEvent (line 16477) | function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEv... function SyntheticMouseEvent (line 16567) | function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent) { function SyntheticTouchEvent (line 16622) | function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent) { function SyntheticUIEvent (line 16691) | function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent) { function SyntheticWheelEvent (line 16759) | function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent) { function accumulate (line 17082) | function accumulate(current, next) { function adler32 (line 17137) | function adler32(data) { function cloneWithProps (line 17187) | function cloneWithProps(child, props) { function containsNode (line 17243) | function containsNode(outerNode, innerNode) { function copyProperties (line 17289) | function copyProperties(obj, a, b, c, d, e, f) { function hasArrayNature (line 17356) | function hasArrayNature(obj) { function createArrayFrom (line 17400) | function createArrayFrom(obj) { function createFullPageComponent (line 17450) | function createFullPageComponent(componentClass) { function getNodeName (line 17522) | function getNodeName(markup) { function createNodesFromMarkup (line 17537) | function createNodesFromMarkup(markup, handleScript) { function cx (line 17606) | function cx(classNames) { function dangerousStyleValue (line 17653) | function dangerousStyleValue(name, value) { function makeEmptyFunction (line 17704) | function makeEmptyFunction(arg) { function emptyFunction (line 17715) | function emptyFunction() {} function escaper (line 17789) | function escaper(match) { function escapeTextForBrowser (line 17799) | function escapeTextForBrowser(text) { function flattenSingleChildIntoContext (line 17834) | function flattenSingleChildIntoContext(traverseContext, child, name) { function flattenChildren (line 17855) | function flattenChildren(children) { function focusNode (line 17893) | function focusNode(node) { function getActiveElement (line 17965) | function getActiveElement() /*?DOMElement*/ { function getEventKey (line 18056) | function getEventKey(nativeEvent) { function modifierStateGetter (line 18129) | function modifierStateGetter(keyArg) { function getEventModifierState (line 18140) | function getEventModifierState(nativeEvent) { function getEventTarget (line 18175) | function getEventTarget(nativeEvent) { function getMarkupWrap (line 18287) | function getMarkupWrap(nodeName) { function getLeafNode (line 18333) | function getLeafNode(node) { function getSiblingNode (line 18347) | function getSiblingNode(node) { function getNodeForCharacterOffset (line 18363) | function getNodeForCharacterOffset(root, offset) { function getReactRootElementInContainer (line 18416) | function getReactRootElementInContainer(container) { function getTextContentAccessor (line 18461) | function getTextContentAccessor() { function getUnboundedScrollPosition (line 18506) | function getUnboundedScrollPosition(scrollable) { function hyphenate (line 18555) | function hyphenate(string) { function hyphenateStyleName (line 18603) | function hyphenateStyleName(string) { function isValidComponentDescriptor (line 18640) | function isValidComponentDescriptor(descriptor) { function instantiateReactComponent (line 18658) | function instantiateReactComponent(descriptor) { function isEventSupported (line 18782) | function isEventSupported(eventNameSuffix, capture) { function isNode (line 18831) | function isNode(object) { function isTextInputElement (line 18884) | function isTextInputElement(elem) { function isTextNode (line 18919) | function isTextNode(object) { function joinClasses (line 18954) | function joinClasses(className/*, ... */) { function mapObject (line 19112) | function mapObject(obj, func, context) { function memoizeStringOnly (line 19156) | function memoizeStringOnly(callback) { function mergeInto (line 19390) | function mergeInto(one, two) { function monitorCodeUse (line 19471) | function monitorCodeUse(eventName, data) { function onlyChild (line 19515) | function onlyChild(children) { function shallowEqual (line 19710) | function shallowEqual(objA, objB) { function shouldUpdateReactComponent (line 19766) | function shouldUpdateReactComponent(prevDescriptor, nextDescriptor) { function toArray (line 19810) | function toArray(obj) { function userProvidedKeyEscaper (line 19901) | function userProvidedKeyEscaper(match) { function getComponentKey (line 19912) | function getComponentKey(component, index) { function escapeUserProvidedKey (line 19927) | function escapeUserProvidedKey(text) { function wrapUserProvidedKey (line 19941) | function wrapUserProvidedKey(key) { function traverseAllChildren (line 20041) | function traverseAllChildren(children, callback, traverseContext) { function shallowCopy (line 20076) | function shallowCopy(x) { function invariantArrayCase (line 20108) | function invariantArrayCase(value, spec, command) { function update (line 20125) | function update(value, spec) { FILE: r2/r2/public/static/js/lib/reddit-client-lib.js function s (line 7) | function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&re... function randomString (line 13) | function randomString(len) { function getCookies (line 24) | function getCookies(/* names */) { function setCookie (line 41) | function setCookie(name, value, expires) { function getLoggedOutData (line 47) | function getLoggedOutData() { FILE: r2/r2/public/static/js/lib/store.js function isLocalStorageNameSupported (line 59) | function isLocalStorageNameSupported() { function isGlobalStorageNameSupported (line 64) | function isGlobalStorageNameSupported() { function withIEStorage (line 130) | function withIEStorage(storeFunction) { function ieKeyFix (line 144) | function ieKeyFix(key) { FILE: r2/r2/public/static/js/lib/ui.core.js function focusable (line 128) | function focusable( element, isTabIndexNotNaN ) { function visible (line 149) | function visible( element ) { function reduce (line 191) | function reduce( elem, size, border, margin ) { FILE: r2/r2/public/static/js/lib/ui.datepicker.js function Datepicker (line 26) | function Datepicker() { function bindHover (line 1958) | function bindHover(dpDiv) { function extendRemove (line 1984) | function extendRemove(target, props) { FILE: r2/r2/public/static/js/link-click-tracking.js function setOutboundURL (line 28) | function setOutboundURL(elem) { function resetOriginalURL (line 52) | function resetOriginalURL(elem) { FILE: r2/r2/public/static/js/migrate-global-reddit.js function migrateWarn (line 11) | function migrateWarn(message) { FILE: r2/r2/public/static/js/models/subreddit-rule.js function ValidRulesLength (line 14) | function ValidRulesLength(attrName, maxLength) { function ValidRule (line 23) | function ValidRule(attrName) { FILE: r2/r2/public/static/js/reddit.js function open_menu (line 1) | function open_menu(menu) { function close_menu (line 12) | function close_menu(item) { function close_menus (line 17) | function close_menus(event) { function select_tab_menu (line 39) | function select_tab_menu(tab_link, tab_name) { function post_user (line 49) | function post_user(form, where) { function post_form (line 59) | function post_form(form, where, statusfunc, nametransformfunc, block) { function get_form_fields (line 77) | function get_form_fields(form, fields, filter_func) { function form_error (line 100) | function form_error(form) { function simple_post_form (line 112) | function simple_post_form(form, where, fields, block, callback) { function post_pseudo_form (line 118) | function post_pseudo_form(form, where, block) { function post_multipart_form (line 130) | function post_multipart_form(form, where) { function showlang (line 136) | function showlang() { function deleteRow (line 150) | function deleteRow(elem) { function change_state (line 158) | function change_state(elem, op, callback, keep, post_callback) { function unread_thing (line 178) | function unread_thing(elem) { function read_thing (line 187) | function read_thing(elem) { function click_thing (line 201) | function click_thing(elem) { function hide_thing (line 215) | function hide_thing(elem) { function toggle (line 245) | function toggle(elem, callback, cancelback) { function cancelToggleForm (line 272) | function cancelToggleForm(elem, form_class, button_class, on_hide) { function linkstatus (line 291) | function linkstatus(form) { function subscribe (line 296) | function subscribe(reddit_name) { function unsubscribe (line 309) | function unsubscribe(reddit_name) { function quarantine_optout (line 322) | function quarantine_optout(subreddit_name) { function friend (line 331) | function friend(user_name, container_name, type) { function unfriend (line 341) | function unfriend(user_name, container_name, type) { function reject_promo (line 348) | function reject_promo(elem) { function cancel_reject_promo (line 352) | function cancel_reject_promo(elem) { function complete_reject_promo (line 356) | function complete_reject_promo(elem) { function helpon (line 368) | function helpon(elem) { function helpoff (line 371) | function helpoff(elem) { function show_all_messages (line 375) | function show_all_messages(elem) { function hide_all_messages (line 399) | function hide_all_messages(elem) { function togglecomment (line 423) | function togglecomment(elem) { function toggleSrQuarantine (line 436) | function toggleSrQuarantine(elem) { function togglemessage (line 449) | function togglemessage(elem) { function morechildren (line 464) | function morechildren(form, link_id, sort, children, depth) { function moremessages (line 480) | function moremessages(elem) { function add_thing_to_cookie (line 488) | function add_thing_to_cookie(thing, cookie_name) { function add_thing_id_to_cookie (line 496) | function add_thing_id_to_cookie(id, cookie_name) { function clicked_items (line 518) | function clicked_items() { function clear_clicked_items (line 534) | function clear_clicked_items() { function updateEventHandlers (line 541) | function updateEventHandlers(thing) { function last_click (line 580) | function last_click() { function login (line 588) | function login(elem) { function register (line 592) | function register(elem) { function fetch_title (line 597) | function fetch_title() { function highlight_reddit (line 619) | function highlight_reddit(item) { function update_dropdown (line 626) | function update_dropdown(sr_names) { function select_form_tab (line 652) | function select_form_tab(elem, to_show, to_hide) { function show_edit_usertext (line 670) | function show_edit_usertext(form) { function hide_edit_usertext (line 706) | function hide_edit_usertext(form) { function comment_reply_for_elem (line 715) | function comment_reply_for_elem(elem) { function edit_usertext (line 731) | function edit_usertext(elem) { function cancel_usertext (line 737) | function cancel_usertext(elem) { function reply (line 744) | function reply(elem) { function toggle_distinguish_span (line 782) | function toggle_distinguish_span(elem) { function set_distinguish (line 787) | function set_distinguish(elem, value) { function toggle_clear_suggested_sort (line 797) | function toggle_clear_suggested_sort(elem) { function set_suggested_sort (line 802) | function set_suggested_sort(elem, value) { function populate_click_gadget (line 809) | function populate_click_gadget() { function fetch_parent (line 824) | function fetch_parent(elem, parent_permalink, parent_id) { function big_mod_action (line 853) | function big_mod_action(elem, dir) { function big_mod_toggle (line 880) | function big_mod_toggle(el, press_action, unpress_action) { function toggleThis (line 1004) | function toggleThis() { return toggle(this); } FILE: r2/r2/public/static/js/report.js function _getTemplate (line 7) | function _getTemplate(id) { function init (line 12) | function init() { function renderFromTemplate (line 54) | function renderFromTemplate(data, thingType) { function showForm (line 80) | function showForm($reportForm, form) { function toggleReportForm (line 86) | function toggleReportForm() { function toggleOther (line 92) | function toggleOther() { function getReportAttrs (line 109) | function getReportAttrs($el) { function openReportForm (line 113) | function openReportForm(e) { FILE: r2/r2/public/static/js/sponsored.js function hyphenate (line 5) | function hyphenate(match, $1, $2) { function expand (line 709) | function expand() { function get_selected (line 717) | function get_selected() { function mapTargets (line 1115) | function mapTargets(target) { function getSelect (line 1122) | function getSelect(target) { function mapSubreddit (line 1312) | function mapSubreddit(name, subreddits) { function getSubredditsByCollection (line 1316) | function getSubredditsByCollection(name) { function mapCollection (line 1320) | function mapCollection(name, subreddits) { function attach_calendar (line 1928) | function attach_calendar(where, min_date_src, max_date_src, callback, mi... function sum (line 1965) | function sum(a, b) { function check_enddate (line 1970) | function check_enddate(startdate, enddate) { function detach_campaign_form (line 2010) | function detach_campaign_form() { function cancel_edit (line 2021) | function cancel_edit(callback) { function send_campaign (line 2063) | function send_campaign(close) { function del_campaign (line 2071) | function del_campaign($campaign_row) { function toggle_pause_campaign (line 2083) | function toggle_pause_campaign($campaign_row, shouldPause) { function edit_campaign (line 2093) | function edit_campaign($campaign_row) { function check_number_of_campaigns (line 2252) | function check_number_of_campaigns(){ function create_campaign (line 2264) | function create_campaign() { function free_campaign (line 2309) | function free_campaign($campaign_row) { function terminate_campaign (line 2318) | function terminate_campaign($campaign_row) { function edit_promotion (line 2326) | function edit_promotion() { function cancel_edit_promotion (line 2336) | function cancel_edit_promotion() { function cancel_edit_campaign (line 2344) | function cancel_edit_campaign() { function check (line 2374) | function check(days, offset) { function compare (line 2409) | function compare(a, b) { function min (line 2425) | function min(arr) { function split (line 2441) | function split(days, offset, bestOption, minValue, check, recurse) { FILE: r2/r2/public/static/js/sr-autocomplete.js function sr_cache (line 8) | function sr_cache() { function sr_search (line 17) | function sr_search(query) { function sr_name_up (line 32) | function sr_name_up(e) { function sr_name_down (line 52) | function sr_name_down(e) { function hide_sr_name_list (line 90) | function hide_sr_name_list(e) { function sr_dropdown_mdown (line 94) | function sr_dropdown_mdown(row) { function sr_dropdown_mup (line 99) | function sr_dropdown_mup(row) { function set_sr_name (line 108) | function set_sr_name(link) { FILE: r2/r2/public/static/js/stateify.js function rightPosition (line 22) | function rightPosition($el) { function getClassNames (line 28) | function getClassNames() { function hasTooltip (line 38) | function hasTooltip($el) { FILE: r2/r2/public/static/js/strength-meter.js function isWeak (line 43) | function isWeak(password, related) { function testConsecutive (line 52) | function testConsecutive(characterClass) { function testRepeat (line 63) | function testRepeat(string) { function testOrdered (line 80) | function testOrdered(ordered) { function testRunner (line 157) | function testRunner(string, definition) { function getScore (line 175) | function getScore(password, related) { function Plugin (line 237) | function Plugin(option /* ,args... */) { FILE: r2/r2/public/static/js/synced-session-storage.js function SyncedSessionStorage (line 26) | function SyncedSessionStorage(sync_key) { FILE: r2/r2/public/static/js/timetext.js function TimeText (line 22) | function TimeText(opts) { FILE: r2/r2/public/static/js/timings.js function timing (line 44) | function timing(key, start, end) { FILE: r2/r2/public/static/js/toggles.js function Plugin (line 27) | function Plugin(option /* ,args... */) { FILE: r2/r2/public/static/js/ui.js function activate (line 716) | function activate(target) { FILE: r2/r2/public/static/js/validator.js function Plugin (line 143) | function Plugin(option /* ,args... */) { FILE: r2/r2/tests/__init__.py function diff_dicts (line 87) | def diff_dicts(d, expected, prefix=None): class DiffAssertionError (line 111) | class DiffAssertionError(AssertionError): method __init__ (line 112) | def __init__(self, diffs): function assert_same_dict (line 123) | def assert_same_dict(data, expected_data): class MockAmqp (line 136) | class MockAmqp(object): method __init__ (line 142) | def __init__(self, test_cls): method add_item (line 146) | def add_item(self, name, body, **kw): method assert_item_count (line 149) | def assert_item_count(self, name, count=None): method assert_event_item (line 163) | def assert_event_item( class RedditTestCase (line 210) | class RedditTestCase(TestCase): method setUp (line 217) | def setUp(self): method assert_same_dict (line 235) | def assert_same_dict(self, data, expected_data, prefix=None): method mock_eventcollector (line 251) | def mock_eventcollector(self): method autopatch (line 271) | def autopatch(self, obj, attr, *a, **kw): method patch_g (line 278) | def patch_g(self, **kw): method patch_liveconfig (line 286) | def patch_liveconfig(self, k, v): class NonCache (line 294) | class NonCache(object): method get (line 295) | def get(self, *a, **kw): method get_multi (line 298) | def get_multi(self, *a, **kw): method set (line 301) | def set(self, *a, **kw): method set_multi (line 304) | def set_multi(self, *a, **kw): method add (line 307) | def add(self, *a, **kw): method incr (line 310) | def incr(self, *a, **kw): class RedditControllerTestCase (line 314) | class RedditControllerTestCase(RedditTestCase): method setUp (line 318) | def setUp(self): method do_post (line 355) | def do_post(self, action, params, headers=None, expect_errors=False): method make_qs (line 377) | def make_qs(self, **kw): method additional_headers (line 381) | def additional_headers(self, headers, body): FILE: r2/r2/tests/functional/controller/del_msg_test.py class DelMsgTest (line 33) | class DelMsgTest(RedditControllerTestCase): method setUp (line 36) | def setUp(self): method test_del_msg_success (line 41) | def test_del_msg_success(self): method test_del_msg_failure_with_link (line 54) | def test_del_msg_failure_with_link(self): method test_del_msg_failure_with_null_msg (line 66) | def test_del_msg_failure_with_null_msg(self): method test_del_msg_failure_with_sender (line 79) | def test_del_msg_failure_with_sender(self): method mock_del_msg (line 92) | def mock_del_msg(self, thing, ret=True): method do_del_msg (line 104) | def do_del_msg(self, name, **kw): FILE: r2/r2/tests/functional/controller/login/api_tests.py class LoginRegTests (line 26) | class LoginRegTests(LoginRegBase, RedditControllerTestCase): method assert_success (line 29) | def assert_success(self, res): method assert_failure (line 33) | def assert_failure(self, res, code=None): FILE: r2/r2/tests/functional/controller/login/apiv1_tests.py class APIV1LoginTests (line 33) | class APIV1LoginTests(LoginRegBase, RedditControllerTestCase): method setUp (line 36) | def setUp(self): method make_ua_signature (line 40) | def make_ua_signature(self, platform="test", version=1): method sign (line 46) | def sign(self, payload, platform="test", version=1): method additional_headers (line 49) | def additional_headers(self, headers, body): method assert_success (line 55) | def assert_success(self, res): method assert_failure (line 67) | def assert_failure(self, res, code=None): method assert_403_response (line 77) | def assert_403_response(self, res, calling): method test_nosigning_login (line 86) | def test_nosigning_login(self): method test_no_body_signing_login (line 96) | def test_no_body_signing_login(self): method test_nosigning_register (line 105) | def test_nosigning_register(self): method test_no_body_signing_register (line 115) | def test_no_body_signing_register(self): method test_captcha_blocking (line 125) | def test_captcha_blocking(self): FILE: r2/r2/tests/functional/controller/login/common.py class LoginRegBase (line 32) | class LoginRegBase(object): method do_login (line 46) | def do_login(self, user="test", passwd="test123", **kw): method do_register (line 49) | def do_register( method mock_login (line 58) | def mock_login(self, name="test", cookie="cookievaluehere"): method mock_register (line 69) | def mock_register(self): method failed_captcha (line 84) | def failed_captcha(self): method disabled_captcha (line 101) | def disabled_captcha(self): method find_headers (line 121) | def find_headers(self, res, name): method assert_headers (line 127) | def assert_headers(self, res, name, test): method assert_success (line 136) | def assert_success(self, res): method assert_failure (line 140) | def assert_failure(self, res, code=None): method test_login (line 144) | def test_login(self): method test_login_wrong_password (line 149) | def test_login_wrong_password(self): method test_register (line 154) | def test_register(self): method test_register_username_taken (line 159) | def test_register_username_taken(self): method test_captcha_blocking (line 167) | def test_captcha_blocking(self): method test_captcha_disabling (line 176) | def test_captcha_disabling(self): FILE: r2/r2/tests/functional/controller/login/post_tests.py class PostLoginRegTests (line 29) | class PostLoginRegTests(LoginRegBase, RedditControllerTestCase): method setUp (line 35) | def setUp(self): method assert_success (line 40) | def assert_success(self, res): method assert_failure (line 55) | def assert_failure(self, res, code=None): method make_qs (line 63) | def make_qs(self, **kw): FILE: r2/r2/tests/unit/config/experiment_test.py class TestExperiment (line 34) | class TestExperiment(TestFeatureBase): method setUp (line 40) | def setUp(self): method get_loggedin_users (line 50) | def get_loggedin_users(self, num_users): method get_loggedout_users (line 57) | def get_loggedout_users(num_users): method test_calculate_bucket (line 60) | def test_calculate_bucket(self): method test_choose_variant (line 88) | def test_choose_variant(self): method do_experiment_simulation (line 181) | def do_experiment_simulation(self, users, loid_generator=None, **cfg): method assert_no_experiment (line 212) | def assert_no_experiment(self, users, **cfg): method test_loggedin_experiment (line 217) | def test_loggedin_experiment(self, num_users=2000): method test_loggedin_experiment_explicit_enable (line 227) | def test_loggedin_experiment_explicit_enable(self, num_users=2000): method test_loggedin_experiment_explicit_disable (line 238) | def test_loggedin_experiment_explicit_disable(self, num_users=2000): method test_loggedout_experiment (line 249) | def test_loggedout_experiment(self, num_users=2000): method test_loggedout_experiment_missing_loids (line 259) | def test_loggedout_experiment_missing_loids(self, num_users=2000): method test_loggedout_experiment_explicit_enable (line 270) | def test_loggedout_experiment_explicit_enable(self, num_users=2000): method test_loggedout_experiment_explicit_disable (line 281) | def test_loggedout_experiment_explicit_disable(self, num_users=2000): method test_loggedout_experiment_global_disable (line 292) | def test_loggedout_experiment_global_disable(self, num_users=2000): method test_mixed_experiment (line 306) | def test_mixed_experiment(self, num_users=2000): method test_mixed_experiment_disable (line 320) | def test_mixed_experiment_disable(self, num_users=2000): FILE: r2/r2/tests/unit/config/feature_test.py class MockAccount (line 36) | class MockAccount(object): method __init__ (line 37) | def __init__(self, name, _fullname): class MockWorld (line 46) | class MockWorld(World): method _make_state (line 47) | def _make_state(self, config): class TestFeatureBase (line 55) | class TestFeatureBase(RedditTestCase): method setUp (line 66) | def setUp(self): method setUp (line 78) | def setUp(self): method generate_loid (line 86) | def generate_loid(cls): class TestFeatureBase (line 61) | class TestFeatureBase(RedditTestCase): method setUp (line 66) | def setUp(self): method setUp (line 78) | def setUp(self): method generate_loid (line 86) | def generate_loid(cls): class TestFeatureBase (line 73) | class TestFeatureBase(RedditTestCase): method setUp (line 66) | def setUp(self): method setUp (line 78) | def setUp(self): method generate_loid (line 86) | def generate_loid(cls): class TestFeature (line 90) | class TestFeature(TestFeatureBase): method _assert_fuzzy_percent_true (line 92) | def _assert_fuzzy_percent_true(self, results, percent): method test_enabled (line 99) | def test_enabled(self): method test_disabled (line 105) | def test_disabled(self): method test_admin_enabled (line 111) | def test_admin_enabled(self): method test_admin_disabled (line 117) | def test_admin_disabled(self): method test_employee_enabled (line 123) | def test_employee_enabled(self): method test_employee_disabled (line 129) | def test_employee_disabled(self): method test_beta_enabled (line 135) | def test_beta_enabled(self): method test_beta_disabled (line 141) | def test_beta_disabled(self): method test_gold_enabled (line 147) | def test_gold_enabled(self): method test_gold_disabled (line 153) | def test_gold_disabled(self): method test_loggedin_enabled (line 159) | def test_loggedin_enabled(self): method test_loggedin_disabled (line 165) | def test_loggedin_disabled(self): method test_loggedout_enabled (line 171) | def test_loggedout_enabled(self): method test_loggedout_disabled (line 177) | def test_loggedout_disabled(self): method test_percent_loggedin (line 183) | def test_percent_loggedin(self): method test_percent_loggedout (line 202) | def test_percent_loggedout(self): method test_url_enabled (line 222) | def test_url_enabled(self): method test_url_disabled (line 242) | def test_url_disabled(self): method test_user_in (line 266) | def test_user_in(self): method test_user_not_in (line 279) | def test_user_not_in(self): method test_subreddit_in (line 288) | def test_subreddit_in(self): method test_subreddit_not_in (line 301) | def test_subreddit_not_in(self): method test_subdomain_in (line 310) | def test_subdomain_in(self): method test_subdomain_not_in (line 323) | def test_subdomain_not_in(self): method test_multiple (line 333) | def test_multiple(self): FILE: r2/r2/tests/unit/lib/authorize/test_api.py class AuthorizeNetExceptionTest (line 46) | class AuthorizeNetExceptionTest(RedditTestCase): method test_exception_message (line 48) | def test_exception_message(self): class SimpleXMLObjectTest (line 59) | class SimpleXMLObjectTest(RedditTestCase): method setUp (line 61) | def setUp(self): method test_to_xml (line 67) | def test_to_xml(self): method test_simple_tag (line 72) | def test_simple_tag(self): method test_from_xml (line 80) | def test_from_xml(self): method test_address (line 98) | def test_address(self): method test_credit_card (line 128) | def test_credit_card(self): method test_payment_profile (line 139) | def test_payment_profile(self): method test_transaction (line 154) | def test_transaction(self): class ApiFunctionTest (line 173) | class ApiFunctionTest(TestCase): method setUp (line 175) | def setUp(self): method test_create_customer_profile (line 184) | def test_create_customer_profile(self, Profile, CreateRequest): method test_get_customer_profile (line 214) | def test_get_customer_profile(self, GetRequest): method test_create_payment_profile (line 233) | def test_create_payment_profile(self, PaymentProfile, CreateRequest): method test_update_payment_profile (line 265) | def test_update_payment_profile(self, PaymentProfile, UpdateRequest): method test_delete_payment_profile (line 285) | def test_delete_payment_profile(self, DeleteRequest): method test_create_authorization_hold (line 304) | def test_create_authorization_hold(self, CreateRequest): method test_capture_authorization_hold (line 336) | def test_capture_authorization_hold(self, CreateRequest): method test_void_authorization_hold (line 364) | def test_void_authorization_hold(self, CreateRequest): method test_refund_transaction (line 386) | def test_refund_transaction(self, CreateRequest): FILE: r2/r2/tests/unit/lib/authorize/test_interaction.py class InteractionTest (line 46) | class InteractionTest(RedditTestCase): method setUp (line 48) | def setUp(self): method test_get_or_create_customer_profile (line 56) | def test_get_or_create_customer_profile(self, create_customer_profile, method test_add_payment_method (line 83) | def test_add_payment_method(self, get_id, create_payment_profile, add): method test_update_payment_method (line 100) | def test_update_payment_method(self, update_payment_profile): method test_delete_payment_method (line 109) | def test_delete_payment_method(self, delete_payment_profile, delete): method test_add_or_update_payment_method (line 129) | def test_add_or_update_payment_method(self, update_payment_method, method test_auth_freebie_transaction (line 147) | def test_auth_freebie_transaction(self, _new): method test_auth_transaction (line 173) | def test_auth_transaction(self, get_ids, get_id, create_authorization_... method test_charge_transaction (line 226) | def test_charge_transaction(self, one, capture_authorization_hold): method test_void_transaction (line 266) | def test_void_transaction(self, one): method test_refund_transaction (line 293) | def test_refund_transaction(self, one): FILE: r2/r2/tests/unit/lib/configparse_test.py class TestConfigValue (line 30) | class TestConfigValue(unittest.TestCase): method test_str (line 32) | def test_str(self): method test_int (line 35) | def test_int(self): method test_float (line 41) | def test_float(self): method test_bool (line 47) | def test_bool(self): method test_tuple (line 53) | def test_tuple(self): method test_set (line 57) | def test_set(self): method test_set_of (line 61) | def test_set_of(self): method test_tuple_of (line 67) | def test_tuple_of(self): method test_dict (line 73) | def test_dict(self): method test_choice (line 84) | def test_choice(self): method test_timeinterval (line 90) | def test_timeinterval(self): FILE: r2/r2/tests/unit/lib/cookie_upgrade_test.py class TestCookieUpgrade (line 37) | class TestCookieUpgrade(RedditTestCase): method setUp (line 39) | def setUp(self): method tearDown (line 55) | def tearDown(self): method _setSessionCookie (line 60) | def _setSessionCookie(self, days_old=0): method test_no_upgrade_loggedout (line 69) | def test_no_upgrade_loggedout(self): method test_no_upgrade_http (line 78) | def test_no_upgrade_http(self): method test_no_upgrade_no_cookie (line 84) | def test_no_upgrade_no_cookie(self): method test_no_upgrade_oauth (line 89) | def test_no_upgrade_oauth(self): method test_no_upgrade_gets (line 97) | def test_no_upgrade_gets(self): method test_no_upgrade_secure_session (line 103) | def test_no_upgrade_secure_session(self): method test_upgrade_posts (line 109) | def test_upgrade_posts(self): method test_cookie_unchanged (line 115) | def test_cookie_unchanged(self): method test_remember_old_session (line 122) | def test_remember_old_session(self): method test_dont_remember_recent_session (line 128) | def test_dont_remember_recent_session(self): FILE: r2/r2/tests/unit/lib/cssfilter_test.py class TestCSSFilter (line 29) | class TestCSSFilter(unittest.TestCase): method assertInvalid (line 30) | def assertInvalid(self, css): method test_offsite_url (line 34) | def test_offsite_url(self): method test_nested_url (line 38) | def test_nested_url(self): method test_url_prelude (line 42) | def test_url_prelude(self): method test_invalid_property (line 46) | def test_invalid_property(self): method test_import (line 50) | def test_import(self): method test_import_rule (line 54) | def test_import_rule(self): method test_invalid_function (line 59) | def test_invalid_function(self): method test_invalid_function_prelude (line 63) | def test_invalid_function_prelude(self): method test_semicolon_function (line 68) | def test_semicolon_function(self): method test_semicolon_block (line 72) | def test_semicolon_block(self): method test_escape_prelude (line 77) | def test_escape_prelude(self): method test_escape_url (line 82) | def test_escape_url(self): method test_control_chars (line 87) | def test_control_chars(self): method test_embedded_nulls (line 91) | def test_embedded_nulls(self): method test_escaped_url (line 96) | def test_escaped_url(self): method test_escape_function_obfuscation (line 101) | def test_escape_function_obfuscation(self): method test_attr_url (line 107) | def test_attr_url(self): FILE: r2/r2/tests/unit/lib/eventcollector_tests.py class TestEventCollector (line 41) | class TestEventCollector(RedditTestCase): method setUp (line 43) | def setUp(self): method test_vote_event (line 48) | def test_vote_event(self): method test_vote_event_with_prev (line 84) | def test_vote_event_with_prev(self): method test_submit_event (line 113) | def test_submit_event(self): method test_report_event_link (line 154) | def test_report_event_link(self): method test_mod_event (line 204) | def test_mod_event(self): method test_quarantine_event (line 244) | def test_quarantine_event(self): method test_modmail_event (line 283) | def test_modmail_event(self): method test_message_event (line 333) | def test_message_event(self): FILE: r2/r2/tests/unit/lib/js_test.py function concat_sources (line 29) | def concat_sources(sources): class TestFileSource (line 33) | class TestFileSource(js.FileSource): method get_source (line 34) | def get_source(self, *args, **kwargs): class TestModule (line 38) | class TestModule(js.Module): method get_default_source (line 39) | def get_default_source(self, source): method build (line 42) | def build(self, *args, **kwargs): class TestModuleGetFlattenedSources (line 48) | class TestModuleGetFlattenedSources(unittest.TestCase): method test_flat_modules_include_all_sources (line 49) | def test_flat_modules_include_all_sources(self): method test_nested_modules_include_all_sources (line 54) | def test_nested_modules_include_all_sources(self): method test_flat_modules_only_include_sources_once (line 62) | def test_flat_modules_only_include_sources_once(self): method test_nested_modules_only_include_sources_once (line 68) | def test_nested_modules_only_include_sources_once(self): method test_filtered_modules_do_not_include_filtered_sources (line 75) | def test_filtered_modules_do_not_include_filtered_sources(self): FILE: r2/r2/tests/unit/lib/loid_tests.py class LoidTests (line 9) | class LoidTests(RedditTestCase): method setUp (line 11) | def setUp(self): method test_ftue_autocreate (line 15) | def test_ftue_autocreate(self): method test_ftue_nocreate (line 68) | def test_ftue_nocreate(self): method test_returning (line 78) | def test_returning(self): FILE: r2/r2/tests/unit/lib/media_test.py class TestGetScrapeUrl (line 31) | class TestGetScrapeUrl(unittest.TestCase): method test_link_post (line 33) | def test_link_post(self, Link): method test_simple_self_post (line 40) | def test_simple_self_post(self): method test_imgur_link (line 48) | def test_imgur_link(self): method test_image_link (line 56) | def test_image_link(self): FILE: r2/r2/tests/unit/lib/permissions_test.py class TestPermissionSet (line 28) | class TestPermissionSet(PermissionSet): class PermissionSetTest (line 31) | class PermissionSetTest(unittest.TestCase): method test_dumps (line 32) | def test_dumps(self): method test_loads (line 40) | def test_loads(self): method test_is_superuser (line 54) | def test_is_superuser(self): method test_is_valid (line 62) | def test_is_valid(self): method test_getitem (line 75) | def test_getitem(self): class ModeratorPermissionSetTest (line 95) | class ModeratorPermissionSetTest(unittest.TestCase): method test_loads (line 96) | def test_loads(self): FILE: r2/r2/tests/unit/lib/promote_test.py class TestSRNamesFromSite (line 44) | class TestSRNamesFromSite(RedditTestCase): method setUp (line 45) | def setUp(self): method test_frontpage_logged_out (line 51) | def test_frontpage_logged_out(self): method test_frontpage_logged_in (line 57) | def test_frontpage_logged_in(self, user_subreddits): method test_multi_logged_out (line 63) | def test_multi_logged_out(self): method test_multi_logged_in (line 70) | def test_multi_logged_in(self, user_subreddits): method test_subreddit_logged_out (line 77) | def test_subreddit_logged_out(self): method test_subreddit_logged_in (line 85) | def test_subreddit_logged_in(self, user_subreddits): method test_quarantined_subscriptions_are_never_included (line 94) | def test_quarantined_subscriptions_are_never_included(self, user_subre... method test_nsfw_subscriptions_arent_included_when_viewing_frontpage (line 103) | def test_nsfw_subscriptions_arent_included_when_viewing_frontpage(self... method test_get_nsfw_collections_srnames (line 111) | def test_get_nsfw_collections_srnames(self, get_all): method test_remove_nsfw_collection_srnames_on_frontpage (line 118) | def test_remove_nsfw_collection_srnames_on_frontpage(self, get_nsfw_co... class TestPromoteRefunds (line 134) | class TestPromoteRefunds(unittest.TestCase): method setUp (line 135) | def setUp(self): method test_refund_campaign_success (line 154) | def test_refund_campaign_success(self, emailer_refunded_promo, method test_refund_campaign_failed (line 178) | def test_refund_campaign_failed(self, promotion_log_add, method test_get_refund_amount_when_zero (line 198) | def test_get_refund_amount_when_zero(self): method test_get_refund_amount_rounding (line 209) | def test_get_refund_amount_rounding(self): FILE: r2/r2/tests/unit/lib/providers/image_resizing/imgix_test.py class TestImgixResizer (line 34) | class TestImgixResizer(RedditTestCase): method setUp (line 35) | def setUp(self): method test_no_resize (line 42) | def test_no_resize(self): method test_too_small (line 48) | def test_too_small(self): method test_resize (line 54) | def test_resize(self): method test_cropping (line 61) | def test_cropping(self): method test_sign_url (line 77) | def test_sign_url(self): method test_censor (line 89) | def test_censor(self): FILE: r2/r2/tests/unit/lib/providers/image_resizing/no_op_test.py class TestLocalResizer (line 29) | class TestLocalResizer(unittest.TestCase): method setUpClass (line 31) | def setUpClass(cls): method test_no_resize (line 34) | def test_no_resize(self): method test_resize (line 40) | def test_resize(self): FILE: r2/r2/tests/unit/lib/providers/image_resizing/unsplashit_test.py class TestLocalResizer (line 29) | class TestLocalResizer(unittest.TestCase): method setUpClass (line 31) | def setUpClass(cls): method test_no_resize (line 34) | def test_no_resize(self): method test_resize (line 40) | def test_resize(self): FILE: r2/r2/tests/unit/lib/reddit_agent_parser_test.py class AgentDetectorTest (line 40) | class AgentDetectorTest(RedditTestCase): method test_reddit_is_fun_detector (line 41) | def test_reddit_is_fun_detector(self): method test_reddit_android_detector (line 52) | def test_reddit_android_detector(self): method test_reddit_ios_detector (line 63) | def test_reddit_ios_detector(self): method test_alian_blue_detector (line 76) | def test_alian_blue_detector(self): method test_relay_for_reddit_detector (line 87) | def test_relay_for_reddit_detector(self): method test_reddit_sync_detector (line 98) | def test_reddit_sync_detector(self): method test_narwhal_detector (line 110) | def test_narwhal_detector(self): method test_mcreddit_detector (line 121) | def test_mcreddit_detector(self): method test_readit_detector (line 132) | def test_readit_detector(self): method test_bacon_reader_detector (line 142) | def test_bacon_reader_detector(self): class HAPIntegrationTests (line 156) | class HAPIntegrationTests(RedditTestCase): method test_reddit_is_fun_integration (line 160) | def test_reddit_is_fun_integration(self): method test_reddit_android_integration (line 166) | def test_reddit_android_integration(self): method test_reddit_ios_integration (line 172) | def test_reddit_ios_integration(self): method test_alien_blue_detector (line 178) | def test_alien_blue_detector(self): method test_relay_for_reddit_detector (line 183) | def test_relay_for_reddit_detector(self): method test_reddit_sync_detector (line 188) | def test_reddit_sync_detector(self): method test_narwhal_detector (line 194) | def test_narwhal_detector(self): method test_mcreddit_detector (line 200) | def test_mcreddit_detector(self): method test_readit_detector (line 205) | def test_readit_detector(self): method test_bacon_reader_detector (line 212) | def test_bacon_reader_detector(self): FILE: r2/r2/tests/unit/lib/signing_tests.py class SigningTests (line 9) | class SigningTests(RedditTestCase): method setUp (line 10) | def setUp(self): method test_get_token (line 14) | def test_get_token(self): method make_sig_header (line 34) | def make_sig_header(self, body, platform="test", version=1, epoch=None): method _assert_validity (line 42) | def _assert_validity(self, body, header, success, error, **expected): method assert_valid (line 62) | def assert_valid(self, body, header, **expected): method assert_invalid (line 68) | def assert_invalid(self, body, header, error, **expected): method test_signing (line 77) | def test_signing(self): method test_valid_header (line 89) | def test_valid_header(self): method test_no_header (line 106) | def test_no_header(self): method test_garbage_header (line 110) | def test_garbage_header(self): method test_future_header (line 118) | def test_future_header(self): method test_invalid (line 128) | def test_invalid(self, _): method test_invalid_header (line 146) | def test_invalid_header(self): method test_expired_header (line 158) | def test_expired_header(self): FILE: r2/r2/tests/unit/lib/souptest_test.py class TestSoupTest (line 41) | class TestSoupTest(unittest.TestCase): method assertFragmentRaises (line 42) | def assertFragmentRaises(self, fragment, error): method assertFragmentValid (line 45) | def assertFragmentValid(self, fragment): method test_benign (line 48) | def test_benign(self): method test_unbalanced (line 57) | def test_unbalanced(self): method test_unclosed_comment (line 60) | def test_unclosed_comment(self): method test_invalid_comment (line 63) | def test_invalid_comment(self): method test_quoting (line 67) | def test_quoting(self): method test_processing_instruction (line 71) | def test_processing_instruction(self): method test_doctype (line 75) | def test_doctype(self): method test_entity_declarations (line 78) | def test_entity_declarations(self): method test_cdata_section (line 84) | def test_cdata_section(self): method test_entities (line 88) | def test_entities(self): method test_tag_whitelist (line 98) | def test_tag_whitelist(self): method test_attr_whitelist (line 102) | def test_attr_whitelist(self): method test_tag_xmlns (line 106) | def test_tag_xmlns(self): method test_attr_xmlns (line 112) | def test_attr_xmlns(self): method test_schemes (line 116) | def test_schemes(self): method test_crashers (line 123) | def test_crashers(self): FILE: r2/r2/tests/unit/lib/stats_test.py class TimingStatBufferTest (line 28) | class TimingStatBufferTest(unittest.TestCase): method test_tsb (line 29) | def test_tsb(self): class CountingStatBufferTest (line 42) | class CountingStatBufferTest(unittest.TestCase): method test_csb (line 43) | def test_csb(self): class StringCountBufferTest (line 56) | class StringCountBufferTest(unittest.TestCase): method test_encode_string (line 57) | def test_encode_string(self): method test_scb (line 62) | def test_scb(self): class FakeUdpSocket (line 79) | class FakeUdpSocket: method __init__ (line 80) | def __init__(self, *ignored_args): method sendto (line 85) | def sendto(self, datagram, host_port): class StatsdConnectionUnderTest (line 88) | class StatsdConnectionUnderTest(stats.StatsdConnection): class StatsdConnectionTest (line 91) | class StatsdConnectionTest(unittest.TestCase): method connect (line 93) | def connect(compress=False): method test_parse_addr (line 96) | def test_parse_addr(self): method test_send (line 100) | def test_send(self): class StatsdClientUnderTest (line 125) | class StatsdClientUnderTest(stats.StatsdClient): method _data_iterator (line 127) | def _data_iterator(cls, x): method _make_conn (line 131) | def _make_conn(cls, addr): class StatsdClientTest (line 134) | class StatsdClientTest(unittest.TestCase): method test_flush (line 135) | def test_flush(self): class CounterAndTimerTest (line 144) | class CounterAndTimerTest(unittest.TestCase): method client (line 146) | def client(): method test_get_stat_name (line 149) | def test_get_stat_name(self): method test_counter (line 154) | def test_counter(self): method test_timer (line 171) | def test_timer(self): FILE: r2/r2/tests/unit/lib/tracking_test.py class TestPadding (line 34) | class TestPadding(unittest.TestCase): method test_pad_empty_string (line 35) | def test_pad_empty_string(self): method test_pad_round_string (line 40) | def test_pad_round_string(self): method test_unpad_empty_message (line 46) | def test_unpad_empty_message(self): method test_unpad_evil_message (line 51) | def test_unpad_evil_message(self): method test_padding_roundtrip (line 57) | def test_padding_roundtrip(self): class TestEncryption (line 63) | class TestEncryption(unittest.TestCase): method test_salt (line 64) | def test_salt(self): method test_encrypt (line 68) | def test_encrypt(self): method test_decrypt (line 77) | def test_decrypt(self): FILE: r2/r2/tests/unit/lib/urlparser_test.py class TestIsRedditURL (line 31) | class TestIsRedditURL(RedditTestCase): method setUp (line 33) | def setUp(self): method _is_safe_reddit_url (line 36) | def _is_safe_reddit_url(self, url, subreddit=None): method assertIsSafeRedditUrl (line 40) | def assertIsSafeRedditUrl(self, url, subreddit=None): method assertIsNotSafeRedditUrl (line 43) | def assertIsNotSafeRedditUrl(self, url, subreddit=None): method test_normal_urls (line 46) | def test_normal_urls(self): method test_incorrect_anchoring (line 64) | def test_incorrect_anchoring(self): method test_protocol_relative (line 67) | def test_protocol_relative(self): method test_weird_protocols (line 70) | def test_weird_protocols(self): method test_http_auth (line 76) | def test_http_auth(self): method test_browser_quirks (line 84) | def test_browser_quirks(self): method test_url_mutation (line 119) | def test_url_mutation(self): method test_nbsp_allowances (line 128) | def test_nbsp_allowances(self): class TestSwitchSubdomainByExtension (line 142) | class TestSwitchSubdomainByExtension(RedditTestCase): method setUp (line 143) | def setUp(self): method test_normal_urls (line 149) | def test_normal_urls(self): method test_default_prefix (line 160) | def test_default_prefix(self): class TestPathExtension (line 170) | class TestPathExtension(unittest.TestCase): method test_no_path (line 171) | def test_no_path(self): method test_directory (line 175) | def test_directory(self): method test_no_extension (line 182) | def test_no_extension(self): method test_root_file (line 186) | def test_root_file(self): method test_nested_file (line 190) | def test_nested_file(self): method test_empty_extension (line 194) | def test_empty_extension(self): method test_two_extensions (line 198) | def test_two_extensions(self): method test_only_extension (line 202) | def test_only_extension(self): class TestEquality (line 207) | class TestEquality(unittest.TestCase): method test_different_objects (line 208) | def test_different_objects(self): method test_different_protocols (line 212) | def test_different_protocols(self): method test_different_domains (line 217) | def test_different_domains(self): method test_different_ports (line 222) | def test_different_ports(self): method test_different_paths (line 229) | def test_different_paths(self): method test_different_params (line 236) | def test_different_params(self): method test_different_queries (line 243) | def test_different_queries(self): method test_different_fragments (line 250) | def test_different_fragments(self): method test_same_url (line 257) | def test_same_url(self): method test_integer_query_params (line 272) | def test_integer_query_params(self): method test_unicode_query_params (line 278) | def test_unicode_query_params(self): FILE: r2/r2/tests/unit/lib/utils_test.py class CrappyQuery (line 39) | class CrappyQuery(object): method __init__ (line 47) | def __init__(self, method _reset_state (line 76) | def _reset_state(self): method __iter__ (line 79) | def __iter__(self): method _after (line 82) | def _after(self, num): method __next__ (line 86) | def __next__(self): method next (line 112) | def next(self): method __call__ (line 115) | def __call__(self): class UtilsTest (line 120) | class UtilsTest(unittest.TestCase): method test_weighted_lottery_errors (line 121) | def test_weighted_lottery_errors(self): method check_exponential_backoff_sleep_times (line 129) | def check_exponential_backoff_sleep_times(self, method test_exponential_retrier (line 147) | def test_exponential_retrier(self): method test_retriable_fetch_things_passthrough (line 231) | def test_retriable_fetch_things_passthrough(self): method test_retriable_fetch_things_exception_rethrow (line 252) | def test_retriable_fetch_things_exception_rethrow(self): method test_retriable_fetch_things_recover_from_fail (line 297) | def test_retriable_fetch_things_recover_from_fail(self): method test_weighted_lottery (line 352) | def test_weighted_lottery(self): method test_extract_subdomain (line 370) | def test_extract_subdomain(self): method test_coerce_url_to_protocol (line 387) | def test_coerce_url_to_protocol(self): method test_sanitize_url (line 412) | def test_sanitize_url(self): class TestCanonicalizeEmail (line 439) | class TestCanonicalizeEmail(unittest.TestCase): method test_empty_string (line 440) | def test_empty_string(self): method test_unicode (line 444) | def test_unicode(self): method test_localonly (line 448) | def test_localonly(self): method test_multiple_ats (line 452) | def test_multiple_ats(self): method test_remove_dots (line 456) | def test_remove_dots(self): method test_remove_plus_address (line 460) | def test_remove_plus_address(self): method test_unicode_in_byte_str (line 464) | def test_unicode_in_byte_str(self): class TestTruncString (line 471) | class TestTruncString(unittest.TestCase): method test_empty_string (line 472) | def test_empty_string(self): method test_short_enough (line 476) | def test_short_enough(self): method test_word_breaks (line 480) | def test_word_breaks(self): method test_suffix (line 484) | def test_suffix(self): method test_really_long_words (line 488) | def test_really_long_words(self): class TestUrlToThing (line 493) | class TestUrlToThing(unittest.TestCase): method test_subreddit_noslash (line 495) | def test_subreddit_noslash(self): method test_subreddit (line 503) | def test_subreddit(self): method test_frontpage (line 511) | def test_frontpage(self): FILE: r2/r2/tests/unit/lib/validator/test_validator.py class ValidatorTests (line 43) | class ValidatorTests(RedditTestCase): method _test_failure (line 44) | def _test_failure(self, input, error): method _test_success (line 50) | def _test_success(self, input, assertEqual=True): class TestVSubmitParent (line 60) | class TestVSubmitParent(ValidatorTests): method setUp (line 61) | def setUp(self): method _mock_message (line 74) | def _mock_message(self, id=1, author_id=1, **kwargs): method _mock_link (line 83) | def _mock_link(self, id=1, author_id=1, sr_id=1, can_comment=True, method _mock_comment (line 99) | def _mock_comment(self, method test_no_fullname (line 121) | def test_no_fullname(self): method test_not_found (line 127) | def test_not_found(self): method test_invalid_thing (line 134) | def test_invalid_thing(self): method test_not_loggedin (line 142) | def test_not_loggedin(self): method test_blocked_user (line 151) | def test_blocked_user(self): method test_valid_message (line 162) | def test_valid_message(self): method test_valid_link (line 169) | def test_valid_link(self): method test_removed_link (line 176) | def test_removed_link(self): method test_archived_link (line 183) | def test_archived_link(self): method test_locked_link (line 191) | def test_locked_link(self): method test_locked_link_mod_reply (line 200) | def test_locked_link_mod_reply(self): method test_invalid_link (line 208) | def test_invalid_link(self): method test_invalid_promo (line 215) | def test_invalid_promo(self): method test_valid_comment (line 222) | def test_valid_comment(self): method test_deleted_comment (line 229) | def test_deleted_comment(self): method test_removed_comment (line 237) | def test_removed_comment(self): method test_removed_comment_self_reply (line 245) | def test_removed_comment_self_reply(self): method test_removed_comment_mod_reply (line 252) | def test_removed_comment_mod_reply(self): method test_invalid_comment (line 259) | def test_invalid_comment(self): class TestVSubredditName (line 267) | class TestVSubredditName(ValidatorTests): method setUp (line 268) | def setUp(self): method _test_failure (line 273) | def _test_failure(self, input, error=errors.BAD_SR_NAME): method test_slash_r_slash (line 278) | def test_slash_r_slash(self): method test_r_slash (line 282) | def test_r_slash(self): method test_two_prefixes (line 286) | def test_two_prefixes(self): method test_slash_not_prefix (line 289) | def test_slash_not_prefix(self): class TestValidEmail (line 293) | class TestValidEmail(ValidatorTests): method setUp (line 298) | def setUp(self): method test_valid_emails (line 303) | def test_valid_emails(self): method _test_failure (line 308) | def _test_failure(self, email, error=errors.BAD_EMAIL): method test_blank_email (line 311) | def test_blank_email(self): method test_no_whitespace (line 316) | def test_no_whitespace(self): method test_no_hostname (line 325) | def test_no_hostname(self): method test_no_username (line 330) | def test_no_username(self): method test_two_hostnames (line 335) | def test_two_hostnames(self): FILE: r2/r2/tests/unit/lib/validator/test_vverifypassword.py class TestVVerifyPassword (line 40) | class TestVVerifyPassword(unittest.TestCase): method setUpClass (line 43) | def setUpClass(cls): method setUp (line 53) | def setUp(self): method _checkFails (line 57) | def _checkFails(self, password, fatal=False, error=errors.WRONG_PASSWO... method test_loggedout (line 73) | def test_loggedout(self): method test_right_password (line 78) | def test_right_password(self): method test_wrong_password (line 82) | def test_wrong_password(self): method test_no_password (line 87) | def test_no_password(self): FILE: r2/r2/tests/unit/models/commentbuilder_test.py function make_comment_tree (line 77) | def make_comment_tree(link): function make_comment_scores (line 97) | def make_comment_scores(): function comments_by_id (line 114) | def comments_by_id(): class CommentOrderTest (line 127) | class CommentOrderTest(RedditTestCase): method setUp (line 128) | def setUp(self): method tearDown (line 146) | def tearDown(self): method test_comment_order_full (line 149) | def test_comment_order_full(self): method test_comment_order_full_asc (line 162) | def test_comment_order_full_asc(self): method test_comment_order_limit (line 175) | def test_comment_order_limit(self): method test_comment_order_depth (line 187) | def test_comment_order_depth(self): method test_comment_order_sticky (line 199) | def test_comment_order_sticky(self): method test_comment_order_invalid_sticky (line 212) | def test_comment_order_invalid_sticky(self): method test_comment_order_permalink (line 226) | def test_comment_order_permalink(self): method test_comment_order_permalink_context (line 240) | def test_comment_order_permalink_context(self): method test_comment_order_invalid_permalink_defocus (line 255) | def test_comment_order_invalid_permalink_defocus(self): method test_comment_order_children (line 270) | def test_comment_order_children(self): method test_comment_order_children_limit (line 283) | def test_comment_order_children_limit(self): method test_comment_order_children_limit_bug (line 296) | def test_comment_order_children_limit_bug(self): method test_comment_order_qa (line 313) | def test_comment_order_qa(self): method test_comment_order_qa_multiple_responders (line 327) | def test_comment_order_qa_multiple_responders(self): FILE: r2/r2/tests/unit/models/link_test.py class CommentMock (line 49) | class CommentMock(Comment): method __init__ (line 54) | def __init__(self, ups=1, downs=0, body=TINY_COMMENT, author_id=None): method __setattr__ (line 60) | def __setattr__(self, attr, val): method __getattr__ (line 63) | def __getattr__(self, attr): class TestCommentQaSort (line 67) | class TestCommentQaSort(unittest.TestCase): method test_simple_upvotes (line 68) | def test_simple_upvotes(self): method test_simple_downvotes (line 80) | def test_simple_downvotes(self): method test_simple_length (line 92) | def test_simple_length(self): method test_simple_op_responses (line 107) | def test_simple_op_responses(self): method test_multiple_op_responses (line 118) | def test_multiple_op_responses(self): method test_simple_op_comments (line 137) | def test_simple_op_comments(self): function _mock_id (line 147) | def _mock_id(instance): class LinkMock (line 153) | class LinkMock(Link): method __init__ (line 156) | def __init__(self, **kwargs): method __setattr__ (line 160) | def __setattr__(self, attr, val): method __getattr__ (line 163) | def __getattr__(self, attr): method _id (line 171) | def _id(self): method subreddit_slow (line 175) | def subreddit_slow(self): method _commit (line 178) | def _commit(self): method _submit (line 183) | def _submit(cls, cast_vote, *args, **kwargs): class ThingMock (line 188) | class ThingMock(): method _id (line 192) | def _id(self): class AccountMock (line 196) | class AccountMock(ThingMock): method _spam (line 198) | def _spam(self): method _commit (line 201) | def _commit(self, *a, **kw): class SubredditMock (line 205) | class SubredditMock(ThingMock): method lang (line 207) | def lang(self): method name (line 211) | def name(self): method spam_selfposts (line 215) | def spam_selfposts(self): method spam_links (line 219) | def spam_links(self): class TestSubmit (line 223) | class TestSubmit(unittest.TestCase): method setUp (line 224) | def setUp(self): method test_new_self_post_has_url (line 241) | def test_new_self_post_has_url(self): method test_new_self_post_doesnt_modify_links_by_url (line 253) | def test_new_self_post_doesnt_modify_links_by_url(self): method test_changing_non_promo_fails (line 266) | def test_changing_non_promo_fails(self): method test_changing_from_self_doesnt_remove_links_by_url (line 279) | def test_changing_from_self_doesnt_remove_links_by_url(self): method test_changing_url_adds_links_by_url (line 300) | def test_changing_url_adds_links_by_url(self): method test_changing_to_self_removes_links_by_url (line 321) | def test_changing_to_self_removes_links_by_url(self): FILE: r2/r2/tests/unit/models/promo_test.py class CollectionStorageTest (line 31) | class CollectionStorageTest(RedditTestCase): method setUp (line 33) | def setUp(self): method test_set_attributes (line 36) | def test_set_attributes(self): method test_set_over_18 (line 68) | def test_set_over_18(self): method test_set_is_spotlight (line 76) | def test_set_is_spotlight(self): class CollectionTest (line 85) | class CollectionTest(RedditTestCase): method test_is_spotlight_default (line 87) | def test_is_spotlight_default(self): class CollectionOrderTest (line 96) | class CollectionOrderTest(RedditTestCase): method setUp (line 104) | def setUp(self): method _assert_scenario (line 132) | def _assert_scenario(self, unordered_collections): method test_scenario_reversed (line 138) | def test_scenario_reversed(self): method test_scenario_semi_sorted (line 151) | def test_scenario_semi_sorted(self): method test_scenario_random (line 167) | def test_scenario_random(self): method test_scenario_casing (line 180) | def test_scenario_casing(self): FILE: r2/r2/tests/unit/models/subreddit_test.py class TestPermissionSet (line 35) | class TestPermissionSet(PermissionSet): class SRMemberTest (line 39) | class SRMemberTest(unittest.TestCase): method setUp (line 40) | def setUp(self): method test_get_permissions (line 47) | def test_get_permissions(self): method test_has_permission (line 54) | def test_has_permission(self): method test_update_permissions (line 66) | def test_update_permissions(self): method test_set_permissions (line 79) | def test_set_permissions(self): method test_is_superuser (line 83) | def test_is_superuser(self): class IsValidNameTest (line 91) | class IsValidNameTest(unittest.TestCase): method test_empty (line 92) | def test_empty(self): method test_short (line 95) | def test_short(self): method test_too_short (line 98) | def test_too_short(self): method test_long (line 101) | def test_long(self): method test_too_long (line 104) | def test_too_long(self): method test_underscore (line 107) | def test_underscore(self): method test_leading_underscore (line 110) | def test_leading_underscore(self): method test_capitals (line 113) | def test_capitals(self): method test_numerics (line 116) | def test_numerics(self): class ByNameTest (line 120) | class ByNameTest(unittest.TestCase): method setUp (line 121) | def setUp(self): method testSingleCached (line 131) | def testSingleCached(self): method testSingleFromDB (line 141) | def testSingleFromDB(self): method testSingleNotFound (line 152) | def testSingleNotFound(self): method testSingleInvalid (line 159) | def testSingleInvalid(self): method testMultiCached (line 166) | def testMultiCached(self): method testMultiCacheMissesAllExist (line 179) | def testMultiCacheMissesAllExist(self): method testMultiSomeDontExist (line 195) | def testMultiSomeDontExist(self): method testMultiSomeInvalid (line 207) | def testMultiSomeInvalid(self): method testForceUpdate (line 219) | def testForceUpdate(self): method testCacheNegativeResults (line 234) | def testCacheNegativeResults(self): method testExcludeNegativeLookups (line 248) | def testExcludeNegativeLookups(self): FILE: r2/r2/tests/unit/models/thing_test.py class SimpleThing (line 37) | class SimpleThing(Thing): class TestThingReadCaching (line 48) | class TestThingReadCaching(RedditTestCase): method setUp (line 49) | def setUp(self): method test_not_found (line 54) | def test_not_found(self): method test_partial_not_found (line 67) | def test_partial_not_found(self): method test_partial_not_found_ignore (line 82) | def test_partial_not_found_ignore(self): method test_cache_miss (line 96) | def test_cache_miss(self): method test_cache_hit (line 113) | def test_cache_hit(self): method test_partial_hit (line 128) | def test_partial_hit(self): method test_return_list (line 144) | def test_return_list(self): method test_single_not_found (line 160) | def test_single_not_found(self): method test_single_miss (line 173) | def test_single_miss(self): method test_single_hit (line 187) | def test_single_hit(self): class FakeLock (line 202) | class FakeLock(object): method __init__ (line 203) | def __init__(self): method acquire (line 206) | def acquire(self): method release (line 209) | def release(self): method __enter__ (line 212) | def __enter__(self): method __exit__ (line 215) | def __exit__(self, *args): class TestThingWrite (line 219) | class TestThingWrite(RedditTestCase): method setUp (line 220) | def setUp(self): method reset_mocks (line 232) | def reset_mocks(self): method test_create (line 239) | def test_create(self): method test_modify (line 254) | def test_modify(self): class TestThingIncr (line 277) | class TestThingIncr(RedditTestCase): method setUp (line 278) | def setUp(self): method reset_mocks (line 290) | def reset_mocks(self): method test_incr_base_prop (line 298) | def test_incr_base_prop(self, incr_thing_prop): method test_incr_data_prop (line 318) | def test_incr_data_prop(self, incr_thing_data): method test_incr_unset_data_prop (line 339) | def test_incr_unset_data_prop(self, set_thing_data): method test_incr_dirty (line 358) | def test_incr_dirty(self): class TestThingWriteConflict (line 375) | class TestThingWriteConflict(RedditTestCase): method setUp (line 376) | def setUp(self): method reset_mocks (line 387) | def reset_mocks(self): method test_dont_overwrite (line 394) | def test_dont_overwrite(self, get_things_from_cache): method test_lock_fail (line 428) | def test_lock_fail(self, get_read_modify_write_lock): method test_create_fail (line 449) | def test_create_fail(self, write_new_thing_to_db): method test_modify_fail (line 466) | def test_modify_fail(self, write_changes_to_db): FILE: r2/r2/tests/unit/models/user_message_builder_test.py class UserMessageBuilderTest (line 35) | class UserMessageBuilderTest(RedditTestCase): method setUp (line 36) | def setUp(self): method test_view_message_on_receiver_side_and_spam (line 41) | def test_view_message_on_receiver_side_and_spam(self): method test_view_message_on_receiver_side_and_del (line 53) | def test_view_message_on_receiver_side_and_del(self): method test_view_message_on_receiver_side (line 67) | def test_view_message_on_receiver_side(self): method test_view_message_on_sender_side_and_del (line 81) | def test_view_message_on_sender_side_and_del(self): method test_view_message_on_admin_and_del (line 95) | def test_view_message_on_admin_and_del(self): method mock_preparation (line 109) | def mock_preparation(self, is_admin=False): FILE: r2/r2/tests/unit/models/vote_test.py class TestVoteValidator (line 11) | class TestVoteValidator(RedditTestCase): method setUp (line 13) | def setUp(self): method cast_vote (line 20) | def cast_vote(self, **kw): method assert_vote_effects (line 31) | def assert_vote_effects( method test_upvote_effects (line 45) | def test_upvote_effects(self): method test_downvote_effects (line 52) | def test_downvote_effects(self): FILE: r2/r2/tests/unit/ratelimit_test.py class RateLimitStandaloneFunctionsTest (line 33) | class RateLimitStandaloneFunctionsTest(unittest.TestCase): method setUp (line 34) | def setUp(self): method patch (line 40) | def patch(self, *a, **kw): method test_get_timeslice (line 45) | def test_get_timeslice(self): method test_make_ratelimit_cache_key_1s (line 52) | def test_make_ratelimit_cache_key_1s(self): method test_make_ratelimit_cache_key_1m (line 58) | def test_make_ratelimit_cache_key_1m(self): method test_make_ratelimit_cache_key_1h (line 64) | def test_make_ratelimit_cache_key_1h(self): method test_make_ratelimit_cache_key_1d (line 70) | def test_make_ratelimit_cache_key_1d(self): method test_make_ratelimit_cache_key_1w (line 76) | def test_make_ratelimit_cache_key_1w(self): method test_record_usage (line 82) | def test_record_usage(self): method test_record_usage_across_slice_expiration (line 95) | def test_record_usage_across_slice_expiration(self): method test_get_usage (line 114) | def test_get_usage(self): class RateLimitTest (line 122) | class RateLimitTest(unittest.TestCase): class TestRateLimit (line 123) | class TestRateLimit(ratelimit.RateLimit): method setUp (line 130) | def setUp(self): method patch (line 136) | def patch(self, *a, **kw): method test_record_usage (line 141) | def test_record_usage(self): method test_get_usage (line 154) | def test_get_usage(self): class LiveConfigRateLimitTest (line 162) | class LiveConfigRateLimitTest(unittest.TestCase): class TestRateLimit (line 163) | class TestRateLimit(ratelimit.LiveConfigRateLimit): method patch_liveconfig (line 170) | def patch_liveconfig(self, k, v): method configure_rate_limit (line 180) | def configure_rate_limit(self, num, per_unit): method test_limit (line 184) | def test_limit(self): method test_seconds (line 192) | def test_seconds(self): FILE: r2/updateini.py function main (line 39) | def main(source_ini, update_ini): FILE: scripts/geoip_service.py function json_response (line 60) | def json_response(result): function get_record (line 68) | def get_record(ips): function get_organizations (line 85) | def get_organizations(ips): FILE: scripts/hashdist.py function parse_size (line 15) | def parse_size(s): class JobInputter (line 32) | class JobInputter(threading.Thread): method __init__ (line 36) | def __init__(self, job_name, popen, iq): method __repr__ (line 42) | def __repr__(self): method run (line 45) | def run(self): class JobOutputter (line 64) | class JobOutputter(threading.Thread): method __init__ (line 68) | def __init__(self, job_name, popen, out_fd, lock): method __repr__ (line 75) | def __repr__(self): method run (line 78) | def run(self): function hash_select (line 92) | def hash_select(key, choices): function main (line 96) | def main(): function _main (line 104) | def _main(): FILE: scripts/inject_test_data.py class TextGenerator (line 56) | class TextGenerator(object): method __init__ (line 59) | def __init__(self, order=8): method _in_groups (line 68) | def _in_groups(input_iterable, n): method add_sample (line 75) | def add_sample(self, sample): method generate (line 90) | def generate(self): function fetch_listing (line 114) | def fetch_listing(path, limit=1000, batch_size=100): class Modeler (line 149) | class Modeler(object): method __init__ (line 150) | def __init__(self): method model_subreddit (line 153) | def model_subreddit(self, subreddit_name): method generate_username (line 184) | def generate_username(self): class SubredditModel (line 189) | class SubredditModel(object): method __init__ (line 192) | def __init__(self, name, titles, selfposts, urls, comments, self_frequ... method generate_link_title (line 200) | def generate_link_title(self): method generate_link_url (line 204) | def generate_link_url(self): method generate_selfpost_body (line 216) | def generate_selfpost_body(self): method generate_comment_body (line 220) | def generate_comment_body(self): function fuzz_number (line 225) | def fuzz_number(number): function ensure_account (line 229) | def ensure_account(name): function ensure_subreddit (line 240) | def ensure_subreddit(name, author): function inject_test_data (line 259) | def inject_test_data(num_links=25, num_comments=25, num_votes=5): FILE: scripts/migrate/backfill/comment_scores_by_link.py function run (line 13) | def run(): FILE: scripts/migrate/backfill/fix_preview_images.py function good_preview_object (line 41) | def good_preview_object(preview_object): FILE: scripts/migrate/backfill/modaction_by_srandmod.py function backfill (line 26) | def backfill(after=None): function backfill_sr (line 36) | def backfill_sr(sr): FILE: scripts/migrate/backfill/msgtime_to_inbox_count.py function _keep (line 34) | def _keep(msg, account): FILE: scripts/migrate/backfill/num_gildings.py function update_num_gildings (line 35) | def update_num_gildings(update_trophy=True, user_id=None): FILE: scripts/migrate/backfill/scrub_deleted_users.py function get_queue_length (line 41) | def get_queue_length(name): function backfill_deleted_accounts (line 48) | def backfill_deleted_accounts(resume_id=None): FILE: scripts/migrate/backfill/srmember_to_cassandra.py function get_query (line 32) | def get_query(after_user_id): function get_srmembers (line 41) | def get_srmembers(after_user_id): function migrate_srmember_subscribers (line 66) | def migrate_srmember_subscribers(after_user_id=39566712): FILE: scripts/migrate/tuples_to_sstables.py function utf8 (line 19) | def utf8(val): function datetime (line 22) | def datetime(val): function convert_to_sstables (line 30) | def convert_to_sstables(input_files, column_family, function main (line 108) | def main(): FILE: scripts/migrate/udfs/src/com/reddit/pig/MAKE_FULLNAME.java class MAKE_FULLNAME (line 8) | public class MAKE_FULLNAME extends EvalFunc { method exec (line 9) | public String exec(Tuple input) throws IOException { method getTypeID (line 18) | private TypeID getTypeID(String thingName) { FILE: scripts/migrate/udfs/src/com/reddit/pig/MAKE_MAP.java class MAKE_MAP (line 12) | public class MAKE_MAP extends EvalFunc> { method exec (line 13) | public Map exec(Tuple input) throws IOException { FILE: scripts/migrate/udfs/src/com/reddit/pig/MAKE_ROWKEY.java class MAKE_ROWKEY (line 8) | public class MAKE_ROWKEY extends EvalFunc { method exec (line 9) | public String exec(Tuple input) throws IOException { method getQueryName (line 22) | private static String getQueryName(String rel, String name) { FILE: scripts/migrate/udfs/src/com/reddit/pig/MAKE_THING2_FULLNAME.java class MAKE_THING2_FULLNAME (line 8) | public class MAKE_THING2_FULLNAME extends MAKE_FULLNAME { method getTypeID (line 9) | private TypeID getTypeID(String rel) { FILE: scripts/migrate/udfs/src/com/reddit/pig/TO_36.java class TO_36 (line 9) | public class TO_36 extends EvalFunc { method exec (line 10) | public String exec(Tuple input) throws IOException { FILE: scripts/migrate/udfs/src/com/reddit/pig/TO_JSON.java class TO_JSON (line 9) | public class TO_JSON extends EvalFunc { method exec (line 10) | public String exec(Tuple input) throws IOException { FILE: scripts/migrate/udfs/src/com/reddit/pig/TypeID.java type TypeID (line 5) | enum TypeID { FILE: scripts/promoted_links.py function error_statistics (line 51) | def error_statistics(errors): function get_scheduled (line 61) | def get_scheduled(date, sr_name=''): function get_campaign_pageviews (line 82) | def get_campaign_pageviews(date, sr_name=''): function filter_campaigns (line 101) | def filter_campaigns(date, fullnames): function get_frontpage_pageviews (line 117) | def get_frontpage_pageviews(date): function compare_pageviews (line 128) | def compare_pageviews(daysago=0, verbose=False): function select_subset (line 202) | def select_subset(n, weighted=False): function pick (line 221) | def pick(subset, weighted=False): function benchmark (line 230) | def benchmark(subsets=1440, picks=6945, weighted_subset=False, FILE: scripts/tracker.py class ApplicationConfig (line 60) | class ApplicationConfig(object): method __init__ (line 67) | def __init__(self): method get (line 74) | def get(self, section, key): method to_config (line 85) | def to_config(self): function healthcheck (line 98) | def healthcheck(): function click_redirect (line 103) | def click_redirect(): function event_redirect (line 125) | def event_redirect(): function event_click (line 140) | def event_click(): function _fix_query_encoding (line 174) | def _fix_query_encoding(parse_result): function _redirect_nocache (line 182) | def _redirect_nocache(destination): function constant_time_compare (line 193) | def constant_time_compare(actual, expected): FILE: scripts/traffic/decrypt_userinfo.c type InputField (line 15) | enum InputField { function main (line 24) | int main(int argc, char** argv) FILE: scripts/traffic/parse.c function main (line 35) | int main(int argc, char** argv) FILE: scripts/traffic/utils.c function split_fields (line 7) | void split_fields(char *line, ...) function url_decode (line 27) | int url_decode(char* buffer) function parse_query_param (line 56) | int parse_query_param(char** query, char** key, char** value) FILE: scripts/traffic/verify.c function main (line 15) | int main(int argc, char** argv) FILE: scripts/upload_static_files_to_s3.py function upload (line 36) | def upload(static_root, bucket_url): function s3_url (line 79) | def s3_url(text): function main (line 88) | def main():