コード例 #1
0
def Initialize(credentials="persistent", opt_url=None):
    """Initialize the EE library.

  If this hasn't been called by the time any object constructor is used,
  it will be called then.  If this is called a second time with a different
  URL, this doesn't do an un-initialization of e.g.: the previously loaded
  Algorithms, but will overwrite them and let point at alternate servers.

  Args:
    credentials: OAuth2 credentials.  'persistent' (default) means use
        credentials already stored in the filesystem, or raise an explanatory
        exception guiding the user to create those credentials.
    opt_url: The base url for the EarthEngine REST API to connect to.
  """
    if credentials == "persistent":
        credentials = _GetPersistentCredentials()
    data.initialize(credentials, (opt_url + "/api" if opt_url else None), opt_url)
    # Initialize the dynamically loaded functions on the objects that want them.
    ApiFunction.initialize()
    Element.initialize()
    Image.initialize()
    Feature.initialize()
    Collection.initialize()
    ImageCollection.initialize()
    FeatureCollection.initialize()
    Filter.initialize()
    Geometry.initialize()
    List.initialize()
    Number.initialize()
    String.initialize()
    Date.initialize()
    Dictionary.initialize()
    Terrain.initialize()
    _InitializeGeneratedClasses()
    _InitializeUnboundMethods()
コード例 #2
0
ファイル: manage.py プロジェクト: jmwenda/agripay
def create_app():
    app = flask.Flask(__name__, instance_relative_config=True)
    app.config.update(DEFAULT_CONFIG)
    app.config.from_pyfile('settings.py', silent=True)
    data.initialize(app)
    viewer.initialize(app)
    return app
コード例 #3
0
ファイル: __init__.py プロジェクト: Arable/ee-python
def Initialize(credentials=None, opt_url=None):
  """Initialize the EE library.

  If this hasn't been called by the time any object constructor is used,
  it will be called then.  If this is called a second time with a different
  URL, this doesn't do an un-initialization of e.g.: the previously loaded
  Algorithms, but will overwrite them and let point at alternate servers.

  Args:
    credentials: OAuth2 credentials.
    opt_url: The base url for the EarthEngine REST API to connect to.
  """
  data.initialize(credentials, (opt_url + '/api' if opt_url else None), opt_url)
  # Initialize the dynamically loaded functions on the objects that want them.
  ApiFunction.initialize()
  Element.initialize()
  Image.initialize()
  Feature.initialize()
  Collection.initialize()
  ImageCollection.initialize()
  FeatureCollection.initialize()
  Filter.initialize()
  Geometry.initialize()
  List.initialize()
  Number.initialize()
  String.initialize()
  Date.initialize()
  Dictionary.initialize()
  _InitializeGeneratedClasses()
  _InitializeUnboundMethods()
コード例 #4
0
def Initialize(credentials=None, opt_url=None):
    """Initialize the EE library.

  If this hasn't been called by the time any object constructor is used,
  it will be called then.  If this is called a second time with a different
  URL, this doesn't do an un-initialization of e.g.: the previously loaded
  Algorithms, but will overwrite them and let point at alternate servers.

  Args:
    credentials: OAuth2 credentials.
    opt_url: The base url for the EarthEngine REST API to connect to.
  """
    data.initialize(credentials, (opt_url + '/api' if opt_url else None),
                    opt_url)
    # Initialize the dynamically loaded functions on the objects that want them.
    ApiFunction.initialize()
    Element.initialize()
    Image.initialize()
    Feature.initialize()
    Collection.initialize()
    ImageCollection.initialize()
    FeatureCollection.initialize()
    Filter.initialize()
    Geometry.initialize()
    List.initialize()
    Number.initialize()
    String.initialize()
    Date.initialize()
    Dictionary.initialize()
    _InitializeGeneratedClasses()
    _InitializeUnboundMethods()
コード例 #5
0
def create_app():
    app = flask.Flask(__name__, instance_relative_config=True)
    app.config.update(DEFAULT_CONFIG)
    app.config.from_pyfile('settings.py', silent=True)
    data.initialize(app)
    viewer.initialize(app)
    return app
コード例 #6
0
ファイル: game.py プロジェクト: Asbert75/dbwebb-kurser
def loadFiles():
    """
    Check for wether or not the game is saved previously.
    """
    #if not data.saved:
    #    data.initialize()
    #else:
    #    print("Loading Saved Files")
    data.initialize()
コード例 #7
0
def setup():
    data.initialize()
    graph.initialize()

    while not data.is_data_initialized() or not graph.is_grapho_initialized():
        rate.sleep()

    data.set_params('coord_x', data.abs_position_x)
    data.set_params('coord_y', data.abs_position_y)

    move.new_waypoint()
コード例 #8
0
import pygame
import drawings
import data
import methods

pygame.init()
window_w, window_h = data.window_w, data.window_h
game_name = data.game_name
folder_location = data.folder_location

screen = pygame.display.set_mode((window_w, window_h))
background = pygame.Surface((window_w, window_h))

data.initialize()
drawings.draw_all(screen)
pygame.display.flip()

while True:
    # drawings.draw_all(screen)

    for event in pygame.event.get():
        keys = pygame.key.get_pressed()

        if (keys[pygame.K_ESCAPE]):
            pygame.quit()
            exit(0)

        if (keys[pygame.K_w] and keys[pygame.K_a]):
            key_name = "wa"
            if (data.player["body_angle"] != 135):
                data.player["body_angle"] = 135
コード例 #9
0
def main():
	initialize()