id int64 0 458k | file_name stringlengths 4 119 | file_path stringlengths 14 227 | content stringlengths 24 9.96M | size int64 24 9.96M | language stringclasses 1
value | extension stringclasses 14
values | total_lines int64 1 219k | avg_line_length float64 2.52 4.63M | max_line_length int64 5 9.91M | alphanum_fraction float64 0 1 | repo_name stringlengths 7 101 | repo_stars int64 100 139k | repo_forks int64 0 26.4k | repo_open_issues int64 0 2.27k | repo_license stringclasses 12
values | repo_extraction_date stringclasses 433
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
33,800 | encoding.py | nylas_sync-engine/inbox/util/encoding.py | def base36encode(number):
if not isinstance(number, (int, long)):
raise TypeError('number must be an integer')
if number < 0:
raise ValueError('number must be positive')
alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
base36 = ''
while number:
number, i = divmod(number, 3... | 741 | Python | .py | 21 | 29.571429 | 77 | 0.673212 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,801 | __init__.py | nylas_sync-engine/inbox/util/__init__.py | """ Non-server-specific utility modules. These shouldn't depend on any code
from the inbox module tree!
Don't add new code here! Find the relevant submodule, or use misc.py if
there's really no other place.
"""
# Allow out-of-tree submodules.
from pkgutil import extend_path
__path__ = extend_path(__path__,... | 331 | Python | .py | 8 | 38.75 | 75 | 0.723602 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,802 | html.py | nylas_sync-engine/inbox/util/html.py | # -*- coding: utf-8 -*-
import re
import cgi
import htmlentitydefs
from HTMLParser import HTMLParser, HTMLParseError
from nylas.logging import get_logger
# http://stackoverflow.com/questions/753052/strip-html-from-strings-in-python
class HTMLTagStripper(HTMLParser):
strippedTags = ["title", "script", "style"]
... | 2,965 | Python | .py | 82 | 27.158537 | 163 | 0.542379 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,803 | addr.py | nylas_sync-engine/inbox/util/addr.py | import rfc822
from flanker.addresslib import address
from flanker.mime.message.headers.parsing import normalize
from flanker.mime.message.headers.encodedword import decode
def valid_email(email_address):
parsed = address.parse(email_address, addr_spec_only=True)
if isinstance(parsed, address.EmailAddress):
... | 2,047 | Python | .py | 40 | 46.1 | 77 | 0.725 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,804 | debug.py | nylas_sync-engine/inbox/util/debug.py | """Utilities for debugging failures in development/staging."""
from functools import wraps
from pyinstrument import Profiler
import signal
def profile(func):
@wraps(func)
def wrapper(*args, **kwargs):
profiler = Profiler()
profiler.start()
r = func(*args, **kwargs)
profiler.sto... | 1,500 | Python | .py | 34 | 38.5 | 79 | 0.704187 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,805 | sharding.py | nylas_sync-engine/inbox/util/sharding.py | import random
from inbox.config import config
from inbox.ignition import engine_manager
def get_shards():
return engine_manager.engines.keys()
def get_open_shards():
# Can't use engine_manager.engines here because it does not track
# shard state (open/ closed)
database_hosts = config.get_required(... | 1,346 | Python | .py | 36 | 30.75 | 77 | 0.654854 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,806 | threading.py | nylas_sync-engine/inbox/util/threading.py | # -*- coding: utf-8 -*-
from inbox.models.thread import Thread
from sqlalchemy import desc
from sqlalchemy.orm import joinedload, load_only
from inbox.util.misc import cleanup_subject
MAX_THREAD_LENGTH = 500
def fetch_corresponding_thread(db_session, namespace_id, message):
"""fetch a thread matching the corres... | 2,920 | Python | .py | 57 | 38.596491 | 76 | 0.587658 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,807 | stats.py | nylas_sync-engine/inbox/util/stats.py | import statsd
from inbox.config import config
def get_statsd_client():
return statsd.StatsClient(
str(config.get("STATSD_HOST", "localhost")),
config.get("STATSD_PORT", 8125),
prefix=config.get("STATSD_PREFIX", "stats"))
statsd_client = get_statsd_client()
| 289 | Python | .py | 8 | 31.125 | 52 | 0.696751 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,808 | misc.py | nylas_sync-engine/inbox/util/misc.py | import sys
import pkgutil
import time
import re
from datetime import datetime
from email.utils import parsedate_tz, mktime_tz
from nylas.logging import get_logger
from inbox.providers import providers
class DummyContextManager(object):
def __enter__(self):
return None
def __exit__(self, exc_type, ... | 6,260 | Python | .py | 167 | 30.60479 | 85 | 0.639032 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,809 | itert.py | nylas_sync-engine/inbox/util/itert.py | import itertools
def chunk(iterable, size):
""" Yield chunks of an iterable.
If len(iterable) is not evenly divisible by size, the last chunk will
be shorter than size.
"""
it = iter(iterable)
while True:
group = tuple(itertools.islice(it, None, size))
if not group:
... | 820 | Python | .py | 24 | 27.625 | 77 | 0.639136 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,810 | concurrency.py | nylas_sync-engine/inbox/util/concurrency.py | import sys
import functools
import random
import gevent
from backports import ssl
from gevent import socket
from redis import TimeoutError
import _mysql_exceptions
from sqlalchemy.exc import StatementError
from inbox.models import Account
from inbox.models.session import session_scope
from nylas.logging import get_l... | 5,008 | Python | .py | 115 | 33.486957 | 102 | 0.638119 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,811 | base.py | nylas_sync-engine/inbox/search/base.py | def get_search_client(account):
from inbox.search.backends import module_registry
search_mod = module_registry.get(account.provider)
search_cls = getattr(search_mod, search_mod.SEARCH_CLS)
search_client = search_cls(account)
return search_client
class SearchBackendException(Exception):
"""Rai... | 1,010 | Python | .py | 22 | 39.727273 | 78 | 0.705703 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,812 | imap.py | nylas_sync-engine/inbox/search/backends/imap.py | from nylas.logging import get_logger
from inbox.crispin import CrispinClient, FolderMissingError
from inbox.providers import provider_info
from inbox.basicauth import NotSupportedError
from inbox.models import Message, Folder, Account, Thread
from inbox.models.session import session_scope
from inbox.models.backends.ima... | 7,223 | Python | .py | 151 | 33.589404 | 80 | 0.566899 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,813 | gmail.py | nylas_sync-engine/inbox/search/backends/gmail.py | import requests
from sqlalchemy import desc
from inbox.basicauth import OAuthError
from inbox.search.base import SearchBackendException
from inbox.auth.oauth import OAuthRequestsWrapper
from inbox.models import Message, Thread, Account
from inbox.models.backends.gmail import g_token_manager
from nylas.logging import ge... | 5,314 | Python | .py | 113 | 35.238938 | 91 | 0.60058 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,814 | generic.py | nylas_sync-engine/inbox/search/backends/generic.py | from inbox.search.backends.imap import IMAPSearchClient
__all__ = ['IMAPSearchClient']
PROVIDER = 'generic'
SEARCH_CLS = 'IMAPSearchClient'
| 142 | Python | .py | 4 | 34 | 55 | 0.794118 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,815 | __init__.py | nylas_sync-engine/inbox/search/backends/__init__.py | # Allow out-of-tree backend submodules.
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
from inbox.util.misc import register_backends
module_registry = register_backends(__name__, __path__)
| 217 | Python | .py | 5 | 42.4 | 55 | 0.740566 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,816 | message.py | nylas_sync-engine/inbox/sendmail/message.py | """
When sending mail, Nylas tries to be a good citizen to the modern world.
This means everything we send is either ASCII or UTF-8.
That means no Latin-1 or ISO-8859-1.
All headers are converted to ASCII and if that doesn't work, UTF-8.
Note that plain text that's UTF-8 will be sent as base64. i.e.:
Content-Type: te... | 8,654 | Python | .py | 194 | 37.046392 | 79 | 0.660884 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,817 | gmail.py | nylas_sync-engine/inbox/sendmail/gmail.py | from inbox.sendmail.smtp.postel import SMTPClient
__all__ = ['SMTPClient']
PROVIDER = 'gmail'
SENDMAIL_CLS = 'SMTPClient'
| 124 | Python | .py | 4 | 29.5 | 49 | 0.762712 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,818 | generic.py | nylas_sync-engine/inbox/sendmail/generic.py | from inbox.sendmail.smtp.postel import SMTPClient
__all__ = ['SMTPClient']
PROVIDER = 'generic'
SENDMAIL_CLS = 'SMTPClient'
| 126 | Python | .py | 4 | 30 | 49 | 0.766667 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,819 | __init__.py | nylas_sync-engine/inbox/sendmail/__init__.py | """
Per-provider backend modules for sending mail.
A backend module *must* meet the following requirements:
1. Specify the provider it implements as the module-level `PROVIDER` variable.
For example, 'gmail', 'eas' etc.
2. Specify the name of the sendmail class as the module-level
`SENDMAIL_CLS` variable.
"""
# All... | 532 | Python | .py | 13 | 39.615385 | 78 | 0.765049 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,820 | base.py | nylas_sync-engine/inbox/sendmail/base.py | import pkg_resources
from datetime import datetime
import re
from inbox.api.validation import (
get_recipients, get_attachments, get_thread, get_message)
from inbox.api.err import InputError
from inbox.contacts.process_mail import update_contacts_from_message
from inbox.models import Message, Part
from inbox.model... | 13,544 | Python | .py | 297 | 36.383838 | 86 | 0.6397 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,821 | util.py | nylas_sync-engine/inbox/sendmail/smtp/util.py | SMTP_ERRORS = {
421: {
"4.4.5": (503, "Server busy, try again later."),
"4.7.0": (429, "Our system has detected an unusual rate of unsolicited "
"mail originating from your IP address. To protect our "
"users from spam, mail sent from your IP address has... | 3,255 | Python | .py | 72 | 35.069444 | 82 | 0.549513 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,822 | postel.py | nylas_sync-engine/inbox/sendmail/smtp/postel.py | import re
import ssl
import base64
import socket
import itertools
import smtplib
from nylas.logging import get_logger
log = get_logger()
from inbox.models.session import session_scope
from inbox.models.backends.imap import ImapAccount
from inbox.models.backends.oauth import token_manager as default_token_manager
from... | 19,780 | Python | .py | 431 | 33.549884 | 105 | 0.594387 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,823 | contact-search-service | nylas_sync-engine/bin/contact-search-service | #!/usr/bin/env python
""" Start the contact search indexing service. """
import os
from setproctitle import setproctitle
import click
import gevent_openssl
gevent_openssl.monkey_patch()
from gevent import monkey
from inbox.config import config as inbox_config
from inbox.util.startup import preflight
from nylas.loggi... | 1,577 | Python | .tac | 39 | 35.333333 | 80 | 0.716721 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,824 | contact-search-backfill | nylas_sync-engine/bin/contact-search-backfill | #!/usr/bin/env python
import click
from gevent import monkey
monkey.patch_all()
import gevent_openssl
gevent_openssl.monkey_patch()
from inbox.contacts.search import index_namespace
from nylas.logging import get_logger, configure_logging
configure_logging()
log = get_logger()
@click.command()
@click.argument('name... | 654 | Python | .tac | 22 | 26 | 60 | 0.7232 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,825 | contact-search-delete-index | nylas_sync-engine/bin/contact-search-delete-index | #!/usr/bin/env python
import click
from inbox.contacts.search import delete_namespace_indexes as delete_indexes
from nylas.logging import get_logger, configure_logging
configure_logging()
log = get_logger()
@click.command()
@click.argument('namespace_ids')
def delete_namespace_indexes(namespace_ids):
"""
De... | 495 | Python | .tac | 15 | 30.2 | 77 | 0.756871 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,826 | check-attachments | nylas_sync-engine/bin/check-attachments | #!/usr/bin/env python
# Check that we can fetch attachments for 99.9% of our syncing accounts.
from gevent import monkey
monkey.patch_all()
import datetime
import click
import gevent
from gevent.pool import Pool
import traceback
from collections import defaultdict
from inbox.models import Account, Block
from inbox.cr... | 2,725 | Python | .tac | 69 | 30.942029 | 80 | 0.635017 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,827 | 237_add_new_contacts_index.py | nylas_sync-engine/migrations/versions/237_add_new_contacts_index.py | """Add new contacts Index
Revision ID: 780b1dabd51
Revises: 3eb4f30c8ed3
Create Date: 2017-02-09 01:50:33.546883
"""
# revision identifiers, used by Alembic.
revision = '780b1dabd51'
down_revision = '3eb4f30c8ed3'
from alembic import op
from sqlalchemy.sql import text
def upgrade():
conn = op.get_bind()
c... | 592 | Python | .tac | 18 | 28.111111 | 84 | 0.701413 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,828 | 075_drop_contacts_search_signals.py | nylas_sync-engine/migrations/versions/075_drop_contacts_search_signals.py | """drop contacts search signals
Revision ID: 1763103db266
Revises: 3c02d8204335
Create Date: 2014-08-07 04:50:58.382371
"""
# revision identifiers, used by Alembic.
revision = '1763103db266'
down_revision = '3c02d8204335'
from alembic import op
def upgrade():
op.drop_table('searchsignal')
op.drop_table('s... | 391 | Python | .tac | 14 | 25.5 | 40 | 0.772358 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,829 | 101_add_namespace_to_contacts.py | nylas_sync-engine/migrations/versions/101_add_namespace_to_contacts.py | """add_namespace_to_contacts
Revision ID: 3bb01fcc755e
Revises:5a68ac0e3e9
Create Date: 2014-09-22 02:33:53.301883
"""
# revision identifiers, used by Alembic.
revision = '3bb01fcc755e'
down_revision = '5a68ac0e3e9'
from alembic import op
from sqlalchemy.sql import text
def upgrade():
conn = op.get_bind()
... | 965 | Python | .tac | 29 | 26.827586 | 81 | 0.667387 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,830 | 234_change_contact_uid_collation.py | nylas_sync-engine/migrations/versions/234_change_contact_uid_collation.py | """Make Contact.uid collation case sensitive
Revision ID: 53e6a7446c45
Revises: 569ebe8e383d
Create Date: 2016-10-07 22:51:31.495243
"""
# revision identifiers, used by Alembic.
revision = '53e6a7446c45'
down_revision = '569ebe8e383d'
from alembic import op
from sqlalchemy.sql import text
def upgrade():
conn ... | 583 | Python | .tac | 16 | 33.9375 | 104 | 0.77102 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,831 | 231_drop_contact_foreign_keys.py | nylas_sync-engine/migrations/versions/231_drop_contact_foreign_keys.py | """Drop Contact foreign keys
Revision ID: c48fc8dea1b
Revises: 23ff7f0b506d
Create Date: 2016-09-13 17:29:27.783566
"""
# revision identifiers, used by Alembic.
revision = 'c48fc8dea1b'
down_revision = '4265dc58eec6'
from alembic import op
from sqlalchemy.sql import text
def upgrade():
conn = op.get_bind()
... | 1,289 | Python | .tac | 29 | 35.103448 | 76 | 0.650641 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,832 | 126_add_account_sync_contacts_events.py | nylas_sync-engine/migrations/versions/126_add_account_sync_contacts_events.py | """Add the [_]sync_{contacts|events} cols to the Account tbl.
Revision ID: 262436681c4
Revises: 955792afd00
Create Date: 2014-12-19 13:33:19.653113
"""
# revision identifiers, used by Alembic.
revision = '262436681c4'
down_revision = '955792afd00'
from alembic import op
import sqlalchemy as sa
def upgrade():
... | 1,490 | Python | .tac | 42 | 23.928571 | 77 | 0.542738 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,833 | 141_remote_remote_contacts.py | nylas_sync-engine/migrations/versions/141_remote_remote_contacts.py | """Remove notion of 'remote' contact and drop contact 'source' column
Revision ID: 3ab34bc85c8d
Revises: 3f01a3f1b4cc
Create Date: 2015-02-16 16:03:45.288539
"""
# revision identifiers, used by Alembic.
revision = '3ab34bc85c8d'
down_revision = '3f01a3f1b4cc'
from alembic import op
from sqlalchemy.ext.declarative i... | 1,035 | Python | .tac | 25 | 37.56 | 77 | 0.744745 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,834 | 139_add_ns_index_to_contact_and_event.py | nylas_sync-engine/migrations/versions/139_add_ns_index_to_contact_and_event.py | """Add compound index to Contact and Event
Revision ID: 1fd7b3e0b662
Revises: 5305d4ae30b4
Create Date: 2015-02-17 18:11:30.726188
"""
# revision identifiers, used by Alembic.
revision = '1fd7b3e0b662'
down_revision = '5305d4ae30b4'
from alembic import op
def upgrade():
op.create_index(
'ix_contact_ns... | 624 | Python | .tac | 20 | 26.75 | 63 | 0.684034 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,835 | 010_store_raw_contact_data.py | nylas_sync-engine/migrations/versions/010_store_raw_contact_data.py | """Store raw contact data.
Revision ID: 3b511977a01f
Revises: 169cac0cd87e
Create Date: 2014-04-16 15:36:22.188971
"""
# revision identifiers, used by Alembic.
revision = '3b511977a01f'
down_revision = '169cac0cd87e'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('contact', sa.Col... | 424 | Python | .tac | 14 | 28.142857 | 77 | 0.756219 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,836 | 207_add_contact_search_index_service_cursor_.py | nylas_sync-engine/migrations/versions/207_add_contact_search_index_service_cursor_.py | """add contact search index service cursor pointer table
Revision ID: 4b225df49747
Revises: gu8eqpm6f2x1n0fg
Create Date: 2015-09-30 14:47:42.028763
"""
# revision identifiers, used by Alembic.
revision = '4b225df49747'
down_revision = 'gu8eqpm6f2x1n0fg'
from alembic import op
import sqlalchemy as sa
from sqlalchem... | 2,428 | Python | .tac | 44 | 42.272727 | 119 | 0.617003 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,837 | 018_message_contact_association.py | nylas_sync-engine/migrations/versions/018_message_contact_association.py | """message contact association
Revision ID: 223041bb858b
Revises: 2c9f3a06de09
Create Date: 2014-04-28 23:52:05.449401
"""
# revision identifiers, used by Alembic.
revision = '223041bb858b'
down_revision = '2c9f3a06de09'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table(
'... | 1,215 | Python | .tac | 32 | 32.28125 | 73 | 0.674339 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,838 | 009_multiple_contact_providers.py | nylas_sync-engine/migrations/versions/009_multiple_contact_providers.py | """multiple contact providers
Revision ID: 169cac0cd87e
Revises: 3c11391b5eb0
Create Date: 2014-03-28 19:16:15.450474
"""
# revision identifiers, used by Alembic.
revision = '169cac0cd87e'
down_revision = '3c11391b5eb0'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('contact', sa.... | 1,333 | Python | .tac | 28 | 36.571429 | 79 | 0.592907 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,839 | 178_add_reply_to_messagecontactassociation.py | nylas_sync-engine/migrations/versions/178_add_reply_to_messagecontactassociation.py | """Add reply_to to MessageContactAssociation
Revision ID: 41f957b595fc
Revises: 2b9dd6f7593a
Create Date: 2015-03-18 17:46:01.393708
"""
# revision identifiers, used by Alembic.
revision = '41f957b595fc'
down_revision = '2b9dd6f7593a'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.alter_colu... | 958 | Python | .tac | 22 | 31.272727 | 76 | 0.548491 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,840 | 014_contact_ranking_signals.py | nylas_sync-engine/migrations/versions/014_contact_ranking_signals.py | """contact ranking signals
Revision ID: 563d405d1f99
Revises: 169cac0cd87e
Create Date: 2014-04-17 19:32:37.715207
"""
# revision identifiers, used by Alembic.
revision = '563d405d1f99'
down_revision = 'f7dbd9bf4a6'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table(
'search... | 899 | Python | .tac | 25 | 30.32 | 77 | 0.665127 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,841 | 085_add_attachment_tag.py | nylas_sync-engine/migrations/versions/085_add_attachment_tag.py | """add attachment tag
Revision ID: 294200d809c8
Revises:10db12da2005
Create Date: 2014-08-22 20:15:59.937498
"""
# revision identifiers, used by Alembic.
revision = '294200d809c8'
down_revision = '10db12da2005'
from alembic import op
from sqlalchemy.sql import text
def upgrade():
from inbox.models.session imp... | 2,178 | Python | .tac | 50 | 36.1 | 81 | 0.657521 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,842 | raw_message_with_filename_attachment | nylas_sync-engine/tests/data/raw_message_with_filename_attachment | MIME-Version: 1.0
From: <inboxapptest.french@gmail.com>
To: <inboxapptest.french@gmail.com>
Message-ID: <etPan.54a04110.46e87ccd.6dd7@air.blah.blah>
Subject: Entretien d'embauche
X-Mailer: Airmail (284)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="54a04110_507ed7ab_6dd7"
--54a04110_507ed7ab_6dd7
Content-... | 1,359 | Python | .tac | 33 | 39.818182 | 74 | 0.804711 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,843 | raw_message_with_name_attachment | nylas_sync-engine/tests/data/raw_message_with_name_attachment | MIME-Version: 1.0
From: <inboxapptest.french@gmail.com>
To: <inboxapptest.french@gmail.com>
Message-ID: <etPan.54a04110.46e87ccd.6dd7@air.blah.blah>
Subject: Entretien d'embauche
X-Mailer: Airmail (284)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="54a04110_507ed7ab_6dd7"
--54a04110_507ed7ab_6dd7
Content-... | 1,353 | Python | .tac | 32 | 40.96875 | 104 | 0.804729 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,844 | raw_message_with_inline_attachment | nylas_sync-engine/tests/data/raw_message_with_inline_attachment | From: Karim Hamidou <inboxapptest.french@gmail.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_E8277AD7-1E39-4BB2-9864-E1817A7092D5"
Subject: Angie
Message-Id: <A9576837-E0E3-4B65-BCC2-6CD8EDBC1794@test.example.com>
Date: Fri, 14 Aug 2015 16:43:50 +0200
To: "InboxApp, Inc." <inboxapptest.french@gmail.co... | 2,087 | Python | .tac | 37 | 54.918919 | 476 | 0.797549 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,845 | raw_message_with_bad_attachment | nylas_sync-engine/tests/data/raw_message_with_bad_attachment | From: Ben Bitdiddle <ben@example.com>
To: Helena Handbasket <helena@example.com>
Subject: The Monsters of MIME
Date: Thu, 30 Apr 2015 16:55:12 +0000
Content-Type: multipart/related; boundary="_004_143041291414210227nylascom_";
type="multipart/alternative"
MIME-Version: 1.0
--_004_143041291414210227nylascom_
Content-... | 1,778 | Python | .tac | 35 | 49.428571 | 77 | 0.919262 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,846 | test_contacts.py | nylas_sync-engine/tests/api/test_contacts.py | from inbox.models import Contact
from tests.util.base import contact_sync, contacts_provider
from tests.api.base import api_client
__all__ = ['contacts_provider', 'contact_sync', 'api_client']
def test_api_list(contacts_provider, contact_sync, db, api_client,
default_namespace):
contacts_provid... | 2,036 | Python | .tac | 42 | 39.119048 | 68 | 0.649646 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,847 | raw_message_with_inline_attachment.txt | nylas_sync-engine/inbox/test/data/raw_message_with_inline_attachment.txt | From: Karim Hamidou <inboxapptest.french@gmail.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_E8277AD7-1E39-4BB2-9864-E1817A7092D5"
Subject: Angie
Message-Id: <A9576837-E0E3-4B65-BCC2-6CD8EDBC1794@test.example.com>
Date: Fri, 14 Aug 2015 16:43:50 +0200
To: "InboxApp, Inc." <inboxapptest.french@gmail.co... | 2,087 | Python | .tac | 37 | 54.918919 | 476 | 0.797549 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,848 | raw_message_with_filename_attachment.txt | nylas_sync-engine/inbox/test/data/raw_message_with_filename_attachment.txt | MIME-Version: 1.0
From: <inboxapptest.french@gmail.com>
To: <inboxapptest.french@gmail.com>
Message-ID: <etPan.54a04110.46e87ccd.6dd7@air.blah.blah>
Subject: Entretien d'embauche
X-Mailer: Airmail (284)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="54a04110_507ed7ab_6dd7"
--54a04110_507ed7ab_6dd7
Content-... | 1,359 | Python | .tac | 33 | 39.818182 | 74 | 0.804711 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,849 | raw_message_with_name_attachment.txt | nylas_sync-engine/inbox/test/data/raw_message_with_name_attachment.txt | MIME-Version: 1.0
From: <inboxapptest.french@gmail.com>
To: <inboxapptest.french@gmail.com>
Message-ID: <etPan.54a04110.46e87ccd.6dd7@air.blah.blah>
Subject: Entretien d'embauche
X-Mailer: Airmail (284)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="54a04110_507ed7ab_6dd7"
--54a04110_507ed7ab_6dd7
Content-... | 1,353 | Python | .tac | 32 | 40.96875 | 104 | 0.804729 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,850 | raw_message_with_bad_attachment.txt | nylas_sync-engine/inbox/test/data/raw_message_with_bad_attachment.txt | From: Ben Bitdiddle <ben@example.com>
To: Helena Handbasket <helena@example.com>
Subject: The Monsters of MIME
Date: Thu, 30 Apr 2015 16:55:12 +0000
Content-Type: multipart/related; boundary="_004_143041291414210227nylascom_";
type="multipart/alternative"
MIME-Version: 1.0
--_004_143041291414210227nylascom_
Content-... | 1,778 | Python | .tac | 35 | 49.428571 | 77 | 0.919262 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,851 | test_contacts.py | nylas_sync-engine/inbox/test/api/test_contacts.py | from inbox.models import Contact
from inbox.test.util.base import contact_sync, contacts_provider
from inbox.test.api.base import api_client
__all__ = ['contacts_provider', 'contact_sync', 'api_client']
def test_api_list(contacts_provider, contact_sync, db, api_client,
default_namespace):
conta... | 2,046 | Python | .tac | 42 | 39.357143 | 68 | 0.650402 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,852 | contact.py | nylas_sync-engine/inbox/models/contact.py | from sqlalchemy import Column, Integer, String, Enum, Text, Index, BigInteger, \
ForeignKey
from sqlalchemy.orm import relationship, backref, validates
from sqlalchemy.schema import UniqueConstraint
from inbox.sqlalchemy_ext.util import MAX_TEXT_CHARS
from inbox.models.mixins import (HasPublicID, HasEmailAddress, ... | 4,414 | Python | .tac | 90 | 40.9 | 81 | 0.669998 | nylas/sync-engine | 3,502 | 354 | 69 | AGPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,853 | setup.py | autokey_autokey/setup.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... | 8,170 | Python | .py | 176 | 37.8125 | 130 | 0.633776 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,854 | extractDoc.py | autokey_autokey/extractDoc.py | # -*- coding: utf-8 -*-
# Copyright (C) 2008 Chris Dekter
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This pro... | 1,592 | Python | .py | 33 | 38.848485 | 92 | 0.636485 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,855 | copyright | autokey_autokey/debian/copyright | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: autokey
Source: https://github.com/autokey/autokey
Files: *
Copyright: © 2008 Sam Peterson <peabodyenator@gmail.com>
© 2008-2012 Chris Dekter <cdekter@gmail.com>
© 2014-2016 GuoCi <guociz@gmail.com>
... | 2,309 | Python | .py | 52 | 40.807692 | 74 | 0.75412 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,856 | dbus_service.py | autokey_autokey/lib/autokey/dbus_service.py | # Copyright (C) 2011 Chris Dekter
# Copyright (C) 2019 Thomas Hess <thomas.hess@udo.edu>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) a... | 2,278 | Python | .py | 42 | 49.404762 | 98 | 0.718848 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,857 | qtapp.py | autokey_autokey/lib/autokey/qtapp.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any late... | 11,627 | Python | .py | 269 | 35.35316 | 149 | 0.671473 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,858 | interface.py | autokey_autokey/lib/autokey/interface.py | # -*- coding: utf-8 -*-
# Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This pr... | 58,537 | Python | .py | 1,215 | 35.717695 | 141 | 0.597718 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,859 | macro.py | autokey_autokey/lib/autokey/macro.py | import datetime
from abc import abstractmethod
import shlex
from autokey.model.key import Key, KEY_SPLIT_RE
from autokey import common
if common.USING_QT:
from PyQt5.QtWidgets import QAction
def _(text: str, args: tuple=None):
"""localisation function, currently returns the identity. If args are giv... | 7,798 | Python | .py | 201 | 30.776119 | 109 | 0.611362 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,860 | monitor.py | autokey_autokey/lib/autokey/monitor.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any late... | 4,382 | Python | .py | 106 | 32.207547 | 87 | 0.637576 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,861 | logger.py | autokey_autokey/lib/autokey/logger.py | # Copyright (C) 2018-2019 Thomas Hess <thomas.hess@udo.edu>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This pro... | 2,293 | Python | .py | 49 | 42.734694 | 104 | 0.744385 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,862 | argument_parser.py | autokey_autokey/lib/autokey/argument_parser.py | # Copyright (C) 2018 Thomas Hess <thomas.hess@udo.edu>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program ... | 2,703 | Python | .py | 67 | 35.208955 | 116 | 0.691692 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,863 | service.py | autokey_autokey/lib/autokey/service.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any late... | 22,220 | Python | .py | 474 | 36.392405 | 179 | 0.625797 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,864 | UI_common_functions.py | autokey_autokey/lib/autokey/UI_common_functions.py | import dbus
import importlib
import os.path
from shutil import which
import re
import subprocess
import sys
import time
from . import common
import autokey.model.helpers
logger = __import__("autokey.logger").logger.get_logger(__name__)
common_modules = ['argparse', 'collections', 'enum', 'faulthandler',
... | 8,244 | Python | .py | 193 | 36.414508 | 146 | 0.685347 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,865 | common.py | autokey_autokey/lib/autokey/common.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any late... | 2,059 | Python | .py | 45 | 44.555556 | 85 | 0.751122 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,866 | gtkapp.py | autokey_autokey/lib/autokey/gtkapp.py | # -*- coding: utf-8 -*-
# Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This pr... | 9,543 | Python | .py | 226 | 34.159292 | 153 | 0.670228 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,867 | configmanager_constants.py | autokey_autokey/lib/autokey/configmanager/configmanager_constants.py | # Copyright (C) 2011 Chris Dekter
# Copyright (C) 2018 Thomas Hess <thomas.hess@udo.edu>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) a... | 1,960 | Python | .py | 44 | 43.340909 | 70 | 0.793917 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,868 | version_upgrading.py | autokey_autokey/lib/autokey/configmanager/version_upgrading.py | # Copyright (C) 2011 Chris Dekter
# Copyright (C) 2018 Thomas Hess <thomas.hess@udo.edu>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) a... | 8,403 | Python | .py | 160 | 47.01875 | 120 | 0.726076 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,869 | configmanager.py | autokey_autokey/lib/autokey/configmanager/configmanager.py | # -*- coding: utf-8 -*-
# Copyright (C) 2011 Chris Dekter
# Copyright (C) 2018 Thomas Hess <thomas.hess@udo.edu>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Licens... | 31,178 | Python | .py | 668 | 35.565868 | 121 | 0.625762 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,870 | autostart.py | autokey_autokey/lib/autokey/configmanager/autostart.py | # Copyright (C) 2018 Thomas Hess <thomas.hess@udo.edu>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program ... | 6,245 | Python | .py | 114 | 48.22807 | 121 | 0.701573 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,871 | predefined_user_files.py | autokey_autokey/lib/autokey/configmanager/predefined_user_files.py | # Copyright (C) 2011 Chris Dekter
# Copyright (C) 2018 Thomas Hess <thomas.hess@udo.edu>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) a... | 7,442 | Python | .py | 194 | 32.283505 | 119 | 0.675758 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,872 | create_phrase_from_selection.pyi | autokey_autokey/lib/autokey/configmanager/predefined_user_scripts/create_phrase_from_selection.pyi | # Create a new phrase from the currently selected text, without having any abbreviation or hotkey assigned.
contents = clipboard.get_selection()
if len(contents) > 20:
# The title is abbreviated, if it is longer than 20 characters
title = contents[0:19] + "…"
else:
title = contents
folder = engine.get_fol... | 430 | Python | .py | 9 | 45.444444 | 107 | 0.750594 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,873 | display_window_info.pyi | autokey_autokey/lib/autokey/configmanager/predefined_user_scripts/display_window_info.pyi | # Displays the information of the next window to be left-clicked
import time
mouse.wait_for_click(5)
time.sleep(0.2)
window_title = window.get_active_title()
window_class = window.get_active_class()
dialog.info_dialog(
"Window information",
"Active window information:\nTitle: '{}'\nClass: '{}'".format(window_t... | 342 | Python | .py | 10 | 32.3 | 93 | 0.752266 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,874 | selection_test.pyi | autokey_autokey/lib/autokey/configmanager/predefined_user_scripts/selection_test.pyi | text = clipboard.get_selection()
keyboard.send_key("<delete>")
keyboard.send_keys("The text {} was here previously".format(text))
| 130 | Python | .py | 3 | 42.333333 | 66 | 0.755906 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,875 | list_menu.pyi | autokey_autokey/lib/autokey/configmanager/predefined_user_scripts/list_menu.pyi | choices = ["something", "something else", "a third thing"]
return_code, choice = dialog.list_menu(choices)
if not return_code: # return code is 0 (thus false) on success.
keyboard.send_keys("You chose " + choice)
| 219 | Python | .py | 4 | 52.5 | 64 | 0.714953 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,876 | new_abbreviation_from_selection.pyi | autokey_autokey/lib/autokey/configmanager/predefined_user_scripts/new_abbreviation_from_selection.pyi | # Create a new Phrase from the current text selection. Ask for an abbreviation and then create a new Phrase having
# this abbreviation assigned.
import time
time.sleep(0.25)
contents = clipboard.get_selection()
return_code, abbreviation = dialog.input_dialog("New Abbreviation", "Choose an abbreviation for the new phras... | 605 | Python | .py | 13 | 43.076923 | 114 | 0.736486 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,877 | popupmenu.py | autokey_autokey/lib/autokey/gtkui/popupmenu.py | # -*- coding: utf-8 -*-
# Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This pr... | 4,663 | Python | .py | 104 | 35.932692 | 98 | 0.642653 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,878 | dialogs.py | autokey_autokey/lib/autokey/gtkui/dialogs.py | # -*- coding: utf-8 -*-
# Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This pr... | 25,298 | Python | .py | 552 | 36.672101 | 135 | 0.657235 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,879 | __main__.py | autokey_autokey/lib/autokey/gtkui/__main__.py | import faulthandler
faulthandler.enable()
from autokey.gtkapp import Application
def main():
a = Application()
a.main()
if __name__ == '__main__':
main()
| 171 | Python | .py | 8 | 18.25 | 38 | 0.683544 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,880 | notifier.py | autokey_autokey/lib/autokey/gtkui/notifier.py | # -*- coding: utf-8 -*-
# Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This pr... | 9,943 | Python | .py | 199 | 40.643216 | 134 | 0.69333 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,881 | settingsdialog.py | autokey_autokey/lib/autokey/gtkui/settingsdialog.py | # -*- coding: utf-8 -*-
# Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This pr... | 10,875 | Python | .py | 185 | 48.6 | 120 | 0.712906 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,882 | shared.py | autokey_autokey/lib/autokey/gtkui/shared.py | import os
from gi.repository import Gtk
def get_ui(fileName):
builder = Gtk.Builder()
uiFile = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data/" + fileName)
builder.add_from_file(uiFile)
return builder
| 235 | Python | .py | 7 | 30 | 89 | 0.712389 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,883 | configwindow.py | autokey_autokey/lib/autokey/gtkui/configwindow.py | # -*- coding: utf-8 -*-
# Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This pr... | 68,544 | Python | .py | 1,391 | 38.765636 | 156 | 0.636375 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,884 | waiter.py | autokey_autokey/lib/autokey/iomediator/waiter.py | # Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in t... | 1,813 | Python | .py | 42 | 37.666667 | 150 | 0.68672 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,885 | iomediator.py | autokey_autokey/lib/autokey/iomediator/iomediator.py | # Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in t... | 10,303 | Python | .py | 220 | 35.468182 | 119 | 0.618728 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,886 | keygrabber.py | autokey_autokey/lib/autokey/iomediator/keygrabber.py | # Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in t... | 4,734 | Python | .py | 108 | 35.453704 | 117 | 0.659857 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,887 | windowgrabber.py | autokey_autokey/lib/autokey/iomediator/windowgrabber.py | # -*- coding: utf-8 -*-
# Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This pr... | 1,300 | Python | .py | 30 | 39.866667 | 107 | 0.738889 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,888 | highlevel.py | autokey_autokey/lib/autokey/scripting/highlevel.py | """
Highlevel scripting API, requires xautomation to be installed
"""
import time
import os
import subprocess
import tempfile
import imghdr
import struct
class PatternNotFound(Exception):
"""Exception raised by functions"""
pass
# numeric representation of the mouse buttons. For use in visgrep.
LEFT = 1
"""... | 5,893 | Python | .py | 133 | 39.180451 | 293 | 0.668417 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,889 | clipboard_gtk.py | autokey_autokey/lib/autokey/scripting/clipboard_gtk.py | # Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in t... | 4,250 | Python | .py | 117 | 28.333333 | 82 | 0.632723 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,890 | window.py | autokey_autokey/lib/autokey/scripting/window.py | # Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in t... | 9,001 | Python | .py | 197 | 36.700508 | 104 | 0.628686 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,891 | dialog_qt.py | autokey_autokey/lib/autokey/scripting/dialog_qt.py | # Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in t... | 10,714 | Python | .py | 200 | 44.615 | 144 | 0.650674 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,892 | keyboard.py | autokey_autokey/lib/autokey/scripting/keyboard.py | # Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in t... | 8,237 | Python | .py | 166 | 40.271084 | 124 | 0.640125 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,893 | clipboard_qt.py | autokey_autokey/lib/autokey/scripting/clipboard_qt.py | """
QtClipboard Functions
"""
import threading
from PyQt5.QtGui import QClipboard, QImage
from PyQt5.QtWidgets import QApplication
from pathlib import Path
class QtClipboard:
"""
Read/write access to the X selection and clipboard - QT version
"""
def __init__(self, app):
"""
Initia... | 3,709 | Python | .py | 109 | 25.697248 | 73 | 0.616269 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,894 | __init__.py | autokey_autokey/lib/autokey/scripting/__init__.py | # Copyright (C) 2018 Thomas Hess <thomas.hess@udo.edu>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program ... | 1,337 | Python | .py | 31 | 41.290323 | 70 | 0.800154 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,895 | engine.py | autokey_autokey/lib/autokey/scripting/engine.py | # Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in t... | 27,216 | Python | .py | 548 | 39.574818 | 130 | 0.649471 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,896 | dialog_gtk.py | autokey_autokey/lib/autokey/scripting/dialog_gtk.py | # Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in t... | 9,749 | Python | .py | 195 | 40.794872 | 144 | 0.623248 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,897 | system.py | autokey_autokey/lib/autokey/scripting/system.py | # Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in t... | 2,553 | Python | .py | 57 | 36.315789 | 93 | 0.657683 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,898 | common.py | autokey_autokey/lib/autokey/scripting/common.py | # Copyright (C) 2018 Thomas Hess
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in th... | 3,182 | Python | .py | 66 | 42.151515 | 118 | 0.670653 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |
33,899 | mouse.py | autokey_autokey/lib/autokey/scripting/mouse.py | # Copyright (C) 2011 Chris Dekter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in t... | 8,499 | Python | .py | 172 | 41.354651 | 123 | 0.673452 | autokey/autokey | 3,322 | 186 | 267 | GPL-3.0 | 9/5/2024, 5:14:54 PM (Europe/Amsterdam) |